1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57

//! This crate describes the common interface of SDA, including the resources,
//! methods, and message format exposed by an SDA service.
//!
//! As such it is lightweight crate referenced by most of the other (Rust) crates.
//!
//! It takes a resource-oriented REST approach whenever possible, 
//! influenced by the [Google API Design Guide](https://cloud.google.com/apis/design/).

extern crate data_encoding;
#[macro_use]
extern crate error_chain;
extern crate serde;
extern crate serde_json;
#[macro_use]
extern crate serde_derive;
#[cfg(test)]
extern crate serde_test;
extern crate uuid;

mod errors {
    error_chain! {
        types {
            SdaError, SdaErrorKind, SdaResultExt, SdaResult;
        }
        errors {
            PermissionDenied {
                description("permission denied")
            }
            InvalidCredentials {
                description("invalid credentials")
            }
            Invalid(s:String) {
                description(s)
            }
        }
        foreign_links {
            SerdeJson(::serde_json::Error);
        }
    }
}

use uuid::Uuid;
pub use errors::*;

#[macro_use]
pub mod helpers;

mod crypto;
mod resources;
mod methods;
pub mod byte_arrays;

pub use helpers::*;
pub use crypto::*;
pub use resources::*;
pub use methods::*;