Skip to main content

Crate smbcloud_gresiq_sdk

Crate smbcloud_gresiq_sdk 

Source
Expand description

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

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(())
}

Structs§

GresiqClient
Talks to the smbCloud GresIQ REST gateway.
GresiqCredentials
API credentials for a GresIQ-managed database.
OndeApp
An app registered to the user’s account.
OndeModel
A model from the Onde catalog, assignable to an OndeApp.

Enums§

Environment
GresiqError

Functions§

assign_model
Assign a catalog model to an app. Creates the record if none exists yet.
base_url
Resolve the GresIQ gateway base URL for the given environment.
create_app
Create a new app under the authenticated user’s account.
list_apps
Fetch all apps for the authenticated user.
list_models
Fetch all models in the Onde catalog.
rename_app
Rename an existing app.