Versions in this module Expand all Collapse all v1 v1.2.2 Sep 30, 2026 v1.2.1 Sep 30, 2026 Changes in this version + const AppSourceTypeCode + const AppSourceTypeContainer + const DefaultLogLimit + const LogQueryRuntime + const LogQueryRuntimeTail + const SourceUploadStateReady + const UsageDimensionApp + const UsageDimensionCoverage + const UsageDimensionDay + const UsageDimensionGpuType + var ErrSSEEventTooLarge = errors.New("log stream event exceeds " + strconv.Itoa(maxSSEFrameBytes) + " bytes") + var ErrTailEnded = errors.New("log stream ended") + func AppDeployTerminal(status AppStatus) bool + func ValidateEndpointPath(path string) error + type App = gen.App + type AppCreate = gen.AppCreate + type AppEvent = gen.AppEvent + type AppEventType = gen.AppEventType + type AppSort = gen.AppSort + const AppSortCreatedAt + const AppSortName + type AppSourceType = gen.AppSourceType + type AppSourceUpsert = gen.AppSourceUpsert + func NewCodeAppSource(src CodeSourceUpsert) (AppSourceUpsert, error) + func NewContainerAppSource(src ContainerSource) (AppSourceUpsert, error) + type AppStatus = gen.AppStatus + const AppStatusActive + const AppStatusDeleted + const AppStatusDeleting + const AppStatusFailed + const AppStatusInitializing + const AppStatusStopped + const AppStatusStopping + type AppUpdate = gen.AppUpdate + type AppVolume = gen.AppVolume + type Build = gen.Build + type BuildStatus = gen.BuildStatus + const BuildStatusBuilding + const BuildStatusFailed + const BuildStatusQueued + const BuildStatusReady + type Client struct + func NewClient(apiKey, baseURL string, logger *slog.Logger) *Client + func (c *Client) AttachAppSecret(ctx context.Context, appID string, body SecretAttach) error + func (c *Client) CompleteSourceUpload(ctx context.Context, uploadID SourceUploadID) (*SourceUpload, error) + func (c *Client) CreateApp(ctx context.Context, body AppCreate) (*App, error) + func (c *Client) CreateSecret(ctx context.Context, body SecretCreate) (*Secret, error) + func (c *Client) CreateSourceUpload(ctx context.Context, body SourceUploadCreate) (*SourceUploadCreation, error) + func (c *Client) DeleteApp(ctx context.Context, appID string) (*App, error) + func (c *Client) DeleteAppEnvironmentVariable(ctx context.Context, appID, key string) error + func (c *Client) DeleteBuild(ctx context.Context, appID string, buildID uuid.UUID) error + func (c *Client) DeleteSecret(ctx context.Context, name string) error + func (c *Client) DeleteSourceUpload(ctx context.Context, uploadID SourceUploadID) error + func (c *Client) DeleteVersion(ctx context.Context, appID string, versionNumber int32) error + func (c *Client) DeployVersion(ctx context.Context, appID string, versionNumber int32) (*App, error) + func (c *Client) DetachAppSecret(ctx context.Context, appID, secretName string) error + func (c *Client) GetApp(ctx context.Context, appID string) (*App, error) + func (c *Client) GetBuild(ctx context.Context, appID string, buildID uuid.UUID) (*Build, error) + func (c *Client) GetEndpoint(ctx context.Context, appID string, endpointID uuid.UUID) (*Endpoint, error) + func (c *Client) GetLogEntries(ctx context.Context, queryID string, params GetLogEntriesParams) (LogEntryPage, error) + func (c *Client) GetTask(ctx context.Context, appID, taskID string) (*Task, error) + func (c *Client) GetUsageSummary(ctx context.Context, params *GetUsageSummaryParams) (*UsageSummary, error) + func (c *Client) GetVersion(ctx context.Context, appID string, versionNumber int32) (*Version, error) + func (c *Client) GetWorker(ctx context.Context, appID string, workerID uuid.UUID) (*Worker, error) + func (c *Client) InvokeAsync(ctx context.Context, appID, endpointPath, taskID string, body TaskPayload) (*Task, error) + func (c *Client) InvokeSync(ctx context.Context, appID, endpointPath, taskID string, body TaskPayload) (*Task, error) + func (c *Client) ListAppEnvironmentVariables(ctx context.Context, appID string, params *ListAppEnvironmentVariablesParams) (Page[EnvironmentVariable], error) + func (c *Client) ListAppErrors(ctx context.Context, appID string, params *ListAppErrorsParams) (Page[LogEntry], error) + func (c *Client) ListAppEvents(ctx context.Context, appID string, params *ListAppEventsParams) (Page[AppEvent], error) + func (c *Client) ListAppSecrets(ctx context.Context, appID string, params *ListAppSecretsParams) (Page[SecretAttachment], error) + func (c *Client) ListApps(ctx context.Context, params *ListAppsParams) (Page[App], error) + func (c *Client) ListBuilds(ctx context.Context, appID string, params *ListBuildsParams) (Page[Build], error) + func (c *Client) ListEndpoints(ctx context.Context, appID string, params *ListEndpointsParams) (Page[Endpoint], error) + func (c *Client) ListGpuTypes(ctx context.Context) ([]GpuType, error) + func (c *Client) ListSecrets(ctx context.Context, params *ListSecretsParams) (Page[Secret], error) + func (c *Client) ListTasks(ctx context.Context, appID string, params *ListTasksParams) (Page[Task], error) + func (c *Client) ListUsageEvents(ctx context.Context, params *ListUsageEventsParams) (Page[UsageEvent], error) + func (c *Client) ListVersions(ctx context.Context, appID string, params *ListVersionsParams) (Page[Version], error) + func (c *Client) ListWorkers(ctx context.Context, appID string, params *ListWorkersParams) (Page[Worker], error) + func (c *Client) ResumeApp(ctx context.Context, appID string) (*App, error) + func (c *Client) StageSourceArchive(ctx context.Context, transfer SourceUploadTransfer, archive []byte) error + func (c *Client) StopApp(ctx context.Context, appID string) (*App, error) + func (c *Client) TailLogs(ctx context.Context, queryID, appID string, emit func(LogEntry) error) error + func (c *Client) UpdateApp(ctx context.Context, appID string, body AppUpdate) (*App, error) + func (c *Client) UpdateAppEnvironmentVariable(ctx context.Context, appID, key string, body EnvironmentVariableUpdate) (*EnvironmentVariable, error) + func (c *Client) UpdateSecret(ctx context.Context, name string, body SecretUpdate) (*Secret, error) + func (c *Client) WaitApp(ctx context.Context, appID string, interval time.Duration) (*App, error) + func (c *Client) WaitTask(ctx context.Context, appID, taskID string, interval time.Duration) (*Task, error) + type CodeSourceUpsert = gen.CodeSourceUpsert + type CodebaseSource = gen.CodebaseSource + type ContainerSource = gen.ContainerSource + type Cursor = gen.Cursor + type DeployRequest = gen.DeployRequest + type Endpoint = gen.Endpoint + type EndpointRuntime = gen.EndpointRuntime + type EnvironmentVariable = gen.EnvironmentVariable + type EnvironmentVariableUpdate = gen.EnvironmentVariableUpdate + type GetLogEntriesParams = gen.GetLogEntriesParams + type GetUsageSummaryParams = gen.GetUsageSummaryParams + type GpuType = gen.GpuType + type Limit = gen.Limit + type ListAppEnvironmentVariablesParams = gen.ListAppEnvironmentVariablesParams + type ListAppErrorsParams = gen.ListAppErrorsParams + type ListAppErrorsParamsStatusClass = gen.ListAppErrorsParamsStatusClass + type ListAppErrorsParamsWindow = gen.ListAppErrorsParamsWindow + type ListAppEventsParams = gen.ListAppEventsParams + type ListAppSecretsParams = gen.ListAppSecretsParams + type ListAppsParams = gen.ListAppsParams + type ListBuildsParams = gen.ListBuildsParams + type ListEndpointsParams = gen.ListEndpointsParams + type ListSecretsParams = gen.ListSecretsParams + type ListTasksParams = gen.ListTasksParams + type ListUsageEventsParams = gen.ListUsageEventsParams + type ListVersionsParams = gen.ListVersionsParams + type ListWorkersParams = gen.ListWorkersParams + type LogEntry = gen.LogEntry + type LogEntryPage = gen.LogEntryPage + type LogSort = gen.LogSort + const LogSortNewest + const LogSortOldest + type LogWindow = gen.GetLogEntriesParamsWindow + type MoneyAmount = gen.MoneyAmount + type Page struct + Data []T + NextCursor *string + type Secret = gen.Secret + type SecretAttach = gen.SecretAttach + type SecretAttachment = gen.SecretAttachment + type SecretCreate = gen.SecretCreate + type SecretType = gen.SecretType + const SecretTypeGeneric + type SecretUpdate = gen.SecretUpdate + type SourceUpload = gen.SourceUpload + type SourceUploadCreate = gen.SourceUploadCreate + type SourceUploadCreation = gen.SourceUploadCreation + type SourceUploadID = gen.SourceUploadId + type SourceUploadState = gen.SourceUploadState + type SourceUploadTransfer = gen.SourceUploadTransfer + type TailStreamError struct + Detail string + func (e *TailStreamError) Error() string + type TailUnavailableError struct + Err error + StatusCode int + func (e *TailUnavailableError) Error() string + func (e *TailUnavailableError) Unwrap() error + type Task = gen.Task + type TaskPayload = map[string]any + type TaskStatus = gen.TaskStatus + const TaskStatusCompleted + const TaskStatusFailed + const TaskStatusPending + type UsageBucket = gen.UsageBucket + type UsageCoverage = gen.UsageCoverage + type UsageDimension = gen.UsageDimension + type UsageEvent = gen.UsageEvent + type UsageSummary = gen.UsageSummary + type Version = gen.Version + type Worker = gen.Worker + type WorkerConfig = gen.WorkerConfig + type WorkerConfigCreate = gen.WorkerConfigCreate + type WorkerConfigPatch = gen.WorkerConfigPatch + type WorkerStateFilter = gen.WorkerStateFilter + const WorkerStateFilterAll + const WorkerStateFilterLive + type WorkerStatus = gen.WorkerStatus