mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-08-26 01:38:02 +00:00

* refactor: delete user model * refactor: delete user model crate * refactor: rm flowy-server-sync crate * refactor: rm flowy-database and flowy-folder * refactor: rm folder-model * refactor: rm database model * refactor: rm flowy-sync * refactor: rm document-model * refactor: rm flowy-document * refactor: rm flowy-client-sync * refactor: rm ws-model * refactor: rm flowy-revisoin * refactor: rm revision-model * refactor: rm flowy-folder * refactor: rm flowy-client-ws * refactor: move crates * chore: move configuration file * ci: fix tauri build' * ci: fix flutter build * ci: rust test script * ci: tauri pnpm version conflict * ci: tauri build
17 lines
276 B
Rust
17 lines
276 B
Rust
use flowy_error::ErrorCode;
|
|
|
|
#[derive(Debug)]
|
|
pub struct UserOpenaiKey(pub String);
|
|
|
|
impl UserOpenaiKey {
|
|
pub fn parse(s: String) -> Result<UserOpenaiKey, ErrorCode> {
|
|
Ok(Self(s))
|
|
}
|
|
}
|
|
|
|
impl AsRef<str> for UserOpenaiKey {
|
|
fn as_ref(&self) -> &str {
|
|
&self.0
|
|
}
|
|
}
|