Trait sda_protocol::SdaAgentService
[−]
[src]
pub trait SdaAgentService: SdaBaseService { fn create_agent(&self, caller: &Agent, agent: &Agent) -> SdaResult<()>; fn get_agent(&self,
caller: &Agent,
agent: &AgentId)
-> SdaResult<Option<Agent>>; fn upsert_profile(&self, caller: &Agent, profile: &Profile) -> SdaResult<()>; fn get_profile(&self,
caller: &Agent,
owner: &AgentId)
-> SdaResult<Option<Profile>>; fn create_encryption_key(&self,
caller: &Agent,
key: &SignedEncryptionKey)
-> SdaResult<()>; fn get_encryption_key(&self,
caller: &Agent,
key: &EncryptionKeyId)
-> SdaResult<Option<SignedEncryptionKey>>; }
Methods used mainly for discovering and maintaining agents and their identities.
Required Methods
fn create_agent(&self, caller: &Agent, agent: &Agent) -> SdaResult<()>
Create an agent.
fn get_agent(&self, caller: &Agent, agent: &AgentId) -> SdaResult<Option<Agent>>
Retrieve the agent description.
fn upsert_profile(&self, caller: &Agent, profile: &Profile) -> SdaResult<()>
Register the given public profile; updates any existing profile.
fn get_profile(&self,
caller: &Agent,
owner: &AgentId)
-> SdaResult<Option<Profile>>
caller: &Agent,
owner: &AgentId)
-> SdaResult<Option<Profile>>
Retrieve the associated public profile.
fn create_encryption_key(&self,
caller: &Agent,
key: &SignedEncryptionKey)
-> SdaResult<()>
caller: &Agent,
key: &SignedEncryptionKey)
-> SdaResult<()>
Register new encryption key for agent.
fn get_encryption_key(&self,
caller: &Agent,
key: &EncryptionKeyId)
-> SdaResult<Option<SignedEncryptionKey>>
caller: &Agent,
key: &EncryptionKeyId)
-> SdaResult<Option<SignedEncryptionKey>>
Retrieve agent encryption key.