pub struct Dracoon<State = Disconnected> { /* private fields */ }Expand description
DRACOON struct - implements all API calls via traits
Implementations§
Source§impl Dracoon<Disconnected>
impl Dracoon<Disconnected>
pub fn builder() -> DracoonBuilder
pub async fn connect( self, oauth_flow: OAuth2Flow, ) -> Result<Dracoon<Connected>, DracoonClientError>
Source§impl Dracoon<Connected>
impl Dracoon<Connected>
pub async fn get_auth_header(&self) -> Result<String, DracoonClientError>
pub fn get_base_url(&self) -> &Url
pub async fn get_refresh_token(&self) -> String
pub async fn get_user_info(&self) -> Result<UserAccount, DracoonClientError>
pub async fn get_system_info(&self) -> Result<SystemInfo, DracoonClientError>
pub async fn get_keypair( &self, secret: Option<String>, ) -> Result<PlainUserKeyPairContainer, DracoonClientError>
Source§impl Dracoon<Provisioning>
impl Dracoon<Provisioning>
Sourcepub fn get_service_token(&self) -> String
pub fn get_service_token(&self) -> String
Returns the service token for provisioning
Sourcepub fn provisioning(&self) -> &ProvisioningEndpoint<Provisioning>
pub fn provisioning(&self) -> &ProvisioningEndpoint<Provisioning>
Returns endpoint for all provisioning routes /api/v4/provisioning
Source§impl<S: ConnectedClient> Dracoon<S>
impl<S: ConnectedClient> Dracoon<S>
pub fn build_api_url(&self, url_part: &str) -> Url
Source§impl Dracoon<Connected>
impl Dracoon<Connected>
Sourcepub fn config(&self) -> &ConfigEndpoint<Connected>
pub fn config(&self) -> &ConfigEndpoint<Connected>
Returns endpoint for all config routes /api/v4/config
Sourcepub fn eventlog(&self) -> &EventlogEndpoint<Connected>
pub fn eventlog(&self) -> &EventlogEndpoint<Connected>
Returns endpoint for all eventlog routes /api/v4/eventlog
Sourcepub fn groups(&self) -> &GroupsEndpoint<Connected>
pub fn groups(&self) -> &GroupsEndpoint<Connected>
Returns endpoint for all groups routes /api/v4/groups
Sourcepub fn nodes(&self) -> &NodesEndpoint<Connected>
pub fn nodes(&self) -> &NodesEndpoint<Connected>
Returns endpoint for all nodes routes /api/v4/nodes
Sourcepub fn roles(&self) -> &RolesEndpoint<Connected>
pub fn roles(&self) -> &RolesEndpoint<Connected>
Returns endpoint for all roles routes /api/v4/roles
Sourcepub fn settings(&self) -> &SettingsEndpoint<Connected>
pub fn settings(&self) -> &SettingsEndpoint<Connected>
Returns endpoint for all settings routes /api/v4/settings
Returns endpoint for all shares routes /api/v4/shares
Sourcepub fn system(&self) -> &SystemEndpoint<Connected>
pub fn system(&self) -> &SystemEndpoint<Connected>
Returns endpoint for all system routes /api/v4/system
Sourcepub fn user(&self) -> &UserEndpoint<Connected>
pub fn user(&self) -> &UserEndpoint<Connected>
Returns endpoint for all user routes /api/v4/user
Sourcepub fn users(&self) -> &UsersEndpoint<Connected>
pub fn users(&self) -> &UsersEndpoint<Connected>
Returns endpoint for all users routes /api/v4/users
Trait Implementations§
Source§impl Download for Dracoon<Connected>
impl Download for Dracoon<Connected>
Source§fn download<'w, 'life0, 'async_trait>(
&'w self,
node: &'life0 Node,
writer: &'w mut (dyn AsyncWrite + Send + Unpin),
callback: Option<DownloadProgressCallback>,
chunksize: Option<usize>,
) -> Pin<Box<dyn Future<Output = Result<(), DracoonClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'w: 'async_trait,
'life0: 'async_trait,
fn download<'w, 'life0, 'async_trait>(
&'w self,
node: &'life0 Node,
writer: &'w mut (dyn AsyncWrite + Send + Unpin),
callback: Option<DownloadProgressCallback>,
chunksize: Option<usize>,
) -> Pin<Box<dyn Future<Output = Result<(), DracoonClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'w: 'async_trait,
'life0: 'async_trait,
Downloads a file (node) to the given writer buffer
Example Read more
Source§impl MissingFileKeys for Dracoon<Connected>
impl MissingFileKeys for Dracoon<Connected>
Source§fn distribute_missing_keys<'life0, 'async_trait>(
&'life0 self,
room_id: Option<u64>,
file_id: Option<u64>,
user_id: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<u64, DracoonClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn distribute_missing_keys<'life0, 'async_trait>(
&'life0 self,
room_id: Option<u64>,
file_id: Option<u64>,
user_id: Option<u64>,
) -> Pin<Box<dyn Future<Output = Result<u64, DracoonClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Distributes missing file keys using the user keypair.
Returns the total amount missing keys.
If the total amount is larger than 100, more keys need distribution
and the method should be called again. Read more
Source§impl<R: AsyncRead + Sync + Send + Unpin + 'static> Upload<R> for Dracoon<Connected>
impl<R: AsyncRead + Sync + Send + Unpin + 'static> Upload<R> for Dracoon<Connected>
Source§fn upload<'r, 'life0, 'async_trait>(
&'r self,
parent_node: &'life0 Node,
upload_options: UploadOptions,
reader: BufReader<R>,
callback: Option<UploadProgressCallback>,
chunk_size: Option<usize>,
) -> Pin<Box<dyn Future<Output = Result<Node, DracoonClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'r: 'async_trait,
'life0: 'async_trait,
fn upload<'r, 'life0, 'async_trait>(
&'r self,
parent_node: &'life0 Node,
upload_options: UploadOptions,
reader: BufReader<R>,
callback: Option<UploadProgressCallback>,
chunk_size: Option<usize>,
) -> Pin<Box<dyn Future<Output = Result<Node, DracoonClientError>> + Send + 'async_trait>>where
Self: 'async_trait,
'r: 'async_trait,
'life0: 'async_trait,
Uploads a stream (buffered reader) with given file meta info to the given parent node Read more
Auto Trait Implementations§
impl<State> Freeze for Dracoon<State>
impl<State = Disconnected> !RefUnwindSafe for Dracoon<State>
impl<State> Send for Dracoon<State>
impl<State> Sync for Dracoon<State>
impl<State> Unpin for Dracoon<State>where
State: Unpin,
impl<State> UnsafeUnpin for Dracoon<State>
impl<State = Disconnected> !UnwindSafe for Dracoon<State>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more