Struct sda_client_http::SdaHttpClient
[−]
[src]
pub struct SdaHttpClient<S> { /* fields omitted */ }
Methods
impl<S: TokenStore> SdaHttpClient<S>
[src]
fn new(server_root: &str,
token_store: S)
-> Result<SdaHttpClient<S>, SdaHttpClientError>
token_store: S)
-> Result<SdaHttpClient<S>, SdaHttpClientError>
fn get<U>(&self,
caller: Option<&Agent>,
url: Url)
-> Result<Option<U>, SdaHttpClientError> where U: Deserialize
caller: Option<&Agent>,
url: Url)
-> Result<Option<U>, SdaHttpClientError> where U: Deserialize
fn post<T, U>(&self,
caller: Option<&Agent>,
url: Url,
body: &T)
-> Result<Option<U>, SdaHttpClientError> where T: Serialize, U: Deserialize
caller: Option<&Agent>,
url: Url,
body: &T)
-> Result<Option<U>, SdaHttpClientError> where T: Serialize, U: Deserialize
fn delete<U>(&self,
caller: Option<&Agent>,
url: Url)
-> Result<Option<U>, SdaHttpClientError> where U: Deserialize
caller: Option<&Agent>,
url: Url)
-> Result<Option<U>, SdaHttpClientError> where U: Deserialize
fn url<P: AsRef<str>>(&self, path: P) -> SdaResult<Url>
Trait Implementations
impl<S> SdaService for SdaHttpClient<S> where S: Send + Sync + TokenStore
[src]
impl<S> SdaBaseService for SdaHttpClient<S> where S: Send + Sync + TokenStore
[src]
fn ping(&self) -> SdaResult<Pong>
Send a ping to the service, expecting a pong in return if everything appears to be running.
impl<S> SdaAgentService for SdaHttpClient<S> where S: Send + Sync + TokenStore
[src]
fn create_agent(&self, caller: &Agent, agent: &Agent) -> SdaResult<()>
Create an agent.
fn get_agent(&self, caller: &Agent, owner: &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.
impl<S> SdaAggregationService for SdaHttpClient<S> where S: Send + Sync + TokenStore
[src]
fn list_aggregations(&self,
caller: &Agent,
filter: Option<&str>,
recipient: Option<&AgentId>)
-> SdaResult<Vec<AggregationId>>
caller: &Agent,
filter: Option<&str>,
recipient: Option<&AgentId>)
-> SdaResult<Vec<AggregationId>>
Search for aggregations optionally filtering by title substring and/or recipient. Read more
fn get_aggregation(&self,
caller: &Agent,
aggregation: &AggregationId)
-> SdaResult<Option<Aggregation>>
caller: &Agent,
aggregation: &AggregationId)
-> SdaResult<Option<Aggregation>>
Retrieve an aggregation and its description.
fn get_committee(&self,
caller: &Agent,
owner: &AggregationId)
-> SdaResult<Option<Committee>>
caller: &Agent,
owner: &AggregationId)
-> SdaResult<Option<Committee>>
Retrieve the associated committee.
impl<S> SdaParticipationService for SdaHttpClient<S> where S: Send + Sync + TokenStore
[src]
fn create_participation(&self,
caller: &Agent,
participation: &Participation)
-> SdaResult<()>
caller: &Agent,
participation: &Participation)
-> SdaResult<()>
Provide user input to an aggregation.
impl<S> SdaClerkingService for SdaHttpClient<S> where S: Send + Sync + TokenStore
[src]
fn get_clerking_job(&self,
caller: &Agent,
_clerk: &AgentId)
-> SdaResult<Option<ClerkingJob>>
caller: &Agent,
_clerk: &AgentId)
-> SdaResult<Option<ClerkingJob>>
Pull any job waiting to be performed by the speficied clerk.
fn create_clerking_result(&self,
caller: &Agent,
result: &ClerkingResult)
-> SdaResult<()>
caller: &Agent,
result: &ClerkingResult)
-> SdaResult<()>
Push the result of a finished job.
impl<S> SdaRecipientService for SdaHttpClient<S> where S: Send + Sync + TokenStore
[src]
fn create_aggregation(&self,
caller: &Agent,
aggregation: &Aggregation)
-> SdaResult<()>
caller: &Agent,
aggregation: &Aggregation)
-> SdaResult<()>
Create a new aggregation on the service (without any associated result). If successful, the original id has been replaced by the returned id. Read more
fn suggest_committee(&self,
caller: &Agent,
aggregation: &AggregationId)
-> SdaResult<Vec<ClerkCandidate>>
caller: &Agent,
aggregation: &AggregationId)
-> SdaResult<Vec<ClerkCandidate>>
Propose suitable members for a committee, taking into account the aggregation constraints.
fn create_committee(&self,
caller: &Agent,
committee: &Committee)
-> SdaResult<()>
caller: &Agent,
committee: &Committee)
-> SdaResult<()>
Set the committee for an aggregation.
fn get_aggregation_status(&self,
caller: &Agent,
aggregation: &AggregationId)
-> SdaResult<Option<AggregationStatus>>
caller: &Agent,
aggregation: &AggregationId)
-> SdaResult<Option<AggregationStatus>>
Poll status of an aggregation.
fn create_snapshot(&self, caller: &Agent, snapshot: &Snapshot) -> SdaResult<()>
Create a snapshot for an aggregation.
fn get_snapshot_result(&self,
caller: &Agent,
aggregation: &AggregationId,
snapshot: &SnapshotId)
-> SdaResult<Option<SnapshotResult>>
caller: &Agent,
aggregation: &AggregationId,
snapshot: &SnapshotId)
-> SdaResult<Option<SnapshotResult>>
Retrieve results of an aggregation.
fn delete_aggregation(&self,
caller: &Agent,
aggregation: &AggregationId)
-> SdaResult<()>
caller: &Agent,
aggregation: &AggregationId)
-> SdaResult<()>
Delete all information (including results) regarding an aggregation.