Trait sda_server::stores::AgentsStore
[−]
[src]
pub trait AgentsStore: BaseStore { fn create_agent(&self, agent: &Agent) -> SdaServerResult<()>; fn get_agent(&self, id: &AgentId) -> SdaServerResult<Option<Agent>>; fn upsert_profile(&self, profile: &Profile) -> SdaServerResult<()>; fn get_profile(&self, owner: &AgentId) -> SdaServerResult<Option<Profile>>; fn create_encryption_key(&self,
key: &SignedEncryptionKey)
-> SdaServerResult<()>; fn get_encryption_key(&self,
key: &EncryptionKeyId)
-> SdaServerResult<Option<SignedEncryptionKey>>; fn suggest_committee(&self) -> SdaServerResult<Vec<ClerkCandidate>>; }
Required Methods
fn create_agent(&self, agent: &Agent) -> SdaServerResult<()>
Create an agent
fn get_agent(&self, id: &AgentId) -> SdaServerResult<Option<Agent>>
Retrieve the agent description.
fn upsert_profile(&self, profile: &Profile) -> SdaServerResult<()>
Register the given public profile; updates any existing profile.
fn get_profile(&self, owner: &AgentId) -> SdaServerResult<Option<Profile>>
Retrieve the associated public profile.
fn create_encryption_key(&self,
key: &SignedEncryptionKey)
-> SdaServerResult<()>
key: &SignedEncryptionKey)
-> SdaServerResult<()>
Register new encryption key for agent.
fn get_encryption_key(&self,
key: &EncryptionKeyId)
-> SdaServerResult<Option<SignedEncryptionKey>>
key: &EncryptionKeyId)
-> SdaServerResult<Option<SignedEncryptionKey>>
Retrieve agent encryption key.
fn suggest_committee(&self) -> SdaServerResult<Vec<ClerkCandidate>>
FIXME: very temporary interface. As logic needs to be adapted to each store capabilities, no real need to abstract this in server, but we do need to give more information about what is needed (supported keys, liveliness, number, ...)
Implementors
impl AgentsStore for JfsAgentsStore