Skip to main content

WingsClient

Struct WingsClient 

Source
pub struct WingsClient { /* private fields */ }

Implementations§

Source§

impl WingsClient

Source

pub fn new(base_url: String, token: String) -> Self

Source

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.

Source

pub fn ignoring_destination( self, destination_ignored: Vec<CompactString>, ) -> Self

WingsClient::ignoring for the destination server of a cross-server transfer.

Source

pub fn request_raw( &self, method: Method, endpoint: impl AsRef<str>, ) -> RequestBuilder

Source

pub async fn open_websocket( &self, endpoint: impl AsRef<str>, headers: HeaderMap, ) -> Result<WebSocketStream<MaybeTlsStream<TcpStream>>, ApiHttpError>

Source

pub async fn delete_backups_backup( &self, backup: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_backups_backup_export( &self, backup: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn get_backups_backup_query( &self, backup: Uuid, query: &Query, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_deauthorize_user( &self, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_permissions_invalidate( &self, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn get_ports_used( &self, query: &Query, ) -> Result<Response, ApiHttpError>

Source

pub async fn get_servers(&self) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers( &self, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_power( &self, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn get_servers_utilization(&self) -> Result<Response, ApiHttpError>

Source

pub async fn get_servers_server( &self, server: Uuid, ) -> Result<Response, ApiHttpError>

Source

pub async fn delete_servers_server( &self, server: Uuid, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_backup( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn delete_servers_server_backup_backup( &self, server: Uuid, backup: Uuid, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_backup_backup_restore( &self, server: Uuid, backup: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_commands( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_database_backup( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_database_backup_backup_restore( &self, server: Uuid, backup: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_files_chmod( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_files_compress( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn get_servers_server_files_contents( &self, server: Uuid, query: &Query, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_files_copy( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_files_copy_many( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_files_copy_remote( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_files_copy_remote_with( &self, server: Uuid, data: &RequestBody, extra: &Extra, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_files_create_directory( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_files_decompress( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_files_delete( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn get_servers_server_files_directory_sizes( &self, server: Uuid, query: &Query, ) -> Result<Response, ApiHttpError>

Source

pub async fn get_servers_server_files_fingerprints( &self, server: Uuid, query: &Query, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_files_ignore_matches( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn get_servers_server_files_largest_directories( &self, server: Uuid, query: &Query, ) -> Result<Response, ApiHttpError>

Source

pub async fn get_servers_server_files_lines( &self, server: Uuid, query: &Query, ) -> Result<Response, ApiHttpError>

Source

pub async fn get_servers_server_files_list( &self, server: Uuid, query: &Query, ) -> Result<Response, ApiHttpError>

Source

pub async fn get_servers_server_files_list_directory( &self, server: Uuid, query: &Query, ) -> Result<Response, ApiHttpError>

Source

pub async fn get_servers_server_files_operations( &self, server: Uuid, ) -> Result<Response, ApiHttpError>

Source

pub async fn delete_servers_server_files_operations_operation( &self, server: Uuid, operation: Uuid, ) -> Result<Response, ApiHttpError>

Source

pub async fn get_servers_server_files_pull( &self, server: Uuid, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_files_pull( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_files_pull_query( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn delete_servers_server_files_pull_pull( &self, server: Uuid, pull: Uuid, ) -> Result<Response, ApiHttpError>

Source

pub async fn put_servers_server_files_rename( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn put_servers_server_files_rename_with( &self, server: Uuid, data: &RequestBody, extra: &Extra, ) -> Result<Response, ApiHttpError>

Source

pub async fn get_servers_server_files_revisions( &self, server: Uuid, query: &Query, ) -> Result<Response, ApiHttpError>

Source

pub async fn get_servers_server_files_revisions_revision( &self, server: Uuid, revision: i64, query: &Query, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_files_search_with( &self, server: Uuid, data: &RequestBody, extra: &Extra, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_files_sqlite_query( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_files_stat( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn get_servers_server_files_trash( &self, server: Uuid, query: &Query, ) -> Result<Response, ApiHttpError>

Source

pub async fn delete_servers_server_files_trash( &self, server: Uuid, query: &Query, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_files_trash( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_files_trash_purge( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_files_trash_restore( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_files_write( &self, server: Uuid, data: RequestBody, query: &Query, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_install_abort( &self, server: Uuid, ) -> Result<Response, ApiHttpError>

Source

pub async fn get_servers_server_logs( &self, server: Uuid, query: &Query, ) -> Result<Response, ApiHttpError>

Source

pub async fn get_servers_server_logs_install( &self, server: Uuid, query: &Query, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_power( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_reinstall( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_reinstall_with( &self, server: Uuid, data: &RequestBody, extra: &Extra, ) -> Result<Response, ApiHttpError>

Source

pub async fn get_servers_server_schedules_schedule( &self, server: Uuid, schedule: Uuid, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_schedules_schedule_abort( &self, server: Uuid, schedule: Uuid, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_schedules_schedule_trigger( &self, server: Uuid, schedule: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_script( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_sync( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn delete_servers_server_transfer( &self, server: Uuid, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_transfer( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn get_servers_server_utilization( &self, server: Uuid, ) -> Result<Response, ApiHttpError>

Source

pub async fn get_servers_server_version( &self, server: Uuid, query: &Query, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_ws_broadcast( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_ws_deny( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_servers_server_ws_permissions( &self, server: Uuid, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn get_system(&self) -> Result<Response, ApiHttpError>

Source

pub async fn post_system_backups_test( &self, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn get_system_config(&self) -> Result<Response, ApiHttpError>

Source

pub async fn get_system_ips(&self) -> Result<Response, ApiHttpError>

Source

pub async fn get_system_logs(&self) -> Result<Response, ApiHttpError>

Source

pub async fn get_system_logs_file( &self, file: &str, query: &Query, ) -> Result<Response, ApiHttpError>

Source

pub async fn get_system_overview(&self) -> Result<Response, ApiHttpError>

Source

pub async fn get_system_restic_prune(&self) -> Result<Response, ApiHttpError>

Source

pub async fn post_system_restic_prune( &self, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn get_system_restic_stats(&self) -> Result<Response, ApiHttpError>

Source

pub async fn post_system_restic_stats( &self, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn get_system_restic_unlock(&self) -> Result<Response, ApiHttpError>

Source

pub async fn post_system_restic_unlock( &self, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn get_system_stats(&self) -> Result<Response, ApiHttpError>

Source

pub async fn post_system_upgrade( &self, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn get_transfers(&self) -> Result<Response, ApiHttpError>

Source

pub async fn post_transfers(&self) -> Result<Response, ApiHttpError>

Source

pub async fn get_transfers_capabilities(&self) -> Result<Response, ApiHttpError>

Source

pub async fn post_transfers_files(&self) -> Result<Response, ApiHttpError>

Source

pub async fn post_transfers_files_stat( &self, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source

pub async fn get_transfers_query(&self) -> Result<Response, ApiHttpError>

Source

pub async fn delete_transfers_server( &self, server: Uuid, ) -> Result<Response, ApiHttpError>

Source

pub async fn post_update( &self, data: &RequestBody, ) -> Result<Response, ApiHttpError>

Source§

impl WingsClient

Source

pub async fn get_tundra(&self) -> Result<TundraStatus, ApiHttpError>

Source

pub async fn post_tundra_sync(&self) -> Result<(), ApiHttpError>

Latency reduction only - the node polls the panel on its own schedule regardless.

Source

pub async fn post_tundra_rotate(&self) -> Result<(), ApiHttpError>

Rotates the token the node’s daemon authenticates with and drops its websocket.

Source

pub async fn get_tundra_metrics(&self) -> Result<TundraMetrics, ApiHttpError>

Source§

impl WingsClient

Source

pub async fn open_tunnel_tcp( &self, server: Uuid, port: u16, ) -> Result<QueryStreamTunnel, ApiHttpError>

Source

pub async fn open_tunnel_udp( &self, server: Uuid, port: u16, ) -> Result<QueryUdpTunnel, ApiHttpError>

Source

pub async fn open_tunnel_unix( &self, server: Uuid, path: &str, ignored: &[CompactString], ) -> Result<QueryStreamTunnel, ApiHttpError>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more