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
//! Rust client for the smbCloud GresIQ REST gateway.
//!
//! GresIQ is a managed-database layer inside smbCloud. It sits in front of
//! a PostgreSQL database, adds API-key auth, and exposes a simple REST
//! interface for inserting and querying rows.
//!
//! This crate handles the HTTP transport and auth headers. Schema knowledge
//! (which tables exist, what the rows look like) lives in the caller.
//!
//! # Quick start
//!
//! ```no_run
//! use smbcloud_gresiq_sdk::{Environment, GresiqClient, GresiqCredentials};
//! use serde::Serialize;
//!
//! #[derive(Serialize)]
//! struct Hit { path: String, status: u16 }
//!
//! #[tokio::main]
//! async fn main() -> anyhow::Result<()> {
//! let client = GresiqClient::from_credentials(
//! Environment::Dev,
//! GresiqCredentials {
//! api_key: "your-key",
//! api_secret: "your-secret",
//! },
//! );
//!
//! client.insert("hits", &Hit {
//! path: "/api/chat".into(),
//! status: 200,
//! }).await?;
//!
//! Ok(())
//! }
//! ```
pub use GresiqClient;
pub use ;
pub use GresiqError;
pub use ;
pub use Environment;