pub struct Client { /* private fields */ }Implementations§
Source§impl Client
impl Client
pub fn new(agent: Arc<Agent>, cluster: Principal) -> Client
Sourcepub async fn admin_set_managers(
&self,
args: BTreeSet<Principal>,
) -> Result<(), String>
pub async fn admin_set_managers( &self, args: BTreeSet<Principal>, ) -> Result<(), String>
the caller of agent should be canister controller
Sourcepub async fn admin_sign_access_token(
&self,
args: Token,
) -> Result<ByteBuf, String>
pub async fn admin_sign_access_token( &self, args: Token, ) -> Result<ByteBuf, String>
the caller of agent should be canister manager
pub async fn admin_ed25519_access_token( &self, args: Token, ) -> Result<ByteBuf, String>
pub async fn admin_weak_access_token( &self, args: Token, now_sec: u64, expiration_sec: u64, ) -> Result<ByteBuf, String>
Sourcepub async fn admin_attach_policies(&self, args: Token) -> Result<(), String>
pub async fn admin_attach_policies(&self, args: Token) -> Result<(), String>
the caller of agent should be canister manager
Sourcepub async fn admin_detach_policies(&self, args: Token) -> Result<(), String>
pub async fn admin_detach_policies(&self, args: Token) -> Result<(), String>
the caller of agent should be canister manager
pub async fn access_token(&self, audience: Principal) -> Result<ByteBuf, String>
pub async fn ed25519_access_token( &self, audience: Principal, ) -> Result<ByteBuf, String>
pub async fn get_cluster_info(&self) -> Result<ClusterInfo, String>
pub async fn get_bucket_wasm( &self, hash: ByteArray<32>, ) -> Result<WasmInfo, String>
pub async fn get_buckets(&self) -> Result<Vec<Principal>, String>
pub async fn get_deployed_buckets( &self, ) -> Result<Vec<BucketDeploymentInfo>, String>
pub async fn bucket_deployment_logs( &self, prev: Option<Nat>, take: Option<Nat>, ) -> Result<Vec<BucketDeploymentInfo>, String>
pub async fn get_subject_policies( &self, subject: Principal, ) -> Result<BTreeMap<Principal, String>, String>
pub async fn get_subject_policies_for( &self, subject: Principal, audience: Principal, ) -> Result<String, String>
pub async fn admin_add_wasm( &self, args: AddWasmInput, force_prev_hash: Option<ByteArray<32>>, ) -> Result<(), String>
pub async fn admin_deploy_bucket( &self, args: DeployWasmInput, ignore_prev_hash: Option<ByteArray<32>>, ) -> Result<(), String>
pub async fn admin_upgrade_all_buckets( &self, args: Option<ByteBuf>, ) -> Result<(), String>
pub async fn admin_batch_call_buckets( &self, buckets: BTreeSet<Principal>, method: String, args: Option<ByteBuf>, ) -> Result<Vec<ByteBuf>, String>
pub async fn admin_topup_all_buckets(&self) -> Result<u128, String>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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