pub struct DaemonApiClient<Stub = Channel<DaemonApiRequest, DaemonApiResponse>>(/* private fields */);Expand description
The client stub that makes RPC calls to the server. All request methods return Futures.
Implementations§
Source§impl DaemonApiClient
impl DaemonApiClient
Sourcepub fn new<T>(
config: Config,
transport: T,
) -> NewClient<Self, RequestDispatch<DaemonApiRequest, DaemonApiResponse, T>>
pub fn new<T>( config: Config, transport: T, ) -> NewClient<Self, RequestDispatch<DaemonApiRequest, DaemonApiResponse, T>>
Returns a new client stub that sends requests over the given transport.
Source§impl<Stub> DaemonApiClient<Stub>
impl<Stub> DaemonApiClient<Stub>
Sourcepub fn version(
&self,
ctx: Context,
) -> impl Future<Output = Result<Result<Version>, RpcError>> + '_
pub fn version( &self, ctx: Context, ) -> impl Future<Output = Result<Result<Version>, RpcError>> + '_
Returns the daemon’s version.
Sourcepub fn aranya_local_addr(
&self,
ctx: Context,
) -> impl Future<Output = Result<Result<SocketAddr>, RpcError>> + '_
pub fn aranya_local_addr( &self, ctx: Context, ) -> impl Future<Output = Result<Result<SocketAddr>, RpcError>> + '_
Gets local address the Aranya sync server is bound to.
Sourcepub fn get_key_bundle(
&self,
ctx: Context,
) -> impl Future<Output = Result<Result<KeyBundle>, RpcError>> + '_
pub fn get_key_bundle( &self, ctx: Context, ) -> impl Future<Output = Result<Result<KeyBundle>, RpcError>> + '_
Gets the public key bundle for this device
Sourcepub fn get_device_id(
&self,
ctx: Context,
) -> impl Future<Output = Result<Result<DeviceId>, RpcError>> + '_
pub fn get_device_id( &self, ctx: Context, ) -> impl Future<Output = Result<Result<DeviceId>, RpcError>> + '_
Gets the public device id.
Sourcepub fn add_sync_peer(
&self,
ctx: Context,
addr: Addr,
team: TeamId,
config: SyncPeerConfig,
) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn add_sync_peer( &self, ctx: Context, addr: Addr, team: TeamId, config: SyncPeerConfig, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
Adds the peer for automatic periodic syncing.
Sourcepub fn sync_now(
&self,
ctx: Context,
addr: Addr,
team: TeamId,
cfg: Option<SyncPeerConfig>,
) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn sync_now( &self, ctx: Context, addr: Addr, team: TeamId, cfg: Option<SyncPeerConfig>, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
Sync with peer immediately.
Sourcepub fn remove_sync_peer(
&self,
ctx: Context,
addr: Addr,
team: TeamId,
) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn remove_sync_peer( &self, ctx: Context, addr: Addr, team: TeamId, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
Removes the peer from automatic syncing.
Sourcepub fn add_team(
&self,
ctx: Context,
cfg: AddTeamConfig,
) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn add_team( &self, ctx: Context, cfg: AddTeamConfig, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
add a team to the local device store that was created by someone else. Not an aranya action/command.
Sourcepub fn remove_team(
&self,
ctx: Context,
team: TeamId,
) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn remove_team( &self, ctx: Context, team: TeamId, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
Remove a team from local device storage.
Sourcepub fn create_team(
&self,
ctx: Context,
cfg: CreateTeamConfig,
) -> impl Future<Output = Result<Result<TeamId>, RpcError>> + '_
pub fn create_team( &self, ctx: Context, cfg: CreateTeamConfig, ) -> impl Future<Output = Result<Result<TeamId>, RpcError>> + '_
Create a new graph/team with the current device as the owner.
Sourcepub fn close_team(
&self,
ctx: Context,
team: TeamId,
) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn close_team( &self, ctx: Context, team: TeamId, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
Close the team.
pub fn encrypt_psk_seed_for_peer( &self, ctx: Context, team: TeamId, peer_enc_pk: EncryptionPublicKey<CS>, ) -> impl Future<Output = Result<Result<WrappedSeed>, RpcError>> + '_
Sourcepub fn add_device_to_team(
&self,
ctx: Context,
team: TeamId,
keys: KeyBundle,
) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn add_device_to_team( &self, ctx: Context, team: TeamId, keys: KeyBundle, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
Add device to the team.
Sourcepub fn remove_device_from_team(
&self,
ctx: Context,
team: TeamId,
device: DeviceId,
) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn remove_device_from_team( &self, ctx: Context, team: TeamId, device: DeviceId, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
Remove device from the team.
Sourcepub fn assign_role(
&self,
ctx: Context,
team: TeamId,
device: DeviceId,
role: Role,
) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn assign_role( &self, ctx: Context, team: TeamId, device: DeviceId, role: Role, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
Assign a role to a device.
Sourcepub fn revoke_role(
&self,
ctx: Context,
team: TeamId,
device: DeviceId,
role: Role,
) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn revoke_role( &self, ctx: Context, team: TeamId, device: DeviceId, role: Role, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
Revoke a role from a device.
pub fn create_label( &self, ctx: Context, team: TeamId, name: Text, ) -> impl Future<Output = Result<Result<LabelId>, RpcError>> + '_
pub fn delete_label( &self, ctx: Context, team: TeamId, label_id: LabelId, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn assign_label( &self, ctx: Context, team: TeamId, device: DeviceId, label_id: LabelId, op: ChanOp, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
pub fn revoke_label( &self, ctx: Context, team: TeamId, device: DeviceId, label_id: LabelId, ) -> impl Future<Output = Result<Result<()>, RpcError>> + '_
Sourcepub fn query_devices_on_team(
&self,
ctx: Context,
team: TeamId,
) -> impl Future<Output = Result<Result<Vec<DeviceId>>, RpcError>> + '_
pub fn query_devices_on_team( &self, ctx: Context, team: TeamId, ) -> impl Future<Output = Result<Result<Vec<DeviceId>>, RpcError>> + '_
Query devices on team.
Sourcepub fn query_device_role(
&self,
ctx: Context,
team: TeamId,
device: DeviceId,
) -> impl Future<Output = Result<Result<Role>, RpcError>> + '_
pub fn query_device_role( &self, ctx: Context, team: TeamId, device: DeviceId, ) -> impl Future<Output = Result<Result<Role>, RpcError>> + '_
Query device role.
Sourcepub fn query_device_keybundle(
&self,
ctx: Context,
team: TeamId,
device: DeviceId,
) -> impl Future<Output = Result<Result<KeyBundle>, RpcError>> + '_
pub fn query_device_keybundle( &self, ctx: Context, team: TeamId, device: DeviceId, ) -> impl Future<Output = Result<Result<KeyBundle>, RpcError>> + '_
Query device keybundle.
Sourcepub fn query_device_label_assignments(
&self,
ctx: Context,
team: TeamId,
device: DeviceId,
) -> impl Future<Output = Result<Result<Vec<Label>>, RpcError>> + '_
pub fn query_device_label_assignments( &self, ctx: Context, team: TeamId, device: DeviceId, ) -> impl Future<Output = Result<Result<Vec<Label>>, RpcError>> + '_
Query device label assignments.
pub fn query_labels( &self, ctx: Context, team: TeamId, ) -> impl Future<Output = Result<Result<Vec<Label>>, RpcError>> + '_
Trait Implementations§
Source§impl<Stub: Clone> Clone for DaemonApiClient<Stub>
impl<Stub: Clone> Clone for DaemonApiClient<Stub>
Source§fn clone(&self) -> DaemonApiClient<Stub>
fn clone(&self) -> DaemonApiClient<Stub>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more