tracing-gcloud-layer 0.2.6

A `tracing` layer for sending structured logs to Google Cloud Logging.
Documentation
use std::result::Result as StdResult;

use thiserror::Error;

#[derive(Debug, Error)]
pub enum GAuthError {
    #[error("failed to read key file: {0}")]
    ReadKey(String),

    #[error("failed to de/serialize to json")]
    SerdeJson(#[from] serde_json::Error),

    #[error("failed to decode base64")]
    Base64Decode(#[from] base64::DecodeError),

    #[error("failed to create rsa key pair: {0}")]
    RsaKeyPair(String),

    #[error("failed to rsa sign: {0}")]
    RsaSign(String),

    #[error("failed to send request")]
    HttpReqwest(#[from] reqwest::Error),

    #[error("systemTime before UNIX EPOCH")]
    SystemTime(#[from] std::time::SystemTimeError),
}

pub type Result<T> = StdResult<T, GAuthError>;