google-cloud 0.2.1

Asynchronous Rust bindings for Google Cloud Platform gRPC APIs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#[cfg(feature = "datastore")]
mod datastore;
#[cfg(feature = "pubsub")]
mod pubsub;
#[cfg(feature = "storage")]
mod storage;
#[cfg(feature = "vision")]
mod vision;

use crate::authorize::ApplicationCredentials;

fn load_creds() -> ApplicationCredentials {
    let creds = std::env::var("GCP_TEST_CREDENTIALS").expect("env GCP_TEST_CREDENTIALS not set");
    json::from_str::<ApplicationCredentials>(&creds)
        .expect("incorrect application credentials format")
}