Expand description
Official Rust SDK for the Verne Nautilus platform.
Provides two services behind a single unified client:
- Relay — Webhooks-as-a-Service: deliver events to subscribed HTTP endpoints.
- Gate — Auth-as-a-Service: manage identities, issue short-lived access tokens, and enforce authorization policies.
- Passepartout — Telegram Auth-as-a-Service: sign users in with Telegram and introspect the access tokens it issues.
- Clockwork — Cron-as-a-Service: schedule recurring cron jobs and one-off delayed jobs that invoke your HTTP endpoints, and inspect their execution history.
§Quick start
Add the crate to your Cargo.toml:
[dependencies]
nautilus-rs = "1.2"
tokio = { version = "1", features = ["full"] }§Using both services together
use nautilus_rs::{Verne, SendMessageParams};
use serde_json::json;
#[tokio::main]
async fn main() -> Result<(), nautilus_rs::Error> {
let verne = Verne::builder()
.relay("vrn_relay_live_sk_…")
.gate("vrn_gate_live_sk_…")
.build()?;
// Send a webhook event
let msg = verne.relay()?.messages().send(SendMessageParams {
event_type: "order.placed".into(),
payload: json!({ "order_id": "ord_123" }),
..Default::default()
}).await?;
println!("sent: {}", msg.id);
Ok(())
}§Using a single service
You can also instantiate Relay or Gate on their own:
use nautilus_rs::Relay;
let relay = Relay::new("vrn_relay_live_sk_…");§Error handling
Every fallible call returns Result<T, Error>. Match on the variants to
handle specific failure modes:
use nautilus_rs::{Error, Relay, SendMessageParams};
use serde_json::json;
let relay = Relay::new("vrn_relay_live_sk_…");
match relay.messages().send(SendMessageParams {
event_type: "ping".into(),
payload: json!({}),
..Default::default()
}).await {
Ok(msg) => println!("delivered: {}", msg.id),
Err(Error::Api(e)) => eprintln!("API {}: {}", e.status, e.message),
Err(e) => eprintln!("unexpected: {e}"),
}§API key format
Keys follow the pattern vrn_<service>_<env>_sk_…, for example:
vrn_relay_live_sk_…vrn_gate_test_sk_…
Structs§
- Access
Token - A short-lived access token issued by Gate.
- ApiError
- A structured error returned by the Verne API.
- Authorization
Decision - The result of an authorization check.
- Authorize
Params - Parameters for
Gate::authorize. - Clockwork
- Clockwork service client — Cron-as-a-Service.
- Clockwork
Builder - Builder for a standalone
Clockworkclient. - Create
Cron JobParams - Parameters for
CronJobsClient::create. - Create
Delayed JobParams - Parameters for
DelayedJobsClient::create. - Create
Identity Params - Parameters for
IdentitiesClient::create. - Create
Token Params - Parameters for
TokensClient::create. - CronJob
- A scheduled cron job returned by the Clockwork API.
- Cron
Jobs Client - Access to the
/v1/clockwork/jobsendpoints. - Delayed
Job - A one-off delayed job returned by the Clockwork API.
- Delayed
Jobs Client - Access to the
/v1/clockwork/delayedendpoints. - Execution
- A single execution record for a cron or delayed job.
- Gate
- Gate service client — Auth-as-a-Service.
- Gate
Builder - Builder for a standalone
Gateclient. - Identities
Client - Access to the
/v1/gate/identitiesendpoints. - Identity
- A user identity managed by Gate.
- Identity
Traits - Profile traits for an existing
Identity. - Identity
Traits Input - Profile traits supplied when creating a new identity.
- Json
Patch Op - A single RFC 6902 JSON
Patch operation used with
IdentitiesClient::patch. - List
Messages Params - Parameters for
MessagesClient::list. - Login
Start - The result of starting a Passepartout login flow.
- Login
Status - The current state of a Passepartout login flow.
- Message
- A webhook message returned by the Relay API.
- Messages
Client - Access to the
/v1/relay/messagesendpoints. - Oidc
Provider - A social login (OAuth 2.0 / OIDC) provider and whether it is enabled for a tenant’s end-users.
- Paginated
- A page of results from a list endpoint.
- Passepartout
- Passepartout service client — Telegram Auth-as-a-Service.
- Passepartout
Builder - Builder for a standalone
Passepartoutclient. - Relay
- Relay service client — Webhooks-as-a-Service.
- Relay
Builder - Builder for a standalone
Relayclient. - Security
Settings - Security-related Gate Identity settings for a tenant.
- Send
Message Params - Parameters for
MessagesClient::send. - Settings
Client - Access to the
/v1/gate/settingsendpoints. - Telegram
User - A Telegram user profile returned once a login flow completes.
- Token
Info - Token validity and claims returned by
TokensClient::introspect. - Token
Introspection - Token validity and claims returned by
Passepartout::introspect. - Tokens
Client - Access to the
/v1/gate/tokensendpoints. - Update
Cron JobParams - Parameters for
CronJobsClient::update. - Verne
- Unified entry point for the Verne Nautilus platform SDK.
- Verne
Builder - Builder for the unified
Verneclient.
Enums§
- Error
- The top-level error type returned by every fallible SDK operation.