TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/superfly/sprites-go/llms.txt
Use this file to discover all available pages before exploring further.
Client type is the primary entry point for the Sprites Go SDK. It holds authentication credentials, HTTP transport configuration, and a pool of control connections to sprites. Create a client with sprites.New or sprites.NewClient, then use its methods to create, retrieve, list, and delete sprites, or obtain *Sprite handles for executing commands and proxying ports.
Constructors
New
https://api.sprites.dev as the base URL with a 30-second HTTP timeout and a 2-second control connection initialization timeout. Accepts zero or more Option values to customize behavior.
Bearer token used to authenticate all API requests.
Zero or more functional options. See Option functions below.
A fully initialized client ready for use.
NewClient
New(token, WithBaseURL(baseURL)).
Base URL for the Sprites API (e.g.,
"https://api.sprites.dev").Bearer token used to authenticate all API requests.
A fully initialized client.
CreateToken
Client required) that exchanges a Fly.io macaroon token for a Sprites access token. Useful during initial setup. Forces HTTP/1.1 to avoid header-size limits on the Fly.io edge proxy.
Context for the HTTP request.
A valid Fly.io authentication token, typically starting with
"FlyV1".Organization slug (e.g.,
"personal" or a named organization).Invite code required by some organizations. Pass an empty string if not needed.
Optional override for the API base URL. Defaults to
"https://api.sprites.dev".The issued Sprites access token.
Non-nil if the request failed or the response did not contain a token.
Option functions
Options are passed toNew to customize the client.
WithBaseURL
Base URL of the Sprites API.
WithHTTPClient
Sprite-Version response header.
Custom HTTP client to use for all requests.
WithControlInitTimeout
Sprite() and SpriteWithOrg() wait to establish an initial control connection before falling back to per-request WebSocket connections. Defaults to 2 seconds.
Maximum duration to wait for the control connection.
WithDisableControl
Sprite handles
Sprite
*Sprite handle for the named sprite without making a create API call. Attempts to establish a control connection during the call, blocking for up to controlInitTimeout. Use this when the sprite already exists.
Name of the sprite.
A sprite handle bound to this client.
SpriteWithOrg
Sprite, but attaches organization information to the returned handle. Useful when working with sprites that belong to a specific organization.
Name of the sprite.
Organization information to associate with the sprite.
A sprite handle with organization context.
Sprite management
CreateSprite
nil for config to use default settings.
Context for the HTTP request.
Name for the new sprite.
Optional resource configuration.
Handle for the newly created sprite.
Non-nil on failure.
CreateSpriteWithOrg
Context for the HTTP request.
Name for the new sprite.
Optional resource configuration.
Optional organization context.
Optional labels to attach to the sprite.
Handle for the newly created sprite.
Non-nil on failure.
GetSprite
*Sprite.
Context for the HTTP request.
Name of the sprite to retrieve.
Sprite with all fields populated from the API response.
Non-nil on failure, including when the sprite is not found.
GetSpriteWithOrg
GetSprite, but attaches organization information to the returned handle.
Context for the HTTP request.
Name of the sprite to retrieve.
Organization context to associate with the sprite handle.
Sprite with all fields populated from the API response.
Non-nil on failure.
ListSprites
ListAllSprites for automatic pagination.
Context for the HTTP request.
Pagination and filter options. Defaults to 100 results if
nil.Page of results.
Non-nil on failure.
ListAllSprites
Context for the HTTP requests.
Name prefix filter. Pass an empty string to list all sprites.
All matching sprites with fields populated from the API.
Non-nil on failure.
ListAllSpritesWithOrg
ListAllSprites, but attaches organization context to every returned sprite handle.
Context for the HTTP requests.
Name prefix filter.
Organization context to associate with each sprite handle.
All matching sprites.
Non-nil on failure.
ListAllSpritesResult
ListAllSpritesWithOrg, but also returns aggregate organization stats captured from the first page of results.
Context for the HTTP requests.
Name prefix filter.
Organization context to associate with each sprite handle.
Contains the sprite slice and org stats.
Non-nil on failure.
DeleteSprite
Context for the HTTP request.
Name of the sprite to delete.
Non-nil on failure.
DestroySprite
DeleteSprite.
Context for the HTTP request.
Name of the sprite to destroy.
Non-nil on failure.
UpgradeSprite
Context for the HTTP request.
Name of the sprite to upgrade.
Non-nil on failure.
UpdateSprite
Context for the HTTP request.
Name of the sprite to update.
Update payload.
Non-nil on failure.
UpdateURLSettings
Context for the HTTP request.
Name of the sprite.
URL authentication settings to apply.
Non-nil on failure.
Version
FetchVersion
HEAD request to capture the sprite server’s version from the Sprite-Version response header. Called automatically before attach operations when the version is unknown. The sprite name is required because each sprite may run a different version.
Context for the HTTP request.
Name of the sprite whose version to fetch.
Non-nil on failure.
SpriteVersion
Server version string, or
"" if unknown.Lifecycle
Close
Always
nil in the current implementation.