Skip to main content
The Go SDK wraps the app.rocksky.* XRPC endpoints behind a typed, namespaced client.

Install

Requires Go 1.22+.

Quick start

Authentication

Read-only queries work without credentials. Mutating procedures need a JWT:

Configuration

NewClient takes functional options: Default base URL: https://api.rocksky.app. Default timeout: 30s.

Surface

Each method takes a context.Context plus a typed params/input struct. Zero-valued option fields are omitted from the outgoing query string.

Pagination

Offset-based endpoints accept PaginationParams{Limit, Offset}. Cursor-based feed endpoints accept CursorPagination{Limit, Cursor} and return a Cursor field to feed back into the next call.

Fluent builders

Use .Do(ctx) for queries and .Send(ctx) for procedures.

Errors

*rocksky.Error carries the HTTP status, XRPC error kind/message, and helpers like IsUnauthorized, IsNotFound, IsRateLimited.

Types

Public model types are derived from the Rocksky lexicons and live in rocksky/gen (package gen). The package-level type aliases in rocksky/types.go re-export them under their historical names. Regenerate with bun run lexgen:types at the repo root.

License

MIT © Tsiry Sandratraina. Source: sdk/go.