platform

package module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 11 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Platform Go machine SDK

NewMachineClient binds the shared OAuth/DPoP transport to a fixed production or test Platform resource. Use separate client IDs and keys for each profile. The test profile permits only isolated domain/DNS operations. Callers pass contexts to all methods; generated models retain exact int64 minor-unit prices.

Run go run ./examples/fixture for a complete offline domain/DNS flow in both profiles. go test -race ./... checks the profile allowlist, audit cursor, required cluster key, and error boundary.

The local shared-auth module replacement is for source qualification and must be replaced by an immutable published module before release.

Documentation

Overview

Package platform is the contract-pinned, machine-only Platform SDK.

Code generated from the pinned Platform machine contract. Do not edit.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Wait

func Wait[T any](ctx context.Context, timeout time.Duration, fetch func(context.Context) (T, string, error), terminal func(string) bool) (T, error)

Wait polls a caller-selected read operation for at most two minutes. Pass a GET callback and a terminal-state predicate.

Types

type APIError

type APIError struct {
	Status                 int
	Type, Title, RequestID string
}

func (*APIError) Error

func (e *APIError) Error() string

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(profile Profile, transport *http.Client) (*Client, error)

NewClient accepts a preconfigured shared machine transport; injectable for offline fixtures.

func NewMachineClient

func NewMachineClient(profile Profile, config machine.Config) (*Client, error)

NewMachineClient binds the reviewed OAuth/DPoP transport to exactly one public resource.

func (*Client) DeleteCluster

func (*Client) DeleteDNSRecord

func (c *Client) DeleteDNSRecord(ctx context.Context, domain string, name string, pType string) (*gen.PlatformDeleteDNSRecordResponse, error)

func (*Client) DeleteObjectStorageBucket

func (c *Client) DeleteObjectStorageBucket(ctx context.Context, id string) (*gen.PlatformDeleteObjectStorageBucketResponse, error)

func (*Client) DeleteObjectStorageCredential

func (c *Client) DeleteObjectStorageCredential(ctx context.Context, id string, credentialId string) (*gen.PlatformDeleteObjectStorageCredentialResponse, error)

func (*Client) EnableDomainDNSSEC added in v0.1.1

func (c *Client) EnableDomainDNSSEC(ctx context.Context, domain string) (*gen.PlatformEnableDomainDNSSECResponse, error)

func (*Client) GetCluster

func (c *Client) GetCluster(ctx context.Context, id string) (*gen.PlatformGetClusterResponse, error)

func (*Client) GetClusterCatalog

func (c *Client) GetClusterCatalog(ctx context.Context) (*gen.PlatformGetClusterCatalogResponse, error)

func (*Client) GetClusterKubeconfig

func (c *Client) GetClusterKubeconfig(ctx context.Context, id string) (*gen.PlatformGetClusterKubeconfigResponse, error)

func (*Client) GetDeveloperLimits

func (c *Client) GetDeveloperLimits(ctx context.Context) (*gen.PlatformGetDeveloperLimitsResponse, error)

func (*Client) GetDomain

func (c *Client) GetDomain(ctx context.Context, domain string) (*gen.PlatformGetDomainResponse, error)

func (*Client) GetDomainAuthCode

func (c *Client) GetDomainAuthCode(ctx context.Context, domain string) (*gen.PlatformGetDomainAuthCodeResponse, error)

func (*Client) GetDomainContacts

func (c *Client) GetDomainContacts(ctx context.Context, domain string) (*gen.PlatformGetDomainContactsResponse, error)

func (*Client) GetDomainDNSSEC added in v0.1.1

func (c *Client) GetDomainDNSSEC(ctx context.Context, domain string) (*gen.PlatformGetDomainDNSSECResponse, error)

func (*Client) GetObjectStorageCatalog

func (c *Client) GetObjectStorageCatalog(ctx context.Context) (*gen.PlatformGetObjectStorageCatalogResponse, error)

func (*Client) ListClusters

func (c *Client) ListClusters(ctx context.Context) (*gen.PlatformListClustersResponse, error)

func (*Client) ListDNSRecords

func (c *Client) ListDNSRecords(ctx context.Context, domain string) (*gen.PlatformListDNSRecordsResponse, error)

func (*Client) ListDomains

func (c *Client) ListDomains(ctx context.Context) (*gen.PlatformListDomainsResponse, error)

func (*Client) ListObjectStorageBuckets

func (c *Client) ListObjectStorageBuckets(ctx context.Context) (*gen.PlatformListObjectStorageBucketsResponse, error)

func (*Client) ListObjectStorageCredentials

func (c *Client) ListObjectStorageCredentials(ctx context.Context, id string) (*gen.PlatformListObjectStorageCredentialsResponse, error)

func (*Client) ResetDomainAuthCode

func (c *Client) ResetDomainAuthCode(ctx context.Context, domain string) (*gen.PlatformResetDomainAuthCodeResponse, error)

func (*Client) ResumeCluster

func (*Client) SuspendCluster

func (*Client) UpsertDNSRecord

func (*Client) WalkAuditEvents

func (c *Client) WalkAuditEvents(ctx context.Context, limit, maxPages int, before string, visit func([]gen.AuditEventBody) error) (string, error)

WalkAuditEvents follows the opaque, exclusive next_before cursor for a bounded number of pages.

type Profile

type Profile string
const (
	Production Profile = "production"
	Test       Profile = "test"
)

func (Profile) Resource

func (p Profile) Resource() (string, error)

Directories

Path Synopsis
examples
fixture command
Package gen provides primitives to interact with the openapi HTTP API.
Package gen provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL