Versions in this module Expand all Collapse all v0 v0.2.0 Sep 27, 2026 Changes in this version + const PushTriggerPrefix + var ErrHookUnauthorized = errors.New("app: this push is not signed with the app's webhook secret") + var ErrNotGitApp = errors.New("app: only an app built from a repository can deploy on push") + type Hook struct + CreatedAt time.Time + Enabled bool + LastDelivery string + LastDeliveryAt time.Time + Pending bool + type Push struct + Body []byte + Event string + Signature string + Token string type Service + func (s *Service) DeliverPush(ctx context.Context, appID uuid.UUID, p Push) (string, error) + func (s *Service) DisableGitHook(ctx context.Context, ownerID, name string) error + func (s *Service) EnableGitHook(ctx context.Context, ownerID, name string) (string, error) + func (s *Service) GitHook(ctx context.Context, ownerID, name string) (Hook, error) v0.1.0 Sep 26, 2026 Changes in this version + const AppReconcileInterval + const BaselineBlocked + const BaselineImageUnavailable + const BaselineNeverDeployed + const BaselinePending + const BaselinePendingImage + const BaselineReady + const BuildFailed + const BuildRunning + const BuildSucceeded + const DefaultBranch + const DefaultProjectName + const DefaultProjectSlug + const DeployActive + const DeployFailed + const DeployRunning + const DeploySucceeded + const DeploySuperseded + const OperationApplying + const OperationBuilding + const OperationCancelled + const OperationClaimed + const OperationFailed + const OperationQueued + const OperationSucceeded + const OperationVerifying + const PendingImage + const ReconcileInterval + const RollbackTrigger + var ErrClusterObservation = errors.New("app: cluster observation unavailable") + var ErrNameTaken = errors.New("app: name already in use") + var ErrNoBaselineRelease = errors.New("app: no baseline release yet") + var ErrNoBuilder = errors.New(...) + var ErrNoManifestResolver = errors.New("app: image manifests cannot be resolved on this install") + var ErrNoSecretKey = errors.New("app: no YACHT_SECRET_KEY is configured, so a secret cannot be stored safely") + var ErrNotFound = errors.New("app: not found") + var ErrOperationClaimLost = errors.New("app: deployment operation claim was lost") + var ErrOperationInFlight = errors.New("app: a deployment operation is already in flight") + var ErrOperationRecoveryPending = errors.New("app: operation stage awaits reconciliation") + var ErrProjectNotFound = errors.New("app: no such project") + var ErrReleaseActive = errors.New("app: that release is the one running now") + var ErrReleaseImageGone = errors.New(...) + var ErrRepoUnreachable = errors.New("app: the repository could not be read") + var ErrTemplateNotFound = errors.New("app: no such template") + var ErrTreeUnsupported = fmt.Errorf("app: only GitHub repositories can be browsed") + var ErrVariableNotFound = errors.New("app: no such variable") + var ErrVolumeAttached = errors.New("app: the volume is still attached to the app") + var ErrVolumeNotFound = errors.New("app: no such volume") + var ErrVolumeShrink = errors.New("app: a volume can grow but never shrink") + func Namespace(ownerID, name string) string + func Slugify(name string) string + func ValidateStackName(stack string) error + type Activity struct + AppName string + AppNamespace string + type App struct + ActiveReleaseID *uuid.UUID + BaselineError string + BaselineState string + CNAMEOnly bool + CPULimit string + CPURequest string + ConfigVersion int64 + CreatedAt time.Time + HTTPSOnly bool + HealthPath string + Host string + ID uuid.UUID + Image string + Internal bool + LastDeploy string + Liveness bool + MemoryLimit string + MemoryRequest string + Name string + Namespace string + OwnerID string + Port int32 + ProjectID uuid.UUID + Replicas int32 + Repo Repo + RunAsUser int64 + Source Source + Status orchestrator.AppStatus + StatusKnown bool + TLS bool + UpdatedAt time.Time + Variables []Variable + Volumes []Volume + X *int32 + Y *int32 + func (a App) Ref() orchestrator.Ref + func (a App) URLScheme() string + func (a App) UntrustedCert() bool + type Blueprint struct + Available bool + Because string + ConnectionKey string + ConnectionTemplate string + Description string + Env map[string]string + FSGroup int64 + GeneratedSecrets []string + Image string + Internal bool + Label string + Port int32 + RunAsUser int64 + ScratchPaths []string + Source Source + Volume *VolumeInput + func BlueprintFor(src Source) (Blueprint, error) + func BlueprintForWith(src Source, c Capabilities) (Blueprint, error) + func Blueprints() []Blueprint + func BlueprintsFor(c Capabilities) []Blueprint + type Build struct + AppID uuid.UUID + CommitSHA string + DeploymentID uuid.UUID + FinishedAt *time.Time + ID uuid.UUID + Image string + Log string + Message string + RepoRef string + RepoURL string + StartedAt time.Time + Status string + func (b Build) Running() bool + type Builder = orchestrator.Builder + type Capabilities struct + CanBuild bool + type CreateInput struct + CPULimit string + CPURequest string + Env map[string]string + Image string + MemoryLimit string + MemoryRequest string + Name string + Port int32 + ProjectID uuid.UUID + Replicas int32 + Repo Repo + Source Source + func (in CreateInput) Validate() error + type DeployActivity struct + Cancelled int + Days []DeployDay + Failed int + Running int + Succeeded int + func (a DeployActivity) Total() int + type DeployDay struct + Cancelled int + Day time.Time + Failed int + Running int + Succeeded int + func (d DeployDay) Total() int + type DeployLogs struct + Deployment Deployment + Live bool + Logs Logs + type Deployment struct + ActorID string + ActorKind string + AppID uuid.UUID + FinishedAt *time.Time + ID uuid.UUID + Image string + IsActive bool + Message string + ReleaseID *uuid.UUID + Revision string + StartedAt time.Time + Status string + Trigger string + func (d Deployment) Source() string + type HTTPBucket struct + At time.Time + Err int + OK int + To time.Time + Warn int + type HTTPLogs struct + Hint string + Hosts []string + Lines []orchestrator.HTTPLogLine + Note string + func (h HTTPLogs) Buckets() []HTTPBucket + type Images interface + Configured func(ctx context.Context) bool + DockerConfig func(ctx context.Context) ([]byte, error) + ImageFor func(ctx context.Context, ownerID, app, revision string) (string, error) + Insecure func(ctx context.Context) bool + type InstallDomain struct + App string + type Link struct + From string + To string + Via string + type LogRequest struct + Pod string + Previous bool + Tail int64 + type Logs struct + Lines []orchestrator.LogLine + Note string + Pod string + Pods []string + Previous bool + type ManifestAvailability interface + CheckDigest func(ctx context.Context, ref string) error + type Manifests interface + ResolveDigest func(ctx context.Context, ref string) (string, error) + type Networking struct + CNAMEOnly bool + Certs map[string]orchestrator.Certificate + Custom []domain.Custom + HTTPSOnly bool + Issuing bool + Managed string + Namespace string + Target string + type Operation struct + AppID uuid.UUID + CancelledAt *time.Time + Checkpoint string + ClaimToken *uuid.UUID + ClaimedAt *time.Time + CreatedAt time.Time + DeploymentID uuid.UUID + FinishedAt *time.Time + ID uuid.UUID + LeaseExpiresAt *time.Time + Message string + OwnerID string + ReleaseID *uuid.UUID + RequiresBuild bool + StageStartedAt time.Time + Status string + type Options struct + AppDomain string + Builder Builder + CertIssuer string + Images Images + Keeper *secret.Keeper + Manifests Manifests + MaxConcurrentBuilds int32 + ReservedDomains []string + Resolver domain.Resolver + RolloutPollInterval time.Duration + RolloutTimeout time.Duration + WildcardTLS bool + type Project struct + Apps int64 + ID uuid.UUID + Name string + OwnerID string + Slug string + type Release struct + AppID uuid.UUID + CPULimit string + CPURequest string + ConfigVersion int64 + CreatedAt time.Time + Env map[string]string + FSGroup int64 + HealthPath string + ID uuid.UUID + ImageDigest string + ImageRef string + Internal bool + Liveness bool + MemoryLimit string + MemoryRequest string + Origin string + OwnerID string + Port int32 + Replicas int32 + RunAsUser int64 + ScratchPaths []string + SecretKeys []string + Source Source + SourceRevision string + WritableRootFilesystem bool + func (r Release) AppSpec(overlays ReleaseOverlays) orchestrator.AppSpec + type ReleaseOverlays struct + CNAMETarget string + CertIssuer string + ConfigVersion int64 + HTTPSOnly bool + Hosts []string + IssuedHosts []string + Ref orchestrator.Ref + RegistryAuth []byte + Secrets map[string]string + TLSHosts []string + Volumes []orchestrator.VolumeSpec + type Repo struct + Branch string + Subdir string + URL string + func (r Repo) Normalise() Repo + func (r Repo) Ref() string + func (r Repo) Set() bool + func (r Repo) Validate() error + type Service struct + func NewService(pool *pgxpool.Pool, orch orchestrator.Orchestrator, log *slog.Logger, ...) *Service + func (s *Service) AddDomain(ctx context.Context, ownerID, name, host string) error + func (s *Service) AllDomains(ctx context.Context, ownerID string) ([]InstallDomain, error) + func (s *Service) ApplyRouting(ctx context.Context, ownerID string, appID uuid.UUID) error + func (s *Service) AttachVolume(ctx context.Context, ownerID, appName string, in VolumeInput) (Volume, error) + func (s *Service) BackfillReleases(ctx context.Context) error + func (s *Service) Branches(ctx context.Context, repoURL, query string) ([]string, error) + func (s *Service) BuildForDeployment(ctx context.Context, ownerID string, deployID uuid.UUID) (Build, error) + func (s *Service) CanBuild(ctx context.Context) bool + func (s *Service) CancelLiveDeployment(ctx context.Context, ownerID, name string) error + func (s *Service) CancelOperation(ctx context.Context, ownerID string, id uuid.UUID) error + func (s *Service) Capabilities(ctx context.Context) Capabilities + func (s *Service) ClaimOperation(ctx context.Context) (Operation, error) + func (s *Service) ClearPositions(ctx context.Context, ownerID string, projectID uuid.UUID) error + func (s *Service) Count(ctx context.Context, ownerID string) (int64, error) + func (s *Service) Create(ctx context.Context, ownerID string, in CreateInput) (App, error) + func (s *Service) CreateProject(ctx context.Context, ownerID, name string) (Project, error) + func (s *Service) DefaultBranch(ctx context.Context, repoURL string) (string, error) + func (s *Service) DefaultProject(ctx context.Context, ownerID string) (Project, error) + func (s *Service) Delete(ctx context.Context, ownerID, name string) error + func (s *Service) DeleteVariable(ctx context.Context, ownerID, appName, key string) error + func (s *Service) DeleteVolume(ctx context.Context, ownerID, appName, volumeName string, detach bool) error + func (s *Service) DeployActivity(ctx context.Context, ownerID string, days int) (DeployActivity, error) + func (s *Service) DeployTemplate(ctx context.Context, ownerID, slug, stack string) (Project, error) + func (s *Service) Deployment(ctx context.Context, ownerID, appName string, deployID uuid.UUID) (Deployment, error) + func (s *Service) DeploymentHTTPLogs(ctx context.Context, ownerID, appName string) (HTTPLogs, error) + func (s *Service) DeploymentLogs(ctx context.Context, ownerID, appName string, deployID uuid.UUID, ...) (DeployLogs, error) + func (s *Service) Deployments(ctx context.Context, ownerID string, appID uuid.UUID, limit int32) ([]Deployment, error) + func (s *Service) Directories(ctx context.Context, repoURL, path string) ([]string, error) + func (s *Service) EnsureHTTPLogs(ctx context.Context) + func (s *Service) EnsureOwner(ctx context.Context, id, displayName, email string) error + func (s *Service) Get(ctx context.Context, ownerID, name string) (App, error) + func (s *Service) Links(ctx context.Context, ownerID string) ([]Link, error) + func (s *Service) List(ctx context.Context, ownerID string) ([]App, error) + func (s *Service) ListInProject(ctx context.Context, ownerID string, projectID uuid.UUID) ([]App, error) + func (s *Service) LogStream(ctx context.Context, ownerID, appName string, req LogRequest) (iter.Seq2[orchestrator.LogLine, error], error) + func (s *Service) Logs(ctx context.Context, ownerID, appName string, req LogRequest) (Logs, error) + func (s *Service) Networking(ctx context.Context, ownerID, name string) (Networking, error) + func (s *Service) Project(ctx context.Context, ownerID, slug string) (Project, error) + func (s *Service) ProjectByID(ctx context.Context, ownerID string, id uuid.UUID) (Project, error) + func (s *Service) Projects(ctx context.Context, ownerID string) ([]Project, error) + func (s *Service) RecentActivity(ctx context.Context, ownerID string, limit int32) ([]Activity, error) + func (s *Service) ReconcileApps(ctx context.Context) error + func (s *Service) ReconcileBuilds(ctx context.Context) error + func (s *Service) Redeploy(ctx context.Context, ownerID, name string) error + func (s *Service) ReleaseByID(ctx context.Context, ownerID string, appID, releaseID uuid.UUID) (Release, error) + func (s *Service) Releases(ctx context.Context, ownerID string, appID uuid.UUID, limit int32) ([]Release, error) + func (s *Service) RemoveDomain(ctx context.Context, ownerID, name string, id uuid.UUID) error + func (s *Service) RequestDomainCheck(ctx context.Context, ownerID string, id uuid.UUID) error + func (s *Service) ResizeVolume(ctx context.Context, ownerID, appName, volumeName string, sizeBytes int64) error + func (s *Service) ResolverName() string + func (s *Service) Rollback(ctx context.Context, ownerID, name string, releaseID uuid.UUID) error + func (s *Service) RunAppReconciler(ctx context.Context) + func (s *Service) RunOperationAdmission(ctx context.Context) + func (s *Service) RunReconciler(ctx context.Context) + func (s *Service) RunReleaseBackfill(ctx context.Context) + func (s *Service) Scale(ctx context.Context, ownerID, name string, replicas int32) (App, error) + func (s *Service) SetHealth(ctx context.Context, ownerID, name, healthPath string, liveness bool) error + func (s *Service) SetNetworking(ctx context.Context, ownerID, name string, httpsOnly, cnameOnly bool) error + func (s *Service) SetPosition(ctx context.Context, ownerID, name string, x, y int32) error + func (s *Service) SetVariable(ctx context.Context, ownerID, appName string, in VariableInput) error + func (s *Service) Sources(ctx context.Context) []Blueprint + func (s *Service) TargetStatus(ctx context.Context, target string) string + func (s *Service) Update(ctx context.Context, ownerID, name string, in UpdateInput) (App, error) + func (s *Service) VerifyDomain(ctx context.Context, ownerID, name string, id uuid.UUID) error + type Source string + const SourceGit + const SourceImage + const SourcePostgres + const SourceTemplate + type Template struct + Apps []TemplateApp + Description string + Label string + Slug string + func TemplateFor(slug string) (Template, error) + func Templates() []Template + type TemplateApp struct + Env map[string]string + Image string + Name string + NeedsFrom string + Port int32 + Source Source + type UpdateInput struct + CPULimit string + CPURequest string + Image string + Internal bool + MemoryLimit string + MemoryRequest string + Port int32 + Repo Repo + func (in UpdateInput) Validate(source Source) error + type Variable struct + Key string + Secret bool + Value string + type VariableInput struct + Key string + Secret bool + Value string + func (in VariableInput) Validate() error + type Volume struct + AppID uuid.UUID + Class string + ID uuid.UUID + MountPath string + Name string + SizeBytes int64 + type VolumeInput struct + Class string + MountPath string + Name string + SizeBytes int64 + func (in VolumeInput) Validate() error