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

Create an agent

Retrieve the agent description.

Register the given public profile; updates any existing profile.

Retrieve the associated public profile.

Register new encryption key for agent.

Retrieve agent encryption key.

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