santati (Rust)
The official Rust SDK for the Santati audit-log API: emit one audit event or a batch, list events with filters and cursor pagination, and iterate across pages. The crate is async and runs on Tokio.
Install
Quickstart
use ;
async
Options
| option | default | meaning |
|---|---|---|
api_key |
required | team API key (sat_sk_…); sent as Authorization: Api-Key <key> |
base_url |
https://api.santati.io |
trailing / removed; may carry a path prefix |
trail |
none | default trail for emits; never applied to reads |
timeout |
10s | per attempt |
max_retries |
2 | retries after the first attempt |
backoff(initial, max) |
250ms, 8s | exponential backoff bounds |
header(name, value) |
none | extra header on every request |
Building fails with a ValidationError (status None) for an empty api_key
(field api_key) or an Authorization header (field headers). Redirects are
never followed, and the SDK's own retry loop is the only retry: transport
failures, 500/502/503/504 and 429 (unless the code is quota_exceeded) are
retried with the identical request, honouring Retry-After when the server
sends one.
Errors
One Error enum with seven kinds, each carrying ErrorDetails:
use ErrorKind;
match client.events.list.await
ErrorKind is Validation, Auth, NotFound, RateLimited, Server,
Transport or Api; error.status(), error.code() and error.field()
carry the server's side of the failure when there is one.
Notes
AuditEvent,EventActorandEventTargetare the generated read models, re-exported here so you never import the generated core directly.- The exact wire contract, error mapping and retry policy are normative in
docs/sdk-surface.md, and enforced by the shared vectors inconformance/.
License
Apache-2.0.