Audit client
Audit logging requires a write-scoped or read-scoped
f0_live_* or f0_live_* API key.Config Options
TheConfig struct supports the following options:
Write methods
Log(ctx context.Context, event AuditEventInput) error
Validates and writes a single audit event immediately.
LogBatch(ctx context.Context, events []AuditEventInput) (map[string]any, error)
Sends up to 1000 events in a single batch request.
Read methods
GetEvent(ctx context.Context, id string) (map[string]any, error)
GET /v1/events/{id}
Retrieves a single audit event by its ID.
ListEvents(ctx context.Context, query string) (map[string]any, error)
GET /v1/events
Filters and lists events. The query string can contain filters like ?actor_id=user_123&action=document.delete.
GetReceipt(ctx context.Context, id string) (map[string]any, error)
GET /v1/receipts/{id}
Retrieves an asynchronous ingestion receipt status.
Verify methods
Verify(ctx context.Context, query string) (map[string]any, error)
GET /v1/verify
Walks the hash chain and verifies integrity. Query parameters include ?from=&to=.