[][src]Struct sdk_cds::Client

pub struct Client {
    pub name: String,
    pub host: String,
    pub token: String,
    pub hash: String,
    pub insecure_skip_verify_tls: bool,
    // some fields omitted
}

Client to request CDS API

Fields

name: Stringhost: Stringtoken: Stringhash: Stringinsecure_skip_verify_tls: bool

Methods

impl Client[src]

pub fn new<T: Into<String>>(host: T, token: T) -> Self[src]

Create a new client to access CDS API

pub async fn status<'_>(&'_ self) -> Result<MonitoringStatus>[src]

Get CDS Status

pub async fn config<'_>(&'_ self) -> Result<HashMap<String, String>>[src]

pub async fn me<'_>(&'_ self) -> Result<User>[src]

Get minimal information about current user

pub async fn broadcasts<'_>(&'_ self) -> Result<Vec<Broadcast>>[src]

Get the list of broadcasts

pub async fn projects<'_>(&'_ self) -> Result<Vec<Project>>[src]

Get the list of projects

pub async fn applications<'_, '_>(
    &'_ self,
    project_key: &'_ str
) -> Result<Vec<Application>>
[src]

Get the list of applications in a project

pub async fn application<'_, '_, '_>(
    &'_ self,
    project_key: &'_ str,
    application_name: &'_ str
) -> Result<Application>
[src]

Get the application's details given the project key and the application name

pub async fn workflows<'_, '_>(
    &'_ self,
    project_key: &'_ str
) -> Result<Vec<Workflow>>
[src]

Get all the workflows inside a project given his project key

pub async fn workflow<'_, '_, '_>(
    &'_ self,
    project_key: &'_ str,
    workflow_name: &'_ str
) -> Result<Workflow>
[src]

Get the workflow's details given his name

pub async fn queue_count<'_>(&'_ self) -> Result<QueueCount>[src]

Fetch the count of the queue

pub async fn bookmarks<'_>(&'_ self) -> Result<Vec<Bookmark>>[src]

Get all personal bookmarks

pub async fn last_run<'_, '_, '_>(
    &'_ self,
    project_key: &'_ str,
    workflow_name: &'_ str
) -> Result<WorkflowRun>
[src]

Get last workflow run given their workflow name

pub async fn service_register<'_, '_>(
    &'_ self,
    service: &'_ Service
) -> Result<String>
[src]

Useful to register a new service to the API

pub async fn stream_json<'_, T: Serialize, U: DeserializeOwned>(
    &'_ self,
    method: String,
    path: String,
    body: T
) -> Result<U>
[src]

Trait Implementations

impl Debug for Client[src]

impl Default for Client[src]

impl<'de> Deserialize<'de> for Client where
    Client: Default
[src]

impl Serialize for Client[src]

Auto Trait Implementations

impl !RefUnwindSafe for Client

impl Send for Client

impl !Sync for Client

impl Unpin for Client

impl UnwindSafe for Client

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> DeserializeOwned for T where
    T: Deserialize<'de>, 
[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.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 

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