Versions in this module Expand all Collapse all v0 v0.1.0 Nov 29, 2026 Changes in this version + const Version + func Ptr[T any](v T) *T + type APIError struct + Code string + Message string + RequestID string + Status int + func (e *APIError) Error() string + type ArtifactsService struct + func (s *ArtifactsService) DownloadFile(ctx context.Context, id, path string, opts DownloadOptions) (DownloadResult, error) + func (s *ArtifactsService) Get(ctx context.Context, id string) (*api.Artifact, error) + func (s *ArtifactsService) GetDownload(ctx context.Context, id string) (*api.ArtifactDownload, error) + type Client struct + API *api.ClientWithResponses + Artifacts *ArtifactsService + Goals *GoalsService + Invocations *InvocationsService + Tasks *TasksService + func New(opts Options) (*Client, error) + func (c *Client) DoJSON(ctx context.Context, method, path string, body, out any) error + func (c *Client) Watch(ctx context.Context, path string, opts WatchOptions, handle func(Event) error) error + func (c *Client) WatchGoal(ctx context.Context, id string, opts WatchOptions, handle func(Event) error) error + func (c *Client) WatchInvocation(ctx context.Context, id string, opts WatchOptions, handle func(Event) error) error + func (c *Client) WatchTask(ctx context.Context, id string, opts WatchOptions, handle func(Event) error) error + type ClientCredentials struct + func NewClientCredentials(opts ClientCredentialsOptions) (*ClientCredentials, error) + func (p *ClientCredentials) Invalidate() + func (p *ClientCredentials) Token(ctx context.Context) (string, error) + type ClientCredentialsOptions struct + AuthMethod string + ClientAssertion func(context.Context) (string, error) + ClientID string + ClientSecret string + HTTPClient *http.Client + Resource string + Scope string + Timeout time.Duration + TokenURL string + type Destination struct + Origin string + PathPrefix string + type DownloadOptions struct + Destinations []Destination + HTTPClient *http.Client + MaxBytes int64 + type DownloadResult struct + ContentType string + SHA256 string + SizeBytes int64 + func DownloadFile(ctx context.Context, receipt api.ArtifactDownload, destination string, ...) (DownloadResult, error) + type DownloadTransportError struct + func (e *DownloadTransportError) Error() string + func (e *DownloadTransportError) Unwrap() error + type Event struct + Data json.RawMessage + ID string + Retry time.Duration + Type string + type ExecutionState string + const StateCancelled + const StateCompleted + const StateFailed + const StatePaused + const StateQueued + const StateRunning + const StateUnknown + const StateWaitingApproval + const StateWaitingInput + func NormalizeState(status string) ExecutionState + func (s ExecutionState) NeedsAttention() bool + type GoalsService struct + func (s *GoalsService) Cancel(ctx context.Context, id string, body api.CancelGoalRequest) (*api.Goal, error) + func (s *GoalsService) Create(ctx context.Context, body api.CreateGoalRequest) (*api.Goal, error) + func (s *GoalsService) Get(ctx context.Context, id string) (*api.Goal, error) + func (s *GoalsService) Observe(ctx context.Context, id string, opts ObserveOptions, ...) error + func (s *GoalsService) Pause(ctx context.Context, id string, body api.PauseGoalRequest) (*api.Goal, error) + func (s *GoalsService) Resume(ctx context.Context, id string, body api.ResumeGoalRequest) (*api.Goal, error) + func (s *GoalsService) Start(ctx context.Context, id string, body api.StartGoalRequest) (*api.Goal, error) + func (s *GoalsService) Wait(ctx context.Context, id string, opts ObserveOptions) (Observation[api.Goal], error) + type InvocationsService struct + func (s *InvocationsService) Cancel(ctx context.Context, id string, body api.CancelInvocationRequest) (*api.Invocation, error) + func (s *InvocationsService) Create(ctx context.Context, deploymentID string, body api.CreateInvocationRequest) (*api.Invocation, error) + func (s *InvocationsService) Get(ctx context.Context, id string) (*api.Invocation, error) + func (s *InvocationsService) Observe(ctx context.Context, id string, opts ObserveOptions, ...) error + func (s *InvocationsService) Retry(ctx context.Context, id string, body api.RetryInvocationRequest) (*api.Invocation, error) + func (s *InvocationsService) Wait(ctx context.Context, id string, opts ObserveOptions) (Observation[api.Invocation], error) + type OAuthError struct + Code string + RequestID string + Status int + func (e *OAuthError) Error() string + type Observation struct + Cursor string + Event *Event + Resource *T + State ExecutionState + type ObserveOptions struct + MinimumSnapshotInterval time.Duration + type Options struct + BaseURL string + HTTPClient *http.Client + Headers http.Header + MaxErrorBytes int64 + MaxRetryDelay time.Duration + Retries int + TenantID string + Timeout time.Duration + Token string + TokenProvider TokenProvider + type TasksService struct + func (s *TasksService) Cancel(ctx context.Context, id string, body api.CancelTaskRequest) (*api.Task, error) + func (s *TasksService) Create(ctx context.Context, body api.CreateTaskRequest) (*api.Task, error) + func (s *TasksService) Get(ctx context.Context, id string) (*api.Task, error) + func (s *TasksService) GetInput(ctx context.Context, id string) (*api.RunInputRequest, error) + func (s *TasksService) InputRequests(ctx context.Context, id string) (*api.ListTaskInputRequestsResponse, error) + func (s *TasksService) Observe(ctx context.Context, id string, opts ObserveOptions, ...) error + func (s *TasksService) Pause(ctx context.Context, id string, body api.PauseTaskRequest) (*api.Task, error) + func (s *TasksService) ReplyInput(ctx context.Context, id string, body api.ReplyTaskInputRequestRequest) (*api.RunInputRequest, error) + func (s *TasksService) Resume(ctx context.Context, id string, body api.ResumeTaskRequest) (*api.Task, error) + func (s *TasksService) Retry(ctx context.Context, id string, body api.RetryTaskRequest) (*api.Task, error) + func (s *TasksService) Wait(ctx context.Context, id string, opts ObserveOptions) (Observation[api.Task], error) + type TokenProvider interface + Token func(context.Context) (string, error) + type TokenProviderFunc func(context.Context) (string, error) + func (f TokenProviderFunc) Token(ctx context.Context) (string, error) + type WatchOptions struct + After string + MaxEventBytes int + MaxReconnects int + ReconnectDelay time.Duration