Versions in this module Expand all Collapse all v0 v0.1.0 Jul 15, 2026 Changes in this version + func VerifyWebhookSignature(rawBody []byte, signatureHeader string, secret string, ...) bool + type AccountResource struct + func (r *AccountResource) Delete(ctx context.Context, token string) error + func (r *AccountResource) Session(ctx context.Context, token string) (*AccountSession, error) + type AccountSession struct + SessionExpAt string + User UserProfile + type AdminReconcileResult struct + Details map[string]any + Reconciled int + type AdminResource struct + func (r *AdminResource) Orphans(ctx context.Context, token string) (*OrphanList, error) + func (r *AdminResource) Reconcile(ctx context.Context, token string) (*AdminReconcileResult, error) + type BillingResource struct + func (r *BillingResource) Storage(ctx context.Context, token string) (*BillingStorage, error) + type BillingStorage struct + PeriodFrom string + PeriodTo string + RatePerGB float64 + StorageGB float64 + type Client struct + APIKey string + Account *AccountResource + Admin *AdminResource + BaseURL string + Billing *BillingResource + Credits *CreditsResource + HTTP *http.Client + RefreshBufferSec int + RetryOn5xx int + Session *Session + Sessions *SessionsResource + Settings *SettingsResource + func NewClient(opts ClientOptions) (*Client, error) + func (c *Client) Health(ctx context.Context) (*Health, error) + type ClientOptions struct + APIKey string + BaseURL string + HTTP *http.Client + RefreshBufferSec int + RetryOn5xx int + Session *Session + type ConnectInfo struct + Host string + Password *string + Port int + type Credits struct + AsOf string + BalanceCents int64 + Currency string + FreeStorageGB *int + StorageGB *int + type CreditsResource struct + func (r *CreditsResource) Me(ctx context.Context, token string) (*Credits, error) + func (r *CreditsResource) Topup(ctx context.Context, input *TopupInput, token string) (*TopupSession, error) + type Error struct + Code string + Details any + Message string + RequestID string + Status int + func (e *Error) Error() string + type Health struct + Status string + type OrphanAMI struct + CreatedAt string + ImageID string + SizeGB float64 + type OrphanEBS struct + CreatedAt string + SizeGB float64 + VolumeID string + type OrphanList struct + AMIs []OrphanAMI + EBS []OrphanEBS + type PairInfo struct + ExpiresAt string + PIN string + PairURL string + type ProfileData struct + AccessToken string + AccountID string + ExpiresAt int64 + RefreshToken string + Scope string + type RefreshFunc func(ctx context.Context, refreshToken string) (*RefreshResult, error) + type RefreshResult struct + AccessToken string + ExpiresIn int + RefreshToken string + Scope string + TokenType string + type Session struct + ClientID string + HTTP *http.Client + Issuer string + RefreshFunc RefreshFunc + func (s *Session) Data() *ProfileData + func (s *Session) IsExpired() bool + func (s *Session) Refresh(ctx context.Context) error + func (s *Session) SetData(d *ProfileData) + func (s *Session) WillExpireSoon(bufferSec int) bool + type SessionStatus struct + InstanceID *string + Message *string + PublicIP *string + Ready *bool + StartedAt *string + State string + TailnetIP *string + type SessionsResource struct + func (r *SessionsResource) Connect(ctx context.Context, token string) (*ConnectInfo, error) + func (r *SessionsResource) Pair(ctx context.Context, token string) (*PairInfo, error) + func (r *SessionsResource) Poll(ctx context.Context, token string) (*SessionStatus, error) + func (r *SessionsResource) Start(ctx context.Context, token string) (*SessionStatus, error) + func (r *SessionsResource) Stop(ctx context.Context, input *StopInput, token string) (*SessionStatus, error) + func (r *SessionsResource) TailscaleKey(ctx context.Context, token string) (*TailscaleKey, error) + type Settings struct + AutoStopMinutes *int + PreferredHours []string + Region *string + StorageGB *int + type SettingsResource struct + func (r *SettingsResource) Get(ctx context.Context, token string) (*Settings, error) + func (r *SettingsResource) Update(ctx context.Context, patch *Settings, token string) (*Settings, error) + type StopInput struct + Force bool + type TailscaleKey struct + AuthKey string + ExpiresAt string + type TopupInput struct + AmountCents int64 + Currency string + type TopupSession struct + SessionID string + URL string + type UserProfile struct + Email string + EmailVerified *bool + ID string + Name string + type VerifyWebhookSignatureOptions struct + Now func() time.Time + ToleranceSeconds int64