[][src]Struct transistor::docker::DockerClient

pub struct DockerClient { /* fields omitted */ }

DockerClient has the reqwest::blocking::Client, the uri to query and the HeaderMap with all the possible headers. Default header is Content-Type: "application/edn". Synchronous request.

Implementations

impl DockerClient[src]

pub fn state(&self) -> Result<StateResponse, CruxError>[src]

Function state queries endpoint / with a GET. Returned information consists of various details about the state of the database and it can be used as a health check.

pub fn tx_log(&self, actions: Vec<Action>) -> Result<TxLogResponse, CruxError>[src]

Function tx_log requests endpoint /tx-log via POST which allow you to send actions Action to CruxDB. The "write" endpoint, to post transactions.

pub fn tx_logs(&self) -> Result<TxLogsResponse, CruxError>[src]

Function tx_logs requests endpoint /tx-log via GET and returns a list of all transactions

pub fn entity(&self, id: String) -> Result<Edn, CruxError>[src]

Function entity requests endpoint /entity via POST which retrieves the last document in CruxDB. Field with CruxId is required. Response is a reqwest::Result<edn_rs::Edn> with the last Entity with that ID.

pub fn entity_tx(&self, id: String) -> Result<EntityTxResponse, CruxError>[src]

Function entity_tx requests endpoint /entity-tx via POST which retrieves the docs and tx infos for the last document for that ID saved in CruxDB.

pub fn entity_history(
    &self,
    hash: String,
    order: Order,
    with_docs: bool
) -> Result<EntityHistoryResponse, CruxError>
[src]

pub fn query(&self, query: Query) -> Result<BTreeSet<Vec<String>>, CruxError>[src]

Function query requests endpoint /query via POST which retrives a Set containing a vector of the values defined by the function Query::find - github example. Argument is a query of the type Query.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.