Enum influxc::Credentials[][src]

pub enum Credentials {
    Basic {
        user: String,
        passwd: String,
        cookie: Option<String>,
    },
    Token {
        token: String,
    },
}

Credentials used to authenticate at the InfluxDB server

Variants

Basic

HTTP Basic authentication pattern. This pattern authenticates at the server and receives back the token to use for subsequent queries against the API.

Fields of Basic

user: String

Username to authenticate with.

passwd: String

Password to provide for authentication.

cookie: Option<String>

Internally keeps track of the token provided by DB after basic auth.

Token

Provide token generated directly in the InfluxDB GUI or CLI.

Fields of Token

token: String

Token to provide for authorization

Implementations

impl Credentials[src]

pub fn from_basic(user: &str, passwd: &str) -> Self[src]

User and password for HTTP basic auth at the server API

pub fn from_token(token: &str) -> Self[src]

Token to utilize for requests at the server API

Trait Implementations

impl Debug for Credentials[src]

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> Instrument 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.