pub struct WingsClient { /* private fields */ }Implementations§
Source§impl WingsClient
impl WingsClient
pub fn new(base_url: String, token: String) -> Self
Sourcepub fn ignoring(self, ignored: Vec<CompactString>) -> Self
pub fn ignoring(self, ignored: Vec<CompactString>) -> Self
Paths the node has to treat as invisible for every request made through this client, mirroring the ignore rules of the subuser the request is made on behalf of. Empty by default, which is what an unrestricted caller wants.
Sourcepub fn ignoring_destination(
self,
destination_ignored: Vec<CompactString>,
) -> Self
pub fn ignoring_destination( self, destination_ignored: Vec<CompactString>, ) -> Self
WingsClient::ignoring for the destination server of a cross-server transfer.
pub fn request_raw( &self, method: Method, endpoint: impl AsRef<str>, ) -> RequestBuilder
pub async fn open_websocket( &self, endpoint: impl AsRef<str>, headers: HeaderMap, ) -> Result<WebSocketStream<MaybeTlsStream<TcpStream>>, ApiHttpError>
pub async fn delete_backups_backup( &self, backup: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn post_backups_backup_export( &self, backup: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn get_backups_backup_query( &self, backup: Uuid, query: &Query, ) -> Result<Response, ApiHttpError>
pub async fn post_permissions_invalidate( &self, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn get_ports_used( &self, query: &Query, ) -> Result<Response, ApiHttpError>
pub async fn get_servers(&self) -> Result<Response, ApiHttpError>
pub async fn post_servers( &self, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_power( &self, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn get_servers_utilization(&self) -> Result<Response, ApiHttpError>
pub async fn get_servers_server( &self, server: Uuid, ) -> Result<Response, ApiHttpError>
pub async fn delete_servers_server( &self, server: Uuid, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_backup( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn delete_servers_server_backup_backup( &self, server: Uuid, backup: Uuid, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_backup_backup_restore( &self, server: Uuid, backup: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_commands( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_database_backup( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_database_backup_backup_restore( &self, server: Uuid, backup: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_files_chmod( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_files_compress( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn get_servers_server_files_contents( &self, server: Uuid, query: &Query, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_files_copy( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_files_copy_many( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_files_copy_remote( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_files_copy_remote_with( &self, server: Uuid, data: &RequestBody, extra: &Extra, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_files_create_directory( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_files_create_symlink( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_files_decompress( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_files_delete( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn get_servers_server_files_directory_sizes( &self, server: Uuid, query: &Query, ) -> Result<Response, ApiHttpError>
pub async fn get_servers_server_files_fingerprints( &self, server: Uuid, query: &Query, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_files_ignore_matches( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn get_servers_server_files_largest_directories( &self, server: Uuid, query: &Query, ) -> Result<Response, ApiHttpError>
pub async fn get_servers_server_files_lines( &self, server: Uuid, query: &Query, ) -> Result<Response, ApiHttpError>
pub async fn get_servers_server_files_list( &self, server: Uuid, query: &Query, ) -> Result<Response, ApiHttpError>
pub async fn get_servers_server_files_list_directory( &self, server: Uuid, query: &Query, ) -> Result<Response, ApiHttpError>
pub async fn get_servers_server_files_operations( &self, server: Uuid, ) -> Result<Response, ApiHttpError>
pub async fn delete_servers_server_files_operations_operation( &self, server: Uuid, operation: Uuid, ) -> Result<Response, ApiHttpError>
pub async fn get_servers_server_files_pull( &self, server: Uuid, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_files_pull( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_files_pull_query( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn delete_servers_server_files_pull_pull( &self, server: Uuid, pull: Uuid, ) -> Result<Response, ApiHttpError>
pub async fn put_servers_server_files_rename( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn put_servers_server_files_rename_with( &self, server: Uuid, data: &RequestBody, extra: &Extra, ) -> Result<Response, ApiHttpError>
pub async fn get_servers_server_files_revisions( &self, server: Uuid, query: &Query, ) -> Result<Response, ApiHttpError>
pub async fn get_servers_server_files_revisions_revision( &self, server: Uuid, revision: i64, query: &Query, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_files_search( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_files_search_with( &self, server: Uuid, data: &RequestBody, extra: &Extra, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_files_sqlite_query( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_files_stat( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn get_servers_server_files_trash( &self, server: Uuid, query: &Query, ) -> Result<Response, ApiHttpError>
pub async fn delete_servers_server_files_trash( &self, server: Uuid, query: &Query, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_files_trash( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_files_trash_purge( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_files_trash_restore( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_files_write( &self, server: Uuid, data: RequestBody, query: &Query, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_install_abort( &self, server: Uuid, ) -> Result<Response, ApiHttpError>
pub async fn get_servers_server_logs( &self, server: Uuid, query: &Query, ) -> Result<Response, ApiHttpError>
pub async fn get_servers_server_logs_install( &self, server: Uuid, query: &Query, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_power( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_reinstall( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_reinstall_with( &self, server: Uuid, data: &RequestBody, extra: &Extra, ) -> Result<Response, ApiHttpError>
pub async fn get_servers_server_schedules_schedule( &self, server: Uuid, schedule: Uuid, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_schedules_schedule_abort( &self, server: Uuid, schedule: Uuid, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_schedules_schedule_trigger( &self, server: Uuid, schedule: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_script( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_sync( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn delete_servers_server_transfer( &self, server: Uuid, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_transfer( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn get_servers_server_utilization( &self, server: Uuid, ) -> Result<Response, ApiHttpError>
pub async fn get_servers_server_version( &self, server: Uuid, query: &Query, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_ws_broadcast( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_ws_deny( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn post_servers_server_ws_permissions( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn get_system(&self) -> Result<Response, ApiHttpError>
pub async fn post_system_backups_test( &self, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn get_system_config(&self) -> Result<Response, ApiHttpError>
pub async fn get_system_ips(&self) -> Result<Response, ApiHttpError>
pub async fn get_system_logs(&self) -> Result<Response, ApiHttpError>
pub async fn get_system_logs_file( &self, file: &str, query: &Query, ) -> Result<Response, ApiHttpError>
pub async fn get_system_overview(&self) -> Result<Response, ApiHttpError>
pub async fn get_system_restic_prune(&self) -> Result<Response, ApiHttpError>
pub async fn post_system_restic_prune( &self, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn get_system_restic_stats(&self) -> Result<Response, ApiHttpError>
pub async fn post_system_restic_stats( &self, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn get_system_restic_unlock(&self) -> Result<Response, ApiHttpError>
pub async fn post_system_restic_unlock( &self, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn get_system_stats(&self) -> Result<Response, ApiHttpError>
pub async fn post_system_upgrade( &self, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn get_transfers(&self) -> Result<Response, ApiHttpError>
pub async fn post_transfers(&self) -> Result<Response, ApiHttpError>
pub async fn get_transfers_capabilities(&self) -> Result<Response, ApiHttpError>
pub async fn post_transfers_files(&self) -> Result<Response, ApiHttpError>
pub async fn post_transfers_files_stat( &self, data: &RequestBody, ) -> Result<Response, ApiHttpError>
pub async fn get_transfers_query(&self) -> Result<Response, ApiHttpError>
pub async fn delete_transfers_server( &self, server: Uuid, ) -> Result<Response, ApiHttpError>
pub async fn post_update( &self, data: &RequestBody, ) -> Result<Response, ApiHttpError>
Source§impl WingsClient
impl WingsClient
pub async fn get_tundra(&self) -> Result<TundraStatus, ApiHttpError>
Sourcepub async fn post_tundra_sync(&self) -> Result<(), ApiHttpError>
pub async fn post_tundra_sync(&self) -> Result<(), ApiHttpError>
Latency reduction only - the node polls the panel on its own schedule regardless.
Sourcepub async fn post_tundra_rotate(&self) -> Result<(), ApiHttpError>
pub async fn post_tundra_rotate(&self) -> Result<(), ApiHttpError>
Rotates the token the node’s daemon authenticates with and drops its websocket.
pub async fn get_tundra_metrics(&self) -> Result<TundraMetrics, ApiHttpError>
Source§impl WingsClient
impl WingsClient
pub async fn open_tunnel_tcp( &self, server: Uuid, port: u16, ) -> Result<QueryStreamTunnel, ApiHttpError>
pub async fn open_tunnel_udp( &self, server: Uuid, port: u16, ) -> Result<QueryUdpTunnel, ApiHttpError>
pub async fn open_tunnel_unix( &self, server: Uuid, path: &str, ignored: &[CompactString], ) -> Result<QueryStreamTunnel, ApiHttpError>
Auto Trait Implementations§
impl Freeze for WingsClient
impl RefUnwindSafe for WingsClient
impl Send for WingsClient
impl Sync for WingsClient
impl Unpin for WingsClient
impl UnsafeUnpin for WingsClient
impl UnwindSafe for WingsClient
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more