drift Docs
Start
What is Drift?
The tour, if you are new here.
Why Drift?
The case for a smaller cloud.
Getting started
Nothing to deployed, in one command.
Architecture
How a slice is put together.
What it costs
The free grant, five unit prices, two rules.
Build
Canvas
Static sites, same origin as your API.
Tools
Operate
Auth
Accounts, tokens and scopes.
Security
Boundaries, sandboxing and hardening.

API reference

Every call a handler can make, at a glance. Each primitive has its own page with exact signatures, return shapes and the edges worth knowing. The tables below are the map.

Method names follow each language's conventions: Go's drift.Backbone.Secret.Get is drift.backbone.secret.get in the interpreted SDKs. In Node.js every Backbone call is async, so await it.

Backbone state

One namespace, drift.Backbone, is the sole entrypoint for every state primitive.

EntrypointMethods
  • Entrypoint
    drift.Backbone.NoSQL.Collection(c)
    Methods
    Insert · Get · Read · List · Delete · Drop
  • Entrypoint
    drift.Backbone.SQL(name)
    Methods
    Query · Execute · Begin
  • Entrypoint
    drift.Backbone.Cache
    Methods
    Set · Get · Del (Go) / delete
  • Entrypoint
    drift.Backbone.Secret
    Methods
    Get · Set · Delete
  • Entrypoint
    drift.Backbone.Blob
    Methods
    Put · Get
  • Entrypoint
    drift.Backbone.Queue(q)
    Methods
    Push · Pop
  • Entrypoint
    drift.Backbone.Lock
    Methods
    Acquire · Release
  • Entrypoint
    drift.Backbone.Realtime.Channel(c)
    Methods
    Publish · Presence

Deed identity

A peer namespace, drift.Deed, not one of Backbone's primitives, because identity is a different kind of problem from storage. All five live on one page.

EntrypointMethods
  • KeyAuth
    Entrypoint
    drift.Deed.KeyAuth
    Methods
    Challenge · Verify
  • JWT
    Entrypoint
    drift.Deed.JWT
    Methods
    Issue · Verify · SliceID
  • Vault
    Entrypoint
    drift.Deed.Vault
    Methods
    Put · Get
  • Link
    Entrypoint
    drift.Deed.Link
    Methods
    Begin · SessionInfo · Attest · Complete · Revoke · QR
  • Pocket
    Entrypoint
    drift.Deed.Pocket
    Methods
    Set · Get · Delete · List

Top level

Area Calls
Utilities & cross-sliceHTTPRequest · Slice(name) · CallerSlice · Env · Log

The handler's own types (its signature, the Request struct, the streaming arguments) are on Writing a handler, since they describe the function rather than something it calls.

Signatures are shown in Go

, the statically-typed reference. The dynamically-typed SDKs (Python, Node.js, Ruby, PHP) hand you parsed values, a dict or array rather than raw bytes, so the “decode the bytes” and “unmarshal each” notes apply to Go and Rust; elsewhere the value arrives ready to use.

Three surfaces need a running slice.

SQL is unserved locally, every Deed call errors, and Realtime is callable but inert. What runs locally has the detail.