apiclient

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package apiclient is the one HTTP client implementation for the control plane's versioned API (internal/api, mounted at /api/v1). cmd/levelrail-cli and cmd/levelrail-mcp both import this package rather than each rolling their own: they are exactly the external callers the documented wire contract in internal/api exists for (see internal/store/tokens.go's own doc comment on APIToken), so neither gets special internal access, only this same bearer-token HTTP client. Wire-shape request/response types live in types.go; this file is the Client type itself and its methods.

Index

Constants

View Source
const (
	DeviceLoginWaiting  = "waiting"
	DeviceLoginExpired  = "expired"
	DeviceLoginDenied   = "denied"
	DeviceLoginApproved = "approved"
)

Device login states as GET /api/v1/auth/device/activity reports them.

View Source
const (
	EnvAPIToken = "APP_API_TOKEN" //nolint:gosec // this is the name of an env var, not a credential value
	EnvAPIURL   = "APP_API_URL"
	EnvProfile  = "APP_PROFILE"
)

EnvAPIToken, EnvAPIURL, and EnvProfile are this project's established APP_*-env-var-prefix convention (see internal/brand's own envPrefix, and cmd/levelrail/main.go's APP_DATA_DIR/APP_HTTP_ADDR/etc.), not a product-name-specific prefix: renaming the product later must not require renaming these. Every caller of this package (the CLI, the MCP server) uses these same names, so a token or URL set for one is already set for the other.

View Source
const (
	// EnvLogMaxBytes names the env var that caps a compact log query's output.
	EnvLogMaxBytes = "APP_MCP_LOG_MAX_BYTES"
	// DefaultLogMaxBytes is the output cap when EnvLogMaxBytes is unset.
	DefaultLogMaxBytes = 8 << 10
	// DefaultLogMaxLines is the line cap when the caller sets none.
	DefaultLogMaxLines = 100
	// DefaultLogWindow is the lookback when neither since nor from is set.
	DefaultLogWindow = time.Hour
)
View Source
const (
	ScopeTeamHeader    = "X-Scope-Team"
	ScopeProjectHeader = "X-Scope-Project"
	EnvTeam            = "APP_TEAM"
	EnvProject         = "APP_PROJECT"
)

Scope headers narrow what the control plane shows to one team or project. They can only narrow: the server never widens access from them.

View Source
const (
	OAuthProviderGoogle    = "google"
	OAuthProviderGitHub    = "github"
	OAuthProviderOIDC      = "oidc"
	OAuthProviderMicrosoft = "microsoft"
)

OAuth provider names accepted by GET/PUT /api/v1/settings/oauth[/{provider}], redeclared from internal/store.OAuthProvider* rather than imported, the same reasoning as ServiceResources above.

View Source
const (
	EmailBackendSMTP = "smtp"
	EmailBackendSES  = "ses"
)

Email backends accepted by EmailSettingsResource.Backend.

View Source
const (
	DeployOutcomeInProgress = "in_progress"
	DeployOutcomeHealthy    = "healthy"
)

Deploy outcomes reported by GetDeploy.

View Source
const AgentClientHeader = "X-Agent-Client"

AgentClientHeader carries the calling MCP client's name and version to the control plane so audit entries can record it.

View Source
const CredentialsFileName = "credentials"

CredentialsFileName is the file ReadCredentialsFile reads, inside a directory named after the caller's own binary (ConfigDir below), not a hardcoded product name.

View Source
const DefaultAPIURL = "http://localhost:8080"

DefaultAPIURL is a zero-config local default, so a caller with no flag, env var, or credentials file still reaches a locally running control plane out of the box: its own defaultHTTPAddr (cmd/levelrail/main.go) is ":8080", so this is that same port on loopback.

View Source
const DefaultProfile = "default"

DefaultProfile is the section ResolveProfile falls back to when neither a --profile flag nor APP_PROFILE is set, and the section an old, pre-profile flat credentials file (no "[section]" headers at all) is read as, for backward compatibility with every credentials file written before profile support existed.

View Source
const MaskedEnvValue = "••••••••"

MaskedEnvValue is what a sensitive env value reads back as.

View Source
const StandaloneScope = "_standalone"

StandaloneScope is the {name} the per-domain endpoints take for a standalone domain, e.g. /api/v1/apps/_standalone/domains/x/waf.

Variables

View Source
var ErrFixStale = errors.New("app changed since the diagnosis, run it again")

ErrFixStale means the app no longer holds the value the fix was computed from, so applying it could overwrite a newer edit.

Functions

func ConfigDir

func ConfigDir(prog string) (string, error)

ConfigDir is "~/.config/<prog>", prog being the caller's own binary basename (filepath.Base(os.Args[0])), never a hardcoded product name: this makes the credentials file location follow the binary automatically if it's ever renamed, the same rebrandability property required everywhere else in this codebase.

func DeployWindow added in v0.2.0

func DeployWindow(attempts []DeployAttemptResource, id string, now time.Time) (from, to time.Time, err error)

DeployWindow returns the time range one deploy attempt owned: from its start to the start of the next newer attempt, or now if it is the newest.

func ExtractErrorMessage

func ExtractErrorMessage(data []byte) string

ExtractErrorMessage parses the control plane's {"error": "..."} body shape (internal/api/respond.go). A body that doesn't match that shape (a proxy's HTML error page, an empty body) falls back to the raw text so the caller still sees something, not a blank message. Exported so callers with their own hand-rolled request (outside this Client, e.g. the CLI's session-cookie authSessionClient) can reuse the same parsing rather than duplicating it.

func LogMaxBytesFromEnv added in v0.2.0

func LogMaxBytesFromEnv(lookup func(string) (string, bool)) int

LogMaxBytesFromEnv returns the byte cap from EnvLogMaxBytes, falling back to DefaultLogMaxBytes on an unset or invalid value.

func ParseLogTime added in v0.2.0

func ParseLogTime(s string, now time.Time) (time.Time, error)

ParseLogTime parses a log window bound: an RFC3339 timestamp, or a Go duration ("30m") meaning that long before now.

func PatchAppMap added in v0.2.0

func PatchAppMap(app map[string]any, changes []DiagnosisChange, inputs map[string]string) ([]string, error)

PatchAppMap applies changes to a decoded app resource (numbers as json.Number). It refuses a change whose current value differs from From.

func PathEscape

func PathEscape(s string) string

PathEscape guards against a name containing characters that would otherwise change the request's URL shape (a "/" turning one path segment into two, for instance). Server-side validation is the real authority on what a valid app name is; this only protects request construction from building a request to the wrong path. Exported for the same reuse reason as ExtractErrorMessage.

func ResolveAPIURL

func ResolveAPIURL(flagURL string, lookupEnv func(string) (string, bool), prog, profile string) string

ResolveAPIURL picks the base API URL by precedence: flagURL, then EnvAPIURL, then profile's section of the credentials file, then DefaultAPIURL.

func ResolveProfile

func ResolveProfile(flagProfile string, lookupEnv func(string) (string, bool)) string

ResolveProfile picks the active profile name by precedence: flagProfile, then EnvProfile, then DefaultProfile. It never returns an empty string.

func ResolveToken

func ResolveToken(flagToken string, lookupEnv func(string) (string, bool), prog, profile string) string

ResolveToken picks an API token by precedence: flagToken, then EnvAPIToken, then profile's section of the local credentials file. Returns "" (not an error) if none is set: an empty token is a valid, if unlikely to succeed, thing to send, and letting the server's own 401 be what reports "not authenticated" keeps this function from duplicating that judgment.

func SetDebugTrace added in v0.2.0

func SetDebugTrace(w io.Writer)

SetDebugTrace enables (non-nil w) or disables (nil) request tracing for every call through this package, process-wide. cmd/levelrail-cli's --debug flag calls this exactly once per invocation, always (even to disable), so no state leaks from one CLI run into the next in a process that invokes the CLI's entrypoint repeatedly, such as a test binary.

func SetScope added in v0.2.0

func SetScope(s Scope)

SetScope sets the scope every Client sends from now on.

func TraceRequest added in v0.2.0

func TraceRequest(method, rawURL, status string, elapsed time.Duration, reqErr error)

TraceRequest writes one --debug trace line for a completed (or failed) HTTP round trip, a no-op unless SetDebugTrace enabled tracing. Exported so cmd/levelrail-cli's authSessionClient (a separate, session-cookie based client that is never a Client, see its own doc comment) can share this exact trace format and URL redaction instead of a second implementation. Never passed a header or body: this never prints an Authorization value or any other credential, in or out of debug mode.

func WithAgentClient added in v0.2.0

func WithAgentClient(ctx context.Context, name, version string) context.Context

WithAgentClient returns a context whose requests report the MCP client name and version in AgentClientHeader.

func WriteContext added in v0.2.0

func WriteContext(prog, profile string, s Scope) error

WriteContext saves a profile's team and project; an empty scope clears it.

func WriteCredentialsFile

func WriteCredentialsFile(prog, profile string, creds Credentials) error

WriteCredentialsFile writes creds under profile's section in prog's credentials file, creating ConfigDir(prog) if it doesn't exist yet, and leaving every other profile section already in the file untouched. "auth login" is this function's only caller today: it is the one command that produces a credential rather than just consuming one. 0o600 on both the directory and the file, tighter than ReadCredentialsFile's own comment on the file needing to stay hand-editable: a freshly minted API token is a live credential, not a value that should ever be group- or world-readable by default.

Types

type ACMEFailure added in v0.2.0

type ACMEFailure struct {
	Error   string `json:"error"`
	Renewal bool   `json:"renewal"`
	At      string `json:"at"`
	Reason  string `json:"reason"`
	Action  string `json:"action"`
}

ACMEFailure mirrors internal/api's acmeFailureResource.

type AIAssistantSettingsResource added in v0.2.0

type AIAssistantSettingsResource struct {
	Configured bool   `json:"configured"`
	Provider   string `json:"provider,omitempty"`
	Model      string `json:"model,omitempty"`
}

AIAssistantSettingsResource mirrors internal/api's aiAssistantSettingsResource (internal/api/ai_settings.go): the shape of GET/PUT/DELETE /api/v1/settings/ai-assistant. Configured reports whether a key has actually been saved; the key itself never round-trips.

type AIChatMessageResource added in v0.2.0

type AIChatMessageResource struct {
	ID        string                   `json:"id"`
	Role      string                   `json:"role"`
	Content   string                   `json:"content"`
	ToolCalls []AIChatToolCallResource `json:"tool_calls"`
	CreatedAt time.Time                `json:"created_at"`
}

AIChatMessageResource mirrors internal/api's aiChatMessageResource.

type AIChatSSEEvent added in v0.2.0

type AIChatSSEEvent struct {
	Type           string          `json:"type"`
	Text           string          `json:"text,omitempty"`
	ConfirmationID string          `json:"confirmation_id,omitempty"`
	ToolUseID      string          `json:"tool_use_id,omitempty"`
	Name           string          `json:"name,omitempty"`
	Arguments      json.RawMessage `json:"arguments,omitempty"`
	ReadOnly       bool            `json:"read_only,omitempty"`
	Result         json.RawMessage `json:"result,omitempty"`
	IsError        bool            `json:"is_error,omitempty"`
}

AIChatSSEEvent mirrors every shape internal/api/ai_chat.go's aiSSESink can write on the bare "data: <json>\n\n" line POST /api/v1/ai/sessions/{id}/messages and POST .../confirmations/{id} stream: Type discriminates which of the other fields are populated (text_delta -> Text, tool_call_proposed -> ConfirmationID/ToolUseID/Name/Arguments, tool_result -> ToolUseID/Name/Result/IsError, done -> no other field).

type AIChatSessionCreatedResource added in v0.2.0

type AIChatSessionCreatedResource struct {
	ID string `json:"id"`
}

AIChatSessionCreatedResource mirrors internal/api's aiChatSessionCreatedResource: POST /api/v1/ai/sessions's response.

type AIChatSessionResource added in v0.2.0

type AIChatSessionResource struct {
	ID       string                  `json:"id"`
	Messages []AIChatMessageResource `json:"messages"`
}

AIChatSessionResource mirrors internal/api's aiChatSessionResource: GET /api/v1/ai/sessions/{id}'s response, the full transcript.

type AIChatSessionSummaryResource added in v0.2.0

type AIChatSessionSummaryResource struct {
	ID        string    `json:"id"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

AIChatSessionSummaryResource mirrors internal/api's aiChatSessionSummaryResource: one row of GET /api/v1/ai/sessions's list response, no message content.

type AIChatToolCallResource added in v0.2.0

type AIChatToolCallResource struct {
	ID             string          `json:"id"`
	ConfirmationID string          `json:"confirmation_id,omitempty"`
	Name           string          `json:"name"`
	Arguments      json.RawMessage `json:"arguments"`
	ReadOnly       bool            `json:"read_only"`
	Status         string          `json:"status"`
	Result         json.RawMessage `json:"result,omitempty"`
	IsError        bool            `json:"is_error,omitempty"`
}

AIChatToolCallResource mirrors store.AIChatToolCall's JSON shape, as carried on an AIChatMessageResource.

type AIControlResource added in v0.2.0

type AIControlResource struct {
	Mode            string   `json:"mode"`
	AllowedEnvKinds []string `json:"allowed_env_kinds"`
	EnvKinds        []string `json:"env_kinds"`
	AdminAvailable  bool     `json:"admin_available"`
	AgentTokenCount int      `json:"agent_token_count"`
	CallerIsAgent   bool     `json:"caller_is_agent"`
	UpdatedAt       string   `json:"updated_at"`
	UpdatedBy       string   `json:"updated_by"`
}

AIControlResource mirrors GET /api/v1/settings/ai-control.

type APIError

type APIError struct {
	StatusCode int
	Message    string
	// RetryAfter is parsed from the response's Retry-After header
	// (seconds form only, the only form this control plane ever sends),
	// 0 when absent. Currently only the general per-actor rate limiter
	// (429 Too Many Requests, internal/api/api_rate_limit.go) sets it,
	// but any future response carrying the header gets the same
	// treatment for free.
	RetryAfter time.Duration
	// Code is the machine-readable reason some refusals carry, such as
	// step_up_required or step_up_code_required.
	Code string
}

APIError is returned by Client methods for a non-2xx HTTP response: a real reply from the server, as opposed to a network-level failure (connection refused, DNS, timeout), which Client methods return as a plain wrapped error instead. Callers distinguish the two with errors.As, which is what picks the CLI's exit code and lets the MCP server surface a specific tool error (e.g. a 403's "token lacks the required ability" message) rather than a generic failure.

func (*APIError) Error

func (e *APIError) Error() string

type AcceptTeamInviteRequest added in v0.2.0

type AcceptTeamInviteRequest struct {
	Token       string `json:"token"`
	Email       string `json:"email,omitempty"`
	DisplayName string `json:"display_name,omitempty"`
	Password    string `json:"password,omitempty"`
}

AcceptTeamInviteRequest is POST /api/v1/team-invites/accept's body.

type ActivityActor added in v0.2.0

type ActivityActor struct {
	Type string `json:"type"`
	Name string `json:"name,omitempty"`
}

ActivityActor mirrors internal/api's activityActor.

type ActivityEvent added in v0.2.0

type ActivityEvent struct {
	ID     string         `json:"id"`
	At     time.Time      `json:"at"`
	Kind   string         `json:"kind"`
	Title  string         `json:"title"`
	Detail string         `json:"detail,omitempty"`
	Failed bool           `json:"failed,omitempty"`
	Action string         `json:"action,omitempty"`
	Actor  ActivityActor  `json:"actor"`
	Object ActivityObject `json:"object"`
}

ActivityEvent is one domain timeline entry.

type ActivityObject added in v0.2.0

type ActivityObject struct {
	Type string `json:"type"`
	ID   string `json:"id"`
	Href string `json:"href,omitempty"`
}

ActivityObject mirrors internal/api's activityObject.

type ActivityPage added in v0.2.0

type ActivityPage struct {
	Events     []ActivityEvent `json:"events"`
	NextCursor string          `json:"next_cursor,omitempty"`
}

ActivityPage is GET /api/v1/domains/{domain}/activity's body.

type AdvisorApplyResult added in v0.2.0

type AdvisorApplyResult struct {
	FindingID       string                  `json:"finding_id"`
	Resource        resourceadvisor.Ref     `json:"resource"`
	Action          *resourceadvisor.Action `json:"action"`
	Before          AdvisorSettings         `json:"before"`
	After           AdvisorSettings         `json:"after"`
	ConfirmRequired bool                    `json:"confirm_required"`
	Applied         bool                    `json:"applied"`
	AppliedLive     bool                    `json:"applied_live"`
}

AdvisorApplyResult is POST .../findings/{id}/apply: a preview unless Applied.

type AdvisorFinding added in v0.2.0

type AdvisorFinding struct {
	resourceadvisor.Finding
	State        string `json:"state,omitempty"`
	SnoozedUntil string `json:"snoozed_until,omitempty"`
	Appliable    bool   `json:"appliable"`
	CanApply     bool   `json:"can_apply"`
}

AdvisorFinding is one finding as GET /api/v1/resource-advisor/findings returns it.

type AdvisorFindingQuery added in v0.2.0

type AdvisorFindingQuery struct {
	Resource      string
	Severity      string
	IncludeHidden bool
}

AdvisorFindingQuery filters ListAdvisorFindings; zero fields do not filter.

type AdvisorFindings added in v0.2.0

type AdvisorFindings struct {
	GeneratedAt string           `json:"generated_at"`
	Findings    []AdvisorFinding `json:"findings"`
}

AdvisorFindings is GET /api/v1/resource-advisor/findings.

type AdvisorSettings added in v0.2.0

type AdvisorSettings struct {
	MemoryBytes      int64 `json:"memory_bytes"`
	NanoCPUs         int64 `json:"nano_cpus"`
	SleepIdleMinutes int   `json:"sleep_idle_minutes,omitempty"`
}

AdvisorSettings is the part of a resource an advisor action changes.

type AdvisorSummary added in v0.2.0

type AdvisorSummary struct {
	GeneratedAt string `json:"generated_at"`
	resourceadvisor.Summary
}

AdvisorSummary is GET /api/v1/resource-advisor/summary.

type AgentVersionChange added in v0.2.0

type AgentVersionChange struct {
	NodeID      string `json:"node_id"`
	NodeName    string `json:"node_name"`
	FromVersion string `json:"from_version"`
	ToVersion   string `json:"to_version"`
	ObservedAt  string `json:"observed_at"`
}

AgentVersionChange is one observed node agent version change.

type AlertHistoryEntry added in v0.2.0

type AlertHistoryEntry struct {
	ID         string    `json:"id"`
	At         time.Time `json:"at"`
	RuleID     string    `json:"rule_id"`
	RuleName   string    `json:"rule_name"`
	RuleKind   string    `json:"rule_kind"`
	ResourceID string    `json:"resource_id,omitempty"`
	App        string    `json:"app,omitempty"`
	Node       string    `json:"node,omitempty"`
	Severity   string    `json:"severity,omitempty"`
	Event      string    `json:"event"`
	Outcome    string    `json:"outcome"`
	Detail     string    `json:"detail,omitempty"`
	SilenceID  string    `json:"silence_id,omitempty"`
	ChannelID  string    `json:"channel_id,omitempty"`
	Error      string    `json:"error,omitempty"`

	// Changes is set on fired entries when the query asked for it.
	Changes        *RecentChangesResource `json:"changes,omitempty"`
	ChangesOmitted bool                   `json:"changes_omitted,omitempty"`
}

AlertHistoryEntry mirrors internal/api's alertHistoryResource.

type AlertHistoryQuery added in v0.2.0

type AlertHistoryQuery struct {
	App            string
	RuleID         string
	Outcome        string
	Event          string
	Since          string
	Limit          int
	IncludeChanges bool
}

AlertHistoryQuery filters ListAlertHistory; zero fields are omitted. IncludeChanges asks the server to attach what changed before each firing.

type AlertLogRule added in v0.2.0

type AlertLogRule struct {
	Query           string   `json:"query,omitempty"`
	Regex           string   `json:"regex,omitempty"`
	Fields          []string `json:"fields,omitempty"`
	Level           string   `json:"level,omitempty"`
	Count           int      `json:"count,omitempty"`
	PerMinute       float64  `json:"per_minute,omitempty"`
	WindowSeconds   int      `json:"window_seconds,omitempty"`
	CooldownSeconds int      `json:"cooldown_seconds,omitempty"`
}

AlertLogRule is the match config of a log_pattern or log_level_rate rule.

type AlertRuleResource

type AlertRuleResource struct {
	ID         string `json:"id,omitempty"`
	Name       string `json:"name"`
	Kind       string `json:"kind"`
	ResourceID string `json:"resource_id,omitempty"`
	ChannelID  string `json:"channel_id,omitempty"`

	Metric      string  `json:"metric,omitempty"`
	Comparator  string  `json:"comparator,omitempty"`
	Threshold   float64 `json:"threshold"`
	ForDuration string  `json:"for_duration,omitempty"`

	RestartCountThreshold int    `json:"restart_count_threshold"`
	RestartWindow         string `json:"restart_window,omitempty"`

	ScheduledTaskID string `json:"scheduled_task_id,omitempty"`

	// BackupResourceKind/BackupDatabaseName/BackupServiceName/
	// BackupVolumeName are kind=backup_missing-only: see
	// CreateAlertRuleRequest's own doc comment.
	BackupResourceKind string `json:"backup_resource_kind,omitempty"`
	BackupDatabaseName string `json:"backup_database_name,omitempty"`
	BackupServiceName  string `json:"backup_service_name,omitempty"`
	BackupVolumeName   string `json:"backup_volume_name,omitempty"`

	SLO     *AlertSLOConfig `json:"slo,omitempty"`
	LogRule *AlertLogRule   `json:"log_rule,omitempty"`

	NotifyURL  string `json:"notify_url,omitempty"`
	NotifyKind string `json:"notify_kind,omitempty"`
	Enabled    bool   `json:"enabled"`

	// Warnings are response-only, non-blocking problems with the saved rule.
	Warnings []string `json:"warnings,omitempty"`

	Severity            string            `json:"severity,omitempty"`
	Labels              map[string]string `json:"labels,omitempty"`
	ConsecutiveFailures int               `json:"consecutive_failures,omitempty"`
	FlapThreshold       int               `json:"flap_threshold,omitempty"`
	FlapWindow          string            `json:"flap_window,omitempty"`
	Silenced            bool              `json:"silenced,omitempty"`
	SilencedBy          string            `json:"silenced_by,omitempty"`

	Firing          bool       `json:"firing,omitempty"`
	PendingSince    *time.Time `json:"pending_since,omitempty"`
	FiringSince     *time.Time `json:"firing_since,omitempty"`
	LastEvaluatedAt *time.Time `json:"last_evaluated_at,omitempty"`
	LastValue       *float64   `json:"last_value,omitempty"`
}

AlertRuleResource mirrors internal/api's ruleResource (internal/api/alerts.go). Threshold-kind fields (Metric, Comparator, Threshold, ForDuration) and crashloop-kind fields (RestartCountThreshold, RestartWindow) are both present on the wire; only the ones matching Kind are meaningful, mirroring alerting.Rule's own shape. A kind=cert_expiry rule uses neither group: it watches every stored certificate platform-wide, not this rule's own resource_id.

type AlertSLOConfig added in v0.2.0

type AlertSLOConfig struct {
	Objective string  `json:"objective"`
	Target    float64 `json:"target"`
	LatencyMs float64 `json:"latency_ms,omitempty"`
}

AlertSLOConfig mirrors internal/alerting.SLOConfig: the request-based SLO a kind=slo_burn rule watches. Target is a percentage such as 99.9.

type AliasesRequest added in v0.2.0

type AliasesRequest struct {
	Aliases    []string `json:"aliases"`
	StatusCode int      `json:"status_code,omitempty"`
}

AliasesRequest makes the path domain the primary for every alias.

type AnalyzeBuild added in v0.2.0

type AnalyzeBuild struct {
	Type           string                   `json:"type"`
	DockerfilePath string                   `json:"dockerfile_path,omitempty"`
	BaseDirectory  string                   `json:"base_directory,omitempty"`
	Evidence       string                   `json:"evidence"`
	Alternatives   []AnalyzeBuildSuggestion `json:"alternatives"`
}

AnalyzeBuild mirrors internal/appwizard's Build.

type AnalyzeBuildSuggestion added in v0.2.0

type AnalyzeBuildSuggestion struct {
	BuildType      string `json:"build_type"`
	DockerfilePath string `json:"dockerfile_path,omitempty"`
	BaseDirectory  string `json:"base_directory,omitempty"`
	Reason         string `json:"reason"`
	ReasonCode     string `json:"reason_code"`
	Recommended    bool   `json:"recommended"`
}

AnalyzeBuildSuggestion mirrors internal/repolayout's Suggestion.

type AnalyzeDatabase added in v0.2.0

type AnalyzeDatabase struct {
	Engine        string `json:"engine"`
	Version       string `json:"version"`
	SuggestedName string `json:"suggested_name"`
	EnvVar        string `json:"env_var"`
	Field         string `json:"field"`
	Evidence      string `json:"evidence"`
}

AnalyzeDatabase mirrors internal/appwizard's DatabaseNeed.

type AnalyzeEnvKey added in v0.2.0

type AnalyzeEnvKey struct {
	Key        string `json:"key"`
	Required   bool   `json:"required"`
	Secret     bool   `json:"secret"`
	Source     string `json:"source"`
	ProvidedBy string `json:"provided_by,omitempty"`
	HasDefault bool   `json:"has_default"`
}

AnalyzeEnvKey mirrors internal/appwizard's EnvKey. It never carries a value.

type AnalyzeText added in v0.2.0

type AnalyzeText struct {
	Value    string `json:"value"`
	Evidence string `json:"evidence"`
}

AnalyzeText mirrors internal/appwizard's Text.

type AppBindMountResource added in v0.2.0

type AppBindMountResource struct {
	HostPath      string `json:"host_path"`
	ContainerPath string `json:"container_path"`
	ReadOnly      bool   `json:"read_only,omitempty"`
}

AppBindMountResource mirrors internal/api's appBindMountResource (app_volumes.go): one of an app's bind-mounted host directories.

type AppBranchEnvOverride added in v0.2.0

type AppBranchEnvOverride struct {
	ID            string `json:"id"`
	BranchPattern string `json:"branch_pattern"`
	Key           string `json:"key"`
	Value         string `json:"value"`
	Secret        bool   `json:"secret"`
	UpdatedAt     string `json:"updated_at"`
}

AppBranchEnvOverride mirrors internal/api's branchEnvOverrideResource: one branch-scoped env var override. Value is always "" for a secret-marked entry, never echoed back once saved.

type AppConnectionResource added in v0.2.0

type AppConnectionResource struct {
	EnvVar       string `json:"env_var"`
	DatabaseName string `json:"database_name"`
	Field        string `json:"field"`
	Host         string `json:"host"`
	MeshDNS      bool   `json:"mesh_dns"`
	NodeID       string `json:"node_id,omitempty"`
	CrossNode    bool   `json:"cross_node"`
}

AppConnectionResource mirrors internal/api's appConnectionResource: GET/POST /api/v1/apps/{name}/connections' wire shape for one DatabaseEnv entry, including a resolved-host preview so a caller can tell whether a connection is cross-node-capable without deploying.

type AppDatabaseResource

type AppDatabaseResource struct {
	AppName      string `json:"app_name,omitempty"`
	DatabaseName string `json:"database_name"`
	EnvVar       string `json:"env_var"`
	Field        string `json:"field"`
}

AppDatabaseResource mirrors internal/api's appDatabaseResource: PUT /api/v1/apps/{name}/database's response body.

type AppEgressAllow added in v0.2.0

type AppEgressAllow struct {
	Host string `json:"host"`
	Port int    `json:"port"`
}

AppEgressAllow mirrors internal/api's egressAllowResource: one host+port pair in an app's outbound network allowlist.

type AppEgressPolicyResource added in v0.2.0

type AppEgressPolicyResource struct {
	AppName string           `json:"app_name"`
	Mode    string           `json:"mode,omitempty"`
	Allow   []AppEgressAllow `json:"allow,omitempty"`
}

AppEgressPolicyResource mirrors internal/api's egressPolicyResource: GET/PUT /api/v1/apps/{name}/egress-policy's response body. Mode/Allow both empty means unconfigured, unrestricted egress, the default for every app that has never opted in.

type AppEnvironmentDomains added in v0.2.0

type AppEnvironmentDomains struct {
	App                 string                        `json:"app"`
	ActiveEnvironmentID string                        `json:"active_environment_id,omitempty"`
	DefaultDomains      []string                      `json:"default_domains"`
	RoutedDomains       []string                      `json:"routed_domains"`
	Environments        []EnvironmentDomainSet        `json:"environments"`
	Reachability        map[string]DomainReachability `json:"reachability,omitempty"`
}

AppEnvironmentDomains mirrors internal/api's appEnvironmentDomainsResource.

type AppGroupResource

type AppGroupResource struct {
	AppID    string           `json:"app_id,omitempty"`
	Services []AppResource    `json:"services"`
	Status   AppStatusSummary `json:"status"`
}

AppGroupResource mirrors internal/api's appGroupResource (internal/api/apps_group.go): GET /api/v1/apps/{name}/group's response, name's sibling services under the same store.App plus one rollup status across all of them.

type AppHealthResource added in v0.2.0

type AppHealthResource struct {
	Name   string         `json:"name"`
	Health *ServiceHealth `json:"health"`
}

AppHealthResource mirrors internal/api's appHealthResource.

type AppHealthScoreCategory added in v0.2.0

type AppHealthScoreCategory struct {
	Key    string `json:"key"`
	Label  string `json:"label"`
	Status string `json:"status"`
	Reason string `json:"reason"`
}

AppHealthScoreCategory mirrors internal/api's healthScoreCategory.

type AppHealthScoreResource added in v0.2.0

type AppHealthScoreResource struct {
	AppName    string                   `json:"app_name"`
	Status     string                   `json:"status"`
	Categories []AppHealthScoreCategory `json:"categories"`
	ComputedAt time.Time                `json:"computed_at"`
}

AppHealthScoreResource mirrors internal/api's appHealthScoreResource.

type AppHookRunsResource

type AppHookRunsResource struct {
	PreDeploy  *HookRunResource `json:"pre_deploy,omitempty"`
	PostDeploy *HookRunResource `json:"post_deploy,omitempty"`
}

AppHookRunsResource mirrors internal/api's appHookRunsResource: nil fields mean that hook has never run, not an empty HookRunResource.

type AppImportChange added in v0.2.0

type AppImportChange struct {
	App    string `json:"app"`
	Key    string `json:"key"`
	Secret bool   `json:"secret"`
	Count  int    `json:"count"`
	Before string `json:"before"`
	After  string `json:"after"`
}

AppImportChange is one env value a mapping rewrote, with masked values.

type AppImportCheck added in v0.2.0

type AppImportCheck struct {
	App    string `json:"app,omitempty"`
	ID     string `json:"id"`
	Status string `json:"status"`
	Detail string `json:"detail"`
	Fix    string `json:"fix,omitempty"`
}

AppImportCheck is one preflight result.

type AppImportDatabase added in v0.2.0

type AppImportDatabase struct {
	SourceID   string `json:"source_id"`
	Name       string `json:"name"`
	Host       string `json:"host"`
	Target     string `json:"target,omitempty"`
	TargetHost string `json:"target_host,omitempty"`
}

AppImportDatabase is a database an app points at.

type AppImportEntry added in v0.2.0

type AppImportEntry struct {
	SourceID    string              `json:"source_id"`
	Name        string              `json:"name"`
	Kind        string              `json:"kind"`
	Project     string              `json:"project,omitempty"`
	Environment string              `json:"environment,omitempty"`
	Server      string              `json:"server,omitempty"`
	Source      string              `json:"source"`
	Repo        string              `json:"repo,omitempty"`
	Branch      string              `json:"branch,omitempty"`
	Image       string              `json:"image,omitempty"`
	ImageID     string              `json:"image_id,omitempty"`
	HostBuilt   bool                `json:"host_built,omitempty"`
	BuildPack   string              `json:"build_pack,omitempty"`
	MapsTo      string              `json:"maps_to,omitempty"`
	Port        int                 `json:"port,omitempty"`
	Domains     []string            `json:"domains,omitempty"`
	Env         AppImportEnvCounts  `json:"env"`
	Volumes     []AppImportVolume   `json:"volumes,omitempty"`
	Databases   []AppImportDatabase `json:"databases,omitempty"`
	Verdict     string              `json:"verdict"`
	Findings    []AppImportFinding  `json:"findings,omitempty"`
}

AppImportEntry is one inventory row. It never holds an env value.

type AppImportEnvCounts added in v0.2.0

type AppImportEnvCounts struct {
	Plain  int `json:"plain"`
	Secret int `json:"secret"`
	Empty  int `json:"empty"`
}

AppImportEnvCounts counts variables by sensitivity.

type AppImportFinding added in v0.2.0

type AppImportFinding struct {
	Reason string `json:"reason"`
	Next   string `json:"next,omitempty"`
}

AppImportFinding is one reason behind a verdict.

type AppImportImage added in v0.2.0

type AppImportImage struct {
	SourceID      string `json:"source_id"`
	App           string `json:"app"`
	Target        string `json:"target,omitempty"`
	Image         string `json:"image"`
	SourceImageID string `json:"source_image_id,omitempty"`
	LoadedImageID string `json:"loaded_image_id,omitempty"`
	Node          string `json:"node,omitempty"`
	State         string `json:"state"`
	Bytes         int64  `json:"bytes"`
	Verified      bool   `json:"verified"`
	Error         string `json:"error,omitempty"`
	UpdatedAt     string `json:"updated_at,omitempty"`
}

AppImportImage is one host-built image of an import session.

type AppImportImages added in v0.2.0

type AppImportImages struct {
	Running         bool             `json:"running"`
	Source          string           `json:"source,omitempty"`
	CredentialsHeld bool             `json:"credentials_held"`
	Supported       bool             `json:"supported"`
	MaxBytes        int64            `json:"max_bytes"`
	Images          []AppImportImage `json:"images"`
}

AppImportImages is the image move state of a session.

type AppImportImagesTransfer added in v0.2.0

type AppImportImagesTransfer struct {
	SSH        string   `json:"ssh,omitempty"`
	Port       int      `json:"port,omitempty"`
	PrivateKey string   `json:"private_key,omitempty"`
	Passphrase string   `json:"passphrase,omitempty"`
	UseAgent   bool     `json:"use_agent,omitempty"`
	Items      []string `json:"items,omitempty"`
}

AppImportImagesTransfer is the body of POST .../images/transfer. The private key travels in this body only and is never stored.

type AppImportItem added in v0.2.0

type AppImportItem struct {
	SourceID  string         `json:"source_id"`
	Name      string         `json:"name"`
	Target    string         `json:"target,omitempty"`
	Kind      string         `json:"kind"`
	State     string         `json:"state"`
	Selected  bool           `json:"selected"`
	Reason    string         `json:"reason,omitempty"`
	Entry     AppImportEntry `json:"entry"`
	Domains   []string       `json:"domains,omitempty"`
	Remaining []string       `json:"remaining,omitempty"`
	AppPath   string         `json:"app_path,omitempty"`
}

AppImportItem is one source app within a session.

type AppImportItemsRequest added in v0.2.0

type AppImportItemsRequest struct {
	Items []string `json:"items,omitempty"`
}

AppImportItemsRequest narrows verify and rollback to some items.

type AppImportMapping added in v0.2.0

type AppImportMapping struct {
	From string `json:"from"`
	To   string `json:"to"`
}

AppImportMapping rewrites one source hostname to a new one in env values.

type AppImportPlanUpdate added in v0.2.0

type AppImportPlanUpdate struct {
	Mappings  *[]AppImportMapping `json:"mappings,omitempty"`
	Selected  *[]string           `json:"selected,omitempty"`
	Collision string              `json:"collision,omitempty"`
}

AppImportPlanUpdate is the body of PUT .../sessions/{id}/plan. Nil fields are left unchanged.

type AppImportPreflight added in v0.2.0

type AppImportPreflight struct {
	Checks     []AppImportCheck  `json:"checks"`
	Diff       []AppImportChange `json:"diff"`
	Failed     int               `json:"failed"`
	Warnings   int               `json:"warnings"`
	EnvChecked bool              `json:"env_checked"`
	CanStage   bool              `json:"can_stage"`
}

AppImportPreflight is the outcome of the preflight checks.

type AppImportRequest added in v0.2.0

type AppImportRequest struct {
	Platform      string             `json:"platform"`
	URL           string             `json:"url"`
	Token         string             `json:"token"`
	Snapshot      string             `json:"snapshot,omitempty"`
	InsecureTLS   bool               `json:"insecure_tls,omitempty"`
	AllowPrivate  bool               `json:"allow_private,omitempty"`
	AllowLoopback bool               `json:"allow_loopback,omitempty"`
	Only          []string           `json:"only,omitempty"`
	Collision     string             `json:"collision,omitempty"`
	Mappings      []AppImportMapping `json:"mappings,omitempty"`
}

AppImportRequest is the body of the plan and session create routes. Token is the source credential and is only ever sent in this body.

type AppImportView added in v0.2.0

type AppImportView struct {
	ID        string              `json:"id"`
	Platform  string              `json:"platform"`
	SourceURL string              `json:"source_url"`
	Step      string              `json:"step"`
	Collision string              `json:"collision"`
	Mappings  []AppImportMapping  `json:"mappings"`
	Suggested []AppImportMapping  `json:"suggested_mappings"`
	Connected bool                `json:"connected"`
	Running   bool                `json:"running"`
	Items     []AppImportItem     `json:"items"`
	Databases []AppImportDatabase `json:"databases"`
	Preflight *AppImportPreflight `json:"preflight,omitempty"`
	Counts    map[string]int      `json:"counts"`
	States    map[string]int      `json:"states"`
}

AppImportView is a plan or a session: the inventory, selection and state.

type AppImportVolume added in v0.2.0

type AppImportVolume struct {
	Name          string `json:"name"`
	ContainerPath string `json:"container_path"`
	HostPath      string `json:"host_path,omitempty"`
	SizeBytes     int64  `json:"size_bytes"`
	SizeKnown     bool   `json:"size_known"`
}

AppImportVolume is one persistent mount of a source app.

type AppIntegrationResource added in v0.2.0

type AppIntegrationResource struct {
	ID             string `json:"id"`
	AppName        string `json:"app_name,omitempty"`
	IntegrationKey string `json:"integration_key"`
	Name           string `json:"name"`
	CreatedAt      string `json:"created_at,omitempty"`
	UpdatedAt      string `json:"updated_at,omitempty"`
}

AppIntegrationResource mirrors internal/api's appIntegrationResource: one app's attached integration. Field values are never included here, the same "names only" shape SecretKeyResource already establishes.

type AppListEntry added in v0.2.0

type AppListEntry struct {
	AppResource
	Status AppStatusSummary `json:"status"`
}

AppListEntry is one GET /api/v1/apps row: the app plus its status rollup.

type AppListQuery added in v0.2.0

type AppListQuery struct {
	Q, Project, Environment string
	Tags                    []string
	Limit, Offset           int
}

AppListQuery narrows GET /api/v1/apps and /api/v1/apps-summary.

type AppMetricsResource

type AppMetricsResource struct {
	Metric string                `json:"metric"`
	Points []MetricPointResource `json:"points"`
}

AppMetricsResource mirrors internal/api's metricsResponse (internal/api/metrics.go).

type AppMetricsSummary added in v0.2.0

type AppMetricsSummary struct {
	Name         string     `json:"name"`
	CPUPercent   *float64   `json:"cpu_percent,omitempty"`
	MemoryBytes  *float64   `json:"memory_usage_bytes,omitempty"`
	MemoryLimit  *float64   `json:"memory_limit_bytes,omitempty"`
	HasTraffic   bool       `json:"has_traffic"`
	RatePerSec   float64    `json:"rate_per_sec"`
	ErrorRate5xx float64    `json:"error_rate_5xx"`
	P95Ms        float64    `json:"p95_ms"`
	Spark        []float64  `json:"spark"`
	LastDeployAt *time.Time `json:"last_deploy_at,omitempty"`
}

AppMetricsSummary is one row of GET /api/v1/apps-metrics.

type AppPreviewEnvOverride added in v0.2.0

type AppPreviewEnvOverride struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

AppPreviewEnvOverride mirrors handleSetAppPreviewEnvOverride's own response shape: the env var key plus the preview-specific value just saved.

type AppRequestsResource added in v0.2.0

type AppRequestsResource struct {
	App         string                 `json:"app"`
	From        time.Time              `json:"from"`
	To          time.Time              `json:"to"`
	StepSeconds float64                `json:"step_seconds"`
	Summary     RequestSummaryResource `json:"summary"`
	Points      []RequestPointResource `json:"points"`
}

AppRequestsResource mirrors internal/api's requestsResponse.

type AppResource

type AppResource struct {
	Name  string `json:"name"`
	Image string `json:"image"`
	// ImageDigest is the content Image is pinned to, empty for a legacy tag.
	ImageDigest string `json:"image_digest,omitempty"`
	Port        int    `json:"port"`
	// HostPort mirrors internal/api's appResource.HostPort: nil means
	// "let Docker assign one", a value pins the host-side port. Settable
	// on create and update, like Port.
	HostPort *int `json:"host_port,omitempty"`
	// BindAddress mirrors internal/api's appResource.BindAddress:
	// "private" (loopback only, the default), "public" (every
	// interface), or a literal IP. No omitempty: a response always
	// carries the resolved value.
	BindAddress string `json:"bind_address"`
	// Replicas and Strategy must round-trip: UpdateApp is a full replace, so
	// dropping them on a GET-then-PUT would reset a scaled app to defaults.
	Replicas int      `json:"replicas,omitempty"`
	Strategy string   `json:"strategy,omitempty"`
	Domains  []string `json:"domains,omitempty"`
	// Env holds MaskedEnvValue for sensitive keys; sending it back keeps the stored value.
	Env map[string]string `json:"env,omitempty"`
	// SecretEnv mirrors internal/api's appResource.SecretEnv: names of
	// env vars backed by encrypted secret storage, values held only in
	// Secrets below or set later via PUT .../secrets/{key}, never here.
	SecretEnv []string `json:"secret_env,omitempty"`
	// Secrets mirrors internal/api's appResource.Secrets: plaintext
	// values to encrypt and store for SecretEnv-named vars at create
	// time. Write-only, like SetSecretRequest's own Value: never
	// populated on a response.
	Secrets map[string]string `json:"secrets,omitempty"`
	// VaultEnv mirrors internal/api's appResource.VaultEnv: env vars
	// whose values resolve live from an external HashiCorp Vault
	// instance, never a value this platform stores. Settable at create
	// time, response-mirrors the store otherwise.
	VaultEnv  map[string]AppVaultEnvRef `json:"vault_env,omitempty"`
	Resources *ServiceResources         `json:"resources,omitempty"`
	Health    *ServiceHealth            `json:"health,omitempty"`
	// Hooks mirrors internal/api's appResource.Hooks: settable on create
	// and update, like Resources/Health above.
	Hooks *ServiceHooks `json:"hooks,omitempty"`
	// NodeID mirrors internal/api's appResource.NodeID: response-only on
	// update, but settable at create time as an explicit placement
	// override (omitted entirely lets the server auto-place via simple
	// spread scheduling instead, see AutoPlaced below).
	NodeID string `json:"node_id,omitempty"`
	// AutoPlaced mirrors internal/api's appResource.AutoPlaced:
	// response-only, true when create left node_id unset and the server
	// picked a non-local node for it via simple spread scheduling.
	AutoPlaced bool `json:"auto_placed,omitempty"`
	// ProjectID mirrors internal/api's appResource.ProjectID:
	// response-only, set via PUT /api/v1/apps/{name}/project.
	ProjectID string `json:"project_id,omitempty"`
	// EnvironmentID mirrors internal/api's appResource.EnvironmentID:
	// response-only, set via PUT /api/v1/apps/{name}/environment.
	EnvironmentID string `json:"environment_id,omitempty"`
	// StorageTargetID mirrors internal/api's appResource.StorageTargetID:
	// response-only, set via PUT/DELETE /api/v1/apps/{name}/storage
	// (SetAppStorage/ClearAppStorage).
	StorageTargetID string `json:"storage_target_id,omitempty"`
	// EnvDirty mirrors internal/api's appResource.EnvDirty: true means
	// Env was saved since the running container was last recreated, so
	// the change is not live yet. Clears on restart or redeploy.
	EnvDirty bool `json:"env_dirty"`
	// PreviousReleaseHeldUntil mirrors internal/api's GET app payload: when
	// the kept previous release, an instant rollback target, is removed.
	PreviousReleaseHeldUntil string `json:"previous_release_held_until,omitempty"`
	// FallbackURL is the automatic sslip.io URL of an app with no domain (GET only).
	FallbackURL string `json:"fallback_url,omitempty"`
	// Volumes mirrors internal/api's appResource.Volumes: this app's
	// declared named Docker volumes, response-only (declared through
	// app.yaml, not settable here).
	Volumes []AppVolumeResource `json:"volumes,omitempty"`
	// BindMounts mirrors internal/api's appResource.BindMounts: this
	// app's declared host-directory bind mounts, response-only
	// (declared through app.yaml or a compose import, not settable
	// here).
	BindMounts []AppBindMountResource `json:"bind_mounts,omitempty"`
	// Command mirrors internal/api's appResource.Command: overrides the
	// image's own default CMD, response-only (declared through app.yaml's
	// command: or a compose import, not settable here).
	Command []string `json:"command,omitempty"`
	// PullPolicy mirrors internal/api's appResource.PullPolicy: "always"
	// forces a fresh image pull on every deploy, empty is the default
	// pull-if-absent behavior. Response-only (declared through a compose
	// import's pull_policy:, not settable here).
	PullPolicy string `json:"pull_policy,omitempty"`
	// PreviewEnvOverrides mirrors internal/api's
	// appResource.PreviewEnvOverrides: response-only, set via PUT/DELETE
	// /api/v1/apps/{name}/preview-env/{key} (SetAppPreviewEnvOverride/
	// ClearAppPreviewEnvOverride).
	PreviewEnvOverrides map[string]string `json:"preview_env_overrides,omitempty"`
	// Tags mirrors internal/api's appResource.Tags: names of every
	// store.Tag attached to this app, response-only, set via POST/DELETE
	// /api/v1/apps/{name}/tags (AttachAppTag/DetachAppTag).
	Tags []string `json:"tags,omitempty"`
}

AppResource mirrors internal/api's appResource (apps.go). Field order and JSON tags match exactly, so a response decodes cleanly and a request encodes into exactly what the server expects.

type AppResourceUsageResource added in v0.2.0

type AppResourceUsageResource struct {
	Name             string   `json:"name"`
	CPUPercent       *float64 `json:"cpu_percent,omitempty"`
	MemoryUsageBytes *float64 `json:"memory_usage_bytes,omitempty"`
	MemoryLimitBytes *float64 `json:"memory_limit_bytes,omitempty"`
	NetworkRxBytes   *float64 `json:"network_rx_bytes,omitempty"`
	NetworkTxBytes   *float64 `json:"network_tx_bytes,omitempty"`
}

AppResourceUsageResource mirrors internal/api's appResourceUsageResource (internal/api/app_resource_usage.go): one app's latest known CPU/memory/network reading, for the dashboard's "what's consuming the most resources right now" ranking. A nil field means telemetry has never recorded that metric for this app yet, not zero usage.

type AppScheduleHistoryEntry added in v0.2.0

type AppScheduleHistoryEntry struct {
	ID           string    `json:"id"`
	ScheduledFor time.Time `json:"scheduled_for"`
	FiredAt      time.Time `json:"fired_at"`
	Status       string    `json:"status"`
	Reason       string    `json:"reason,omitempty"`
}

AppScheduleHistoryEntry mirrors internal/api's appScheduleHistoryResource (GET /api/v1/apps/{name}/schedule/history).

type AppScheduleResource added in v0.2.0

type AppScheduleResource struct {
	ServiceName string     `json:"service_name"`
	Cron        string     `json:"cron"`
	Branch      string     `json:"branch"`
	Timezone    string     `json:"timezone"`
	Enabled     bool       `json:"enabled"`
	NextRunAt   *time.Time `json:"next_run_at,omitempty"`
}

AppScheduleResource mirrors internal/api's appScheduleResource (GET/PUT /api/v1/apps/{name}/schedule).

type AppSleepResource added in v0.2.0

type AppSleepResource struct {
	Enabled     bool `json:"enabled"`
	IdleMinutes int  `json:"idle_minutes"`
	Sleeping    bool `json:"sleeping"`
	// HoldRequests is function mode: a request that wakes the app waits for it.
	HoldRequests bool `json:"hold_requests"`
}

AppSleepResource mirrors internal/api's appSleepResource.

type AppStatusEntry added in v0.2.0

type AppStatusEntry struct {
	Name   string `json:"name"`
	Status struct {
		Label   string `json:"label"`
		Variant string `json:"variant"`
	} `json:"status"`
}

AppStatusEntry is one row of GET /api/v1/apps reduced to its name and status rollup (internal/api's appStatusSummary).

type AppStatusSummary

type AppStatusSummary struct {
	Label   string `json:"label"`
	Variant string `json:"variant"`
}

AppStatusSummary mirrors internal/api's appStatusSummary (internal/api/app_status.go): a compact category rollup, not the raw conditions list ConditionResource carries.

type AppStorageResource added in v0.2.0

type AppStorageResource struct {
	AppName         string `json:"app_name"`
	StorageTargetID string `json:"storage_target_id,omitempty"`
}

AppStorageResource mirrors internal/api's appStorageResource (internal/api/apps_storage.go): PUT/DELETE /api/v1/apps/{name}/storage's response.

type AppStreamResource added in v0.2.0

type AppStreamResource struct {
	ID            string `json:"id"`
	App           string `json:"app"`
	ContainerPort int    `json:"container_port"`
	HostPort      int    `json:"host_port"`
	Protocol      string `json:"protocol"`
	CreatedAt     string `json:"created_at"`
}

AppStreamResource mirrors internal/api's appStreamResource.

type AppVaultEnvRef added in v0.2.0

type AppVaultEnvRef struct {
	Path string `json:"path"`
	Key  string `json:"key"`
}

AppVaultEnvRef mirrors internal/api's appVaultEnvRef: one env var's { path, key } reference into an external Vault instance.

type AppVolumeMoveResource added in v0.2.0

type AppVolumeMoveResource struct {
	ID          string                      `json:"id"`
	ServiceName string                      `json:"service_name"`
	FromNodeID  string                      `json:"from_node_id"`
	ToNodeID    string                      `json:"to_node_id"`
	Status      string                      `json:"status"`
	Error       string                      `json:"error,omitempty"`
	Steps       []AppVolumeMoveStepResource `json:"steps"`
	StartedAt   string                      `json:"started_at"`
	FinishedAt  string                      `json:"finished_at,omitempty"`
}

AppVolumeMoveResource mirrors internal/api's appVolumeMoveResource: one "move this app to another node, taking its volumes with it" attempt. MoveAppWithVolumes always returns this shape regardless of status code: 200 means it already finished (an app with no volumes, or already on the target node), 202 means Status is "running" and the caller should poll GetAppVolumeMove until it isn't.

type AppVolumeMoveStepResource added in v0.2.0

type AppVolumeMoveStepResource struct {
	Name       string `json:"name"`
	Status     string `json:"status"`
	Error      string `json:"error,omitempty"`
	StartedAt  string `json:"started_at"`
	FinishedAt string `json:"finished_at,omitempty"`
}

AppVolumeMoveStepResource mirrors internal/api's appVolumeMoveStepResource (apps_move_with_volumes.go).

type AppVolumeResource

type AppVolumeResource struct {
	Name          string `json:"name"`
	ContainerPath string `json:"container_path"`
}

AppVolumeResource mirrors internal/api's appVolumeResource (app_volumes.go): one of an app's named Docker volumes, identified by its logical name (what an operator wrote in app.yaml), not the resolved, platform-prefixed Docker volume name.

type ApplyPendingResult added in v0.2.0

type ApplyPendingResult struct {
	AttemptID string `json:"attempt_id,omitempty"`
}

ApplyPendingResult mirrors internal/api's applyPendingResult.

type ApplyPolicyTemplateAttach added in v0.2.0

type ApplyPolicyTemplateAttach struct {
	PrincipalType string `json:"principal_type"`
	PrincipalID   string `json:"principal_id"`
}

ApplyPolicyTemplateAttach names the user or token a template policy is attached to.

type ApplyPolicyTemplateRequest added in v0.2.0

type ApplyPolicyTemplateRequest struct {
	Name   string                     `json:"name,omitempty"`
	Params map[string]string          `json:"params,omitempty"`
	Attach *ApplyPolicyTemplateAttach `json:"attach,omitempty"`
}

ApplyPolicyTemplateRequest mirrors internal/api's applyTemplateRequest.

type ApplyPolicyTemplateResponse added in v0.2.0

type ApplyPolicyTemplateResponse struct {
	Policy   PolicyResource `json:"policy"`
	Attached bool           `json:"attached"`
}

ApplyPolicyTemplateResponse mirrors internal/api's applyTemplateResponse.

type ApprovePreviewResult added in v0.2.0

type ApprovePreviewResult struct {
	Status string `json:"status"`
}

ApprovePreviewResult is POST .../approve's body.

type AppsPage added in v0.2.0

type AppsPage struct {
	Items      []AppResource
	NextOffset int
	TotalCount int
}

AppsPage is one page of GET /api/v1/apps, returned by ListAppsPage. NextOffset is 0 when there is no further page; TotalCount is the server's own X-Total-Count header, the full match count before paging.

type AppsSummary added in v0.2.0

type AppsSummary struct {
	Total     int `json:"total"`
	Running   int `json:"running"`
	Failing   int `json:"failing"`
	Deploying int `json:"deploying"`
	Stopped   int `json:"stopped"`
	Unknown   int `json:"unknown"`
}

AppsSummary is GET /api/v1/apps-summary's body.

type AttachAppIntegrationRequest added in v0.2.0

type AttachAppIntegrationRequest struct {
	IntegrationKey string            `json:"integration_key"`
	Fields         map[string]string `json:"fields"`
}

AttachAppIntegrationRequest mirrors internal/api's attachAppIntegrationRequest.

type AttachAppTagRequest added in v0.2.0

type AttachAppTagRequest struct {
	Name string `json:"name"`
}

AttachAppTagRequest mirrors internal/api's attachAppTagRequest: POST /api/v1/apps/{name}/tags' body, a tag name rather than an ID (see that type's own doc comment for why).

type AttachPolicyRequest

type AttachPolicyRequest struct {
	PrincipalType string `json:"principal_type"`
	PrincipalID   string `json:"principal_id"`
}

AttachPolicyRequest mirrors internal/api's attachPolicyRequest.

type AttentionFeedItem added in v0.2.0

type AttentionFeedItem struct {
	ID       string            `json:"id"`
	Severity string            `json:"severity"`
	Kind     string            `json:"kind"`
	Subject  string            `json:"subject"`
	Title    string            `json:"title"`
	Detail   string            `json:"detail"`
	Action   string            `json:"action"`
	Link     string            `json:"link"`
	Params   map[string]string `json:"params,omitempty"`
	Class    string            `json:"class,omitempty"`
}

AttentionFeedItem is one server-built attention item (GET /api/v1/attention/feed), already limited to what the caller may see.

type AuditLogEntryResource

type AuditLogEntryResource struct {
	ID         string `json:"id"`
	ActorType  string `json:"actor_type"`
	ActorID    string `json:"actor_id"`
	ActorName  string `json:"actor_name"`
	Ability    string `json:"ability"`
	Method     string `json:"method"`
	Path       string `json:"path"`
	StatusCode int    `json:"status_code"`
	RemoteAddr string `json:"remote_addr"`
	CreatedAt  string `json:"created_at"`
	ClientKind string `json:"client_kind"`
	// AgentName labels the AI agent behind the token; AgentClient is the
	// self-reported MCP client name and version.
	AgentName   string `json:"agent_name,omitempty"`
	AgentClient string `json:"agent_client,omitempty"`
}

AuditLogEntryResource mirrors internal/api's auditLogEntryResource (internal/api/audit.go).

type AuthEngineStatusResource added in v0.2.0

type AuthEngineStatusResource struct {
	LibraryVersion string `json:"library_version"`
	TOTP           bool   `json:"totp"`
	Passkeys       bool   `json:"passkeys"`
	OAuth          bool   `json:"oauth"`
}

AuthEngineStatusResource mirrors internal/api's authEngineStatusResponse.

type AuthGateEvent added in v0.2.0

type AuthGateEvent struct {
	At        string `json:"at"`
	UserID    string `json:"user_id"`
	UserEmail string `json:"user_email"`
	Decision  string `json:"decision"`
	Reason    string `json:"reason"`
	IP        string `json:"ip"`
	Count     int    `json:"count"`
}

AuthGateEvent mirrors internal/api's authGateEventResource.

type AuthGateEventsResponse added in v0.2.0

type AuthGateEventsResponse struct {
	Domain string          `json:"domain"`
	Since  string          `json:"since"`
	Events []AuthGateEvent `json:"events"`
}

AuthGateEventsResponse mirrors internal/api's authGateEventsResponse.

type AuthGateRule added in v0.2.0

type AuthGateRule struct {
	Kind    string `json:"kind"`
	Subject string `json:"subject"`
	Label   string `json:"label,omitempty"`
}

AuthGateRule is one built-in gate allow rule; Label is the email, team name or role name.

type AuthGateSessionsRevoked added in v0.2.0

type AuthGateSessionsRevoked struct {
	Domain  string `json:"domain"`
	Revoked int64  `json:"revoked"`
}

AuthGateSessionsRevoked mirrors internal/api's gateSessionsRevokedResponse.

type AutoRollbackSLOBurnSettingResource added in v0.2.0

type AutoRollbackSLOBurnSettingResource struct {
	Mode string `json:"mode"`
}

AutoRollbackSLOBurnSettingResource mirrors internal/api's autoRollbackSLOBurnSettingResource: both GET and PUT /api/v1/apps/{name}/auto-rollback-slo-burn's response, how this app reacts the next time a kind=slo_burn alert rule fires.

type AutoRollbackSettingResource added in v0.2.0

type AutoRollbackSettingResource struct {
	Enabled bool `json:"enabled"`
}

AutoRollbackSettingResource mirrors internal/api's autoRollbackSettingResource: both GET and PUT /api/v1/apps/{name}/auto-rollback's response, whether this app rolls itself back automatically the next time a crashloop alert rule fires.

type AutomationRun added in v0.2.0

type AutomationRun struct {
	ID        string       `json:"id"`
	App       string       `json:"app"`
	Domain    string       `json:"domain"`
	Result    string       `json:"result"`
	Steps     []GoLiveStep `json:"steps"`
	CreatedAt time.Time    `json:"created_at"`
	UndoneAt  *time.Time   `json:"undone_at,omitempty"`
	Undoable  bool         `json:"undoable"`
}

AutomationRun is one entry of the automation history.

type BackupCoverageResponse added in v0.2.0

type BackupCoverageResponse struct {
	Summary   CoverageSummaryResource `json:"summary"`
	Resources []CoverageRowResource   `json:"resources"`
	Targets   []struct {
		ID       string `json:"id"`
		Name     string `json:"name"`
		Provider string `json:"provider"`
	} `json:"targets"`
	Defaults BackupDefaults `json:"defaults"`
}

BackupCoverageResponse mirrors internal/api's backupCoverageResponse.

type BackupDefaults added in v0.2.0

type BackupDefaults struct {
	Schedule   string `json:"schedule"`
	Retain     int    `json:"retain"`
	RetainDays int    `json:"retain_days"`
}

BackupDefaults mirrors internal/api's backupDefaults.

type BackupDrillResource added in v0.2.0

type BackupDrillResource struct {
	ID           string `json:"id"`
	BackupID     string `json:"backup_id"`
	ResourceKind string `json:"resource_kind"`
	DatabaseName string `json:"database_name,omitempty"`
	ServiceName  string `json:"service_name,omitempty"`
	VolumeName   string `json:"volume_name,omitempty"`
	Trigger      string `json:"trigger"`
	Status       string `json:"status"`
	Stage        string `json:"stage"`
	ObjectOK     bool   `json:"object_ok"`
	ChecksumOK   bool   `json:"checksum_ok"`
	RestoreOK    bool   `json:"restore_ok"`
	ContentOK    bool   `json:"content_ok"`
	Files        int64  `json:"files"`
	Bytes        int64  `json:"bytes"`
	DurationMS   int64  `json:"duration_ms"`
	Error        string `json:"error,omitempty"`
	StartedAt    string `json:"started_at"`
	FinishedAt   string `json:"finished_at,omitempty"`
}

BackupDrillResource mirrors internal/api's drillResource.

type BackupHealthResponse added in v0.2.0

type BackupHealthResponse struct {
	Resources  []ResourceHealthResource   `json:"resources"`
	Targets    []TargetProtectionResource `json:"targets"`
	Encryption struct {
		Enabled   bool   `json:"enabled"`
		Recipient string `json:"recipient,omitempty"`
		Codec     string `json:"codec"`
	} `json:"encryption"`
}

BackupHealthResponse mirrors internal/api's backupHealthResponse.

type BackupHistoryResource

type BackupHistoryResource struct {
	ID             string `json:"id"`
	ResourceKind   string `json:"resource_kind"`
	DatabaseName   string `json:"database_name,omitempty"`
	ServiceName    string `json:"service_name,omitempty"`
	VolumeName     string `json:"volume_name,omitempty"`
	TargetID       string `json:"target_id"`
	ObjectKey      string `json:"object_key"`
	SizeBytes      int64  `json:"size_bytes"`
	Status         string `json:"status"`
	Error          string `json:"error,omitempty"`
	StartedAt      string `json:"started_at"`
	FinishedAt     string `json:"finished_at,omitempty"`
	ChecksumSHA256 string `json:"checksum_sha256,omitempty"`
}

BackupHistoryResource mirrors internal/api's backupHistoryResource (internal/api/backups.go). ServiceName/VolumeName are set instead of DatabaseName for an app service volume backup, never alongside it.

type BackupScheduleResource

type BackupScheduleResource struct {
	DatabaseName string `json:"database_name"`
	TargetID     string `json:"target_id,omitempty"`
	Schedule     string `json:"schedule,omitempty"`
	Retain       int    `json:"retain,omitempty"`
	RetainDays   int    `json:"retain_days,omitempty"`
}

BackupScheduleResource mirrors internal/api's backupScheduleResource (internal/api/backups.go): PUT/DELETE .../backup-schedule only ever touch these three fields, never the full database resource.

type BackupSummaryResource added in v0.2.0

type BackupSummaryResource struct {
	ID        string `json:"id"`
	At        string `json:"at"`
	Status    string `json:"status"`
	SizeBytes int64  `json:"size_bytes"`
	Codec     string `json:"codec,omitempty"`
	Error     string `json:"error,omitempty"`
}

BackupSummaryResource mirrors internal/api's backupSummaryResource.

type BackupTargetResource

type BackupTargetResource struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	Provider  string `json:"provider"`
	Endpoint  string `json:"endpoint,omitempty"`
	Region    string `json:"region,omitempty"`
	Bucket    string `json:"bucket"`
	CreatedAt string `json:"created_at"`
}

BackupTargetResource mirrors internal/api's backupTargetResource (internal/api/backup_targets.go). No credential fields: access_key_id and secret_access_key are write-only, accepted through CreateBackupTargetRequest/UpdateBackupTargetRequest and never echoed back in any response.

type BackupVerificationResource

type BackupVerificationResource struct {
	ID              string `json:"id"`
	BackupHistoryID string `json:"backup_history_id"`
	Status          string `json:"status"`
	ChecksumMatch   bool   `json:"checksum_match"`
	SizeMatch       bool   `json:"size_match"`
	FormatValid     bool   `json:"format_valid"`
	DownloadedBytes int64  `json:"downloaded_bytes"`
	Error           string `json:"error,omitempty"`
	CheckedBy       string `json:"checked_by,omitempty"`
	StartedAt       string `json:"started_at"`
	FinishedAt      string `json:"finished_at,omitempty"`
}

BackupVerificationResource mirrors internal/api's backupVerificationResource (internal/api/backup_verify.go).

type BaseBackupHistoryResource added in v0.2.0

type BaseBackupHistoryResource struct {
	ID           string `json:"id"`
	DatabaseName string `json:"database_name"`
	TargetID     string `json:"target_id"`
	LSN          string `json:"lsn,omitempty"`
	SizeBytes    int64  `json:"size_bytes"`
	Status       string `json:"status"`
	Error        string `json:"error,omitempty"`
	StartedAt    string `json:"started_at"`
	FinishedAt   string `json:"finished_at,omitempty"`
}

BaseBackupHistoryResource mirrors internal/api's baseBackupHistoryResource: GET/POST .../base-backups.

type BaseDomainBackfill added in v0.2.0

type BaseDomainBackfill struct {
	DryRun     bool                     `json:"dry_run"`
	BaseDomain string                   `json:"base_domain"`
	Items      []BaseDomainBackfillItem `json:"items"`
}

BaseDomainBackfill is the backfill response.

type BaseDomainBackfillItem added in v0.2.0

type BaseDomainBackfillItem struct {
	App    string           `json:"app"`
	Domain string           `json:"domain"`
	Status string           `json:"status"`
	DNS    *DomainDNSResult `json:"dns,omitempty"`
}

BaseDomainBackfillItem is one app of a backfill.

type BetaFeature added in v0.2.0

type BetaFeature struct {
	Feature string `json:"feature"`
	Enabled bool   `json:"enabled"`
	Source  string `json:"source"`
	Locked  bool   `json:"locked"`
}

BetaFeature is one Settings-switchable beta feature.

type BitbucketAppRepoResource added in v0.2.0

type BitbucketAppRepoResource struct {
	FullName      string `json:"full_name"`
	Name          string `json:"name"`
	Private       bool   `json:"private"`
	DefaultBranch string `json:"default_branch"`
	CloneURL      string `json:"clone_url"`
	WebURL        string `json:"web_url"`
}

BitbucketAppRepoResource mirrors internal/api's bitbucketAppRepoResource: one entry of GET /api/v1/bitbucket-app/repos.

type BitbucketAppStatusResource added in v0.2.0

type BitbucketAppStatusResource struct {
	Connected  bool   `json:"connected"`
	Key        string `json:"key,omitempty"`
	CreatedAt  string `json:"created_at,omitempty"`
	Authorized bool   `json:"authorized"`
	BaseURL    string `json:"base_url,omitempty"`
}

BitbucketAppStatusResource mirrors internal/api's bitbucketAppStatusResource: GET /api/v1/bitbucket-app's response.

type BuildCacheClearResult added in v0.2.0

type BuildCacheClearResult struct {
	Deleted int  `json:"deleted"`
	More    bool `json:"more"`
}

BuildCacheClearResult reports a cache clear. More means run it again.

type BuildCacheRequest added in v0.2.0

type BuildCacheRequest struct {
	AppName  string `json:"app_name"`
	TargetID string `json:"target_id"`
	Mode     string `json:"mode,omitempty"`
	Enabled  *bool  `json:"enabled,omitempty"`
}

BuildCacheRequest sets a build cache setting. An empty AppName is the global default.

type BuildCacheSetting added in v0.2.0

type BuildCacheSetting struct {
	AppName       string `json:"app_name"`
	TargetID      string `json:"target_id"`
	Enabled       bool   `json:"enabled"`
	Mode          string `json:"mode"`
	KeyPrefix     string `json:"key_prefix,omitempty"`
	LastBuildAt   string `json:"last_build_at,omitempty"`
	LastResult    string `json:"last_result,omitempty"`
	LastWarning   string `json:"last_warning,omitempty"`
	LastClearedAt string `json:"last_cleared_at,omitempty"`
	UpdatedAt     string `json:"updated_at"`
}

BuildCacheSetting points an app's (or the global) BuildKit remote cache at a storage destination. It never carries credentials.

type BuildCacheStats added in v0.2.0

type BuildCacheStats struct {
	Prefix       string    `json:"prefix"`
	Objects      int       `json:"objects"`
	Bytes        int64     `json:"bytes"`
	LastModified time.Time `json:"last_modified"`
	Truncated    bool      `json:"truncated"`
}

BuildCacheStats summarises the objects under an app's cache prefix.

type BuildTriggerRequest

type BuildTriggerRequest struct {
	RepoURL   string                   `json:"repo_url"`
	Ref       string                   `json:"ref"`
	ImageRepo string                   `json:"image_repo,omitempty"`
	Build     BuildTriggerRequestBuild `json:"build,omitempty"`
	// DetectedFramework mirrors triggerBuildRequest.DetectedFramework: the
	// human-readable framework name a prior DetectFramework call reported
	// for this exact repo/ref, stored on the resulting deploy_attempts row.
	DetectedFramework string `json:"detected_framework,omitempty"`
}

BuildTriggerRequest mirrors internal/api's triggerBuildRequest (internal/api/builds.go). Ref is required server-side (handleTriggerBuild rejects an empty one with 400), so every caller of TriggerBuild must resolve a real ref before sending this, never leave it blank.

type BuildTriggerRequestBuild

type BuildTriggerRequestBuild struct {
	Type string `json:"type,omitempty"`
	Path string `json:"path,omitempty"`
	// BaseDirectory scopes the build context to a subdirectory of the
	// repo, for a monorepo. Not meaningful for Type == "image".
	BaseDirectory string `json:"base_directory,omitempty"`
	Image         string `json:"image,omitempty"`
	// Args are Dockerfile build-time ARG values. Only meaningful for
	// Type == "dockerfile".
	Args map[string]string `json:"args,omitempty"`
}

BuildTriggerRequestBuild is BuildTriggerRequest's nested build.* input (internal/api/builds.go's triggerBuildBuildInput), matching the same fields app.yaml's own build: block has. Type left empty defaults server-side to a Dockerfile build. Image is only meaningful for Type == "image": a prebuilt registry reference deployed as-is, no repo/ref/build needed.

type BuildTriggerResponse

type BuildTriggerResponse struct {
	ID string `json:"id,omitempty"`
	// Status is "queued" when the build waits behind another deploy.
	Status        string `json:"status,omitempty"`
	QueuePosition int    `json:"queue_position,omitempty"`
	WaitReason    string `json:"wait_reason,omitempty"`
}

BuildTriggerResponse mirrors internal/api's triggerBuildResponse: handleTriggerBuild is asynchronous (202 Accepted, the fetch and build run in a background goroutine), so this carries only the new deploy attempt's id, not a finished image tag. Poll its outcome via "apps deploys list"/"apps deploys logs", the same deploy_attempts row a git-push-triggered deploy produces.

type BulkAppResult added in v0.2.0

type BulkAppResult struct {
	Name    string `json:"name"`
	Status  string `json:"status"`
	Message string `json:"message,omitempty"`
}

BulkAppResult is one app's outcome in a bulk response.

type BulkAppsRequest added in v0.2.0

type BulkAppsRequest struct {
	Action       string   `json:"action"`
	Names        []string `json:"names,omitempty"`
	Tag          string   `json:"tag,omitempty"`
	Environment  string   `json:"environment,omitempty"`
	Value        string   `json:"value,omitempty"`
	DryRun       bool     `json:"dry_run,omitempty"`
	ConfirmNames []string `json:"confirm_names,omitempty"`
}

BulkAppsRequest is POST /api/v1/apps/bulk's body.

type BulkAppsResponse added in v0.2.0

type BulkAppsResponse struct {
	Action  string          `json:"action"`
	DryRun  bool            `json:"dry_run"`
	Results []BulkAppResult `json:"results"`
	Counts  map[string]int  `json:"counts"`
}

BulkAppsResponse is the 207 body of POST /api/v1/apps/bulk.

type CacheBucket added in v0.2.0

type CacheBucket struct {
	Minute int64  `json:"minute"`
	Hits   uint64 `json:"hits"`
	Misses uint64 `json:"misses"`
}

CacheBucket is one minute of cache activity.

type CachePolicyResource added in v0.2.0

type CachePolicyResource struct {
	Domain     string              `json:"domain"`
	Kind       string              `json:"kind"`
	Configured bool                `json:"configured"`
	Spec       trafficpolicy.Cache `json:"spec"`
	UpdatedAt  string              `json:"updated_at,omitempty"`
}

CachePolicyResource is GET/PUT .../domains/{domain}/cache.

type CacheStats added in v0.2.0

type CacheStats struct {
	Hits     uint64        `json:"hits"`
	Misses   uint64        `json:"misses"`
	Bypasses uint64        `json:"bypasses"`
	Stale    uint64        `json:"stale"`
	Entries  int           `json:"entries"`
	Bytes    int64         `json:"bytes"`
	Series   []CacheBucket `json:"series"`
}

CacheStats is one domain's in-process cache activity.

type CanaryResource added in v0.2.0

type CanaryResource struct {
	Active    bool       `json:"active"`
	Image     string     `json:"image,omitempty"`
	Weight    int        `json:"weight"`
	CreatedAt *time.Time `json:"created_at,omitempty"`
}

CanaryResource mirrors internal/api's canaryResource.

type CancelSupersededResource added in v0.2.0

type CancelSupersededResource struct {
	Enabled bool `json:"enabled"`
}

CancelSupersededResource mirrors internal/api's cancelSupersededResource.

type CanonicalRequest added in v0.2.0

type CanonicalRequest struct {
	Preset     string `json:"preset"`
	StatusCode int    `json:"status_code,omitempty"`
	Attach     *bool  `json:"attach,omitempty"`
	Replace    bool   `json:"replace,omitempty"`
}

CanonicalRequest applies a www and apex preset.

type CanonicalState added in v0.2.0

type CanonicalState struct {
	Counterpart         string `json:"counterpart,omitempty"`
	CounterpartAttached bool   `json:"counterpart_attached"`
	AttachedElsewhere   string `json:"counterpart_app,omitempty"`
	Preset              string `json:"preset"`
	DNSHint             string `json:"dns_hint,omitempty"`
	Unavailable         string `json:"unavailable,omitempty"`
}

CanonicalState is the www and apex setup for a domain.

type CapacityForecastMetric added in v0.2.0

type CapacityForecastMetric struct {
	CurrentUsedBytes float64   `json:"current_used_bytes"`
	TotalBytes       float64   `json:"total_bytes"`
	SlopeBytesPerDay float64   `json:"slope_bytes_per_day"`
	DaysUntilFull    float64   `json:"days_until_full"`
	ProjectedFullAt  time.Time `json:"projected_full_at"`
	SampleCount      int       `json:"sample_count"`
	CoverageWindow   string    `json:"coverage_window"`
}

CapacityForecastMetric mirrors internal/api's capacityForecastMetric: one resource's (disk or memory) rough days-until-full projection from internal/forecast's ordinary-least-squares trend fit. Absent (nil) from NodeCapacityForecastResource whenever the fitted trend is flat or improving, or there isn't enough history yet, never a zero-value struct with DaysUntilFull: 0.

type CascadeDeleteFailure added in v0.2.0

type CascadeDeleteFailure struct {
	Kind  string `json:"kind"`
	Name  string `json:"name"`
	Error string `json:"error"`
}

CascadeDeleteFailure is one member a cascading delete could not remove.

type CascadeDeleteResult added in v0.2.0

type CascadeDeleteResult struct {
	Status           string                 `json:"status"`
	DeletedApps      []string               `json:"deleted_apps"`
	DeletedDatabases []string               `json:"deleted_databases"`
	TeardownPending  []string               `json:"teardown_pending,omitempty"`
	Failed           []CascadeDeleteFailure `json:"failed,omitempty"`
}

CascadeDeleteResult mirrors internal/api's cascadeResponse. The zero value is what a 204 (nothing inside) decodes to.

type CertificateResource added in v0.2.0

type CertificateResource struct {
	Domain    string    `json:"domain"`
	SANs      []string  `json:"sans,omitempty"`
	Issuer    string    `json:"issuer,omitempty"`
	NotBefore time.Time `json:"not_before"`
	NotAfter  time.Time `json:"not_after"`
	Status    string    `json:"status"`
	// Renewal is "ok" or "stalled".
	Renewal string `json:"renewal"`
	// Apps is every app or static site owning Domain; see
	// certificateStatus.Apps's own doc comment.
	Apps []string `json:"apps,omitempty"`
	// Source is "acme", "custom" or "proxy"; see certificateStatus.Source.
	Source string `json:"source"`
	// TLSOwner is who terminates TLS: acme, internal, proxy or custom.
	TLSOwner string `json:"tls_owner,omitempty"`
	// ACMEFailure is the CA's last error for this domain, when it has one.
	ACMEFailure *ACMEFailure `json:"acme_failure,omitempty"`
	// ExpiryClass is "incident" when this certificate's expiry needs an
	// operator, empty otherwise.
	ExpiryClass string `json:"expiry_class,omitempty"`
}

CertificateResource mirrors internal/api's certificateStatus (internal/api/certificates.go): one entry of GET /api/v1/certificates. Status is "healthy", "expiring_soon", or "expired".

type ChangelogEntryResource added in v0.2.0

type ChangelogEntryResource struct {
	Version string   `json:"version"`
	Date    string   `json:"date"`
	Bullets []string `json:"bullets"`
}

ChangelogEntryResource mirrors internal/api's changelogEntryResource: one released version's notes.

type ChangelogResource added in v0.2.0

type ChangelogResource struct {
	CurrentVersion string                   `json:"current_version"`
	Entries        []ChangelogEntryResource `json:"entries"`
}

ChangelogResource mirrors internal/api's changelogResource (GET /api/v1/changelog): the running version plus the most recent entries parsed from the repo's own CHANGELOG.md.

type ClaimOrphanedContainerRequest added in v0.2.0

type ClaimOrphanedContainerRequest struct {
	Name string `json:"name,omitempty"`
}

ClaimOrphanedContainerRequest is POST /api/v1/system/containers/{name}/claim's optional request body. A blank Name lets the server derive one from the container's own name.

type CleanupOrphanedVolumesRequest added in v0.2.0

type CleanupOrphanedVolumesRequest struct {
	Names []string `json:"names"`
}

CleanupOrphanedVolumesRequest mirrors internal/api's cleanupOrphanedVolumesRequest: the exact, operator-confirmed set of volume names to remove.

type CleanupOrphanedVolumesResult added in v0.2.0

type CleanupOrphanedVolumesResult struct {
	Removed        []string `json:"removed"`
	ReclaimedBytes uint64   `json:"reclaimed_bytes"`
	Skipped        []string `json:"skipped,omitempty"`
	Errors         []string `json:"errors,omitempty"`
}

CleanupOrphanedVolumesResult mirrors internal/api's cleanupOrphanedVolumesResponse.

type Client

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

Client is a minimal HTTP client for the control plane's versioned API (internal/api, mounted at /api/v1). It carries no session/cookie state: every request is a single bearer-token call, matching how this project's own token scheme (internal/api/abilities.go) is meant to be used by a non-interactive caller.

func NewClient

func NewClient(baseURL, token string, opts ...Option) *Client

NewClient builds a Client. baseURL should not have a trailing slash (trimmed defensively if it does). The timeout is long, not the usual few seconds a typical REST call would use: POST .../builds is synchronous and blocking (internal/api/builds.go's own doc comment), and a real Dockerfile build can legitimately take minutes.

func (*Client) AbortCanary added in v0.2.0

func (c *Client) AbortCanary(ctx context.Context, appName string) (CanaryResource, error)

AbortCanary calls DELETE /api/v1/apps/{name}/canary.

func (*Client) AcceptTeamInvite added in v0.2.0

func (c *Client) AcceptTeamInvite(ctx context.Context, req AcceptTeamInviteRequest) error

AcceptTeamInvite calls POST /api/v1/team-invites/accept.

func (*Client) AckControlPlaneEscrow added in v0.2.0

func (c *Client) AckControlPlaneEscrow(ctx context.Context) (ControlPlaneDR, error)

AckControlPlaneEscrow calls POST /api/v1/system/control-plane-dr/escrow/ack.

func (*Client) AckUpgrade added in v0.2.0

func (c *Client) AckUpgrade(ctx context.Context, id string) (UpgradeHistoryItem, error)

AckUpgrade calls POST /api/v1/updates/history/{id}/ack.

func (*Client) AdoptExternalDatabase added in v0.2.0

func (c *Client) AdoptExternalDatabase(ctx context.Context, req ExternalDatabaseRequest) (ExternalDatabase, error)

AdoptExternalDatabase calls POST /api/v1/external-databases/adopt.

func (*Client) AnalyzeIAM added in v0.2.0

func (c *Client) AnalyzeIAM(ctx context.Context) (IAMAnalysis, error)

AnalyzeIAM calls GET /api/v1/iam/analyze.

func (*Client) AnalyzeImport added in v0.2.0

func (c *Client) AnalyzeImport(ctx context.Context, req ImportAnalyzeRequest) (ImportAnalysis, error)

AnalyzeImport calls POST /api/v1/imports/analyze. It creates nothing.

func (*Client) AppImportCutoverPlan added in v0.2.0

func (c *Client) AppImportCutoverPlan(ctx context.Context, session, item string) (ImportCutoverPlan, error)

AppImportCutoverPlan calls GET .../items/{item}/cutover/plan.

func (*Client) AppImportCutoverRun added in v0.2.0

func (c *Client) AppImportCutoverRun(ctx context.Context, session, item, run string) (ImportCutoverRun, error)

AppImportCutoverRun calls GET .../items/{item}/cutover/runs/{run}.

func (*Client) AppImportCutoverRuns added in v0.2.0

func (c *Client) AppImportCutoverRuns(ctx context.Context, session, item string) ([]ImportCutoverRun, error)

AppImportCutoverRuns calls GET .../items/{item}/cutover/runs, newest first.

func (*Client) AppImportImages added in v0.2.0

func (c *Client) AppImportImages(ctx context.Context, id string) (AppImportImages, error)

AppImportImages calls GET .../sessions/{id}/images.

func (*Client) AppImportImagesStatus added in v0.2.0

func (c *Client) AppImportImagesStatus(ctx context.Context, id string) (AppImportImages, error)

AppImportImagesStatus calls GET .../sessions/{id}/images/status.

func (*Client) AppImportReceipt added in v0.2.0

func (c *Client) AppImportReceipt(ctx context.Context, id string) (json.RawMessage, error)

AppImportReceipt calls GET .../sessions/{id}/receipt and returns the JSON as is.

func (*Client) ApplyAdvisorFinding added in v0.2.0

func (c *Client) ApplyAdvisorFinding(ctx context.Context, id string, confirm bool) (AdvisorApplyResult, error)

ApplyAdvisorFinding previews (confirm false) or applies a finding's action.

func (*Client) ApplyDNSTemplate added in v0.2.0

func (c *Client) ApplyDNSTemplate(ctx context.Context, provider, zone, id string, params map[string]string, apply bool) (DNSImportResult, error)

ApplyDNSTemplate calls POST /api/v1/dns/zones/{zone}/templates/{id}.

func (*Client) ApplyDatabaseRules added in v0.2.0

func (c *Client) ApplyDatabaseRules(ctx context.Context, name string, req DatabaseRulesRequest) (DatabaseRulesPlan, error)

ApplyDatabaseRules calls PUT /api/v1/databases/{name}/network/rules.

func (*Client) ApplyDiagnosisFix added in v0.2.0

func (c *Client) ApplyDiagnosisFix(ctx context.Context, name string, fix DiagnosisFix, inputs map[string]string, redeploy bool) ([]string, error)

ApplyDiagnosisFix applies a patch or input fix to the app through the ordinary GET then PUT path, so the caller's own permissions and the audit log apply. inputs supplies values for changes marked NeedsInput, keyed by field. It returns the fields changed. The app is round-tripped as raw JSON so fields this client does not model are never dropped.

func (*Client) ApplyExposureRestriction added in v0.2.0

func (c *Client) ApplyExposureRestriction(ctx context.Context, req ExposureRestrictRequest) (ExposurePlan, error)

ApplyExposureRestriction calls PUT .../exposure/restrictions/{protocol}/{port}.

func (*Client) ApplyIaC added in v0.2.0

func (c *Client) ApplyIaC(ctx context.Context, req IaCRequest) (iac.ApplyResult, error)

ApplyIaC calls POST /api/v1/apply.

func (*Client) ApplyMigrationSession added in v0.2.0

func (c *Client) ApplyMigrationSession(ctx context.Context, id, password string) (HubSession, error)

ApplyMigrationSession starts the bulk copy. A non-empty password replaces the one held in memory.

func (*Client) ApplyPendingChanges added in v0.2.0

func (c *Client) ApplyPendingChanges(ctx context.Context, name string) (ApplyPendingResult, error)

ApplyPendingChanges calls POST /api/v1/apps/{name}/apply-pending.

func (*Client) ApplyPlatformImport added in v0.2.0

func (c *Client) ApplyPlatformImport(ctx context.Context, req PlatformImportRequest) (PlatformImportReport, error)

ApplyPlatformImport calls POST /api/v1/imports/platform/apply.

func (*Client) ApplyPolicyTemplate added in v0.2.0

ApplyPolicyTemplate calls POST /api/v1/iam/policy-templates/{id}/apply.

func (*Client) ApplyProxyIntegration added in v0.2.0

func (c *Client) ApplyProxyIntegration(ctx context.Context) (ProxyIntegration, error)

ApplyProxyIntegration rewrites the managed route files now.

func (*Client) ApproveDeployApproval added in v0.2.0

func (c *Client) ApproveDeployApproval(ctx context.Context, id string) (DeployApprovalDecisionResult, error)

ApproveDeployApproval calls POST /api/v1/deploy-approvals/{id}/approve: applies the gated deploy/promote through the normal reconcile path. Fails with 403 if the caller is the same actor who requested it, or 409 if it's no longer pending (already decided, or expired).

func (*Client) ApprovePreviewEnvironment added in v0.2.0

func (c *Client) ApprovePreviewEnvironment(ctx context.Context, appName string, prNumber int) (ApprovePreviewResult, error)

ApprovePreviewEnvironment calls POST /api/v1/apps/{name}/previews/{number}/approve with the confirmation the server requires.

func (*Client) ApprovePreviewEnvironmentShared added in v0.2.0

func (c *Client) ApprovePreviewEnvironmentShared(ctx context.Context, appName string, prNumber int, shareSecrets bool) (ApprovePreviewResult, error)

ApprovePreviewEnvironmentShared is ApprovePreviewEnvironment that can also give this one deploy the app's environment variables and secrets.

func (*Client) AttachAppIntegration added in v0.2.0

func (c *Client) AttachAppIntegration(ctx context.Context, name, integrationKey string, fields map[string]string) (AppIntegrationResource, error)

AttachAppIntegration calls POST /api/v1/apps/{name}/integrations: attaches integrationKey with the given field values, storing them through the same envelope encryption every other app secret uses.

func (*Client) AttachAppTag added in v0.2.0

func (c *Client) AttachAppTag(ctx context.Context, name, tagName string) (TagResource, error)

AttachAppTag calls POST /api/v1/apps/{name}/tags: attaches tagName, creating it first if this is the first time it's been used.

func (*Client) AttachPolicy

func (c *Client) AttachPolicy(ctx context.Context, id string, req AttachPolicyRequest) error

AttachPolicy calls POST /api/v1/iam/policies/{id}/attachments.

func (*Client) BackfillBaseDomain added in v0.2.0

func (c *Client) BackfillBaseDomain(ctx context.Context, confirm bool) (BaseDomainBackfill, error)

BackfillBaseDomain calls POST /api/v1/settings/ingress/apps-base-domain/backfill.

func (*Client) BackupCoverage added in v0.2.0

func (c *Client) BackupCoverage(ctx context.Context) (BackupCoverageResponse, error)

BackupCoverage calls GET /api/v1/backups/coverage.

func (*Client) BackupHealth added in v0.2.0

func (c *Client) BackupHealth(ctx context.Context) (BackupHealthResponse, error)

BackupHealth calls GET /api/v1/backups/health.

func (*Client) BrandShortName added in v0.2.0

func (c *Client) BrandShortName(ctx context.Context) (string, error)

BrandShortName reads the control plane's brand short name from the public GET /api/v1/brand, used to find the branded pipeline directory in a repo.

func (*Client) BuildControlPlaneEscrow added in v0.2.0

func (c *Client) BuildControlPlaneEscrow(ctx context.Context, recipients []string, upload bool) (ControlPlaneEscrowBundle, error)

BuildControlPlaneEscrow calls POST /api/v1/system/control-plane-dr/escrow. recipients, when non-empty, replace the configured ones for this bundle.

func (*Client) BulkApps added in v0.2.0

func (c *Client) BulkApps(ctx context.Context, req BulkAppsRequest) (BulkAppsResponse, error)

BulkApps calls POST /api/v1/apps/bulk.

func (*Client) CancelAppImportImages added in v0.2.0

func (c *Client) CancelAppImportImages(ctx context.Context, id string) (AppImportImages, error)

CancelAppImportImages calls POST .../sessions/{id}/images/cancel.

func (*Client) CancelDeploy added in v0.2.0

func (c *Client) CancelDeploy(ctx context.Context, appName, deployID string) (DeployAttemptResource, error)

CancelDeploy calls POST /api/v1/apps/{name}/deploys/{deployId}/cancel and returns the attempt as it is after the cancel.

func (*Client) CancelPipelineRun added in v0.2.0

func (c *Client) CancelPipelineRun(ctx context.Context, app, id string) error

CancelPipelineRun calls POST .../pipeline-runs/{id}/cancel.

func (*Client) CancelUpgradeSchedule added in v0.2.0

func (c *Client) CancelUpgradeSchedule(ctx context.Context) (UpgradeSchedule, error)

CancelUpgradeSchedule calls DELETE /api/v1/updates/schedule.

func (*Client) CapturePreview added in v0.2.0

func (c *Client) CapturePreview(ctx context.Context, name string) (PreviewStatus, error)

CapturePreview calls POST /api/v1/apps/{name}/preview/capture.

func (*Client) CheckDNS added in v0.2.0

func (c *Client) CheckDNS(ctx context.Context, name, typ, zone string) (DNSPropagation, error)

CheckDNS calls GET /api/v1/dns/check.

func (*Client) CheckDomain added in v0.2.0

func (c *Client) CheckDomain(ctx context.Context, name, domain string) (DomainCheckResource, error)

CheckDomain calls GET /api/v1/apps/{name}/domains/{domain}/check: a real DNS lookup reporting whether domain currently resolves to this control plane's own advertised address.

func (*Client) CheckImageAutoUpdate added in v0.2.0

func (c *Client) CheckImageAutoUpdate(ctx context.Context, appName string) (ImageAutoUpdateResource, error)

CheckImageAutoUpdate calls POST /api/v1/apps/{name}/auto-update/check: one registry check now, redeploying if the tag moved.

func (*Client) CheckLoadBalancer added in v0.2.0

func (c *Client) CheckLoadBalancer(ctx context.Context, name string) (LoadBalancerCheck, error)

CheckLoadBalancer calls POST /api/v1/apps/{name}/loadbalancer/check.

func (*Client) CheckModelFit added in v0.2.0

func (c *Client) CheckModelFit(ctx context.Context, req ModelFitRequest) (ModelFitReport, error)

CheckModelFit calls POST /api/v1/models/fit.

func (*Client) ClaimOrphanedContainer added in v0.2.0

func (c *Client) ClaimOrphanedContainer(ctx context.Context, name string, req ClaimOrphanedContainerRequest) (AppResource, error)

ClaimOrphanedContainer calls POST /api/v1/system/containers/{name}/claim: creates a real app (build.type: image) from the container's own image, same path POST /api/v1/apps itself uses. Returns the created app.

func (*Client) CleanupOrphanedVolumes added in v0.2.0

func (c *Client) CleanupOrphanedVolumes(ctx context.Context, names []string) (CleanupOrphanedVolumesResult, error)

CleanupOrphanedVolumes calls POST /api/v1/system/volumes/orphaned/cleanup: removes exactly the named volumes, after the control plane re-confirms each one is still genuinely orphaned.

func (*Client) ClearAppDatabaseAttachment

func (c *Client) ClearAppDatabaseAttachment(ctx context.Context, name string) error

ClearAppDatabaseAttachment calls DELETE /api/v1/apps/{name}/database.

func (*Client) ClearAppEgressPolicy added in v0.2.0

func (c *Client) ClearAppEgressPolicy(ctx context.Context, name string) error

ClearAppEgressPolicy calls DELETE /api/v1/apps/{name}/egress-policy, opting name back out to unrestricted egress.

func (*Client) ClearAppHealth added in v0.2.0

func (c *Client) ClearAppHealth(ctx context.Context, name string) error

ClearAppHealth calls DELETE /api/v1/apps/{name}/health.

func (*Client) ClearAppPreviewEnvOverride added in v0.2.0

func (c *Client) ClearAppPreviewEnvOverride(ctx context.Context, name, key string) error

ClearAppPreviewEnvOverride calls DELETE /api/v1/apps/{name}/preview-env/{key}.

func (*Client) ClearAppStorage added in v0.2.0

func (c *Client) ClearAppStorage(ctx context.Context, name string) error

ClearAppStorage calls DELETE /api/v1/apps/{name}/storage: detaches name's object-storage credential source.

func (*Client) ClearAppVaultEnv added in v0.2.0

func (c *Client) ClearAppVaultEnv(ctx context.Context, name, key string) error

ClearAppVaultEnv calls DELETE /api/v1/apps/{name}/vault-env/{key}.

func (*Client) ClearBackupSchedule

func (c *Client) ClearBackupSchedule(ctx context.Context, name string) error

ClearBackupSchedule calls DELETE /api/v1/databases/{name}/backup-schedule: returns name to its default "no scheduled backup configured" state. Past backup_history rows are untouched, only the going-forward configuration.

func (*Client) ClearBuildCache added in v0.2.0

func (c *Client) ClearBuildCache(ctx context.Context, app string) (BuildCacheClearResult, error)

ClearBuildCache calls POST /api/v1/build-cache/clear.

func (*Client) ClearDatabasePublicAccess added in v0.2.0

func (c *Client) ClearDatabasePublicAccess(ctx context.Context, name string) error

ClearDatabasePublicAccess calls DELETE /api/v1/databases/{name}/public-access: returns name to internal-network-only, the reverse of SetDatabasePublicAccess.

func (*Client) ClearDomainAuthGate added in v0.2.0

func (c *Client) ClearDomainAuthGate(ctx context.Context, name, domain string) (DomainAuthGateResource, error)

ClearDomainAuthGate calls DELETE /api/v1/apps/{name}/domains/{domain}/auth-gate.

func (*Client) ClearDomainBasicAuth

func (c *Client) ClearDomainBasicAuth(ctx context.Context, name, domain string) (DomainBasicAuthResource, error)

ClearDomainBasicAuth calls DELETE /api/v1/apps/{name}/domains/{domain}/auth: removes basic auth protection from domain.

func (*Client) ClearDomainCache added in v0.2.0

func (c *Client) ClearDomainCache(ctx context.Context, name, domain string) (CachePolicyResource, error)

ClearDomainCache calls DELETE .../domains/{domain}/cache.

func (*Client) ClearDomainErrorPage added in v0.2.0

func (c *Client) ClearDomainErrorPage(ctx context.Context, name, domain string, statusCode int) (DomainErrorPagesResource, error)

ClearDomainErrorPage calls DELETE /api/v1/apps/{name}/domains/{domain}/error-pages?status_code=<code>: removes domain's mapping for one status code.

func (*Client) ClearDomainErrorPages added in v0.2.0

func (c *Client) ClearDomainErrorPages(ctx context.Context, name, domain string) (DomainErrorPagesResource, error)

ClearDomainErrorPages calls DELETE /api/v1/apps/{name}/domains/{domain}/error-pages: removes every custom error page configured for domain.

func (*Client) ClearDomainForwarders added in v0.2.0

func (c *Client) ClearDomainForwarders(ctx context.Context, name, domain string) (ForwardersPolicyResource, error)

ClearDomainForwarders calls DELETE .../domains/{domain}/forwarders.

func (*Client) ClearDomainGeo added in v0.2.0

func (c *Client) ClearDomainGeo(ctx context.Context, name, domain string) (GeoPolicyResource, error)

ClearDomainGeo calls DELETE .../domains/{domain}/geo.

func (*Client) ClearDomainHeaders added in v0.2.0

func (c *Client) ClearDomainHeaders(ctx context.Context, name, domain string) (HeadersPolicyResource, error)

ClearDomainHeaders calls DELETE .../domains/{domain}/headers.

func (*Client) ClearDomainMaintenance

func (c *Client) ClearDomainMaintenance(ctx context.Context, name, domain string) (DomainMaintenanceResource, error)

ClearDomainMaintenance calls DELETE /api/v1/apps/{name}/domains/{domain}/maintenance: disables maintenance mode on domain.

func (*Client) ClearDomainRedirect added in v0.2.0

func (c *Client) ClearDomainRedirect(ctx context.Context, name, domain string) (DomainRedirectResource, error)

ClearDomainRedirect calls DELETE /api/v1/apps/{name}/domains/{domain}/redirect: removes domain's redirect.

func (*Client) ClearDomainRedirectSettings added in v0.2.0

func (c *Client) ClearDomainRedirectSettings(ctx context.Context, name, domain string) (DomainRedirectsResource, error)

ClearDomainRedirectSettings calls DELETE .../domains/{domain}/redirects.

func (*Client) ClearDomainTLSCert

func (c *Client) ClearDomainTLSCert(ctx context.Context, name, domain string) (DomainTLSCertResource, error)

ClearDomainTLSCert calls DELETE /api/v1/apps/{name}/domains/{domain}/tls-cert: removes domain's BYO certificate, reverting it to automatic ACME/internal issuance.

func (*Client) ClearDomainWAF added in v0.2.0

func (c *Client) ClearDomainWAF(ctx context.Context, name, domain string) (DomainWAFResource, error)

ClearDomainWAF calls DELETE /api/v1/apps/{name}/domains/{domain}/waf: resets domain to no WAF and no rate limiting.

func (*Client) ClearLogDrain

func (c *Client) ClearLogDrain(ctx context.Context, name string) error

ClearLogDrain calls DELETE /api/v1/apps/{name}/log-drain. No response body (204 on success), matching SetSecret's own "no body beyond the status" shape above.

func (*Client) ClearVolumeBackupSchedule

func (c *Client) ClearVolumeBackupSchedule(ctx context.Context, name, volume string) error

ClearVolumeBackupSchedule calls DELETE /api/v1/apps/{name}/volumes/{volume}/backup-schedule: the app service volume counterpart of ClearBackupSchedule.

func (*Client) CloneApp added in v0.2.0

func (c *Client) CloneApp(ctx context.Context, name, newName string) (AppResource, error)

CloneApp calls POST /api/v1/apps/{name}/clone: duplicates name's desired state under newName. Domains, secret values, and node placement are never copied (see internal/api/apps_clone.go's own doc comment for why).

func (*Client) CloneAppWith added in v0.2.0

func (c *Client) CloneAppWith(ctx context.Context, name string, req CloneAppRequest) (AppResource, error)

CloneAppWith is CloneApp with the secret, domain and environment options.

func (*Client) CloneEnvironment added in v0.2.0

CloneEnvironment calls POST /api/v1/environments/{id}/clone: creates a new environment in id's own project plus a real, deployed copy of every app tagged with id.

func (*Client) CompareDeploys

func (c *Client) CompareDeploys(ctx context.Context, name, from, to string) (DeployCompareResource, error)

CompareDeploys calls GET /api/v1/apps/{name}/deploys/compare: a before/after diff of deploy attempt from against to, or against the app's current live state when to is empty.

func (*Client) CompareEnvironmentEnv added in v0.2.0

func (c *Client) CompareEnvironmentEnv(ctx context.Context, projectID, a, b string) (EnvironmentCompareResource, error)

CompareEnvironmentEnv calls GET /api/v1/projects/{id}/environments/compare?a=...&b=...: each of environment a and b's resolved effective env vars, secret values always redacted, plus the keys that differ between them.

func (*Client) ComposeDown added in v0.2.0

func (c *Client) ComposeDown(ctx context.Context, name string, removeVolumes bool) (ComposeDownResult, error)

ComposeDown calls DELETE /api/v1/apps/{name}/compose.

func (*Client) ConfirmAppImportCutoverDNS added in v0.2.0

func (c *Client) ConfirmAppImportCutoverDNS(ctx context.Context, session, item, run string) (ImportCutoverRun, error)

ConfirmAppImportCutoverDNS calls POST .../cutover/runs/{run}/confirm-dns.

func (*Client) ConnectExternalDatabase added in v0.2.0

func (c *Client) ConnectExternalDatabase(ctx context.Context, req ExternalDatabaseRequest) (ExternalDatabase, error)

ConnectExternalDatabase calls POST /api/v1/external-databases.

func (*Client) ConvertEnvToSecret added in v0.2.0

func (c *Client) ConvertEnvToSecret(ctx context.Context, app, key string) error

ConvertEnvToSecret calls POST /api/v1/apps/{name}/env/{key}/convert-to-secret.

func (*Client) CordonNode

func (c *Client) CordonNode(ctx context.Context, id string) (NodeResource, error)

CordonNode calls POST /api/v1/nodes/{id}/cordon: marks id unschedulable for new placements without evacuating anything already running there.

func (*Client) CreateAIChatSession added in v0.2.0

func (c *Client) CreateAIChatSession(ctx context.Context) (AIChatSessionCreatedResource, error)

CreateAIChatSession calls POST /api/v1/ai/sessions.

func (*Client) CreateAlertRule

func (c *Client) CreateAlertRule(ctx context.Context, name string, req CreateAlertRuleRequest) (AlertRuleResource, error)

CreateAlertRule calls POST /api/v1/apps/{name}/alerts.

func (*Client) CreateAlertSilence added in v0.2.0

func (c *Client) CreateAlertSilence(ctx context.Context, req CreateSilenceRequest) (SilenceResource, error)

CreateAlertSilence calls POST /api/v1/alert-silences.

func (*Client) CreateApp

func (c *Client) CreateApp(ctx context.Context, req AppResource) (AppResource, error)

CreateApp calls POST /api/v1/apps.

func (*Client) CreateAppConnection added in v0.2.0

func (c *Client) CreateAppConnection(ctx context.Context, name string, req CreateAppConnectionRequest) (AppConnectionResource, error)

CreateAppConnection calls POST /api/v1/apps/{name}/connections: adds (or replaces) one entry in name's DatabaseEnv map, the multi- connection sibling of SetAppDatabaseAttachment above.

func (*Client) CreateAppImportSession added in v0.2.0

func (c *Client) CreateAppImportSession(ctx context.Context, req AppImportRequest) (AppImportView, error)

CreateAppImportSession calls POST /api/v1/migration/apps/sessions.

func (*Client) CreateAppStream added in v0.2.0

func (c *Client) CreateAppStream(ctx context.Context, name string, req CreateAppStreamRequest) (AppStreamResource, error)

CreateAppStream calls POST /api/v1/apps/{name}/streams.

func (*Client) CreateBackupTarget

func (c *Client) CreateBackupTarget(ctx context.Context, req CreateBackupTargetRequest) (BackupTargetResource, error)

CreateBackupTarget calls POST /api/v1/backup-targets.

func (*Client) CreateControlPlaneBackup added in v0.2.0

func (c *Client) CreateControlPlaneBackup(ctx context.Context) (ControlPlaneBackup, error)

CreateControlPlaneBackup calls POST /api/v1/system/backups.

func (*Client) CreateDNSHealthCheck added in v0.2.0

func (c *Client) CreateDNSHealthCheck(ctx context.Context, hc DNSHealthCheck) (DNSHealthCheck, error)

CreateDNSHealthCheck calls POST /api/v1/dns/health-checks.

func (*Client) CreateDNSRecord added in v0.2.0

func (c *Client) CreateDNSRecord(ctx context.Context, name, domain string, record DNSRecordResource) (DNSRecordsResponse, error)

CreateDNSRecord calls POST .../dns-records: appends a new record to domain's zone, leaving any existing record with the same name and type untouched.

func (*Client) CreateDNSZone added in v0.2.0

func (c *Client) CreateDNSZone(ctx context.Context, provider, name, accountID string) (DNSZone, error)

CreateDNSZone calls POST /api/v1/dns/zones.

func (*Client) CreateDNSZoneRecord added in v0.2.0

func (c *Client) CreateDNSZoneRecord(ctx context.Context, provider, zone string, rs DNSRecordSet) (DNSRecordWrite, error)

CreateDNSZoneRecord calls POST /api/v1/dns/zones/{zone}/records.

func (*Client) CreateDatabase

func (c *Client) CreateDatabase(ctx context.Context, req DatabaseResource) (DatabaseResource, error)

CreateDatabase calls POST /api/v1/databases.

func (*Client) CreateDatabaseUser added in v0.2.0

func (c *Client) CreateDatabaseUser(ctx context.Context, name string, req DatabaseUserCreateRequest) (DatabaseUserCreated, error)

CreateDatabaseUser calls POST /api/v1/databases/{name}/users.

func (*Client) CreateDeployNotifyTarget added in v0.2.0

func (c *Client) CreateDeployNotifyTarget(ctx context.Context, name string, req CreateDeployNotifyTargetRequest) (DeployNotifyTargetResource, error)

CreateDeployNotifyTarget calls POST /api/v1/apps/{name}/deploy-notify-targets.

func (*Client) CreateEnvironment

func (c *Client) CreateEnvironment(ctx context.Context, projectID string, req CreateEnvironmentRequest) (EnvironmentResource, error)

CreateEnvironment calls POST /api/v1/projects/{id}/environments.

func (*Client) CreateExportDestination added in v0.2.0

func (c *Client) CreateExportDestination(ctx context.Context, req CreateExportDestinationRequest) (ExportDestinationResource, error)

CreateExportDestination calls POST /api/v1/export/destinations.

func (*Client) CreateFeatureFlag

func (c *Client) CreateFeatureFlag(ctx context.Context, name string, req FeatureFlagRequest) (FeatureFlagResource, error)

CreateFeatureFlag calls POST /api/v1/apps/{name}/flags.

func (*Client) CreateFirewallRule added in v0.2.0

func (c *Client) CreateFirewallRule(ctx context.Context, req CreateFirewallRuleRequest) (FirewallRuleResource, error)

CreateFirewallRule calls POST /api/v1/firewall-rules.

func (*Client) CreateGlobalEnvironment added in v0.2.0

func (c *Client) CreateGlobalEnvironment(ctx context.Context, req CreateGlobalEnvironmentRequest) (EnvironmentResource, error)

CreateGlobalEnvironment calls POST /api/v1/environments.

func (*Client) CreateInvite

func (c *Client) CreateInvite(ctx context.Context, req CreateInviteRequest) (CreateInviteResponse, error)

CreateInvite calls POST /api/v1/invites.

func (*Client) CreateJob added in v0.2.0

CreateJob calls POST /api/v1/apps/{name}/jobs.

func (*Client) CreateMaintenanceWindow added in v0.2.0

func (c *Client) CreateMaintenanceWindow(ctx context.Context, req MaintenanceWindowResource) (MaintenanceWindowResource, error)

CreateMaintenanceWindow calls POST /api/v1/alert-maintenance-windows.

func (*Client) CreateMigrationSession added in v0.2.0

func (c *Client) CreateMigrationSession(ctx context.Context, src HubSource) (HubSession, error)

CreateMigrationSession inventories a source server read-only.

func (*Client) CreateMobilePairing added in v0.2.0

func (c *Client) CreateMobilePairing(ctx context.Context, proof *StepUpProof) (MobilePairingCode, error)

CreateMobilePairing calls POST /api/v1/mobile/pairing-codes with the token owner's step-up proof.

func (*Client) CreateModel added in v0.2.0

func (c *Client) CreateModel(ctx context.Context, req CreateModelRequest) (CreateModelResponse, error)

CreateModel calls POST /api/v1/models. The response carries the API key exactly once.

func (*Client) CreateModelKey added in v0.2.0

func (c *Client) CreateModelKey(ctx context.Context, name string, req CreateModelKeyRequest) (CreatedModelKeyResource, error)

CreateModelKey calls POST /api/v1/models/{name}/keys.

func (*Client) CreateNetworkShare added in v0.2.0

func (c *Client) CreateNetworkShare(ctx context.Context, req CreateNetworkShareRequest) (NetworkShareResource, error)

CreateNetworkShare calls POST /api/v1/network-shares.

func (*Client) CreateNodeJoinToken

func (c *Client) CreateNodeJoinToken(ctx context.Context) (CreateNodeJoinTokenResponse, error)

CreateNodeJoinToken calls POST /api/v1/nodes/join-tokens: mints a one-time enrollment token, returned in plaintext exactly once.

func (*Client) CreateNodeJoinTokenFor added in v0.2.0

func (c *Client) CreateNodeJoinTokenFor(ctx context.Context, req CreateNodeJoinTokenRequest) (CreateNodeJoinTokenResponse, error)

CreateNodeJoinTokenFor calls POST /api/v1/nodes/join-tokens with req.

func (*Client) CreateNodeProvision added in v0.2.0

func (c *Client) CreateNodeProvision(ctx context.Context, req CreateNodeProvisionRequest) (NodeProvisionResource, error)

CreateNodeProvision calls POST /api/v1/nodes/provision.

func (*Client) CreateNodeReenrollToken added in v0.2.0

func (c *Client) CreateNodeReenrollToken(ctx context.Context, id string) (NodeReenrollTokenResponse, error)

CreateNodeReenrollToken calls POST /api/v1/nodes/{id}/reenroll-token.

func (*Client) CreateNotificationChannel

func (c *Client) CreateNotificationChannel(ctx context.Context, req CreateNotificationChannelRequest) (NotificationChannelResource, error)

CreateNotificationChannel calls POST /api/v1/notification-channels.

func (*Client) CreateOrganization

func (c *Client) CreateOrganization(ctx context.Context, req CreateOrganizationRequest) (OrganizationResource, error)

CreateOrganization calls POST /api/v1/organizations.

func (*Client) CreatePipeline added in v0.2.0

func (c *Client) CreatePipeline(ctx context.Context, app string, req PipelineSaveRequest) (PipelineResource, error)

CreatePipeline calls POST /api/v1/apps/{app}/pipelines.

func (*Client) CreatePolicy

func (c *Client) CreatePolicy(ctx context.Context, req PolicyRequest) (PolicyResource, error)

CreatePolicy calls POST /api/v1/iam/policies.

func (*Client) CreateProject

func (c *Client) CreateProject(ctx context.Context, req CreateProjectRequest) (ProjectResource, error)

CreateProject calls POST /api/v1/projects.

func (*Client) CreateRegistryCredential

func (c *Client) CreateRegistryCredential(ctx context.Context, req CreateRegistryCredentialRequest) (RegistryCredentialResource, error)

CreateRegistryCredential calls POST /api/v1/registry-credentials.

func (*Client) CreateRole added in v0.2.0

func (c *Client) CreateRole(ctx context.Context, req RoleRequest) (RoleResource, error)

CreateRole calls POST /api/v1/roles.

func (*Client) CreateSSHNodeProvision added in v0.2.0

func (c *Client) CreateSSHNodeProvision(ctx context.Context, req CreateSSHNodeProvisionRequest) (SSHNodeProvisionResource, error)

CreateSSHNodeProvision calls POST /api/v1/nodes/ssh-provision.

func (*Client) CreateSavedLogQuery added in v0.2.0

func (c *Client) CreateSavedLogQuery(ctx context.Context, req SavedLogQueryRequest) (SavedLogQuery, error)

CreateSavedLogQuery calls POST /api/v1/logs/queries.

func (*Client) CreateScheduledTask

func (c *Client) CreateScheduledTask(ctx context.Context, name string, req ScheduledTaskRequest) (ScheduledTaskResource, error)

CreateScheduledTask calls POST /api/v1/apps/{name}/scheduled-tasks.

func (*Client) CreateStandaloneDomain added in v0.2.0

func (c *Client) CreateStandaloneDomain(ctx context.Context, req StandaloneDomainRequest) (StandaloneDomain, error)

CreateStandaloneDomain calls POST /api/v1/domains/standalone.

func (*Client) CreateStatusComponent added in v0.2.0

func (c *Client) CreateStatusComponent(ctx context.Context, comp StatusComponent) (StatusComponent, error)

CreateStatusComponent calls POST /api/v1/status-page/components.

func (*Client) CreateStatusIncident added in v0.2.0

func (c *Client) CreateStatusIncident(ctx context.Context, inc StatusIncident) (StatusIncident, error)

CreateStatusIncident calls POST /api/v1/status-page/incidents.

func (*Client) CreateStorageDestination added in v0.2.0

func (c *Client) CreateStorageDestination(ctx context.Context, req StorageDestinationRequest) (StorageDestination, error)

CreateStorageDestination calls POST /api/v1/storage/destinations.

func (*Client) CreateTag added in v0.2.0

func (c *Client) CreateTag(ctx context.Context, name string) (TagResource, error)

CreateTag calls POST /api/v1/tags.

func (*Client) CreateTeam added in v0.2.0

func (c *Client) CreateTeam(ctx context.Context, name string) (TeamResource, error)

CreateTeam calls POST /api/v1/teams.

func (*Client) CreateTeamInvite added in v0.2.0

func (c *Client) CreateTeamInvite(ctx context.Context, id string, req CreateTeamInviteRequest) (TeamInviteResource, error)

CreateTeamInvite calls POST /api/v1/teams/{id}/invites.

func (*Client) CreateUpgradeSchedule added in v0.2.0

func (c *Client) CreateUpgradeSchedule(ctx context.Context, req UpgradeScheduleRequest) (UpgradeSchedule, error)

CreateUpgradeSchedule calls POST /api/v1/updates/schedule.

func (*Client) CreateUser

func (c *Client) CreateUser(ctx context.Context, req CreateUserRequest) (UserResource, error)

CreateUser calls POST /api/v1/auth/users.

func (*Client) CutoverReport added in v0.2.0

func (c *Client) CutoverReport(ctx context.Context, app, targetIP string, verify bool) (CutoverReport, error)

CutoverReport calls GET /api/v1/migration/cutover, or its /verify form.

func (*Client) DNSZone added in v0.2.0

func (c *Client) DNSZone(ctx context.Context, domain string) (DNSZoneResult, error)

DNSZone calls GET /api/v1/dns/zone?domain=.

func (*Client) DNSZoneDelegation added in v0.2.0

func (c *Client) DNSZoneDelegation(ctx context.Context, provider, zone string) (DNSDelegation, error)

DNSZoneDelegation calls GET /api/v1/dns/zones/{zone}/delegation.

func (*Client) DNSZoneNameServers added in v0.2.0

func (c *Client) DNSZoneNameServers(ctx context.Context, provider, zone string) ([]string, error)

DNSZoneNameServers calls GET /api/v1/dns/zones/{zone}/nameservers.

func (*Client) DatabaseUpgradeSummary added in v0.2.0

func (c *Client) DatabaseUpgradeSummary(ctx context.Context) (DBUpgradeSummary, error)

DatabaseUpgradeSummary calls GET /api/v1/databases/upgrade-summary.

func (*Client) DecideLoginApproval added in v0.2.0

func (c *Client) DecideLoginApproval(ctx context.Context, id string, approve bool, match int) error

DecideLoginApproval calls POST /api/v1/auth/login-approvals/{id}/approve with the number the waiting browser shows, or /deny. A token must hold signin:approve.

func (*Client) DecidePipelineApproval added in v0.2.0

func (c *Client) DecidePipelineApproval(ctx context.Context, app, runID string, approvalID int64, decision, comment string) error

DecidePipelineApproval calls POST .../pipeline-runs/{id}/approvals/{approval}.

func (*Client) DecidePipelineRunHold added in v0.2.0

func (c *Client) DecidePipelineRunHold(ctx context.Context, app, runID, decision string) error

DecidePipelineRunHold calls POST .../pipeline-runs/{id}/hold.

func (*Client) DeleteAIAssistantSettings added in v0.2.0

func (c *Client) DeleteAIAssistantSettings(ctx context.Context) (AIAssistantSettingsResource, error)

DeleteAIAssistantSettings calls DELETE /api/v1/settings/ai-assistant: clears the stored key and resets provider/model in one step.

func (*Client) DeleteAIChatSession added in v0.2.0

func (c *Client) DeleteAIChatSession(ctx context.Context, id string) error

DeleteAIChatSession calls DELETE /api/v1/ai/sessions/{id}.

func (*Client) DeleteAlertRule

func (c *Client) DeleteAlertRule(ctx context.Context, name, id string) error

DeleteAlertRule calls DELETE /api/v1/apps/{name}/alerts/{id}.

func (*Client) DeleteApp

func (c *Client) DeleteApp(ctx context.Context, name string) error

DeleteApp calls DELETE /api/v1/apps/{name}: removes the app's desired state (internal/api/apps.go's own handleDeleteApp doc comment covers the known gap that this does not itself stop the running container).

func (*Client) DeleteAppAndData added in v0.2.0

func (c *Client) DeleteAppAndData(ctx context.Context, name string) (DeleteAppResult, error)

DeleteAppAndData is DeleteAppResult with delete_data=true: the app's volumes are destroyed once its containers are gone.

func (*Client) DeleteAppBranchEnv added in v0.2.0

func (c *Client) DeleteAppBranchEnv(ctx context.Context, name, id string) error

DeleteAppBranchEnv calls DELETE /api/v1/apps/{name}/branch-env/{id}: id is the override's own id (from ListAppBranchEnv or SetAppBranchEnv), not a branch name or env var key.

func (*Client) DeleteAppConnection added in v0.2.0

func (c *Client) DeleteAppConnection(ctx context.Context, name, envVar string) error

DeleteAppConnection calls DELETE /api/v1/apps/{name}/connections/{env_var}.

func (*Client) DeleteAppResult added in v0.2.0

func (c *Client) DeleteAppResult(ctx context.Context, name string) (DeleteAppResult, error)

DeleteAppResult calls DELETE /api/v1/apps/{name} and reports whether container teardown is still pending (HTTP 202).

func (*Client) DeleteAppStream added in v0.2.0

func (c *Client) DeleteAppStream(ctx context.Context, name, id string) error

DeleteAppStream calls DELETE /api/v1/apps/{name}/streams/{id}.

func (*Client) DeleteBackup added in v0.2.0

func (c *Client) DeleteBackup(ctx context.Context, name, historyID string) error

DeleteBackup calls DELETE /api/v1/databases/{name}/backups/{historyId}: permanently deletes one specific archived backup attempt, both its stored object and its history row, rather than waiting for retention to age it out. Irreversible; callers must gate this behind their own explicit confirmation before ever reaching it.

func (*Client) DeleteBackupTarget

func (c *Client) DeleteBackupTarget(ctx context.Context, id string) error

DeleteBackupTarget calls DELETE /api/v1/backup-targets/{id}.

func (*Client) DeleteBuildCache added in v0.2.0

func (c *Client) DeleteBuildCache(ctx context.Context, app string) error

DeleteBuildCache calls DELETE /api/v1/build-cache. An empty app is the global default.

func (*Client) DeleteControlPlaneBackup added in v0.2.0

func (c *Client) DeleteControlPlaneBackup(ctx context.Context, name string) error

DeleteControlPlaneBackup calls DELETE /api/v1/system/backups/{name}.

func (*Client) DeleteCustomTemplate added in v0.2.0

func (c *Client) DeleteCustomTemplate(ctx context.Context, id string) error

DeleteCustomTemplate calls DELETE /api/v1/templates/custom/{id}.

func (*Client) DeleteDNSHealthCheck added in v0.2.0

func (c *Client) DeleteDNSHealthCheck(ctx context.Context, id string) error

DeleteDNSHealthCheck calls DELETE /api/v1/dns/health-checks/{id}.

func (*Client) DeleteDNSRecord added in v0.2.0

func (c *Client) DeleteDNSRecord(ctx context.Context, name, domain string, record DNSRecordResource) (DNSRecordsResponse, error)

DeleteDNSRecord calls DELETE .../dns-records: removes one exact record (name, type, and value must all match). Idempotent.

func (*Client) DeleteDNSZone added in v0.2.0

func (c *Client) DeleteDNSZone(ctx context.Context, provider, zone, confirm string, force bool) error

DeleteDNSZone calls DELETE /api/v1/dns/zones/{zone}.

func (*Client) DeleteDNSZoneRecord added in v0.2.0

func (c *Client) DeleteDNSZoneRecord(ctx context.Context, provider, zone string, k DNSRecordKey) error

DeleteDNSZoneRecord calls DELETE /api/v1/dns/zones/{zone}/records.

func (*Client) DeleteDatabase

func (c *Client) DeleteDatabase(ctx context.Context, name string, force bool) error

DeleteDatabase calls DELETE /api/v1/databases/{name}.

func (*Client) DeleteDatabaseAndData added in v0.2.0

func (c *Client) DeleteDatabaseAndData(ctx context.Context, name string, force bool) error

DeleteDatabaseAndData calls DELETE /api/v1/databases/{name} with delete_data=true: the data volumes are destroyed with the database. The server requires confirm to equal name.

func (*Client) DeleteDatabaseUser added in v0.2.0

func (c *Client) DeleteDatabaseUser(ctx context.Context, name, role string) error

DeleteDatabaseUser calls DELETE /api/v1/databases/{name}/users/{role}.

func (*Client) DeleteDeployNotifyTarget added in v0.2.0

func (c *Client) DeleteDeployNotifyTarget(ctx context.Context, name, id string) error

DeleteDeployNotifyTarget calls DELETE /api/v1/apps/{name}/deploy-notify-targets/{id}.

func (*Client) DeleteEnvironment

func (c *Client) DeleteEnvironment(ctx context.Context, id string) error

DeleteEnvironment calls DELETE /api/v1/environments/{id}.

func (*Client) DeleteEnvironmentCascade added in v0.2.0

func (c *Client) DeleteEnvironmentCascade(ctx context.Context, id string) (CascadeDeleteResult, error)

DeleteEnvironmentCascade calls DELETE with cascade=true: every app and database inside is torn down first. A partial result (Status "partial") means the environment still exists and repeating the call resumes.

func (*Client) DeleteEnvironmentMoveTo added in v0.2.0

func (c *Client) DeleteEnvironmentMoveTo(ctx context.Context, id, moveTo string) error

DeleteEnvironmentMoveTo calls DELETE /api/v1/environments/{id}, retagging every member to moveTo first when moveTo is not empty.

func (*Client) DeleteExportDestination added in v0.2.0

func (c *Client) DeleteExportDestination(ctx context.Context, id string) error

DeleteExportDestination calls DELETE /api/v1/export/destinations/{id}.

func (*Client) DeleteExternalDatabase added in v0.2.0

func (c *Client) DeleteExternalDatabase(ctx context.Context, name string, force bool) error

DeleteExternalDatabase calls DELETE /api/v1/external-databases/{name}. It removes only the local record; the remote database is untouched.

func (*Client) DeleteFeatureFlag

func (c *Client) DeleteFeatureFlag(ctx context.Context, name, id string) error

DeleteFeatureFlag calls DELETE /api/v1/apps/{name}/flags/{id}.

func (*Client) DeleteFirewallRule added in v0.2.0

func (c *Client) DeleteFirewallRule(ctx context.Context, id string) error

DeleteFirewallRule calls DELETE /api/v1/firewall-rules/{id}.

func (*Client) DeleteGitHubAppInstallation added in v0.2.0

func (c *Client) DeleteGitHubAppInstallation(ctx context.Context, id int64) error

DeleteGitHubAppInstallation calls DELETE /api/v1/github-app/installations/{id}: disconnects one account/org. Refused with a 409 (surfaced as *APIError) while a git source still points at a repo under that account.

func (*Client) DeleteGitSource

func (c *Client) DeleteGitSource(ctx context.Context, name string) error

DeleteGitSource calls DELETE /api/v1/apps/{name}/git-source.

func (*Client) DeleteJob added in v0.2.0

func (c *Client) DeleteJob(ctx context.Context, app, id string) error

DeleteJob calls DELETE /api/v1/apps/{name}/jobs/{id}.

func (*Client) DeleteLoadBalancer added in v0.2.0

func (c *Client) DeleteLoadBalancer(ctx context.Context, name string) error

DeleteLoadBalancer calls DELETE /api/v1/apps/{name}/loadbalancer.

func (*Client) DeleteLogArchivePolicy added in v0.2.0

func (c *Client) DeleteLogArchivePolicy(ctx context.Context, app string) error

DeleteLogArchivePolicy calls DELETE /api/v1/log-archive/policy. An empty app is the global policy.

func (*Client) DeleteMaintenanceWindow added in v0.2.0

func (c *Client) DeleteMaintenanceWindow(ctx context.Context, id string) error

DeleteMaintenanceWindow calls DELETE /api/v1/alert-maintenance-windows/{id}.

func (*Client) DeleteModel added in v0.2.0

func (c *Client) DeleteModel(ctx context.Context, name string) error

DeleteModel calls DELETE /api/v1/models/{name}.

func (*Client) DeleteNetworkShare added in v0.2.0

func (c *Client) DeleteNetworkShare(ctx context.Context, id string) error

DeleteNetworkShare calls DELETE /api/v1/network-shares/{id}.

func (*Client) DeleteNode

func (c *Client) DeleteNode(ctx context.Context, id string) error

DeleteNode calls DELETE /api/v1/nodes/{id}. Refused with a 409 (*APIError) while any service or database is still placed on id, telling the caller to drain first (handleDeleteNode's own doc comment).

func (*Client) DeleteNotificationChannel

func (c *Client) DeleteNotificationChannel(ctx context.Context, id string) error

DeleteNotificationChannel calls DELETE /api/v1/notification-channels/{id}.

func (*Client) DeleteOrganization

func (c *Client) DeleteOrganization(ctx context.Context, id string) error

DeleteOrganization calls DELETE /api/v1/organizations/{id}.

func (*Client) DeleteOrganizationCascade added in v0.2.0

func (c *Client) DeleteOrganizationCascade(ctx context.Context, id string) (CascadeDeleteResult, error)

DeleteOrganizationCascade calls DELETE with cascade=true: every app and database inside is torn down first. A partial result (Status "partial") means the organization still exists and repeating the call resumes.

func (*Client) DeletePipeline added in v0.2.0

func (c *Client) DeletePipeline(ctx context.Context, app, name string) error

DeletePipeline calls DELETE /api/v1/apps/{app}/pipelines/{name}.

func (*Client) DeletePolicy

func (c *Client) DeletePolicy(ctx context.Context, id string) error

DeletePolicy calls DELETE /api/v1/iam/policies/{id}.

func (*Client) DeleteProject

func (c *Client) DeleteProject(ctx context.Context, id string) error

DeleteProject calls DELETE /api/v1/projects/{id}.

func (*Client) DeleteProjectCascade added in v0.2.0

func (c *Client) DeleteProjectCascade(ctx context.Context, id string) (CascadeDeleteResult, error)

DeleteProjectCascade calls DELETE with cascade=true: every app and database inside is torn down first. A partial result (Status "partial") means the project still exists and repeating the call resumes.

func (*Client) DeletePushSubscription added in v0.2.0

func (c *Client) DeletePushSubscription(ctx context.Context, id string) error

DeletePushSubscription calls DELETE /api/v1/settings/push-subscriptions/{id}: revokes one registered browser.

func (*Client) DeleteRegistryCredential

func (c *Client) DeleteRegistryCredential(ctx context.Context, id string) error

DeleteRegistryCredential calls DELETE /api/v1/registry-credentials/{id}.

func (*Client) DeleteRole added in v0.2.0

func (c *Client) DeleteRole(ctx context.Context, id string) error

DeleteRole calls DELETE /api/v1/roles/{id}.

func (*Client) DeleteSavedLogQuery added in v0.2.0

func (c *Client) DeleteSavedLogQuery(ctx context.Context, id string) error

DeleteSavedLogQuery calls DELETE /api/v1/logs/queries/{id}.

func (*Client) DeleteScheduledTask

func (c *Client) DeleteScheduledTask(ctx context.Context, name, id string) error

DeleteScheduledTask calls DELETE /api/v1/apps/{name}/scheduled-tasks/{id}.

func (*Client) DeleteSecret added in v0.2.0

func (c *Client) DeleteSecret(ctx context.Context, name, key string, force bool) error

DeleteSecret calls DELETE /api/v1/apps/{name}/secrets/{key}: removes the value and undeclares the key. force overrides a locked key.

func (*Client) DeleteSharedEnvSecret added in v0.2.0

func (c *Client) DeleteSharedEnvSecret(ctx context.Context, scope, id, key string) error

DeleteSharedEnvSecret calls DELETE /api/v1/{scope}s/{id}/env/secrets/{key}.

func (*Client) DeleteStandaloneDomain added in v0.2.0

func (c *Client) DeleteStandaloneDomain(ctx context.Context, domain string) error

DeleteStandaloneDomain calls DELETE /api/v1/domains/standalone/{domain}.

func (*Client) DeleteStatusComponent added in v0.2.0

func (c *Client) DeleteStatusComponent(ctx context.Context, id string) error

DeleteStatusComponent calls DELETE /api/v1/status-page/components/{id}.

func (*Client) DeleteStatusIncident added in v0.2.0

func (c *Client) DeleteStatusIncident(ctx context.Context, id string) error

DeleteStatusIncident calls DELETE /api/v1/status-page/incidents/{id}.

func (*Client) DeleteStorageDestination added in v0.2.0

func (c *Client) DeleteStorageDestination(ctx context.Context, id string) error

DeleteStorageDestination calls DELETE /api/v1/storage/destinations/{id}.

func (*Client) DeleteTag added in v0.2.0

func (c *Client) DeleteTag(ctx context.Context, id string) error

DeleteTag calls DELETE /api/v1/tags/{id}.

func (*Client) DeleteTeam added in v0.2.0

func (c *Client) DeleteTeam(ctx context.Context, id string) error

DeleteTeam calls DELETE /api/v1/teams/{id}.

func (*Client) DeleteUsageBudget added in v0.2.0

func (c *Client) DeleteUsageBudget(ctx context.Context, id string) error

DeleteUsageBudget calls DELETE /api/v1/usage/budgets/{id}.

func (*Client) DeleteUser

func (c *Client) DeleteUser(ctx context.Context, id string) error

DeleteUser calls DELETE /api/v1/users/{id}.

func (*Client) DeleteVolumeBackup added in v0.2.0

func (c *Client) DeleteVolumeBackup(ctx context.Context, name, volume, historyID string) error

DeleteVolumeBackup calls DELETE /api/v1/apps/{name}/volumes/{volume}/backups/{historyId}: the app service volume counterpart of DeleteBackup.

func (*Client) DeployApp

func (c *Client) DeployApp(ctx context.Context, name, image string, confirm bool) (DeployTriggerResult, error)

DeployApp calls POST /api/v1/apps/{name}/deploys: points the app's desired image at image. Asynchronous: this returns as soon as the desired state is saved, not once a container is actually running it. Also how a rollback is done: deploying an older, already-known tag with this same method.

confirm must be true just to have the request accepted at all when the app is tagged with a protected environment (internal/api/ environments.go's checkEnvironmentProtection); otherwise the call fails with a 409, ignored when the app has no protected environment. Even with confirm: true, a protected environment does not deploy immediately: the result's PendingApproval is set instead of App, and a different, sufficiently privileged user must approve it (ApproveDeployApproval below) before this tag actually reaches a running container.

func (*Client) DeployAppWith added in v0.2.0

func (c *Client) DeployAppWith(ctx context.Context, name string, req DeployTriggerRequest) (DeployTriggerResult, error)

DeployAppWith is DeployApp with the full request: pull and freeze override.

func (*Client) DeployCompose

func (c *Client) DeployCompose(ctx context.Context, name string, composeYAML []byte) (ComposeDeployResult, error)

DeployCompose calls POST /api/v1/apps/{name}/compose with composeYAML as the raw request body. Unlike every other Client method, this doesn't go through do(): handleDeployCompose (internal/api/apps_compose.go) reads the body directly via io.ReadAll and parses it as a compose.yaml document, so the body must be sent as-is, not JSON-marshaled, with Content-Type: text/yaml instead of do()'s hardcoded application/json.

func (*Client) DeployComposeStack added in v0.2.0

func (c *Client) DeployComposeStack(ctx context.Context, name string, composeYAML []byte, profiles []string) (ComposeStackDeploy, error)

DeployComposeStack calls POST /api/v1/apps/{name}/compose with optional profiles.

func (*Client) DeploySpec

func (c *Client) DeploySpec(ctx context.Context, name string, req DeploySpecRequest) (DeploySpecResult, error)

DeploySpec calls POST /api/v1/apps/{name}/deploy-spec (internal/api/apps_multi.go's handleDeploySpec): fans req.Services out into N independent builds+deploys under one store.App named name. Synchronous and blocking, same as TriggerBuild, for the identical reason (internal/api/apps_multi.go's own doc comment).

func (*Client) DetachAppIntegration added in v0.2.0

func (c *Client) DetachAppIntegration(ctx context.Context, name, id string) error

DetachAppIntegration calls DELETE /api/v1/apps/{name}/integrations/{id}: id is the attachment's own ID (from ListAppIntegrations), not the catalog key.

func (*Client) DetachAppTag added in v0.2.0

func (c *Client) DetachAppTag(ctx context.Context, name, tagID string) error

DetachAppTag calls DELETE /api/v1/apps/{name}/tags/{id}: id is the tag's ID (from ListAppTags or ListTags above), not its name.

func (*Client) DetachPolicy

func (c *Client) DetachPolicy(ctx context.Context, id, principalType, principalID string) error

DetachPolicy calls DELETE /api/v1/iam/policies/{id}/attachments/{principalType}/{principalID}.

func (*Client) DetectFramework added in v0.2.0

func (c *Client) DetectFramework(ctx context.Context, repoURL, ref string) (DetectFrameworkResource, error)

DetectFramework calls POST /api/v1/build/detect.

func (*Client) DetectGitSourceBuild added in v0.2.0

func (c *Client) DetectGitSourceBuild(ctx context.Context, name, branch string) (GitBuildDetection, error)

DetectGitSourceBuild calls POST /api/v1/apps/{name}/git-source/detect.

func (*Client) DiagnoseApp

func (c *Client) DiagnoseApp(ctx context.Context, name, deployID string) (DiagnosisResource, error)

DiagnoseApp calls GET /api/v1/apps/{name}/diagnose (internal/api/diagnose.go's handleDiagnoseApp): a read-only, deterministic explanation of the app's newest deploy failure or crashloop state. deployID pins the diagnosis to one past attempt (?deploy_id=); empty means "the app's newest attempt."

func (*Client) DisablePITR added in v0.2.0

func (c *Client) DisablePITR(ctx context.Context, name string) error

DisablePITR calls DELETE /api/v1/databases/{name}/pitr.

func (*Client) DisableRegistry

func (c *Client) DisableRegistry(ctx context.Context) (RegistrySettingsResource, error)

DisableRegistry calls DELETE /api/v1/settings/registry: disables the registry and clears its generated credentials in one step.

func (*Client) DiscardMajorUpgradeSnapshot added in v0.2.0

func (c *Client) DiscardMajorUpgradeSnapshot(ctx context.Context, name, id string) error

DiscardMajorUpgradeSnapshot calls DELETE .../major-upgrades/{id}/snapshot.

func (*Client) DisconnectBitbucketApp added in v0.2.0

func (c *Client) DisconnectBitbucketApp(ctx context.Context) error

DisconnectBitbucketApp calls DELETE /api/v1/bitbucket-app: forgets the stored connection locally. Does not revoke the token or delete the consumer on Bitbucket's own side.

func (*Client) DisconnectCloudflareDNS

func (c *Client) DisconnectCloudflareDNS(ctx context.Context) (CloudflareDNSResource, error)

DisconnectCloudflareDNS calls DELETE /api/v1/settings/cloudflare-dns.

func (*Client) DisconnectCloudflareTunnel

func (c *Client) DisconnectCloudflareTunnel(ctx context.Context) (CloudflareTunnelResource, error)

DisconnectCloudflareTunnel calls DELETE /api/v1/settings/cloudflare-tunnel: disables the tunnel and clears the stored token in one step.

func (*Client) DisconnectGitHubApp added in v0.2.0

func (c *Client) DisconnectGitHubApp(ctx context.Context) error

DisconnectGitHubApp calls DELETE /api/v1/github-app: forgets the stored connection locally. Does not uninstall or delete the App on GitHub's own side.

func (*Client) DisconnectGitLabApp added in v0.2.0

func (c *Client) DisconnectGitLabApp(ctx context.Context) error

DisconnectGitLabApp calls DELETE /api/v1/gitlab-app: forgets the stored connection locally. Does not revoke the token or delete the Application on GitLab's own side.

func (*Client) DisconnectGiteaApp added in v0.2.0

func (c *Client) DisconnectGiteaApp(ctx context.Context) error

DisconnectGiteaApp calls DELETE /api/v1/gitea-app: forgets the stored connection locally. Does not revoke the token or delete the Application on Gitea's own side.

func (*Client) DisconnectRoute53DNS added in v0.2.0

func (c *Client) DisconnectRoute53DNS(ctx context.Context) (Route53DNSResource, error)

DisconnectRoute53DNS calls DELETE /api/v1/settings/route53-dns.

func (*Client) DisconnectVault added in v0.2.0

func (c *Client) DisconnectVault(ctx context.Context) (VaultSettingsResource, error)

DisconnectVault calls DELETE /api/v1/settings/vault: disables vault and clears the stored credential in one step.

func (*Client) DiscoverAppHealth added in v0.2.0

func (c *Client) DiscoverAppHealth(ctx context.Context, name string) (HealthDiscoveryResponse, error)

DiscoverAppHealth calls POST /api/v1/apps/{name}/health/discover: actively probes name's running container against a fixed set of well-known paths and reports each one's real outcome. Never guesses: every path in the response was actually tried.

func (*Client) DiscoverPlatformImport added in v0.2.0

func (c *Client) DiscoverPlatformImport(ctx context.Context, req PlatformImportRequest) (PlatformImportReport, error)

DiscoverPlatformImport calls POST /api/v1/imports/platform/discover.

func (*Client) DomainActivity added in v0.2.0

func (c *Client) DomainActivity(ctx context.Context, domain string, limit int, before, actions string) (ActivityPage, error)

DomainActivity calls GET /api/v1/domains/{domain}/activity.

func (*Client) DomainDoctor added in v0.2.0

func (c *Client) DomainDoctor(ctx context.Context, app, domain string) (DomainDoctorReport, error)

DomainDoctor calls POST /api/v1/apps/{name}/domains/{domain}/doctor.

func (*Client) DownloadAuditLogCSV

func (c *Client) DownloadAuditLogCSV(ctx context.Context, opts ListAuditLogOptions) ([]byte, error)

DownloadAuditLogCSV calls GET /api/v1/audit-log?format=csv: the same rows ListAuditLog returns, as a raw CSV file rather than JSON. Built as its own request rather than through do(), since the response body is a CSV file to pass through unmodified, not a JSON value to decode.

func (*Client) DownloadBackup added in v0.2.0

func (c *Client) DownloadBackup(ctx context.Context, name, historyID string) ([]byte, error)

DownloadBackup calls GET /api/v1/databases/{name}/backups/{historyId}/download: one succeeded database backup's own object, streamed straight through as raw bytes so a caller can write it to a local file.

func (*Client) DownloadControlPlaneBackup added in v0.2.0

func (c *Client) DownloadControlPlaneBackup(ctx context.Context, name string) ([]byte, error)

DownloadControlPlaneBackup calls GET /api/v1/system/backups/{name}/download and returns the raw SQLite file.

func (*Client) DownloadDeployLog added in v0.2.0

func (c *Client) DownloadDeployLog(ctx context.Context, name, deployID string) ([]byte, error)

DownloadDeployLog calls GET /api/v1/apps/{name}/deploys/{deployId}/logs/download: one deploy attempt's full log as raw text, the download counterpart to the dashboard's own SSE view. Built as its own request rather than through do(), the same reasoning DownloadAuditLogCSV above already gives: the response body is a text file to pass through unmodified, not a JSON value to decode.

func (*Client) DownloadLogArchiveObject added in v0.2.0

func (c *Client) DownloadLogArchiveObject(ctx context.Context, targetID, key string) ([]byte, error)

DownloadLogArchiveObject calls GET /api/v1/log-archive/objects/download and returns the gzip bytes.

func (*Client) DownloadSBOM added in v0.2.0

func (c *Client) DownloadSBOM(ctx context.Context, name, id string) ([]byte, error)

DownloadSBOM fetches the raw SBOM document of one deployment.

func (*Client) DownloadUsageReportCSV added in v0.2.0

func (c *Client) DownloadUsageReportCSV(ctx context.Context, q UsageReportQuery) ([]byte, error)

DownloadUsageReportCSV calls GET /api/v1/usage/report?format=csv.

func (*Client) DownloadVolumeBackup added in v0.2.0

func (c *Client) DownloadVolumeBackup(ctx context.Context, name, volume, historyID string) ([]byte, error)

DownloadVolumeBackup calls GET /api/v1/apps/{name}/volumes/{volume}/backups/{historyId}/download: the app service volume counterpart of DownloadBackup above.

func (*Client) DrainNode

func (c *Client) DrainNode(ctx context.Context, id, targetNodeID string) (DrainNodeResponse, error)

DrainNode calls POST /api/v1/nodes/{id}/drain?target_node_id=: moves every service and database placed on id to targetNodeID (empty: the local-node sentinel, the server's own default).

func (*Client) EditAppDomains added in v0.2.0

func (c *Client) EditAppDomains(ctx context.Context, name string, req EditDomainsRequest) (EditDomainsResult, error)

EditAppDomains calls PATCH /api/v1/apps/{name}/domains, which changes only the domain list.

func (*Client) EnableHTTPS added in v0.2.0

func (c *Client) EnableHTTPS(ctx context.Context, req EnableHTTPSRequest) (HTTPSStatusResource, error)

EnableHTTPS calls POST /api/v1/settings/ingress/https.

func (*Client) EnablePITR added in v0.2.0

func (c *Client) EnablePITR(ctx context.Context, name string) error

EnablePITR calls POST /api/v1/databases/{name}/pitr: turns on continuous WAL archiving for name going forward.

func (*Client) EvaluateFeatureFlag

func (c *Client) EvaluateFeatureFlag(ctx context.Context, key, identifier string) (EvaluateFlagResource, error)

EvaluateFeatureFlag calls GET /api/v1/flags/evaluate/{key}, optionally with an identifier query param for consistent percentage-rollout bucketing. Flat, not nested under an app: see internal/api/feature_flags.go's own handleEvaluateFeatureFlag doc comment for why.

func (*Client) ExecApp

func (c *Client) ExecApp(ctx context.Context, name string, req ExecRequest) (ExecResponse, error)

ExecApp calls POST /api/v1/apps/{name}/exec: runs command (plus args) inside the app's currently running container and returns its stdout/stderr/exit code once it finishes. AbilityRoot-gated server-side (internal/api/exec.go's own doc comment: secrets are injected as plaintext env vars, so exec can read them anyway, and must sit behind the tier that boundary implies).

func (*Client) ExpireAlertSilence added in v0.2.0

func (c *Client) ExpireAlertSilence(ctx context.Context, id string) (SilenceResource, error)

ExpireAlertSilence calls DELETE /api/v1/alert-silences/{id}, ending it now.

func (*Client) ExplainDatabaseQuery added in v0.2.0

func (c *Client) ExplainDatabaseQuery(ctx context.Context, name string, req DatabaseQueryRequest) (DatabaseQueryResult, error)

ExplainDatabaseQuery calls POST /api/v1/databases/{name}/explain.

func (*Client) ExportAuditLog added in v0.2.0

func (c *Client) ExportAuditLog(ctx context.Context, from, to, format string) ([]byte, error)

ExportAuditLog calls GET /api/v1/audit-log/export and returns the raw NDJSON or CSV body.

func (*Client) ExportDNSZoneRecords added in v0.2.0

func (c *Client) ExportDNSZoneRecords(ctx context.Context, provider, zone, format string) ([]byte, error)

ExportDNSZoneRecords calls GET /api/v1/dns/zones/{zone}/records/export.

func (*Client) ExportEnv added in v0.2.0

func (c *Client) ExportEnv(ctx context.Context, app, format, values string) ([]byte, error)

ExportEnv calls GET /api/v1/apps/{name}/env/export: the file with sensitive values masked (values "masked") or every value dropped ("none").

func (*Client) ExportEnvRevealed added in v0.2.0

func (c *Client) ExportEnvRevealed(ctx context.Context, app, format string, proof *StepUpProof) ([]byte, error)

ExportEnvRevealed calls POST /api/v1/apps/{name}/env/export: every value, secrets included, after a step-up.

func (*Client) ExportIaC added in v0.2.0

func (c *Client) ExportIaC(ctx context.Context, project, app string, includeEnvValues bool) (iac.ExportResult, error)

ExportIaC calls GET /api/v1/export.

func (*Client) ExportLoadBalancer added in v0.2.0

func (c *Client) ExportLoadBalancer(ctx context.Context, name, format string) (LoadBalancerArtifact, error)

ExportLoadBalancer calls GET /api/v1/apps/{name}/loadbalancer/export.

func (*Client) ExtendPreviewEnvironment added in v0.2.0

func (c *Client) ExtendPreviewEnvironment(ctx context.Context, appName string, prNumber, hours int) (PreviewEnvironmentResource, error)

ExtendPreviewEnvironment calls POST /api/v1/apps/{name}/previews/{number}/extend.

func (*Client) GeoIPLookup added in v0.2.0

func (c *Client) GeoIPLookup(ctx context.Context, ip string) (GeoIPLookupResource, error)

GeoIPLookup calls GET /api/v1/system/geoip, with ?ip= when ip is set.

func (*Client) GetAIAssistantSettings added in v0.2.0

func (c *Client) GetAIAssistantSettings(ctx context.Context) (AIAssistantSettingsResource, error)

GetAIAssistantSettings calls GET /api/v1/settings/ai-assistant.

func (*Client) GetAIChatSession added in v0.2.0

func (c *Client) GetAIChatSession(ctx context.Context, id string) (AIChatSessionResource, error)

GetAIChatSession calls GET /api/v1/ai/sessions/{id}: the full transcript.

func (*Client) GetAIControl added in v0.2.0

func (c *Client) GetAIControl(ctx context.Context) (AIControlResource, error)

GetAIControl calls GET /api/v1/settings/ai-control.

func (*Client) GetAdvisorSummary added in v0.2.0

func (c *Client) GetAdvisorSummary(ctx context.Context) (AdvisorSummary, error)

GetAdvisorSummary calls GET /api/v1/resource-advisor/summary.

func (*Client) GetApp

func (c *Client) GetApp(ctx context.Context, name string) (AppResource, error)

GetApp calls GET /api/v1/apps/{name}.

func (*Client) GetAppChanges added in v0.2.0

func (c *Client) GetAppChanges(ctx context.Context, name string, until time.Time, window string) (*RecentChangesResource, error)

GetAppChanges calls GET /api/v1/apps/{name}/changes. Zero until means now; an empty window keeps the server default.

func (*Client) GetAppCostEstimate added in v0.2.0

func (c *Client) GetAppCostEstimate(ctx context.Context, name string) (CostEstimateResource, error)

GetAppCostEstimate calls GET /api/v1/apps/{name}/cost-estimate (internal/api/cost_estimate.go's handleAppCostEstimate): a read-only, deterministic "what this would cost elsewhere" estimate derived from the app's declared or observed CPU/memory. Not a real bill.

func (*Client) GetAppEgressPolicy added in v0.2.0

func (c *Client) GetAppEgressPolicy(ctx context.Context, name string) (AppEgressPolicyResource, error)

GetAppEgressPolicy calls GET /api/v1/apps/{name}/egress-policy: name's current outbound network allowlist, unconfigured (Mode/Allow both empty) meaning unrestricted egress.

func (*Client) GetAppEnvironmentDomains added in v0.2.0

func (c *Client) GetAppEnvironmentDomains(ctx context.Context, name string) (AppEnvironmentDomains, error)

GetAppEnvironmentDomains calls GET /api/v1/apps/{name}/environment-domains.

func (*Client) GetAppGroup

func (c *Client) GetAppGroup(ctx context.Context, name string) (AppGroupResource, error)

GetAppGroup calls GET /api/v1/apps/{name}/group (internal/api/apps_group.go's handleGetAppGroup): name's sibling services under the same store.App, one call whether name already has siblings or is its own one-service group.

func (*Client) GetAppHealth added in v0.2.0

func (c *Client) GetAppHealth(ctx context.Context, name string) (AppHealthResource, error)

GetAppHealth calls GET /api/v1/apps/{name}/health.

func (*Client) GetAppHealthScore added in v0.2.0

func (c *Client) GetAppHealthScore(ctx context.Context, name string) (AppHealthScoreResource, error)

GetAppHealthScore calls GET /api/v1/apps/{name}/health-score: a live synthesis of deploy, security, resilience, and observability signals into one pass/warn/fail verdict per category.

func (*Client) GetAppHookRuns

func (c *Client) GetAppHookRuns(ctx context.Context, name string) (AppHookRunsResource, error)

GetAppHookRuns calls GET /api/v1/apps/{name}/hook-runs (internal/api/apps_hooks.go's handleGetAppHookRuns): the most recent outcome of each of name's pre/post-deploy hooks.

func (*Client) GetAppImportSession added in v0.2.0

func (c *Client) GetAppImportSession(ctx context.Context, id string) (AppImportView, error)

GetAppImportSession calls GET /api/v1/migration/apps/sessions/{id}.

func (*Client) GetAppNetwork

func (c *Client) GetAppNetwork(ctx context.Context, name string) (NetworkResource, error)

GetAppNetwork calls GET /api/v1/apps/{name}/network (internal/api/network.go's handleGetAppNetwork).

func (*Client) GetAppResourceRecommendation

func (c *Client) GetAppResourceRecommendation(ctx context.Context, name string) (ResourceRecommendationResource, error)

GetAppResourceRecommendation calls GET /api/v1/apps/{name}/resource-recommendation (internal/api/resource_recommendation.go's handleAppResourceRecommendation): a read-only, deterministic memory/CPU right-sizing suggestion derived from the app's own historical usage.

func (*Client) GetAppSchedule added in v0.2.0

func (c *Client) GetAppSchedule(ctx context.Context, name string) (AppScheduleResource, error)

GetAppSchedule calls GET /api/v1/apps/{name}/schedule.

func (*Client) GetAppSleep added in v0.2.0

func (c *Client) GetAppSleep(ctx context.Context, appName string) (AppSleepResource, error)

GetAppSleep calls GET /api/v1/apps/{name}/sleep.

func (*Client) GetAppTimeline added in v0.2.0

func (c *Client) GetAppTimeline(ctx context.Context, name string, limit int, before string) (TimelineResponse, error)

GetAppTimeline calls GET /api/v1/apps/{name}/timeline. limit 0 keeps the server default; before is the previous page's next_cursor.

func (*Client) GetAppVolumeMove added in v0.2.0

func (c *Client) GetAppVolumeMove(ctx context.Context, name, id string) (AppVolumeMoveResource, error)

GetAppVolumeMove calls GET /api/v1/apps/{name}/moves/{id}: what a caller polls while MoveAppWithVolumes' own returned Status is still "running".

func (*Client) GetAppsSummary added in v0.2.0

func (c *Client) GetAppsSummary(ctx context.Context, q AppListQuery) (AppsSummary, error)

GetAppsSummary calls GET /api/v1/apps-summary.

func (*Client) GetAttentionFeed added in v0.2.0

func (c *Client) GetAttentionFeed(ctx context.Context) ([]AttentionFeedItem, error)

GetAttentionFeed calls GET /api/v1/attention/feed.

func (*Client) GetAuthEngineStatus added in v0.2.0

func (c *Client) GetAuthEngineStatus(ctx context.Context) (AuthEngineStatusResource, error)

GetAuthEngineStatus calls GET /api/v1/auth-engine/status (root only).

func (*Client) GetAutoRollback added in v0.2.0

func (c *Client) GetAutoRollback(ctx context.Context, appName string) (AutoRollbackSettingResource, error)

GetAutoRollback calls GET /api/v1/apps/{name}/auto-rollback: whether appName rolls itself back automatically the next time a crashloop alert rule fires for it.

func (*Client) GetAutoRollbackSLOBurn added in v0.2.0

func (c *Client) GetAutoRollbackSLOBurn(ctx context.Context, appName string) (AutoRollbackSLOBurnSettingResource, error)

GetAutoRollbackSLOBurn calls GET /api/v1/apps/{name}/auto-rollback-slo-burn: which mode appName reacts in the next time a kind=slo_burn alert rule fires for it.

func (*Client) GetBackupDrill added in v0.2.0

func (c *Client) GetBackupDrill(ctx context.Context, id string) (BackupDrillResource, error)

GetBackupDrill calls GET /api/v1/backups/drills/{id}.

func (*Client) GetBackupTarget

func (c *Client) GetBackupTarget(ctx context.Context, id string) (BackupTargetResource, error)

GetBackupTarget calls GET /api/v1/backup-targets/{id}.

func (*Client) GetBitbucketAppStatus added in v0.2.0

func (c *Client) GetBitbucketAppStatus(ctx context.Context) (BitbucketAppStatusResource, error)

GetBitbucketAppStatus calls GET /api/v1/bitbucket-app: the connection status (configured, and whether the OAuth consumer has been authorized).

func (*Client) GetBuildCacheStats added in v0.2.0

func (c *Client) GetBuildCacheStats(ctx context.Context, app string) (BuildCacheStats, error)

GetBuildCacheStats calls GET /api/v1/build-cache/stats.

func (*Client) GetCanary added in v0.2.0

func (c *Client) GetCanary(ctx context.Context, appName string) (CanaryResource, error)

GetCanary calls GET /api/v1/apps/{name}/canary.

func (*Client) GetCancelSuperseded added in v0.2.0

func (c *Client) GetCancelSuperseded(ctx context.Context, appName string) (CancelSupersededResource, error)

GetCancelSuperseded calls GET /api/v1/apps/{name}/cancel-superseded.

func (*Client) GetChangelog added in v0.2.0

func (c *Client) GetChangelog(ctx context.Context, limit int) (ChangelogResource, error)

GetChangelog calls GET /api/v1/changelog: the most recent release notes parsed from the control plane's own CHANGELOG.md. limit <= 0 uses the API's own default page size.

func (*Client) GetCloudflareDNS

func (c *Client) GetCloudflareDNS(ctx context.Context) (CloudflareDNSResource, error)

GetCloudflareDNS calls GET /api/v1/settings/cloudflare-dns: the Cloudflare DNS-01 credential's enabled/has_token state, needed for ACME to issue real wildcard certificates (HTTP-01 cannot).

func (*Client) GetCloudflareTunnel

func (c *Client) GetCloudflareTunnel(ctx context.Context) (CloudflareTunnelResource, error)

GetCloudflareTunnel calls GET /api/v1/settings/cloudflare-tunnel: the cloudflared container's configured/observed state, exposing the control plane through a Cloudflare Tunnel instead of an inbound port.

func (*Client) GetCodeLoginSettings added in v0.2.0

func (c *Client) GetCodeLoginSettings(ctx context.Context) (CodeLoginSettings, error)

GetCodeLoginSettings calls GET /api/v1/settings/auth/code-login.

func (*Client) GetComposeRevision added in v0.2.0

func (c *Client) GetComposeRevision(ctx context.Context, name string, revision int) (ComposeRevision, error)

GetComposeRevision calls GET /api/v1/apps/{name}/compose/revisions/{revision}.

func (*Client) GetComposeStack added in v0.2.0

func (c *Client) GetComposeStack(ctx context.Context, name string) (ComposeStack, error)

GetComposeStack calls GET /api/v1/apps/{name}/compose.

func (*Client) GetControlPlaneDR added in v0.2.0

func (c *Client) GetControlPlaneDR(ctx context.Context) (ControlPlaneDR, error)

GetControlPlaneDR calls GET /api/v1/system/control-plane-dr.

func (*Client) GetDashboardURL added in v0.2.0

func (c *Client) GetDashboardURL(ctx context.Context) (DashboardURLResource, error)

GetDashboardURL calls GET /api/v1/settings/dashboard-url.

func (*Client) GetDatabase

func (c *Client) GetDatabase(ctx context.Context, name string) (DatabaseResource, error)

GetDatabase calls GET /api/v1/databases/{name}.

func (*Client) GetDatabaseDataCopy added in v0.2.0

func (c *Client) GetDatabaseDataCopy(ctx context.Context, name string) (DataCopyStatus, error)

GetDatabaseDataCopy calls GET /api/v1/imports/platform/databases/{name}.

func (*Client) GetDatabaseNetwork added in v0.2.0

func (c *Client) GetDatabaseNetwork(ctx context.Context, name string) (DatabaseNetwork, error)

GetDatabaseNetwork calls GET /api/v1/databases/{name}/network.

func (*Client) GetDatabaseResourceRecommendation

func (c *Client) GetDatabaseResourceRecommendation(ctx context.Context, name string) (ResourceRecommendationResource, error)

GetDatabaseResourceRecommendation calls GET /api/v1/databases/{name}/resource-recommendation (internal/api/database_resource_recommendation.go's handleDatabaseResourceRecommendation): the database-kind counterpart to GetAppResourceRecommendation, same wire shape.

func (*Client) GetDatabaseSchema added in v0.2.0

func (c *Client) GetDatabaseSchema(ctx context.Context, name string) (DatabaseSchemaResource, error)

GetDatabaseSchema calls GET /api/v1/databases/{name}/schema.

func (*Client) GetDatabaseStatus added in v0.2.0

func (c *Client) GetDatabaseStatus(ctx context.Context, name string) ([]ConditionResource, error)

GetDatabaseStatus calls GET /api/v1/databases/{name}/status.

func (*Client) GetDatabaseUpgrades added in v0.2.0

func (c *Client) GetDatabaseUpgrades(ctx context.Context, name string) (DBUpgradesResource, error)

GetDatabaseUpgrades calls GET /api/v1/databases/{name}/upgrades.

func (*Client) GetDatabaseWho added in v0.2.0

func (c *Client) GetDatabaseWho(ctx context.Context, name string) (DatabaseWho, error)

GetDatabaseWho calls GET /api/v1/databases/{name}/access/principals.

func (*Client) GetDeploy added in v0.2.0

func (c *Client) GetDeploy(ctx context.Context, name, deployID string) (DeployAttemptResource, error)

GetDeploy calls GET /api/v1/apps/{name}/deploys/{deployId}: one deploy attempt with its structured failure. deployID may be "latest".

func (*Client) GetDeployApproval added in v0.2.0

func (c *Client) GetDeployApproval(ctx context.Context, id string) (DeployApprovalResource, error)

GetDeployApproval calls GET /api/v1/deploy-approvals/{id}.

func (*Client) GetDeployFreeze added in v0.2.0

func (c *Client) GetDeployFreeze(ctx context.Context, name string) (DeployFreezeResource, error)

GetDeployFreeze calls GET /api/v1/apps/{name}/deploy-freeze.

func (*Client) GetDeployGate added in v0.2.0

func (c *Client) GetDeployGate(ctx context.Context, appName, deployID string) (DeployGateResource, error)

GetDeployGate calls GET /api/v1/apps/{name}/deploys/{deployId}/gate.

func (*Client) GetDeploySafety added in v0.2.0

func (c *Client) GetDeploySafety(ctx context.Context, appName string) (DeploySafetyResource, error)

GetDeploySafety calls GET /api/v1/apps/{name}/deploy-safety.

func (*Client) GetDeployStatus

func (c *Client) GetDeployStatus(ctx context.Context, name string) ([]ConditionResource, error)

GetDeployStatus calls GET /api/v1/apps/{name}/deploys: the application controller's current stored reconcile conditions, not a deploy history log (internal/api/deploys.go's own handleDeployHistory doc comment).

func (*Client) GetDeploymentsSummary added in v0.2.0

func (c *Client) GetDeploymentsSummary(ctx context.Context, window string) (DeploymentSummary, error)

GetDeploymentsSummary calls GET /api/v1/deployments/summary; window is a duration such as 24h or 7d, empty for the server default.

func (*Client) GetDockerGuard added in v0.2.0

func (c *Client) GetDockerGuard(ctx context.Context) (DockerGuardResource, error)

GetDockerGuard calls GET /api/v1/system/docker-guard.

func (*Client) GetDomainAuthGate added in v0.2.0

func (c *Client) GetDomainAuthGate(ctx context.Context, name, domain string) (DomainAuthGateResource, error)

GetDomainAuthGate calls GET /api/v1/apps/{name}/domains/{domain}/auth-gate.

func (*Client) GetDomainAutomation added in v0.2.0

func (c *Client) GetDomainAutomation(ctx context.Context) (DomainAutomationResource, error)

GetDomainAutomation calls GET /api/v1/settings/domain-automation.

func (*Client) GetDomainBasicAuth

func (c *Client) GetDomainBasicAuth(ctx context.Context, name, domain string) (DomainBasicAuthResource, error)

GetDomainBasicAuth calls GET /api/v1/apps/{name}/domains/{domain}/auth: domain's current HTTP Basic Auth state.

func (*Client) GetDomainCache added in v0.2.0

func (c *Client) GetDomainCache(ctx context.Context, name, domain string) (CachePolicyResource, error)

GetDomainCache calls GET .../domains/{domain}/cache.

func (*Client) GetDomainCacheStats added in v0.2.0

func (c *Client) GetDomainCacheStats(ctx context.Context, name, domain string) (CacheStats, error)

GetDomainCacheStats calls GET .../domains/{domain}/cache/stats.

func (*Client) GetDomainErrorPages added in v0.2.0

func (c *Client) GetDomainErrorPages(ctx context.Context, name, domain string) (DomainErrorPagesResource, error)

GetDomainErrorPages calls GET /api/v1/apps/{name}/domains/{domain}/error-pages: every custom error page currently configured for domain.

func (*Client) GetDomainForwarders added in v0.2.0

func (c *Client) GetDomainForwarders(ctx context.Context, name, domain string) (ForwardersPolicyResource, error)

GetDomainForwarders calls GET .../domains/{domain}/forwarders.

func (*Client) GetDomainGeo added in v0.2.0

func (c *Client) GetDomainGeo(ctx context.Context, name, domain string) (GeoPolicyResource, error)

GetDomainGeo calls GET .../domains/{domain}/geo.

func (*Client) GetDomainHeaders added in v0.2.0

func (c *Client) GetDomainHeaders(ctx context.Context, name, domain string) (HeadersPolicyResource, error)

GetDomainHeaders calls GET .../domains/{domain}/headers.

func (*Client) GetDomainMaintenance

func (c *Client) GetDomainMaintenance(ctx context.Context, name, domain string) (DomainMaintenanceResource, error)

GetDomainMaintenance calls GET /api/v1/apps/{name}/domains/{domain}/maintenance: domain's current maintenance-mode state.

func (*Client) GetDomainPolicies added in v0.2.0

func (c *Client) GetDomainPolicies(ctx context.Context, name, domain string) (DomainPoliciesResource, error)

GetDomainPolicies calls GET .../domains/{domain}/policies.

func (*Client) GetDomainPorts added in v0.2.0

func (c *Client) GetDomainPorts(ctx context.Context, name, domain string) (DomainPortsResource, error)

GetDomainPorts calls GET .../domains/{domain}/ports.

func (*Client) GetDomainRedirect added in v0.2.0

func (c *Client) GetDomainRedirect(ctx context.Context, name, domain string) (DomainRedirectResource, error)

GetDomainRedirect calls GET /api/v1/apps/{name}/domains/{domain}/redirect: domain's current redirect configuration.

func (*Client) GetDomainRedirects added in v0.2.0

func (c *Client) GetDomainRedirects(ctx context.Context, name, domain string) (DomainRedirectsResource, error)

GetDomainRedirects calls GET .../domains/{domain}/redirects.

func (*Client) GetDomainSearchVisibility added in v0.2.0

func (c *Client) GetDomainSearchVisibility(ctx context.Context, name, domain string) (DomainSearchVisibilityResource, error)

GetDomainSearchVisibility calls GET .../domains/{domain}/search-visibility.

func (*Client) GetDomainTLSCert

func (c *Client) GetDomainTLSCert(ctx context.Context, name, domain string) (DomainTLSCertResource, error)

GetDomainTLSCert calls GET /api/v1/apps/{name}/domains/{domain}/tls-cert: domain's current BYO certificate state.

func (*Client) GetDomainWAF added in v0.2.0

func (c *Client) GetDomainWAF(ctx context.Context, name, domain string) (DomainWAFResource, error)

GetDomainWAF calls GET /api/v1/apps/{name}/domains/{domain}/waf: domain's current WAF and rate-limit state.

func (*Client) GetEmailSettings added in v0.2.0

func (c *Client) GetEmailSettings(ctx context.Context) (EmailSettingsResource, error)

GetEmailSettings calls GET /api/v1/settings/email.

func (*Client) GetEnvSettings added in v0.2.0

func (c *Client) GetEnvSettings(ctx context.Context, app string) (EnvSettings, error)

GetEnvSettings calls GET /api/v1/apps/{name}/env/settings.

func (*Client) GetEnvironmentEnv

func (c *Client) GetEnvironmentEnv(ctx context.Context, id string) (map[string]string, error)

GetEnvironmentEnv calls GET /api/v1/environments/{id}/env.

func (*Client) GetExecAccess added in v0.2.0

func (c *Client) GetExecAccess(ctx context.Context, appName string) (ExecAccessResource, error)

GetExecAccess calls GET /api/v1/apps/{name}/exec-access: whether appName's shell/exec routes (POST .../exec, GET .../terminal) are even attempted, regardless of the caller's own IAM abilities. On by default.

func (*Client) GetExportDestination added in v0.2.0

func (c *Client) GetExportDestination(ctx context.Context, id string) (ExportDestinationResource, error)

GetExportDestination calls GET /api/v1/export/destinations/{id}.

func (*Client) GetExposure added in v0.2.0

func (c *Client) GetExposure(ctx context.Context, node string, probe bool) (ExposureReport, error)

GetExposure calls GET /api/v1/firewall/exposure.

func (*Client) GetFailureContext added in v0.2.0

func (c *Client) GetFailureContext(ctx context.Context, name string) (FailureContextResource, error)

GetFailureContext calls GET /api/v1/apps/{name}/failure-context.

func (*Client) GetFeatureFlag

func (c *Client) GetFeatureFlag(ctx context.Context, name, id string) (FeatureFlagResource, error)

GetFeatureFlag calls GET /api/v1/apps/{name}/flags/{id}.

func (*Client) GetFleetResourceUsage added in v0.2.0

func (c *Client) GetFleetResourceUsage(ctx context.Context) (FleetResourceUsageResource, error)

GetFleetResourceUsage calls GET /api/v1/nodes/resource-usage (internal/api/node_resource_usage.go's handleFleetResourceUsage): the latest CPU/memory/disk reading for every node plus a fleet-wide rollup, the node-scoped counterpart to ListAppResourceUsage.

func (*Client) GetGitHubAppStatus added in v0.2.0

func (c *Client) GetGitHubAppStatus(ctx context.Context) (GitHubAppStatusResource, error)

GetGitHubAppStatus calls GET /api/v1/github-app: the connection status (not connected / connected / connected but not yet installed).

func (*Client) GetGitLabAppStatus added in v0.2.0

func (c *Client) GetGitLabAppStatus(ctx context.Context) (GitLabAppStatusResource, error)

GetGitLabAppStatus calls GET /api/v1/gitlab-app: the connection status (configured, and whether the OAuth authorization-code flow has completed).

func (*Client) GetGitSource

func (c *Client) GetGitSource(ctx context.Context, name string) (GitSourceResource, error)

GetGitSource calls GET /api/v1/apps/{name}/git-source.

func (*Client) GetGiteaAppStatus added in v0.2.0

func (c *Client) GetGiteaAppStatus(ctx context.Context) (GiteaAppStatusResource, error)

GetGiteaAppStatus calls GET /api/v1/gitea-app: the connection status (configured, and whether the OAuth authorization-code flow has completed).

func (*Client) GetGlobalDeployFreeze added in v0.2.0

func (c *Client) GetGlobalDeployFreeze(ctx context.Context) (DeployFreezeResource, error)

GetGlobalDeployFreeze calls GET /api/v1/settings/deploy-freeze.

func (*Client) GetGoLive added in v0.2.0

func (c *Client) GetGoLive(ctx context.Context, app, domain string) (GoLiveResult, error)

GetGoLive calls GET .../domains/{domain}/go-live (a poll friendly status).

func (*Client) GetHTTPSStatus added in v0.2.0

func (c *Client) GetHTTPSStatus(ctx context.Context) (HTTPSStatusResource, error)

GetHTTPSStatus calls GET /api/v1/settings/ingress/https.

func (*Client) GetImageAutoUpdate added in v0.2.0

func (c *Client) GetImageAutoUpdate(ctx context.Context, appName string) (ImageAutoUpdateResource, error)

GetImageAutoUpdate calls GET /api/v1/apps/{name}/auto-update.

func (*Client) GetIngressConnectivity added in v0.2.0

func (c *Client) GetIngressConnectivity(ctx context.Context) (IngressConnectivity, error)

GetIngressConnectivity calls GET /api/v1/ingress/connectivity.

func (*Client) GetIngressSettings added in v0.2.0

func (c *Client) GetIngressSettings(ctx context.Context) (IngressSettingsResource, error)

GetIngressSettings calls GET /api/v1/settings/ingress.

func (*Client) GetJob added in v0.2.0

func (c *Client) GetJob(ctx context.Context, app, id string) (ScheduledTaskResource, error)

GetJob calls GET /api/v1/apps/{name}/jobs/{id}; id may be the job's name.

func (*Client) GetJobRun added in v0.2.0

func (c *Client) GetJobRun(ctx context.Context, app, id, runID string) (JobRunResource, error)

GetJobRun calls GET .../jobs/{id}/runs/{run}, including the output.

func (*Client) GetLoadBalancer added in v0.2.0

func (c *Client) GetLoadBalancer(ctx context.Context, name string) (LoadBalancerResource, error)

GetLoadBalancer calls GET /api/v1/apps/{name}/loadbalancer.

func (*Client) GetLoadBalancerHistory added in v0.2.0

func (c *Client) GetLoadBalancerHistory(ctx context.Context, name string, limit int) (LoadBalancerHistory, error)

GetLoadBalancerHistory calls GET /api/v1/apps/{name}/loadbalancer/history.

func (*Client) GetLoadBalancerStatus added in v0.2.0

func (c *Client) GetLoadBalancerStatus(ctx context.Context, name string) (LoadBalancerStatus, error)

GetLoadBalancerStatus calls GET /api/v1/apps/{name}/loadbalancer/status.

func (*Client) GetLogDrain

func (c *Client) GetLogDrain(ctx context.Context, name string) (LogDrainResource, error)

GetLogDrain calls GET /api/v1/apps/{name}/log-drain: the app's currently configured external log-forwarding sink. Returns *APIError with StatusCode 404 (via errors.As) if the app doesn't exist or has no drain configured, the same two-404-cases-in-one shape that route's own doc comment describes.

func (*Client) GetLogSignatures added in v0.2.0

func (c *Client) GetLogSignatures(ctx context.Context, app string, s LogSignatureQuery) (LogSignatures, error)

GetLogSignatures calls GET /api/v1/apps/{name}/logs/signatures.

func (*Client) GetMeshConnectivity added in v0.2.0

func (c *Client) GetMeshConnectivity(ctx context.Context) (MeshConnectivity, error)

GetMeshConnectivity calls GET /api/v1/mesh/connectivity.

func (*Client) GetMeshSettings added in v0.2.0

func (c *Client) GetMeshSettings(ctx context.Context) (MeshSettings, error)

GetMeshSettings calls GET /api/v1/mesh/settings.

func (*Client) GetMeshStatus added in v0.2.0

func (c *Client) GetMeshStatus(ctx context.Context) (MeshStatusResource, error)

GetMeshStatus calls GET /api/v1/mesh: this node's live WireGuard mesh state, every peer it currently knows about, and its own most recent key rotation if any. Returns a 501-wrapping error when mesh networking is not enabled on the target control plane.

func (*Client) GetMigrationSession added in v0.2.0

func (c *Client) GetMigrationSession(ctx context.Context, id string) (HubSession, error)

GetMigrationSession returns one session's plan and progress.

func (*Client) GetModel added in v0.2.0

func (c *Client) GetModel(ctx context.Context, name string) (ModelResource, error)

GetModel calls GET /api/v1/models/{name}.

func (*Client) GetModelEngineMetrics added in v0.2.0

func (c *Client) GetModelEngineMetrics(ctx context.Context, name string, since time.Duration) (EngineMetricsReport, error)

GetModelEngineMetrics calls GET /api/v1/models/{name}/engine-metrics.

func (*Client) GetModelFit added in v0.2.0

func (c *Client) GetModelFit(ctx context.Context, name string) (ModelFitReport, error)

GetModelFit calls GET /api/v1/models/{name}/fit.

func (*Client) GetModelUsage added in v0.2.0

func (c *Client) GetModelUsage(ctx context.Context, name string, since time.Duration) (ModelUsageReport, error)

GetModelUsage calls GET /api/v1/models/{name}/usage.

func (*Client) GetNetworkProxyStatus added in v0.2.0

func (c *Client) GetNetworkProxyStatus(ctx context.Context) (NetworkProxyResource, error)

GetNetworkProxyStatus calls GET /api/v1/network/proxy: per-domain reachability (does this control plane's own ingress reach the app behind it) plus certificate status, the Traffic dashboard page's own data source.

func (*Client) GetNetworkShare added in v0.2.0

func (c *Client) GetNetworkShare(ctx context.Context, id string) (NetworkShareResource, error)

GetNetworkShare calls GET /api/v1/network-shares/{id}.

func (*Client) GetNetworkTopology added in v0.2.0

func (c *Client) GetNetworkTopology(ctx context.Context) (NetworkTopologyResource, error)

GetNetworkTopology calls GET /api/v1/network/topology: a read-only, whole-mesh summary of nodes, apps, databases, load balancers, and app-to-database connections.

func (*Client) GetNode

func (c *Client) GetNode(ctx context.Context, id string) (NodeResource, error)

GetNode calls GET /api/v1/nodes/{id}.

func (*Client) GetNodeCapacityForecast added in v0.2.0

func (c *Client) GetNodeCapacityForecast(ctx context.Context, id string) (NodeCapacityForecastResource, error)

GetNodeCapacityForecast calls GET /api/v1/nodes/{id}/capacity-forecast (internal/api/node_capacity_forecast.go's handleNodeCapacityForecast): a rough "days until full at the current trend" projection for id's disk and memory, derived from a deterministic linear-trend fit over recent usage history, never from an external model. Disk/Memory come back nil when the fitted trend is flat or improving, or there isn't enough history yet.

func (*Client) GetNodeDrain added in v0.2.0

func (c *Client) GetNodeDrain(ctx context.Context, id string) (NodeDrainResource, error)

GetNodeDrain calls GET /api/v1/node-drains/{id}.

func (*Client) GetNodeHealth

func (c *Client) GetNodeHealth(ctx context.Context, id string) ([]ConditionResource, error)

GetNodeHealth calls GET /api/v1/nodes/{id}/health: the node health controller's stored reconcile conditions, the same ConditionResource shape GetDeployStatus returns for an app.

func (*Client) GetNodeLabels added in v0.2.0

func (c *Client) GetNodeLabels(ctx context.Context, id string) (NodeLabels, error)

GetNodeLabels calls GET /api/v1/nodes/{id}/labels.

func (*Client) GetNodeMove added in v0.2.0

func (c *Client) GetNodeMove(ctx context.Context, id string) (NodeMoveResource, error)

GetNodeMove calls GET /api/v1/node-moves/{id}.

func (*Client) GetNodePatchStatus

func (c *Client) GetNodePatchStatus(ctx context.Context, id string) (NodePatchStatusResource, error)

GetNodePatchStatus calls GET /api/v1/nodes/{id}/patch-status: the latest OS-patch reading HostPatchCollector wrote for id, or Checked == false if it has never checked (unsupported package manager, or the collector hasn't run yet).

func (*Client) GetNodeProvision added in v0.2.0

func (c *Client) GetNodeProvision(ctx context.Context, id string) (NodeProvisionResource, error)

GetNodeProvision calls GET /api/v1/node-provisions/{id}.

func (*Client) GetOAuthSettings added in v0.2.0

func (c *Client) GetOAuthSettings(ctx context.Context) ([]OAuthProviderSettingsResource, error)

GetOAuthSettings calls GET /api/v1/settings/oauth: every OAuth sign-in provider's current configuration.

func (*Client) GetOnboardingState

func (c *Client) GetOnboardingState(ctx context.Context) (OnboardingStateResource, error)

GetOnboardingState calls GET /api/v1/onboarding: whether the first-run onboarding flow has been completed.

func (*Client) GetOpenAPISpec added in v0.2.0

func (c *Client) GetOpenAPISpec(ctx context.Context) (OpenAPISpecResource, error)

GetOpenAPISpec calls GET /api/v1/openapi.json: the route metadata behind "levelrail-cli api-docs" and the web dashboard's API explorer.

func (*Client) GetOrganization

func (c *Client) GetOrganization(ctx context.Context, id string) (OrganizationResource, error)

GetOrganization calls GET /api/v1/organizations/{id}.

func (*Client) GetOrganizationEnv

func (c *Client) GetOrganizationEnv(ctx context.Context, id string) (map[string]string, error)

GetOrganizationEnv calls GET /api/v1/organizations/{id}/env.

func (*Client) GetPITRStatus added in v0.2.0

func (c *Client) GetPITRStatus(ctx context.Context, name string) (PITRStatusResource, error)

GetPITRStatus calls GET /api/v1/databases/{name}/pitr: whether PITR is enabled and, if so, the currently recoverable window.

func (*Client) GetPendingChanges added in v0.2.0

func (c *Client) GetPendingChanges(ctx context.Context, name string) (PendingChanges, error)

GetPendingChanges calls GET /api/v1/apps/{name}/pending-changes.

func (*Client) GetPipeline added in v0.2.0

func (c *Client) GetPipeline(ctx context.Context, app, name string) (PipelineResource, error)

GetPipeline calls GET /api/v1/apps/{app}/pipelines/{name}.

func (*Client) GetPipelineOIDCInfo added in v0.2.0

func (c *Client) GetPipelineOIDCInfo(ctx context.Context) (PipelineOIDCResource, error)

GetPipelineOIDCInfo calls GET /api/v1/pipelines/oidc: whether pipeline jobs can mint OIDC tokens on this control plane, and the URLs an operator wires into a cloud provider's OIDC trust policy.

func (*Client) GetPipelineRun added in v0.2.0

func (c *Client) GetPipelineRun(ctx context.Context, app, id string) (PipelineRunResource, error)

GetPipelineRun calls GET /api/v1/apps/{app}/pipeline-runs/{id}.

func (*Client) GetPipelineSync added in v0.2.0

func (c *Client) GetPipelineSync(ctx context.Context, app string) (PipelineSyncStatus, error)

GetPipelineSync calls GET /api/v1/apps/{app}/pipeline-sync.

func (*Client) GetPlacement added in v0.2.0

func (c *Client) GetPlacement(ctx context.Context, kind, name string) (PlacementResource, error)

GetPlacement calls GET /api/v1/{apps|databases}/{name}/placement.

func (*Client) GetPlatformUpgradePolicy added in v0.2.0

func (c *Client) GetPlatformUpgradePolicy(ctx context.Context) (DBUpgradePolicy, error)

GetPlatformUpgradePolicy calls GET /api/v1/settings/database-upgrades.

func (*Client) GetPolicy

func (c *Client) GetPolicy(ctx context.Context, id string) (PolicyResource, error)

GetPolicy calls GET /api/v1/iam/policies/{id}.

func (*Client) GetPreview added in v0.2.0

func (c *Client) GetPreview(ctx context.Context, name string) (PreviewStatus, error)

GetPreview calls GET /api/v1/apps/{name}/preview.

func (*Client) GetPreviewPolicy added in v0.2.0

func (c *Client) GetPreviewPolicy(ctx context.Context, appName string) (PreviewPolicyResource, error)

GetPreviewPolicy calls GET /api/v1/apps/{name}/preview-policy.

func (*Client) GetProject

func (c *Client) GetProject(ctx context.Context, id string) (ProjectResource, error)

GetProject calls GET /api/v1/projects/{id}.

func (*Client) GetProjectEnv

func (c *Client) GetProjectEnv(ctx context.Context, id string) (map[string]string, error)

GetProjectEnv calls GET /api/v1/projects/{id}/env.

func (*Client) GetProjectTopology added in v0.2.0

func (c *Client) GetProjectTopology(ctx context.Context, id string) (ProjectTopologyResource, error)

GetProjectTopology calls GET /api/v1/projects/{id}/topology: a diagram-ready graph of one project's apps, databases, and shared volumes.

func (*Client) GetProxyIntegration added in v0.2.0

func (c *Client) GetProxyIntegration(ctx context.Context) (ProxyIntegration, error)

GetProxyIntegration returns detection, settings and per-domain status.

func (*Client) GetRegistryCredential

func (c *Client) GetRegistryCredential(ctx context.Context, id string) (RegistryCredentialResource, error)

GetRegistryCredential calls GET /api/v1/registry-credentials/{id}.

func (*Client) GetRegistrySettings

func (c *Client) GetRegistrySettings(ctx context.Context) (RegistrySettingsResource, error)

GetRegistrySettings calls GET /api/v1/settings/registry: the built-in registry container's configured/observed state.

func (*Client) GetReleaseHistory added in v0.2.0

func (c *Client) GetReleaseHistory(ctx context.Context, channel string) (ReleaseHistory, error)

GetReleaseHistory calls GET /api/v1/updates/releases.

func (*Client) GetReverseProxyGuide added in v0.2.0

func (c *Client) GetReverseProxyGuide(ctx context.Context, domain, proxy, app string, verify bool) (ReverseProxyGuide, error)

GetReverseProxyGuide calls GET /api/v1/system/reverse-proxy. A non-empty app builds the snippet for that app's domain instead of the dashboard.

func (*Client) GetRollbackPlan added in v0.2.0

func (c *Client) GetRollbackPlan(ctx context.Context, version string) (RollbackPlan, error)

GetRollbackPlan calls GET /api/v1/updates/rollback-plan.

func (*Client) GetRoute53DNS added in v0.2.0

func (c *Client) GetRoute53DNS(ctx context.Context) (Route53DNSResource, error)

GetRoute53DNS calls GET /api/v1/settings/route53-dns: a second, independent ACME DNS-01 provider's enabled/credential-presence state, mirroring GetCloudflareDNS's own shape.

func (*Client) GetSBOM added in v0.2.0

func (c *Client) GetSBOM(ctx context.Context, name, id string) (SBOMSummary, error)

GetSBOM calls GET /api/v1/apps/{name}/deployments/{id}/sbom.

func (*Client) GetSLOPreview added in v0.2.0

func (c *Client) GetSLOPreview(ctx context.Context, name string, cfg AlertSLOConfig) (*SLOPreviewResource, error)

GetSLOPreview calls GET /api/v1/apps/{name}/slo-preview.

func (*Client) GetSSHNodeProvision added in v0.2.0

func (c *Client) GetSSHNodeProvision(ctx context.Context, id string) (SSHNodeProvisionResource, error)

GetSSHNodeProvision calls GET /api/v1/ssh-node-provisions/{id}.

func (*Client) GetScheduledTask

func (c *Client) GetScheduledTask(ctx context.Context, name, id string) (ScheduledTaskResource, error)

GetScheduledTask calls GET /api/v1/apps/{name}/scheduled-tasks/{id}.

func (*Client) GetSecretBinding added in v0.2.0

func (c *Client) GetSecretBinding(ctx context.Context) (SecretBindingStatus, error)

GetSecretBinding calls GET /api/v1/system/secrets/binding: how many stored secret values still use the legacy unbound format.

func (*Client) GetSecurityPolicy added in v0.2.0

func (c *Client) GetSecurityPolicy(ctx context.Context) (SecurityPolicy, error)

GetSecurityPolicy calls GET /api/v1/security/policy.

func (*Client) GetSecurityPosture added in v0.2.0

func (c *Client) GetSecurityPosture(ctx context.Context) (SecurityPosture, error)

GetSecurityPosture calls GET /api/v1/security/posture.

func (*Client) GetSelfUpgradePlan added in v0.2.0

func (c *Client) GetSelfUpgradePlan(ctx context.Context, target string) (SelfUpgradePlan, error)

GetSelfUpgradePlan calls GET /api/v1/updates/self-upgrade/plan. An empty target asks for the latest release on the configured channel.

func (*Client) GetServerAddress added in v0.2.0

func (c *Client) GetServerAddress(ctx context.Context, domain string) (ServerAddress, error)

GetServerAddress calls GET /api/v1/system/server-address; domain may be empty.

func (*Client) GetServerReadiness added in v0.2.0

func (c *Client) GetServerReadiness(ctx context.Context, domain string) (ServerReadiness, error)

GetServerReadiness calls GET /api/v1/system/readiness, optionally also checking the DNS of domain.

func (*Client) GetServiceTemplate

func (c *Client) GetServiceTemplate(ctx context.Context, id string) (ServiceTemplateDetail, error)

GetServiceTemplate calls GET /api/v1/service-templates/{id}: one catalog entry, including its full compose.yaml body. Also resolves an operator-defined custom template id (resolveTemplate, internal/api/service_templates.go), so this is the same call whether id came from ListServiceTemplates or ListCustomTemplates below.

func (*Client) GetSession

func (c *Client) GetSession(ctx context.Context) (SessionInfoResource, error)

GetSession calls GET /api/v1/auth/session using this Client's bearer token, exactly the same auth mechanism every other method on this type uses. The server gates this route with requireAuth, session-cookie-only, by explicit design (internal/api/account.go's handleGetSession doc comment), so a call made through this method always gets back a real, honest 401 "authentication required" for a bearer-token caller, not a client-side bug.

func (*Client) GetSetupGuide added in v0.2.0

func (c *Client) GetSetupGuide(ctx context.Context) (SetupGuideResource, error)

GetSetupGuide calls GET /api/v1/setup/guide.

func (*Client) GetSetupStatus added in v0.2.0

func (c *Client) GetSetupStatus(ctx context.Context) (SetupStatusResource, error)

GetSetupStatus calls GET /api/v1/auth/setup-status.

func (*Client) GetStatusPage added in v0.2.0

func (c *Client) GetStatusPage(ctx context.Context) (StatusPageSettings, error)

GetStatusPage calls GET /api/v1/status-page.

func (*Client) GetSupplyChain added in v0.2.0

func (c *Client) GetSupplyChain(ctx context.Context, name string) (SupplyChainSettings, error)

GetSupplyChain calls GET /api/v1/apps/{name}/supply-chain.

func (*Client) GetSystemDoctor

func (c *Client) GetSystemDoctor(ctx context.Context) (SystemDoctorResource, error)

GetSystemDoctor calls GET /api/v1/system/doctor: the "levelrail-cli doctor" preflight bundle, a superset of GetSystemStatus above.

func (*Client) GetSystemRestart added in v0.2.0

func (c *Client) GetSystemRestart(ctx context.Context) (SystemRestart, error)

GetSystemRestart calls GET /api/v1/system/restart.

func (*Client) GetSystemStatus

func (c *Client) GetSystemStatus(ctx context.Context) (SystemStatusResource, error)

GetSystemStatus calls GET /api/v1/system/status: this control plane's own configured/not-configured signals, including local Docker daemon reachability (DockerConnected/DockerError).

func (*Client) GetTeam added in v0.2.0

func (c *Client) GetTeam(ctx context.Context, id string) (TeamResource, error)

GetTeam calls GET /api/v1/teams/{id}.

func (*Client) GetUpdatePreflight added in v0.2.0

func (c *Client) GetUpdatePreflight(ctx context.Context) (UpdatePreflight, error)

GetUpdatePreflight calls GET /api/v1/updates/preflight.

func (*Client) GetUpdateSettings added in v0.2.0

func (c *Client) GetUpdateSettings(ctx context.Context) (UpdateSettingsResource, error)

GetUpdateSettings calls GET /api/v1/updates/settings.

func (*Client) GetUpdates

func (c *Client) GetUpdates(ctx context.Context) (UpdatesResource, error)

GetUpdates calls GET /api/v1/updates: the running control plane version against GitHub's latest published release.

func (*Client) GetUpgradeHistory added in v0.2.0

func (c *Client) GetUpgradeHistory(ctx context.Context) (UpgradeHistory, error)

GetUpgradeHistory calls GET /api/v1/updates/history.

func (*Client) GetUpgradePolicy added in v0.2.0

func (c *Client) GetUpgradePolicy(ctx context.Context) (UpgradePolicy, error)

GetUpgradePolicy calls GET /api/v1/updates/auto.

func (*Client) GetUpgradeSchedule added in v0.2.0

func (c *Client) GetUpgradeSchedule(ctx context.Context) (UpgradeScheduleStatus, error)

GetUpgradeSchedule calls GET /api/v1/updates/schedule.

func (*Client) GetUsageReport added in v0.2.0

func (c *Client) GetUsageReport(ctx context.Context, q UsageReportQuery) (UsageReport, error)

GetUsageReport calls GET /api/v1/usage/report.

func (*Client) GetUsageSettings added in v0.2.0

func (c *Client) GetUsageSettings(ctx context.Context) (UsageSettings, error)

GetUsageSettings calls GET /api/v1/usage/settings.

func (*Client) GetUserEnvironmentGrants added in v0.2.0

func (c *Client) GetUserEnvironmentGrants(ctx context.Context, userID string) (EnvironmentGrants, error)

GetUserEnvironmentGrants calls GET /api/v1/users/{id}/environment-grants.

func (*Client) GetVault added in v0.2.0

func (c *Client) GetVault(ctx context.Context) (VaultSettingsResource, error)

GetVault calls GET /api/v1/settings/vault: the external Vault integration's configured state, for resolving { vault: { path, key } } app.yaml env vars.

func (*Client) GetVolumeBackupPolicy added in v0.2.0

func (c *Client) GetVolumeBackupPolicy(ctx context.Context, name, volume string) (VolumeBackupPolicyResource, error)

GetVolumeBackupPolicy calls GET /api/v1/apps/{name}/volumes/{volume}/backup-policy.

func (*Client) GetVolumeBackupSchedule

func (c *Client) GetVolumeBackupSchedule(ctx context.Context, name, volume string) (VolumeBackupScheduleResource, error)

GetVolumeBackupSchedule calls GET /api/v1/apps/{name}/volumes/{volume}/backup-schedule: the app service volume counterpart of the schedule fields riding along on GET .../databases/{name} for a database (a service can have many volumes, so there is no single app resource to embed this in, hence its own dedicated GET here).

func (*Client) GetVulnerabilities added in v0.2.0

func (c *Client) GetVulnerabilities(ctx context.Context, name, id string) (VulnReport, error)

GetVulnerabilities calls GET /api/v1/apps/{name}/deployments/{id}/vulnerabilities.

func (*Client) GitSourceCommits added in v0.2.0

func (c *Client) GitSourceCommits(ctx context.Context, name, branch string, refresh bool) (GitSourceCommits, error)

GitSourceCommits lists recent commits of a branch with deploy status and suggestions. branch empty means the connected branch.

func (*Client) GrantDatabaseAccess added in v0.2.0

func (c *Client) GrantDatabaseAccess(ctx context.Context, name string, req DatabaseGrantRequest) (DatabaseGrant, error)

GrantDatabaseAccess calls POST /api/v1/databases/{name}/access/grants.

func (*Client) HostFirewallStatus added in v0.2.0

func (c *Client) HostFirewallStatus(ctx context.Context) (HostFirewallResource, error)

HostFirewallStatus calls GET /api/v1/firewall/host.

func (*Client) IAMEffectivePermissions added in v0.2.0

func (c *Client) IAMEffectivePermissions(ctx context.Context, principalType, principalID string) (IAMEffective, error)

IAMEffectivePermissions calls GET /api/v1/iam/principals/{type}/{id}/effective.

func (*Client) ImportDNSZoneRecords added in v0.2.0

func (c *Client) ImportDNSZoneRecords(ctx context.Context, provider, zone string, req DNSImportRequest) (DNSImportResult, error)

ImportDNSZoneRecords calls POST /api/v1/dns/zones/{zone}/records/import.

func (*Client) InstallTemplate added in v0.2.0

func (c *Client) InstallTemplate(ctx context.Context, id string, req TemplateInstallRequest) (ComposeStackDeploy, error)

InstallTemplate calls POST /api/v1/service-templates/{id}/install.

func (*Client) InvestigateApp added in v0.2.0

func (c *Client) InvestigateApp(ctx context.Context, name string, from, to time.Time) (InvestigationResource, error)

InvestigateApp calls GET /api/v1/apps/{name}/investigate.

func (*Client) IssueDatabaseTemp added in v0.2.0

func (c *Client) IssueDatabaseTemp(ctx context.Context, name, preset string, ttlMinutes int) (DatabaseTempIssued, error)

IssueDatabaseTemp calls POST /api/v1/databases/{name}/access/temp.

func (*Client) ListAIChatSessions added in v0.2.0

func (c *Client) ListAIChatSessions(ctx context.Context) ([]AIChatSessionSummaryResource, error)

ListAIChatSessions calls GET /api/v1/ai/sessions.

func (*Client) ListAdvisorFindings added in v0.2.0

func (c *Client) ListAdvisorFindings(ctx context.Context, q AdvisorFindingQuery) (AdvisorFindings, error)

ListAdvisorFindings calls GET /api/v1/resource-advisor/findings.

func (*Client) ListAlertHistory added in v0.2.0

func (c *Client) ListAlertHistory(ctx context.Context, q AlertHistoryQuery) ([]AlertHistoryEntry, error)

ListAlertHistory calls GET /api/v1/alert-history.

func (*Client) ListAlertRules

func (c *Client) ListAlertRules(ctx context.Context, name string) ([]AlertRuleResource, error)

ListAlertRules calls GET /api/v1/apps/{name}/alerts: every alert rule scoped to name, including disabled ones.

func (*Client) ListAlertSilences added in v0.2.0

func (c *Client) ListAlertSilences(ctx context.Context, includeExpired bool) ([]SilenceResource, error)

ListAlertSilences calls GET /api/v1/alert-silences.

func (*Client) ListAllBackups added in v0.2.0

func (c *Client) ListAllBackups(ctx context.Context, opts ListBackupsOptions) ([]BackupHistoryResource, error)

ListAllBackups calls GET /api/v1/backups: the instance-wide backup attempt history across every database and app volume, the aggregated counterpart of ListBackups/ListVolumeBackups.

func (*Client) ListAllEnvironments added in v0.2.0

func (c *Client) ListAllEnvironments(ctx context.Context) ([]GlobalEnvironmentResource, error)

ListAllEnvironments calls GET /api/v1/environments.

func (*Client) ListAllPipelineRuns added in v0.2.0

func (c *Client) ListAllPipelineRuns(ctx context.Context, q PipelineRunsQuery) (PipelineRunRowsPage, error)

ListAllPipelineRuns calls GET /api/v1/pipeline-runs.

func (*Client) ListAllPreviews added in v0.2.0

func (c *Client) ListAllPreviews(ctx context.Context) (PreviewsOverview, error)

ListAllPreviews calls GET /api/v1/previews: previews of every readable app plus platform-wide limit usage.

func (*Client) ListAppBranchEnv added in v0.2.0

func (c *Client) ListAppBranchEnv(ctx context.Context, name string) ([]AppBranchEnvOverride, error)

ListAppBranchEnv calls GET /api/v1/apps/{name}/branch-env: every branch-scoped env var override declared for name, across every branch pattern.

func (*Client) ListAppConnections added in v0.2.0

func (c *Client) ListAppConnections(ctx context.Context, name string) ([]AppConnectionResource, error)

ListAppConnections calls GET /api/v1/apps/{name}/connections: every DatabaseEnv entry, each resolved against its database's real placement so the response says whether it's cross-node-capable today.

func (*Client) ListAppEntries added in v0.2.0

func (c *Client) ListAppEntries(ctx context.Context) ([]AppListEntry, error)

ListAppEntries calls GET /api/v1/apps and keeps each row's status rollup.

func (*Client) ListAppImages added in v0.2.0

func (c *Client) ListAppImages(ctx context.Context, name string) ([]ImageResource, error)

ListAppImages calls GET /api/v1/apps/{name}/images: every locally-present tag under name's current image's repo, newest first.

func (*Client) ListAppIntegrations added in v0.2.0

func (c *Client) ListAppIntegrations(ctx context.Context, name string) ([]AppIntegrationResource, error)

ListAppIntegrations calls GET /api/v1/apps/{name}/integrations: every catalog integration attached to name.

func (*Client) ListAppMetricsSummary added in v0.2.0

func (c *Client) ListAppMetricsSummary(ctx context.Context, names []string) ([]AppMetricsSummary, error)

ListAppMetricsSummary calls GET /api/v1/apps-metrics, optionally limited to names.

func (*Client) ListAppResourceUsage added in v0.2.0

func (c *Client) ListAppResourceUsage(ctx context.Context) ([]AppResourceUsageResource, error)

ListAppResourceUsage calls GET /api/v1/apps/resource-usage (internal/api/app_resource_usage.go's handleAppResourceUsage): the latest CPU/memory/network reading for every app in one call, for a dashboard-wide ranking rather than one QueryAppMetrics call per app.

func (*Client) ListAppScheduleHistory added in v0.2.0

func (c *Client) ListAppScheduleHistory(ctx context.Context, name string, limit int) ([]AppScheduleHistoryEntry, error)

ListAppScheduleHistory calls GET /api/v1/apps/{name}/schedule/history. limit <= 0 uses the server default.

func (*Client) ListAppStatuses added in v0.2.0

func (c *Client) ListAppStatuses(ctx context.Context) ([]AppStatusEntry, error)

ListAppStatuses calls GET /api/v1/apps and keeps only each app's name and rolled-up status summary.

func (*Client) ListAppStreams added in v0.2.0

func (c *Client) ListAppStreams(ctx context.Context, name string) ([]AppStreamResource, error)

ListAppStreams calls GET /api/v1/apps/{name}/streams.

func (*Client) ListAppTags added in v0.2.0

func (c *Client) ListAppTags(ctx context.Context, name string) ([]TagResource, error)

ListAppTags calls GET /api/v1/apps/{name}/tags.

func (*Client) ListAppVolumeMoves added in v0.2.0

func (c *Client) ListAppVolumeMoves(ctx context.Context, name string) ([]AppVolumeMoveResource, error)

ListAppVolumeMoves calls GET /api/v1/apps/{name}/moves: every "move with volumes" attempt for name, newest first.

func (*Client) ListApps

func (c *Client) ListApps(ctx context.Context) ([]AppResource, error)

ListApps calls GET /api/v1/apps.

func (*Client) ListAppsByTag added in v0.2.0

func (c *Client) ListAppsByTag(ctx context.Context, id string) ([]TagAppResource, error)

ListAppsByTag calls GET /api/v1/tags/{id}/apps: every app tagged with id, the "list resources filtered by tag" primitive.

func (*Client) ListAppsFiltered added in v0.2.0

func (c *Client) ListAppsFiltered(ctx context.Context, q AppListQuery) ([]AppResource, error)

ListAppsFiltered calls GET /api/v1/apps with filters.

func (*Client) ListAppsInEnvironment added in v0.2.0

func (c *Client) ListAppsInEnvironment(ctx context.Context, environment string) ([]AppResource, error)

ListAppsInEnvironment calls GET /api/v1/apps?environment=<id or name>.

func (*Client) ListAppsPage added in v0.2.0

func (c *Client) ListAppsPage(ctx context.Context, opts ListAppsOptions) (AppsPage, error)

ListAppsPage calls GET /api/v1/apps with opts.Limit/opts.Offset as query params. Built as its own request rather than through do(): it needs the server's X-Total-Count response header to compute NextOffset, which do() discards once it decodes the JSON body.

func (*Client) ListAuditLog

func (c *Client) ListAuditLog(ctx context.Context, opts ListAuditLogOptions) ([]AuditLogEntryResource, error)

ListAuditLog calls GET /api/v1/audit-log: every recorded write/ deploy/root-tier request, newest first, cursor-paginated by opts.Before.

func (*Client) ListAuthGateEvents added in v0.2.0

func (c *Client) ListAuthGateEvents(ctx context.Context, name, domain, since string) (AuthGateEventsResponse, error)

ListAuthGateEvents calls GET .../auth-gate/events. since is a duration such as "24h" or "7d"; empty uses the server default.

func (*Client) ListAutomationRuns added in v0.2.0

func (c *Client) ListAutomationRuns(ctx context.Context, limit int) ([]AutomationRun, error)

ListAutomationRuns calls GET /api/v1/domains/automation/runs.

func (*Client) ListBackupDrills added in v0.2.0

func (c *Client) ListBackupDrills(ctx context.Context, service, volume, database string, limit int) ([]BackupDrillResource, error)

ListBackupDrills calls GET /api/v1/backups/drills.

func (*Client) ListBackupTargets

func (c *Client) ListBackupTargets(ctx context.Context) ([]BackupTargetResource, error)

ListBackupTargets calls GET /api/v1/backup-targets.

func (*Client) ListBackupVerifications

func (c *Client) ListBackupVerifications(ctx context.Context, name, historyID string) ([]BackupVerificationResource, error)

ListBackupVerifications calls GET /api/v1/databases/{name}/backups/{historyId}/verifications: every verification attempt made against one backup, newest first.

func (*Client) ListBackups

func (c *Client) ListBackups(ctx context.Context, name string, opts ListBackupsOptions) ([]BackupHistoryResource, error)

ListBackups calls GET /api/v1/databases/{name}/backups: the full backup attempt history for one database.

func (*Client) ListBaseBackups added in v0.2.0

func (c *Client) ListBaseBackups(ctx context.Context, name string) ([]BaseBackupHistoryResource, error)

ListBaseBackups calls GET /api/v1/databases/{name}/base-backups.

func (*Client) ListBetaFeatures added in v0.2.0

func (c *Client) ListBetaFeatures(ctx context.Context) ([]BetaFeature, error)

ListBetaFeatures calls GET /api/v1/settings/beta-features.

func (*Client) ListBitbucketAppBranches added in v0.2.0

func (c *Client) ListBitbucketAppBranches(ctx context.Context, workspace, repoSlug string) ([]GitAppBranchResource, error)

ListBitbucketAppBranches calls GET /api/v1/bitbucket-app/repos/{workspace}/{repoSlug}/branches.

func (*Client) ListBitbucketAppRepos added in v0.2.0

func (c *Client) ListBitbucketAppRepos(ctx context.Context) ([]BitbucketAppRepoResource, error)

ListBitbucketAppRepos calls GET /api/v1/bitbucket-app/repos: every repository the connected Bitbucket account can access.

func (*Client) ListBuildCache added in v0.2.0

func (c *Client) ListBuildCache(ctx context.Context) ([]BuildCacheSetting, error)

ListBuildCache calls GET /api/v1/build-cache.

func (*Client) ListCertificates added in v0.2.0

func (c *Client) ListCertificates(ctx context.Context) ([]CertificateResource, error)

ListCertificates calls GET /api/v1/certificates: every certificate currently in this control plane's certmagic storage, healthy or not. An empty slice means no certificate has ever been issued, not an error.

func (*Client) ListCloneRestores added in v0.2.0

func (c *Client) ListCloneRestores(ctx context.Context, name string) ([]CloneRestoreResource, error)

ListCloneRestores calls GET /api/v1/databases/{name}/clone-restores.

func (*Client) ListComposeRevisions added in v0.2.0

func (c *Client) ListComposeRevisions(ctx context.Context, name string) ([]ComposeRevision, error)

ListComposeRevisions calls GET /api/v1/apps/{name}/compose/revisions.

func (*Client) ListConnectableDatabases added in v0.2.0

func (c *Client) ListConnectableDatabases(ctx context.Context, name string) ([]ConnectableDatabaseResource, error)

ListConnectableDatabases calls GET /api/v1/apps/{name}/connectable-databases: every managed database name could connect to, marked with whether it's already connected and whether it's on a different node.

func (*Client) ListContainers

func (c *Client) ListContainers(ctx context.Context) ([]ContainerResource, error)

ListContainers calls GET /api/v1/system/containers: every container on this node, whether or not Levelrail manages it.

func (*Client) ListControlPlaneBackups added in v0.2.0

func (c *Client) ListControlPlaneBackups(ctx context.Context) ([]ControlPlaneBackup, error)

ListControlPlaneBackups calls GET /api/v1/system/backups, newest first.

func (*Client) ListControlPlaneOffboxBackups added in v0.2.0

func (c *Client) ListControlPlaneOffboxBackups(ctx context.Context) ([]ControlPlaneOffboxBackup, error)

ListControlPlaneOffboxBackups calls GET /api/v1/system/control-plane-dr/backups.

func (*Client) ListCustomTemplates added in v0.2.0

func (c *Client) ListCustomTemplates(ctx context.Context) ([]CustomTemplateListItem, error)

ListCustomTemplates calls GET /api/v1/templates/custom: every operator-defined template, without each one's compose body (see GetServiceTemplate for the full body).

func (*Client) ListDNSHealthChecks added in v0.2.0

func (c *Client) ListDNSHealthChecks(ctx context.Context) ([]DNSHealthCheck, error)

ListDNSHealthChecks calls GET /api/v1/dns/health-checks.

func (*Client) ListDNSRecords added in v0.2.0

func (c *Client) ListDNSRecords(ctx context.Context, name, domain string) (DNSRecordsResponse, error)

ListDNSRecords calls GET /api/v1/apps/{name}/domains/{domain}/dns-records: every record in domain's best-effort zone, from whichever ACME DNS-01 provider is configured, each with a live resolution status.

func (*Client) ListDNSZoneRecords added in v0.2.0

func (c *Client) ListDNSZoneRecords(ctx context.Context, provider, zone, typ, query string) (DNSRecordsList, error)

ListDNSZoneRecords calls GET /api/v1/dns/zones/{zone}/records.

func (*Client) ListDNSZones added in v0.2.0

func (c *Client) ListDNSZones(ctx context.Context, provider string) (DNSZonesList, error)

ListDNSZones calls GET /api/v1/dns/zones.

func (*Client) ListDatabaseDataCopies added in v0.2.0

func (c *Client) ListDatabaseDataCopies(ctx context.Context) ([]DataCopyStatus, error)

ListDatabaseDataCopies calls GET /api/v1/imports/platform/databases.

func (*Client) ListDatabaseEngines

func (c *Client) ListDatabaseEngines(ctx context.Context) ([]DatabaseEngineResource, error)

ListDatabaseEngines calls GET /api/v1/database-engines: every engine this control plane can actually create, backing the creation wizard's engine picker instead of a hardcoded list.

func (*Client) ListDatabaseTemp added in v0.2.0

func (c *Client) ListDatabaseTemp(ctx context.Context, name string) (DatabaseTempList, error)

ListDatabaseTemp calls GET /api/v1/databases/{name}/access/temp.

func (*Client) ListDatabaseUsers added in v0.2.0

func (c *Client) ListDatabaseUsers(ctx context.Context, name string) ([]DatabaseUser, error)

ListDatabaseUsers calls GET /api/v1/databases/{name}/users.

func (*Client) ListDatabases

func (c *Client) ListDatabases(ctx context.Context) ([]DatabaseResource, error)

ListDatabases calls GET /api/v1/databases.

func (*Client) ListDatabasesInEnvironment added in v0.2.0

func (c *Client) ListDatabasesInEnvironment(ctx context.Context, environment string) ([]DatabaseResource, error)

ListDatabasesInEnvironment calls GET /api/v1/databases?environment=<id or name>.

func (*Client) ListDeployApprovals added in v0.2.0

func (c *Client) ListDeployApprovals(ctx context.Context, status, service string) ([]DeployApprovalResource, error)

ListDeployApprovals calls GET /api/v1/deploy-approvals: status defaults server-side to "pending" when empty; pass "all" to include decided requests too. service filters to one app, empty means every app.

func (*Client) ListDeployAttempts added in v0.2.0

func (c *Client) ListDeployAttempts(ctx context.Context, name string) ([]DeployAttemptResource, error)

ListDeployAttempts calls GET /api/v1/apps/{name}/deploy-attempts: the real, row-per-trigger-call deploy history for name, newest first. Additive to GetDeployStatus's reconcile conditions, not a replacement.

func (*Client) ListDeployNotifyTargets added in v0.2.0

func (c *Client) ListDeployNotifyTargets(ctx context.Context, name string) ([]DeployNotifyTargetResource, error)

ListDeployNotifyTargets calls GET /api/v1/apps/{name}/deploy-notify-targets: every deploy-outcome notification target scoped to name, including disabled ones.

func (*Client) ListDeployments added in v0.2.0

func (c *Client) ListDeployments(ctx context.Context, opts DeploymentListOptions) (DeploymentList, error)

ListDeployments calls GET /api/v1/deployments.

func (*Client) ListDeviceActivity added in v0.2.0

func (c *Client) ListDeviceActivity(ctx context.Context) ([]DeviceActivity, error)

ListDeviceActivity calls GET /api/v1/auth/device/activity.

func (*Client) ListDomains

func (c *Client) ListDomains(ctx context.Context) ([]DomainResource, error)

ListDomains calls GET /api/v1/domains: every service_domains row across every app, aggregated in one call.

func (*Client) ListEnvironments

func (c *Client) ListEnvironments(ctx context.Context, projectID string) ([]EnvironmentResource, error)

ListEnvironments calls GET /api/v1/projects/{id}/environments.

func (*Client) ListExportDestinations added in v0.2.0

func (c *Client) ListExportDestinations(ctx context.Context) ([]ExportDestinationResource, error)

ListExportDestinations calls GET /api/v1/export/destinations.

func (*Client) ListExternalDatabaseCandidates added in v0.2.0

func (c *Client) ListExternalDatabaseCandidates(ctx context.Context, nodeID string) ([]ExternalDatabaseCandidate, error)

ListExternalDatabaseCandidates calls GET /api/v1/external-databases/candidates.

func (*Client) ListExternalDatabases added in v0.2.0

func (c *Client) ListExternalDatabases(ctx context.Context) ([]ExternalDatabase, error)

ListExternalDatabases calls GET /api/v1/external-databases.

func (*Client) ListFailedDeploys added in v0.2.0

func (c *Client) ListFailedDeploys(ctx context.Context, since string) ([]FailedDeployResource, error)

ListFailedDeploys calls GET /api/v1/deploys/failed. since is a Go duration such as "24h"; empty uses the server default.

func (*Client) ListFeatureFlags

func (c *Client) ListFeatureFlags(ctx context.Context, name string) ([]FeatureFlagResource, error)

ListFeatureFlags calls GET /api/v1/apps/{name}/flags.

func (*Client) ListFirewallRules added in v0.2.0

func (c *Client) ListFirewallRules(ctx context.Context) ([]FirewallRuleResource, error)

ListFirewallRules calls GET /api/v1/firewall-rules.

func (*Client) ListGPUNodes added in v0.2.0

func (c *Client) ListGPUNodes(ctx context.Context) ([]GPUNodeResource, error)

ListGPUNodes calls GET /api/v1/gpus.

func (*Client) ListGitHubAppBranches added in v0.2.0

func (c *Client) ListGitHubAppBranches(ctx context.Context, owner, repo string) ([]GitAppBranchResource, error)

ListGitHubAppBranches calls GET /api/v1/github-app/repos/{owner}/{repo}/branches.

func (*Client) ListGitHubAppInstallations added in v0.2.0

func (c *Client) ListGitHubAppInstallations(ctx context.Context) (GitHubAppInstallationListResource, error)

ListGitHubAppInstallations calls GET /api/v1/github-app/installations: every connected GitHub account/org, plus the URL to connect another one.

func (*Client) ListGitHubAppRepos added in v0.2.0

func (c *Client) ListGitHubAppRepos(ctx context.Context) (GitHubAppRepoListResource, error)

ListGitHubAppRepos calls GET /api/v1/github-app/repos: every repository every connected installation can access, plus one error per installation that failed to list (migrations/0282 made installations one-to-many).

func (*Client) ListGitLabAppBranches added in v0.2.0

func (c *Client) ListGitLabAppBranches(ctx context.Context, projectID int64) ([]GitAppBranchResource, error)

ListGitLabAppBranches calls GET /api/v1/gitlab-app/projects/{id}/branches.

func (*Client) ListGitLabAppProjects added in v0.2.0

func (c *Client) ListGitLabAppProjects(ctx context.Context) ([]GitLabAppProjectResource, error)

ListGitLabAppProjects calls GET /api/v1/gitlab-app/projects: every project the connected GitLab account can access.

func (*Client) ListGitProviders added in v0.2.0

func (c *Client) ListGitProviders(ctx context.Context) ([]GitProviderResource, error)

ListGitProviders calls GET /api/v1/git-providers: a capability summary (connected, can list branches, can register a webhook, can auth-clone) for every git provider this control plane knows about, in one call rather than three separate per-provider status checks.

func (*Client) ListGiteaAppBranches added in v0.2.0

func (c *Client) ListGiteaAppBranches(ctx context.Context, owner, repo string) ([]GitAppBranchResource, error)

ListGiteaAppBranches calls GET /api/v1/gitea-app/repos/{owner}/{repo}/branches.

func (*Client) ListGiteaAppRepos added in v0.2.0

func (c *Client) ListGiteaAppRepos(ctx context.Context) ([]GiteaAppRepoResource, error)

ListGiteaAppRepos calls GET /api/v1/gitea-app/repos: every repository the connected Gitea account can access.

func (*Client) ListIntegrationCatalog added in v0.2.0

func (c *Client) ListIntegrationCatalog(ctx context.Context) ([]IntegrationCatalogEntryResource, error)

ListIntegrationCatalog calls GET /api/v1/integrations: the full internal/integrations.Catalog, global and read-only.

func (*Client) ListInvites

func (c *Client) ListInvites(ctx context.Context) ([]InviteResource, error)

ListInvites calls GET /api/v1/invites.

func (*Client) ListJobRuns added in v0.2.0

func (c *Client) ListJobRuns(ctx context.Context, app, id, status string, limit int) ([]JobRunResource, error)

ListJobRuns calls GET .../jobs/{id}/runs, or the app-wide GET .../job-runs when id is empty. status and limit are optional filters.

func (*Client) ListJobs added in v0.2.0

func (c *Client) ListJobs(ctx context.Context, app string) ([]ScheduledTaskResource, error)

ListJobs calls GET /api/v1/apps/{name}/jobs.

func (*Client) ListLoadBalancers added in v0.2.0

func (c *Client) ListLoadBalancers(ctx context.Context, p LoadBalancerListParams) (LoadBalancerList, error)

ListLoadBalancers calls GET /api/v1/loadbalancers.

func (*Client) ListLogArchiveObjects added in v0.2.0

func (c *Client) ListLogArchiveObjects(ctx context.Context, targetID, app, cursor string) (LogArchiveObjects, error)

ListLogArchiveObjects calls GET /api/v1/log-archive/objects.

func (*Client) ListLogArchivePolicies added in v0.2.0

func (c *Client) ListLogArchivePolicies(ctx context.Context) ([]LogArchivePolicy, error)

ListLogArchivePolicies calls GET /api/v1/log-archive/policies.

func (*Client) ListLogArchiveRuns added in v0.2.0

func (c *Client) ListLogArchiveRuns(ctx context.Context, app string, all bool) ([]LogArchiveRun, error)

ListLogArchiveRuns calls GET /api/v1/log-archive/runs. all ignores app.

func (*Client) ListMaintenanceWindows added in v0.2.0

func (c *Client) ListMaintenanceWindows(ctx context.Context) ([]MaintenanceWindowResource, error)

ListMaintenanceWindows calls GET /api/v1/alert-maintenance-windows.

func (*Client) ListMajorUpgrades added in v0.2.0

func (c *Client) ListMajorUpgrades(ctx context.Context, name string) ([]MajorUpgradeResource, error)

ListMajorUpgrades calls GET /api/v1/databases/{name}/major-upgrades.

func (*Client) ListMigrationLocalSources added in v0.2.0

func (c *Client) ListMigrationLocalSources(ctx context.Context, nodeID string) ([]HubLocalSource, error)

ListMigrationLocalSources lists database containers on a node.

func (*Client) ListMigrationSessions added in v0.2.0

func (c *Client) ListMigrationSessions(ctx context.Context) ([]HubSession, error)

ListMigrationSessions lists sessions without their items.

func (*Client) ListMobileDevices added in v0.2.0

func (c *Client) ListMobileDevices(ctx context.Context) ([]MobileDevice, error)

ListMobileDevices calls GET /api/v1/mobile/devices.

func (*Client) ListModelCache added in v0.2.0

func (c *Client) ListModelCache(ctx context.Context) (ModelCacheReport, error)

ListModelCache calls GET /api/v1/model-cache.

func (*Client) ListModelKeys added in v0.2.0

func (c *Client) ListModelKeys(ctx context.Context, name string) ([]ModelKeyResource, error)

ListModelKeys calls GET /api/v1/models/{name}/keys.

func (*Client) ListModels added in v0.2.0

func (c *Client) ListModels(ctx context.Context) ([]ModelResource, error)

ListModels calls GET /api/v1/models.

func (*Client) ListNetworkShares added in v0.2.0

func (c *Client) ListNetworkShares(ctx context.Context) ([]NetworkShareResource, error)

ListNetworkShares calls GET /api/v1/network-shares.

func (*Client) ListNodeDrains added in v0.2.0

func (c *Client) ListNodeDrains(ctx context.Context, nodeID string) ([]NodeDrainResource, error)

ListNodeDrains calls GET /api/v1/nodes/{id}/drains.

func (*Client) ListNodeEvents added in v0.2.0

func (c *Client) ListNodeEvents(ctx context.Context, id string, limit int) ([]NodeStatusEventResource, error)

ListNodeEvents calls GET /api/v1/nodes/{id}/events: the node's recent status transitions, newest first. limit <= 0 uses the server default.

func (*Client) ListNodeMoves added in v0.2.0

func (c *Client) ListNodeMoves(ctx context.Context, kind, resource, status string) ([]NodeMoveResource, error)

ListNodeMoves calls GET /api/v1/node-moves with optional filters.

func (*Client) ListNodeProviderRegions added in v0.2.0

func (c *Client) ListNodeProviderRegions(ctx context.Context, provider string) ([]NodeProviderRegionResource, error)

ListNodeProviderRegions calls GET /api/v1/node-providers/{provider}/regions.

func (*Client) ListNodeProviderSizes added in v0.2.0

func (c *Client) ListNodeProviderSizes(ctx context.Context, provider, region string) ([]NodeProviderSizeResource, error)

ListNodeProviderSizes calls GET /api/v1/node-providers/{provider}/sizes?region=X. region may be empty to list every size regardless of region.

func (*Client) ListNodeProviders added in v0.2.0

func (c *Client) ListNodeProviders(ctx context.Context) ([]NodeProviderResource, error)

ListNodeProviders calls GET /api/v1/node-providers.

func (*Client) ListNodeProvisions added in v0.2.0

func (c *Client) ListNodeProvisions(ctx context.Context) ([]NodeProvisionResource, error)

ListNodeProvisions calls GET /api/v1/node-provisions.

func (*Client) ListNodes

func (c *Client) ListNodes(ctx context.Context) ([]NodeResource, error)

ListNodes calls GET /api/v1/nodes.

func (*Client) ListNodesFiltered added in v0.2.0

func (c *Client) ListNodesFiltered(ctx context.Context, opts ListNodesOptions) ([]NodeResource, int, error)

ListNodesFiltered calls GET /api/v1/nodes with optional query, limit and offset, returning nodes plus the total match count before paging (the X-Total-Count header handleListNodes always sets). ListNodes stays the plain unfiltered call every existing caller already uses.

func (*Client) ListNotificationChannels

func (c *Client) ListNotificationChannels(ctx context.Context) ([]NotificationChannelResource, error)

ListNotificationChannels calls GET /api/v1/notification-channels.

func (*Client) ListNotificationDeliveries

func (c *Client) ListNotificationDeliveries(ctx context.Context, id string, limit int) ([]NotificationDeliveryResource, error)

ListNotificationDeliveries calls GET /api/v1/notification-channels/{id}/deliveries: this channel's send history, newest first, up to limit rows (0 leaves the server's own default in place).

func (*Client) ListOAuthProviderSettings added in v0.2.0

func (c *Client) ListOAuthProviderSettings(ctx context.Context) ([]OAuthProviderSettingsResource, error)

ListOAuthProviderSettings calls GET /api/v1/settings/oauth: every provider's full sign-in configuration.

func (*Client) ListOrganizations

func (c *Client) ListOrganizations(ctx context.Context) ([]OrganizationResource, error)

ListOrganizations calls GET /api/v1/organizations.

func (*Client) ListOrphanedVolumes added in v0.2.0

func (c *Client) ListOrphanedVolumes(ctx context.Context) ([]OrphanedVolumeResource, error)

ListOrphanedVolumes calls GET /api/v1/system/volumes/orphaned: every named Docker volume this instance created that current desired state no longer references.

func (*Client) ListOrphans added in v0.2.0

func (c *Client) ListOrphans(ctx context.Context) (OrphanReport, error)

ListOrphans calls GET /api/v1/system/orphans: every leftover container and volume across nodes with its grace period status. Removes nothing.

func (*Client) ListPITRRestores added in v0.2.0

func (c *Client) ListPITRRestores(ctx context.Context, name string) ([]PITRRestoreHistoryResource, error)

ListPITRRestores calls GET /api/v1/databases/{name}/pitr-restores.

func (*Client) ListPendingDeviceLogins added in v0.2.0

func (c *Client) ListPendingDeviceLogins(ctx context.Context) ([]DevicePendingLogin, error)

ListPendingDeviceLogins calls GET /api/v1/auth/device/pending-summary.

func (*Client) ListPipelineRunLogs added in v0.2.0

func (c *Client) ListPipelineRunLogs(ctx context.Context, app, id, job string, after int64, limit int) ([]PipelineLogLine, error)

ListPipelineRunLogs calls GET .../pipeline-runs/{id}/logs. job filters to one job key and after resumes past a line ID.

func (*Client) ListPipelineRuns added in v0.2.0

func (c *Client) ListPipelineRuns(ctx context.Context, app, pipeline string, limit int) ([]PipelineRunResource, error)

ListPipelineRuns calls GET /api/v1/apps/{app}/pipeline-runs.

func (*Client) ListPipelineTriggers added in v0.2.0

func (c *Client) ListPipelineTriggers(ctx context.Context, app string) ([]PipelineTrigger, error)

ListPipelineTriggers calls GET /api/v1/apps/{app}/pipeline-triggers.

func (*Client) ListPipelines added in v0.2.0

func (c *Client) ListPipelines(ctx context.Context, app string) ([]PipelineResource, error)

ListPipelines calls GET /api/v1/apps/{app}/pipelines.

func (*Client) ListPolicies

func (c *Client) ListPolicies(ctx context.Context) ([]PolicyResource, error)

ListPolicies calls GET /api/v1/iam/policies.

func (*Client) ListPolicyAttachments

func (c *Client) ListPolicyAttachments(ctx context.Context, id string) ([]PolicyAttachmentResource, error)

ListPolicyAttachments calls GET /api/v1/iam/policies/{id}/attachments.

func (*Client) ListPolicyTemplates added in v0.2.0

func (c *Client) ListPolicyTemplates(ctx context.Context) (PolicyTemplateList, error)

ListPolicyTemplates calls GET /api/v1/iam/policy-templates.

func (*Client) ListPreviewEnvironments

func (c *Client) ListPreviewEnvironments(ctx context.Context, appName string) ([]PreviewEnvironmentResource, error)

ListPreviewEnvironments calls GET /api/v1/apps/{name}/previews: every active pull-request preview for an app.

func (*Client) ListProbeAttempts added in v0.2.0

func (c *Client) ListProbeAttempts(ctx context.Context, name, deployID string) ([]ProbeAttempt, error)

ListProbeAttempts calls GET /api/v1/apps/{name}/deploys/{deployID}/probes.

func (*Client) ListProjects

func (c *Client) ListProjects(ctx context.Context) ([]ProjectResource, error)

ListProjects calls GET /api/v1/projects.

func (*Client) ListPushSubscriptions added in v0.2.0

func (c *Client) ListPushSubscriptions(ctx context.Context) ([]PushSubscriptionResource, error)

ListPushSubscriptions calls GET /api/v1/settings/push-subscriptions: every browser the caller's own account has registered for the "webpush" notification-channel kind.

func (*Client) ListRegistryCredentialRepositories added in v0.2.0

func (c *Client) ListRegistryCredentialRepositories(ctx context.Context, id string) (RegistryRepositoriesResource, error)

ListRegistryCredentialRepositories calls GET /api/v1/registry-credentials/{id}/repositories: every repository in the external registry this credential authenticates against, the same wire shape ListRegistryRepositories uses for the built-in registry.

func (*Client) ListRegistryCredentialTags added in v0.2.0

func (c *Client) ListRegistryCredentialTags(ctx context.Context, id, repository string) (RegistryTagsResource, error)

ListRegistryCredentialTags calls GET /api/v1/registry-credentials/{id}/tags?repository=<name>: every tag pushed for one repository in the external registry this credential authenticates against.

func (*Client) ListRegistryCredentials

func (c *Client) ListRegistryCredentials(ctx context.Context) ([]RegistryCredentialResource, error)

ListRegistryCredentials calls GET /api/v1/registry-credentials.

func (*Client) ListRegistryRepositories added in v0.2.0

func (c *Client) ListRegistryRepositories(ctx context.Context) (RegistryRepositoriesResource, error)

ListRegistryRepositories calls GET /api/v1/registry/repositories: every repository name pushed to the built-in registry.

func (*Client) ListRegistryTags added in v0.2.0

func (c *Client) ListRegistryTags(ctx context.Context, repository string) (RegistryTagsResource, error)

ListRegistryTags calls GET /api/v1/registry/tags?repository=<name>: every tag pushed for one repository in the built-in registry.

func (*Client) ListRepoBranches added in v0.2.0

func (c *Client) ListRepoBranches(ctx context.Context, repoURL string) (RepoBranchesResource, error)

ListRepoBranches calls the repo branch listing route (POST under /api/v1/git).

func (*Client) ListRestores added in v0.2.0

func (c *Client) ListRestores(ctx context.Context, name string) ([]RestoreHistoryResource, error)

ListRestores calls GET /api/v1/databases/{name}/restores.

func (*Client) ListRoles

func (c *Client) ListRoles(ctx context.Context) ([]RoleResource, error)

ListRoles calls GET /api/v1/roles.

func (*Client) ListRollbackTargets added in v0.2.0

func (c *Client) ListRollbackTargets(ctx context.Context, appName string) ([]RollbackTargetResource, error)

ListRollbackTargets calls GET /api/v1/apps/{name}/rollback-targets.

func (*Client) ListSSHNodeProvisions added in v0.2.0

func (c *Client) ListSSHNodeProvisions(ctx context.Context) ([]SSHNodeProvisionResource, error)

ListSSHNodeProvisions calls GET /api/v1/ssh-node-provisions.

func (*Client) ListSavedLogQueries added in v0.2.0

func (c *Client) ListSavedLogQueries(ctx context.Context, app string) ([]SavedLogQuery, error)

ListSavedLogQueries calls GET /api/v1/logs/queries.

func (*Client) ListScheduledTasks

func (c *Client) ListScheduledTasks(ctx context.Context, name string) ([]ScheduledTaskResource, error)

ListScheduledTasks calls GET /api/v1/apps/{name}/scheduled-tasks.

func (*Client) ListSecrets

func (c *Client) ListSecrets(ctx context.Context, name string) ([]SecretKeyResource, error)

ListSecrets calls GET /api/v1/apps/{name}/secrets: every known secret key for the app with its locked state, never a value.

func (*Client) ListSecuritySessions added in v0.2.0

func (c *Client) ListSecuritySessions(ctx context.Context, userID string) (SecuritySessions, error)

ListSecuritySessions calls GET /api/v1/security/sessions; userID is empty for the caller's own account, another account needs root.

func (*Client) ListSelfUpgradeAttempts added in v0.2.0

func (c *Client) ListSelfUpgradeAttempts(ctx context.Context) (SelfUpgradeAttempts, error)

ListSelfUpgradeAttempts calls GET /api/v1/updates/self-upgrade/attempts.

func (*Client) ListServiceTemplates

func (c *Client) ListServiceTemplates(ctx context.Context) ([]ServiceTemplateListItem, error)

ListServiceTemplates calls GET /api/v1/service-templates: the full catalog, without each entry's Compose body (see ServiceTemplateListItem).

func (*Client) ListSharedEnvAll added in v0.2.0

func (c *Client) ListSharedEnvAll(ctx context.Context, scope, id string) ([]SharedEnvVarResource, error)

ListSharedEnvAll calls GET /api/v1/{scope}s/{id}/env/all: every shared env var at that tier, plain and secret-marked alike.

func (*Client) ListSharedEnvSecretKeys added in v0.2.0

func (c *Client) ListSharedEnvSecretKeys(ctx context.Context, scope, id string) ([]string, error)

ListSharedEnvSecretKeys calls GET /api/v1/{scope}s/{id}/env/secrets: every secret-marked shared env var key at that tier, never a value.

func (*Client) ListSignInRequests added in v0.2.0

func (c *Client) ListSignInRequests(ctx context.Context) (SignInRequests, error)

ListSignInRequests calls GET /api/v1/auth/sign-in-requests. A token must belong to a user and hold write:sensitive or signin:approve.

func (*Client) ListStandaloneDomains added in v0.2.0

func (c *Client) ListStandaloneDomains(ctx context.Context) ([]StandaloneDomain, error)

ListStandaloneDomains calls GET /api/v1/domains/standalone.

func (*Client) ListStaticSites added in v0.2.0

func (c *Client) ListStaticSites(ctx context.Context) ([]StaticSiteResource, error)

ListStaticSites calls GET /api/v1/static-sites: every build.type: static site currently served directly through embedded Caddy.

func (*Client) ListStatusComponents added in v0.2.0

func (c *Client) ListStatusComponents(ctx context.Context) ([]StatusComponent, error)

ListStatusComponents calls GET /api/v1/status-page/components.

func (*Client) ListStatusIncidents added in v0.2.0

func (c *Client) ListStatusIncidents(ctx context.Context) ([]StatusIncident, error)

ListStatusIncidents calls GET /api/v1/status-page/incidents.

func (*Client) ListStorageDestinations added in v0.2.0

func (c *Client) ListStorageDestinations(ctx context.Context) ([]StorageDestination, error)

ListStorageDestinations calls GET /api/v1/storage/destinations.

func (*Client) ListStorageOrphans added in v0.2.0

func (c *Client) ListStorageOrphans(ctx context.Context) (StorageOrphansResponse, error)

ListStorageOrphans calls GET /api/v1/storage/orphans.

func (*Client) ListStorageProviders added in v0.2.0

func (c *Client) ListStorageProviders(ctx context.Context) ([]StorageProvider, error)

ListStorageProviders calls GET /api/v1/storage/providers.

func (*Client) ListTags added in v0.2.0

func (c *Client) ListTags(ctx context.Context) ([]TagResource, error)

ListTags calls GET /api/v1/tags.

func (*Client) ListTeamEvents added in v0.2.0

func (c *Client) ListTeamEvents(ctx context.Context, id string, limit int) ([]TeamEventResource, error)

ListTeamEvents calls GET /api/v1/teams/{id}/events.

func (*Client) ListTeamInvites added in v0.2.0

func (c *Client) ListTeamInvites(ctx context.Context, id string) ([]TeamInviteResource, error)

ListTeamInvites calls GET /api/v1/teams/{id}/invites.

func (*Client) ListTeamMembers added in v0.2.0

func (c *Client) ListTeamMembers(ctx context.Context, id string) ([]TeamMemberResource, error)

ListTeamMembers calls GET /api/v1/teams/{id}/members.

func (*Client) ListTeamRoles added in v0.2.0

func (c *Client) ListTeamRoles(ctx context.Context) ([]TeamRoleResource, error)

ListTeamRoles calls GET /api/v1/teams/roles.

func (*Client) ListTeams added in v0.2.0

func (c *Client) ListTeams(ctx context.Context) ([]TeamResource, error)

ListTeams calls GET /api/v1/teams.

func (*Client) ListTokensRaw added in v0.2.0

func (c *Client) ListTokensRaw(ctx context.Context) (json.RawMessage, error)

ListTokensRaw calls GET /api/v1/auth/tokens with the client's bearer token (root ability), returning the JSON array undecoded.

func (*Client) ListTrustedDevices added in v0.2.0

func (c *Client) ListTrustedDevices(ctx context.Context) ([]TrustedDevice, error)

ListTrustedDevices calls GET /api/v1/auth/trusted-devices.

func (*Client) ListUsageBudgets added in v0.2.0

func (c *Client) ListUsageBudgets(ctx context.Context) (UsageBudgets, error)

ListUsageBudgets calls GET /api/v1/usage/budgets.

func (*Client) ListUsers

func (c *Client) ListUsers(ctx context.Context) ([]UserResource, error)

ListUsers calls GET /api/v1/users.

func (*Client) ListVolumeBackupVerifications

func (c *Client) ListVolumeBackupVerifications(ctx context.Context, name, volume, historyID string) ([]BackupVerificationResource, error)

ListVolumeBackupVerifications calls GET /api/v1/apps/{name}/volumes/{volume}/backups/{historyId}/verifications: the app service volume counterpart of ListBackupVerifications.

func (*Client) ListVolumeBackups

func (c *Client) ListVolumeBackups(ctx context.Context, name, volume string, opts ListBackupsOptions) ([]BackupHistoryResource, error)

ListVolumeBackups calls GET /api/v1/apps/{name}/volumes/{volume}/backups: the app service volume counterpart of ListBackups.

func (*Client) ListVolumeCloneRestores added in v0.2.0

func (c *Client) ListVolumeCloneRestores(ctx context.Context, name, volume string) ([]VolumeCloneRestoreResource, error)

ListVolumeCloneRestores calls GET /api/v1/apps/{name}/volumes/{volume}/clone-restores.

func (*Client) ListVolumeRestores added in v0.2.0

func (c *Client) ListVolumeRestores(ctx context.Context, name, volume string) ([]RestoreHistoryResource, error)

ListVolumeRestores calls GET /api/v1/apps/{name}/volumes/{volume}/restores.

func (*Client) ListWebhookDeliveries

func (c *Client) ListWebhookDeliveries(ctx context.Context, name string, opts ListWebhookDeliveriesOptions) ([]WebhookDeliveryResource, error)

ListWebhookDeliveries calls GET /api/v1/apps/{name}/webhook-deliveries: recent inbound git-provider webhook requests for name, newest first.

func (*Client) MakeDatabasePrivate added in v0.2.0

func (c *Client) MakeDatabasePrivate(ctx context.Context, name string) error

MakeDatabasePrivate calls POST /api/v1/databases/{name}/network/make-private.

func (*Client) MigrationVolumeGuide added in v0.2.0

func (c *Client) MigrationVolumeGuide(ctx context.Context, source, app string) (VolumeGuideResponse, error)

MigrationVolumeGuide calls GET /api/v1/migration/volumes.

func (c *Client) MintSessionLink(ctx context.Context) (SessionLinkResource, error)

MintSessionLink calls POST /api/v1/auth/session-links using this Client's bearer token, which must hold AbilityRoot: minting a session link is root-equivalent since redeeming it establishes a session with the minting caller's own abilities. The returned token is a one-time secret, the same contract CreateNodeJoinToken's own doc comment describes.

func (*Client) MoveAppEnvironment added in v0.2.0

func (c *Client) MoveAppEnvironment(ctx context.Context, name string, req MoveEnvironmentRequest) (MoveEnvironmentResult, error)

MoveAppEnvironment calls PUT /api/v1/apps/{name}/environment.

func (*Client) MoveAppWithVolumes added in v0.2.0

func (c *Client) MoveAppWithVolumes(ctx context.Context, name, nodeID string) (AppVolumeMoveResource, error)

MoveAppWithVolumes calls POST /api/v1/apps/{name}/move-with-volumes: the same placement change SetAppNode makes, plus archiving and restoring every one of the app's named Docker volumes onto the destination node (internal/api's handleMoveAppWithVolumes). Always returns an AppVolumeMoveResource: check its Status field, not the status code alone, to tell "already done" (an app with no volumes, or already on nodeID) from "still running" (real volumes to copy: poll GetAppVolumeMove with the returned ID until Status is no longer "running"). An empty nodeID moves the app back to the control plane's own local node.

func (*Client) MoveDatabaseEnvironment added in v0.2.0

func (c *Client) MoveDatabaseEnvironment(ctx context.Context, name string, req MoveEnvironmentRequest) (MoveEnvironmentResult, error)

MoveDatabaseEnvironment calls PUT /api/v1/databases/{name}/environment.

func (*Client) OverrideSupplyChainGate added in v0.2.0

func (c *Client) OverrideSupplyChainGate(ctx context.Context, name, reason string) (SupplyChainSettings, error)

OverrideSupplyChainGate calls POST /api/v1/apps/{name}/supply-chain/override.

func (*Client) PatchEnvironment added in v0.2.0

func (c *Client) PatchEnvironment(ctx context.Context, id string, req PatchEnvironmentRequest) (EnvironmentResource, error)

PatchEnvironment calls PATCH /api/v1/environments/{id}.

func (*Client) PlanAppImport added in v0.2.0

func (c *Client) PlanAppImport(ctx context.Context, req AppImportRequest) (AppImportView, error)

PlanAppImport calls POST /api/v1/migration/apps/plan. It stores nothing.

func (*Client) PlanGoLive added in v0.2.0

func (c *Client) PlanGoLive(ctx context.Context, app string, req GoLivePlanRequest) (GoLivePlanResponse, error)

PlanGoLive calls POST .../domains/go-live/plan.

func (*Client) PlanIaC added in v0.2.0

func (c *Client) PlanIaC(ctx context.Context, req IaCRequest) (iac.Plan, error)

PlanIaC calls POST /api/v1/apply/plan.

func (*Client) PlanImport added in v0.2.0

func (c *Client) PlanImport(ctx context.Context, req ImportPlanRequest) (ImportPlan, error)

PlanImport calls POST /api/v1/imports/plan. It creates nothing.

func (*Client) PollDeviceAuthToken

func (c *Client) PollDeviceAuthToken(ctx context.Context, deviceCode string) (DeviceTokenResponse, error)

PollDeviceAuthToken calls POST /api/v1/auth/device/token once. Unauthenticated, same as StartDeviceAuth. Returns *APIError with Message one of "authorization_pending"/"access_denied"/ "expired_token" until the request has been approved; the caller is expected to poll this on an interval (DeviceStartResponse.Interval) until it either returns a token or a terminal error.

func (*Client) PostStatusIncidentUpdate added in v0.2.0

func (c *Client) PostStatusIncidentUpdate(ctx context.Context, id string, u StatusUpdate) (StatusIncident, error)

PostStatusIncidentUpdate calls POST /api/v1/status-page/incidents/{id}/updates.

func (*Client) PreflightApp added in v0.2.0

func (c *Client) PreflightApp(ctx context.Context, name string, requiredEnv []string) (PreflightReport, error)

PreflightApp calls POST /api/v1/apps/{name}/preflight. requiredEnv names variables the app must have set, since that set is not stored.

func (*Client) PreflightModel added in v0.2.0

func (c *Client) PreflightModel(ctx context.Context, req ModelPreflightRequest) (ModelPreflightResult, error)

PreflightModel calls POST /api/v1/models/preflight.

func (*Client) PreviewClone added in v0.2.0

func (c *Client) PreviewClone(ctx context.Context, name string) (ClonePreview, error)

PreviewClone calls GET /api/v1/apps/{name}/clone/preview.

func (*Client) PreviewCompose added in v0.2.0

func (c *Client) PreviewCompose(ctx context.Context, composeYAML []byte, profiles []string) (ComposePreview, error)

PreviewCompose calls POST /api/v1/compose/preview.

func (*Client) PreviewDatabaseRules added in v0.2.0

func (c *Client) PreviewDatabaseRules(ctx context.Context, name string, req DatabaseRulesRequest) (DatabaseRulesPlan, error)

PreviewDatabaseRules calls POST /api/v1/databases/{name}/network/rules/preview.

func (*Client) PreviewDomainPolicies added in v0.2.0

func (c *Client) PreviewDomainPolicies(ctx context.Context, name, domain string, req PolicyPreviewRequest) (PolicyPreviewResponse, error)

PreviewDomainPolicies calls POST .../domains/{domain}/policies/preview.

func (*Client) PreviewEnvironmentClone added in v0.2.0

func (c *Client) PreviewEnvironmentClone(ctx context.Context, id, newEnvironmentName string) (EnvironmentClonePreviewResource, error)

PreviewEnvironmentClone calls GET /api/v1/environments/{id}/clone/preview: what cloning id into a new environment named newEnvironmentName would most likely create, without applying it or reserving any name.

func (*Client) PreviewExposureRestriction added in v0.2.0

func (c *Client) PreviewExposureRestriction(ctx context.Context, req ExposureRestrictRequest) (ExposurePlan, error)

PreviewExposureRestriction calls POST /api/v1/firewall/exposure/preview.

func (*Client) PreviewPromotion

func (c *Client) PreviewPromotion(ctx context.Context, name, environmentID, target string) (PromotePreviewResource, error)

PreviewPromotion calls GET /api/v1/apps/{name}/promote/preview: what promoting name's current image into environmentID would change, without applying it. target disambiguates when more than one app in environmentID belongs to the same project; leave it empty to let the server auto-discover the sole candidate.

func (*Client) ProbeExternalDatabase added in v0.2.0

func (c *Client) ProbeExternalDatabase(ctx context.Context, name string) (ExternalDatabaseProbe, error)

ProbeExternalDatabase calls POST /api/v1/external-databases/{name}/probe.

func (*Client) PromoteApp

func (c *Client) PromoteApp(ctx context.Context, name string, req PromoteAppRequest) (DeployTriggerResult, error)

PromoteApp calls POST /api/v1/apps/{name}/promote: points the resolved target app's image at name's current image and redeploys it.

func (*Client) PromoteCanary added in v0.2.0

func (c *Client) PromoteCanary(ctx context.Context, appName string) (CanaryResource, error)

PromoteCanary calls POST /api/v1/apps/{name}/canary/promote.

func (*Client) ProtectAll added in v0.2.0

func (c *Client) ProtectAll(ctx context.Context, req ProtectAllRequest) (ProtectAllResponse, error)

ProtectAll calls POST /api/v1/backups/protect-all; Apply false only plans.

func (*Client) PruneModelCache added in v0.2.0

func (c *Client) PruneModelCache(ctx context.Context, volumes []string, dryRun bool) (ModelCachePruneResult, error)

PruneModelCache calls POST /api/v1/model-cache/prune.

func (*Client) PrunePreview added in v0.2.0

func (c *Client) PrunePreview(ctx context.Context, name string, all bool) (PreviewPruneResult, error)

PrunePreview calls POST /api/v1/apps/{name}/preview/prune.

func (*Client) PruneSystem added in v0.2.0

func (c *Client) PruneSystem(ctx context.Context) (SystemPruneResult, error)

PruneSystem calls POST /api/v1/system/prune: removes every stopped container, dangling image, and unused volume or build cache the reconciler's current desired state doesn't need, fleet-wide.

func (*Client) PurgeAuditLog

func (c *Client) PurgeAuditLog(ctx context.Context) (PurgeAuditLogResult, error)

PurgeAuditLog calls POST /api/v1/audit-log/purge: deletes every audit_log row older than the control plane's own configured retention window right now, instead of waiting for its next periodic sweep.

func (*Client) PurgeDomainCache added in v0.2.0

func (c *Client) PurgeDomainCache(ctx context.Context, name, domain string, req PurgeCacheRequest) (PurgeCacheResponse, error)

PurgeDomainCache calls POST .../domains/{domain}/cache/purge.

func (*Client) PutAppImportPlan added in v0.2.0

func (c *Client) PutAppImportPlan(ctx context.Context, id string, body AppImportPlanUpdate) (AppImportView, error)

PutAppImportPlan calls PUT .../sessions/{id}/plan.

func (*Client) PutStatusPage added in v0.2.0

func (c *Client) PutStatusPage(ctx context.Context, s StatusPageSettings) (StatusPageSettings, error)

PutStatusPage calls PUT /api/v1/status-page.

func (*Client) QueryAppMetrics

func (c *Client) QueryAppMetrics(ctx context.Context, name, metric string, from, to time.Time, step time.Duration) (AppMetricsResource, error)

QueryAppMetrics calls GET /api/v1/apps/{name}/metrics?metric=&from=&to=&step= (internal/api/metrics.go's handleQueryMetrics). from/to are sent as RFC3339; step of zero omits the query param, matching the server's own "step<=0 means raw unaggregated samples" contract (telemetry.Aggregate).

func (*Client) QueryAppMetricsSeries added in v0.2.0

func (c *Client) QueryAppMetricsSeries(ctx context.Context, name, metric string, from, to time.Time, opt MetricsQueryOptions) (MetricsSeriesResource, error)

QueryAppMetricsSeries calls GET /api/v1/apps/{name}/metrics with max_points and compare support.

func (*Client) QueryAppRequests added in v0.2.0

func (c *Client) QueryAppRequests(ctx context.Context, name string, from, to time.Time, step time.Duration) (AppRequestsResource, error)

QueryAppRequests calls GET /api/v1/apps/{name}/requests: ingress request rate, error rates and latency percentiles. A zero step lets the server pick.

func (*Client) QueryDatabase added in v0.2.0

func (c *Client) QueryDatabase(ctx context.Context, name string, req DatabaseQueryRequest, write bool) (DatabaseQueryResult, error)

QueryDatabase calls POST /api/v1/databases/{name}/query, or /query/write when write is true (admin only, confirm must equal the database name).

func (*Client) QueryDatabaseLogs added in v0.2.0

func (c *Client) QueryDatabaseLogs(ctx context.Context, name string, from, to time.Time, q string) ([]LogEntryResource, error)

QueryDatabaseLogs calls GET /api/v1/databases/{name}/logs?from=&to=&q= (internal/api/database_logs.go's handleQueryDatabaseLogs), the database counterpart to QueryLogs above: same request/response shape, same shared queryResourceLogs implementation server-side.

func (*Client) QueryDatabaseMetrics added in v0.2.0

func (c *Client) QueryDatabaseMetrics(ctx context.Context, name, metric string, from, to time.Time, step time.Duration) (AppMetricsResource, error)

QueryDatabaseMetrics calls GET /api/v1/databases/{name}/metrics?metric=&from=&to=&step= (internal/api/database_metrics.go's handleQueryDatabaseMetrics), the database-kind counterpart to QueryAppMetrics: same params, same response shape, since internal/api's queryResourceMetrics is the shared implementation behind both routes server-side.

func (*Client) QueryDatabaseSlowQueries added in v0.2.0

func (c *Client) QueryDatabaseSlowQueries(ctx context.Context, name string, from, to time.Time, limit, offset int) ([]SlowQueryEntryResource, int, error)

QueryDatabaseSlowQueries calls GET /api/v1/databases/{name}/slow-queries?from=&to=&limit=&offset= (internal/api/database_slow_queries.go's handleQueryDatabaseSlowQueries), returning parsed slow-query entries sorted by duration descending plus the total count before limit/offset truncation. limit <= 0 omits the ?limit param, letting the server apply its own default.

func (*Client) QueryLogs

func (c *Client) QueryLogs(ctx context.Context, name string, from, to time.Time, q string) ([]LogEntryResource, error)

QueryLogs calls GET /api/v1/apps/{name}/logs?from=&to=&q= (internal/api/logs.go's handleQueryLogs): a real, historical full-text search over already-stored log entries. from/to are sent as RFC3339, the same format the server requires (internal/api's parseTimeRange); q empty means every entry in the window, matching the server's own "empty query" contract.

func (*Client) QueryLogsCompact added in v0.2.0

func (c *Client) QueryLogsCompact(ctx context.Context, q LogQuery, maxBytes int, now time.Time) (LogExcerpt, error)

QueryLogsCompact runs q against the logs API and returns a capped excerpt of the newest matching lines. The level, text and newest-N filtering happen server side; the byte cap is applied here.

func (*Client) QueryModelLogs added in v0.2.0

func (c *Client) QueryModelLogs(ctx context.Context, name string, from, to time.Time, q string) ([]LogEntryResource, error)

QueryModelLogs calls GET /api/v1/models/{name}/logs.

func (*Client) QueryNodeMetrics added in v0.2.0

func (c *Client) QueryNodeMetrics(ctx context.Context, id, metric string, from, to time.Time, step time.Duration) (NodeMetricsResource, error)

QueryNodeMetrics calls GET /api/v1/nodes/{id}/metrics?metric=&from=&to=&step= (internal/api/node_metrics.go's handleQueryNodeMetrics): a sum of every service placed on the node for most metrics, or a real host-level reading for the rest (disk usage, OS patches available); see that handler's own doc comment for exactly which metric names fall into each group. The server, not this client, is the authority on which metric names are valid.

func (*Client) ReapOrphans added in v0.2.0

func (c *Client) ReapOrphans(ctx context.Context, dryRun bool) (OrphanReport, error)

ReapOrphans calls POST /api/v1/system/orphans/reap: one reaper pass now. dryRun reports what would go without removing it.

func (*Client) RebindSecrets added in v0.2.0

func (c *Client) RebindSecrets(ctx context.Context) (SecretRebindResult, error)

RebindSecrets calls POST /api/v1/system/secrets/rebind: re-encrypts every legacy secret value bound to its slot. Safe to repeat.

func (*Client) RecheckUpdatePreflight added in v0.2.0

func (c *Client) RecheckUpdatePreflight(ctx context.Context) (UpdatePreflight, error)

RecheckUpdatePreflight is GetUpdatePreflight bypassing the release cache.

func (*Client) ReclaimStorageOrphan added in v0.2.0

func (c *Client) ReclaimStorageOrphan(ctx context.Context, id, confirm string) (ReclaimOrphanResponse, error)

ReclaimStorageOrphan calls DELETE /api/v1/storage/orphans/{id}; confirm must equal id.

func (*Client) RedeployComposeStack added in v0.2.0

func (c *Client) RedeployComposeStack(ctx context.Context, name, service string) ([]string, error)

RedeployComposeStack calls POST /api/v1/apps/{name}/compose/redeploy; service "" means every service.

func (*Client) RefreshBackupProtection added in v0.2.0

func (c *Client) RefreshBackupProtection(ctx context.Context, targetIDs []string) ([]TargetProtectionResource, error)

RefreshBackupProtection calls POST /api/v1/backups/protection/refresh.

func (*Client) RejectDeployApproval added in v0.2.0

func (c *Client) RejectDeployApproval(ctx context.Context, id, reason string) (DeployApprovalResource, error)

RejectDeployApproval calls POST /api/v1/deploy-approvals/{id}/reject: records the decision, the app's desired state is left untouched.

func (*Client) RejoinNodeMesh added in v0.2.0

func (c *Client) RejoinNodeMesh(ctx context.Context, id string) (RejoinMeshResponse, error)

RejoinNodeMesh calls POST /api/v1/nodes/{id}/mesh/rejoin: forces an immediate fleet-wide mesh reconcile pass instead of waiting for the next scheduled resync. See internal/api/mesh.go's own doc comment: id is only used to validate the node exists, the resync itself always covers the whole fleet.

func (*Client) RemoveDatabaseRules added in v0.2.0

func (c *Client) RemoveDatabaseRules(ctx context.Context, name string) error

RemoveDatabaseRules calls DELETE /api/v1/databases/{name}/network/rules.

func (*Client) RemoveExposureRestriction added in v0.2.0

func (c *Client) RemoveExposureRestriction(ctx context.Context, protocol string, port int) error

RemoveExposureRestriction calls DELETE .../exposure/restrictions/{protocol}/{port}.

func (*Client) RemoveOrphanedContainer added in v0.2.0

func (c *Client) RemoveOrphanedContainer(ctx context.Context, name string) error

RemoveOrphanedContainer calls POST /api/v1/system/containers/{name}/remove.

func (*Client) RemoveTeamMember added in v0.2.0

func (c *Client) RemoveTeamMember(ctx context.Context, id, userID string) error

RemoveTeamMember calls DELETE /api/v1/teams/{id}/members/{user}.

func (*Client) RenameTeam added in v0.2.0

func (c *Client) RenameTeam(ctx context.Context, id, name string) (TeamResource, error)

RenameTeam calls PATCH /api/v1/teams/{id}.

func (*Client) RenewDomainCertificate added in v0.2.0

func (c *Client) RenewDomainCertificate(ctx context.Context, name, domain string) (RenewCertificateResource, error)

RenewDomainCertificate calls POST /api/v1/apps/{name}/domains/{domain}/cert/renew: forces re-issuance of domain's automatically-managed certificate (ACME or internal; not valid for a domain with a BYO certificate uploaded, see handleRenewDomainCertificate's own doc comment).

func (*Client) ReplayWebhookDelivery

func (c *Client) ReplayWebhookDelivery(ctx context.Context, name, id string) (ReplayWebhookDeliveryResult, error)

ReplayWebhookDelivery calls POST /api/v1/apps/{name}/webhook-deliveries/{id}/replay: re-runs a stored delivery's exact payload through the same processing a live webhook takes, which can trigger a real build and deploy.

func (*Client) RerunPipelineRun added in v0.2.0

func (c *Client) RerunPipelineRun(ctx context.Context, app, id string) (PipelineRunResource, error)

RerunPipelineRun calls POST .../pipeline-runs/{id}/rerun.

func (*Client) ResetSetupGuide added in v0.2.0

func (c *Client) ResetSetupGuide(ctx context.Context) (SetupGuideResource, error)

ResetSetupGuide calls POST /api/v1/setup/guide/reset.

func (*Client) ResolveAIChatConfirmation added in v0.2.0

func (c *Client) ResolveAIChatConfirmation(ctx context.Context, sessionID, confirmationID string, approve bool, onEvent func(AIChatSSEEvent) error) error

ResolveAIChatConfirmation calls POST /api/v1/ai/sessions/{id}/confirmations/{confirmationID}: approves or rejects a pending mutating tool call, streaming the turn's continuation the same way SendAIChatMessage does.

func (*Client) RestartApp

func (c *Client) RestartApp(ctx context.Context, name string) (AppResource, error)

RestartApp calls POST /api/v1/apps/{name}/restart: force a running container to be recreated with no image change (internal/api/apps.go's own handleRestartApp). No request body; the response is the app's current desired state, unchanged.

func (*Client) RestartControlPlane added in v0.2.0

func (c *Client) RestartControlPlane(ctx context.Context) (SystemRestart, error)

RestartControlPlane calls POST /api/v1/system/restart.

func (*Client) RestartModel added in v0.2.0

func (c *Client) RestartModel(ctx context.Context, name string) error

RestartModel calls POST /api/v1/models/{name}/restart.

func (*Client) RestartProject added in v0.2.0

func (c *Client) RestartProject(ctx context.Context, id string) (ProjectRestartResponse, error)

RestartProject calls POST /api/v1/projects/{id}/restart: force every app filed under this project to have its running container recreated with no image change (internal/api/project_restart.go's own handleRestartProject). No request body.

func (*Client) RestoreVolumeTo added in v0.2.0

func (c *Client) RestoreVolumeTo(ctx context.Context, name, volume string, req VolumeRestoreToRequest) (VolumeRestoreToResponse, error)

RestoreVolumeTo calls POST /api/v1/apps/{name}/volumes/{volume}/restore-to.

func (*Client) RestrictDomainPort added in v0.2.0

func (c *Client) RestrictDomainPort(ctx context.Context, name, domain string, port int, sources []string) (DomainPortsResource, error)

RestrictDomainPort calls PUT .../ports/{port}/restrict: only sources may reach the port.

func (*Client) RevealEnv added in v0.2.0

func (c *Client) RevealEnv(ctx context.Context, app, key string, proof *StepUpProof) (RevealResult, error)

RevealEnv calls POST /api/v1/apps/{name}/env/reveal.

func (*Client) RevealLoginCode added in v0.2.0

func (c *Client) RevealLoginCode(ctx context.Context, id string) (RevealedLoginCode, error)

RevealLoginCode calls POST /api/v1/auth/sign-in-requests/codes/{id}/reveal. A token must hold signin:approve.

func (*Client) RevealSecret added in v0.2.0

func (c *Client) RevealSecret(ctx context.Context, app, key string, proof *StepUpProof) (RevealResult, error)

RevealSecret calls POST /api/v1/apps/{name}/secrets/{key}/reveal.

func (*Client) RevokeAgentTokens added in v0.2.0

func (c *Client) RevokeAgentTokens(ctx context.Context) (RevokeAgentTokensResource, error)

RevokeAgentTokens calls POST /api/v1/settings/ai-control/revoke-agent-tokens.

func (*Client) RevokeAuthGateSessions added in v0.2.0

func (c *Client) RevokeAuthGateSessions(ctx context.Context, name, domain string) (AuthGateSessionsRevoked, error)

RevokeAuthGateSessions calls DELETE .../auth-gate/sessions.

func (*Client) RevokeDatabaseTemp added in v0.2.0

func (c *Client) RevokeDatabaseTemp(ctx context.Context, name, id string) error

RevokeDatabaseTemp calls DELETE /api/v1/databases/{name}/access/temp/{id}.

func (*Client) RevokeInvite

func (c *Client) RevokeInvite(ctx context.Context, id string) error

RevokeInvite calls DELETE /api/v1/invites/{id}.

func (*Client) RevokeMobileDevice added in v0.2.0

func (c *Client) RevokeMobileDevice(ctx context.Context, id string) error

RevokeMobileDevice calls DELETE /api/v1/mobile/devices/{id}.

func (*Client) RevokeModelKey added in v0.2.0

func (c *Client) RevokeModelKey(ctx context.Context, name, id string) error

RevokeModelKey calls DELETE /api/v1/models/{name}/keys/{id}.

func (*Client) RevokeNodeCert added in v0.2.0

func (c *Client) RevokeNodeCert(ctx context.Context, id string) (NodeResource, error)

RevokeNodeCert calls POST /api/v1/nodes/{id}/revoke-cert.

func (*Client) RevokeOtherSecuritySessions added in v0.2.0

func (c *Client) RevokeOtherSecuritySessions(ctx context.Context, userID string) (RevokedSessions, error)

RevokeOtherSecuritySessions calls POST /api/v1/security/sessions/revoke-others.

func (*Client) RevokeSecuritySession added in v0.2.0

func (c *Client) RevokeSecuritySession(ctx context.Context, id, userID string) error

RevokeSecuritySession calls DELETE /api/v1/security/sessions/{id}.

func (*Client) RevokeTeamInvite added in v0.2.0

func (c *Client) RevokeTeamInvite(ctx context.Context, id, inviteID string) error

RevokeTeamInvite calls DELETE /api/v1/teams/{id}/invites/{invite}.

func (*Client) RevokeTrustedDevice added in v0.2.0

func (c *Client) RevokeTrustedDevice(ctx context.Context, id string) error

RevokeTrustedDevice calls DELETE /api/v1/auth/trusted-devices/{id}.

func (*Client) RollbackAppImport added in v0.2.0

func (c *Client) RollbackAppImport(ctx context.Context, id string, items []string) (AppImportView, error)

RollbackAppImport calls POST .../sessions/{id}/rollback.

func (*Client) RollbackAppImportCutover added in v0.2.0

func (c *Client) RollbackAppImportCutover(ctx context.Context, session, item, run string) (ImportCutoverRun, error)

RollbackAppImportCutover calls POST .../cutover/runs/{run}/rollback.

func (*Client) RollbackComposeStack added in v0.2.0

func (c *Client) RollbackComposeStack(ctx context.Context, name string, revision int) (ComposeRollbackResult, error)

RollbackComposeStack calls POST /api/v1/apps/{name}/compose/rollback; revision 0 means the previous one.

func (*Client) RollbackMajorUpgrade added in v0.2.0

func (c *Client) RollbackMajorUpgrade(ctx context.Context, name, id string) (MajorUpgradeResource, error)

RollbackMajorUpgrade calls POST .../major-upgrades/{id}/rollback.

func (*Client) RollbackToDeploy added in v0.2.0

func (c *Client) RollbackToDeploy(ctx context.Context, appName, deployID string, req RollbackToRequest) (DeployTriggerResult, error)

RollbackToDeploy calls POST /api/v1/apps/{name}/deploys/{deployId}/rollback: redeploys the content that past deploy recorded, pinned by digest.

func (*Client) RotateDatabaseUser added in v0.2.0

func (c *Client) RotateDatabaseUser(ctx context.Context, name, role string) (DatabaseCredential, error)

RotateDatabaseUser calls POST /api/v1/databases/{name}/users/{role}/rotate.

func (*Client) RotateGitSourceWebhookSecret added in v0.2.0

func (c *Client) RotateGitSourceWebhookSecret(ctx context.Context, name string) (GitSourceResource, error)

RotateGitSourceWebhookSecret calls POST /api/v1/apps/{name}/git-source/rotate-webhook-secret: mints a fresh webhook secret without touching repo_url/branch/build config. The returned resource's WebhookSecret is populated this one time, the caller's only chance to see it.

func (*Client) RotateImageUpdateWebhook added in v0.2.0

func (c *Client) RotateImageUpdateWebhook(ctx context.Context, appName string) (ImageUpdateWebhookResource, error)

RotateImageUpdateWebhook calls POST /api/v1/apps/{name}/auto-update/webhook.

func (*Client) RotateMasterKey

func (c *Client) RotateMasterKey(ctx context.Context, newMasterKey string) (RotateMasterKeyResult, error)

RotateMasterKey calls POST /api/v1/system/master-key/rotate: re-wraps every stored DEK from the control plane's currently active master key to newMasterKey, live, in one atomic step.

func (*Client) RotateModelAPIKey added in v0.2.0

func (c *Client) RotateModelAPIKey(ctx context.Context, name string) (ModelAPIKeyResource, error)

RotateModelAPIKey calls POST /api/v1/models/{name}/api-key.

func (*Client) RotateModelKey added in v0.2.0

func (c *Client) RotateModelKey(ctx context.Context, name, id string, grace *time.Duration) (CreatedModelKeyResource, error)

RotateModelKey calls POST /api/v1/models/{name}/keys/{id}/rotate. A nil grace uses the server default; zero retires the old key at once.

func (*Client) RotateNodeMeshKey added in v0.2.0

func (c *Client) RotateNodeMeshKey(ctx context.Context, id string) (RotateKeyResponse, error)

RotateNodeMeshKey calls POST /api/v1/nodes/{id}/mesh/rotate-key: generates a fresh WireGuard keypair for id and makes it live immediately. Works for any node currently connected to the target control plane, local or remote (internal/api/mesh.go's own doc comment).

func (*Client) RotatePipelineOIDCKey added in v0.2.0

func (c *Client) RotatePipelineOIDCKey(ctx context.Context, retireAfter string) (PipelineOIDCRotation, error)

RotatePipelineOIDCKey calls POST /api/v1/pipelines/oidc/rotate-key. retireAfter is a Go duration string (e.g. "1h"); empty uses the control plane's default grace period.

func (*Client) RunControlPlaneDrill added in v0.2.0

func (c *Client) RunControlPlaneDrill(ctx context.Context) error

RunControlPlaneDrill calls POST /api/v1/system/control-plane-dr/drill.

func (*Client) RunControlPlaneOffboxBackup added in v0.2.0

func (c *Client) RunControlPlaneOffboxBackup(ctx context.Context) error

RunControlPlaneOffboxBackup calls POST /api/v1/system/control-plane-dr/run. The backup runs in the background; poll GetControlPlaneDR for the result.

func (*Client) RunGoLive added in v0.2.0

func (c *Client) RunGoLive(ctx context.Context, app, domain string, req GoLiveRequest) (GoLiveResult, error)

RunGoLive calls POST .../domains/{domain}/go-live.

func (*Client) RunJob added in v0.2.0

func (c *Client) RunJob(ctx context.Context, app, id string) (ScheduledTaskResource, error)

RunJob calls POST .../jobs/{id}/run and returns the started run's ID in the response's RunID.

func (*Client) RunPipelineSync added in v0.2.0

func (c *Client) RunPipelineSync(ctx context.Context, app string) (PipelineSyncResult, error)

RunPipelineSync calls POST /api/v1/apps/{app}/pipeline-sync.

func (*Client) RunScheduledTask

func (c *Client) RunScheduledTask(ctx context.Context, name, id string) (ScheduledTaskResource, error)

RunScheduledTask calls POST /api/v1/apps/{name}/scheduled-tasks/{id}/run: triggers an immediate run and returns as soon as it starts, not once the command finishes.

func (*Client) SaveAppAsTemplate added in v0.2.0

func (c *Client) SaveAppAsTemplate(ctx context.Context, name string, req SaveAppAsTemplateRequest) (CustomTemplateDetail, error)

SaveAppAsTemplate calls POST /api/v1/apps/{name}/save-as-template (internal/api/service_templates_custom.go): derives a compose.yaml from name's current desired state and saves it as a reusable, operator-defined template. No secret, database, or vault-backed env value is ever captured, only the key name (see compose. FromDesiredServices' own doc comment); result.RequiredEnvKeys lists exactly which keys will need a real value before this template can deploy.

func (*Client) ScanDeployment added in v0.2.0

func (c *Client) ScanDeployment(ctx context.Context, name, id string) (VulnReport, error)

ScanDeployment calls POST /api/v1/apps/{name}/deployments/{id}/scan.

func (*Client) SearchAppLogs added in v0.2.0

func (c *Client) SearchAppLogs(ctx context.Context, name string, s LogSearch) (LogSearchResource, error)

SearchAppLogs calls GET /api/v1/apps/{name}/logs with the filter params.

func (*Client) SelectMigrationItems added in v0.2.0

func (c *Client) SelectMigrationItems(ctx context.Context, id string, items []HubSelection) (HubSession, error)

SelectMigrationItems updates the selection and names of a session.

func (*Client) SendAIChatMessage added in v0.2.0

func (c *Client) SendAIChatMessage(ctx context.Context, sessionID, content string, onEvent func(AIChatSSEEvent) error) error

SendAIChatMessage calls POST /api/v1/ai/sessions/{id}/messages: sends content as a new user message and streams the assistant's turn, calling onEvent for every SSE event in arrival order (see AIChatSSEEvent's own doc comment for the four shapes). Returns once the server sends "done" or the connection ends, matching streamLogEvents' own contract.

func (*Client) SetAdvisorFindingState added in v0.2.0

func (c *Client) SetAdvisorFindingState(ctx context.Context, id, verb, duration string) (AdvisorFinding, error)

SetAdvisorFindingState dismisses, snoozes (for duration) or restores a finding.

func (*Client) SetAppBranchEnv added in v0.2.0

func (c *Client) SetAppBranchEnv(ctx context.Context, name, branchPattern, key, value string, secret bool) (AppBranchEnvOverride, error)

SetAppBranchEnv calls POST /api/v1/apps/{name}/branch-env: declares (or, for the same branchPattern+key, replaces) one env var's value for name, applied only when a preview built from a matching branch is deployed.

func (*Client) SetAppDatabaseAttachment

func (c *Client) SetAppDatabaseAttachment(ctx context.Context, name string, req SetAppDatabaseRequest) (AppDatabaseResource, error)

SetAppDatabaseAttachment calls PUT /api/v1/apps/{name}/database: attaches an existing managed database to name as a real, persisted connection env var source.

func (*Client) SetAppEgressPolicy added in v0.2.0

func (c *Client) SetAppEgressPolicy(ctx context.Context, name string, req SetAppEgressPolicyRequest) (AppEgressPolicyResource, error)

SetAppEgressPolicy calls PUT /api/v1/apps/{name}/egress-policy: sets (or replaces) name's outbound network allowlist.

func (*Client) SetAppEnvironment

func (c *Client) SetAppEnvironment(ctx context.Context, name, environmentID string) (AppResource, error)

SetAppEnvironment calls PUT /api/v1/apps/{name}/environment. An empty environmentID clears the assignment. Returns the updated app.

func (*Client) SetAppHealth added in v0.2.0

func (c *Client) SetAppHealth(ctx context.Context, name string, health ServiceHealth) (AppHealthResource, error)

SetAppHealth calls PUT /api/v1/apps/{name}/health, replacing name's readiness and liveness config as a whole.

func (*Client) SetAppNode added in v0.2.0

func (c *Client) SetAppNode(ctx context.Context, name, nodeID string) (AppResource, error)

SetAppNode calls PUT /api/v1/apps/{name}/node: an instant placement change (internal/api's handleSetAppNode), no volumes involved. An empty nodeID moves the app back to the control plane's own local node. Returns the updated app. See MoveAppWithVolumes for the same move, taking the app's named volumes along with it.

func (*Client) SetAppPreviewEnvOverride added in v0.2.0

func (c *Client) SetAppPreviewEnvOverride(ctx context.Context, name, key, value string) (AppPreviewEnvOverride, error)

SetAppPreviewEnvOverride calls PUT /api/v1/apps/{name}/preview-env/{key}: declares (or replaces) one env var's preview-specific value on an app that already exists, applied only the next time a preview environment is created from it.

func (*Client) SetAppProject

func (c *Client) SetAppProject(ctx context.Context, name, projectID string) (AppResource, error)

SetAppProject calls PUT /api/v1/apps/{name}/project. An empty projectID clears the assignment. Returns the updated app.

func (*Client) SetAppSchedule added in v0.2.0

func (c *Client) SetAppSchedule(ctx context.Context, name string, req SetAppScheduleRequest) (AppScheduleResource, error)

SetAppSchedule calls PUT /api/v1/apps/{name}/schedule: sets or replaces the app's recurring redeploy schedule.

func (*Client) SetAppSleep added in v0.2.0

func (c *Client) SetAppSleep(ctx context.Context, appName string, idleMinutes int) (AppSleepResource, error)

SetAppSleep calls PUT /api/v1/apps/{name}/sleep; 0 minutes turns sleeping off.

func (*Client) SetAppSleepHold added in v0.2.0

func (c *Client) SetAppSleepHold(ctx context.Context, appName string, idleMinutes int, hold bool) (AppSleepResource, error)

SetAppSleepHold calls PUT /api/v1/apps/{name}/sleep with function mode on or off.

func (*Client) SetAppStorage added in v0.2.0

func (c *Client) SetAppStorage(ctx context.Context, name, storageTargetID string) (AppStorageResource, error)

SetAppStorage calls PUT /api/v1/apps/{name}/storage: attaches an already-connected backup target to name as its object-storage credential source.

func (*Client) SetAppVaultEnv added in v0.2.0

func (c *Client) SetAppVaultEnv(ctx context.Context, name, key string, req AppVaultEnvRef) (AppVaultEnvRef, error)

SetAppVaultEnv calls PUT /api/v1/apps/{name}/vault-env/{key}: declares (or replaces) one env var as resolving live from the platform's configured external Vault instance, for an app that already exists.

func (*Client) SetAppVolumes added in v0.2.0

func (c *Client) SetAppVolumes(ctx context.Context, name string, req SetAppVolumesRequest) (SetAppVolumesResponse, error)

SetAppVolumes calls PUT /api/v1/apps/{name}/volumes: attaches (or removes) a named Docker volume outside a redeploy, replacing name's whole desired volume list with req.Volumes.

func (*Client) SetAutoRollback added in v0.2.0

func (c *Client) SetAutoRollback(ctx context.Context, appName string, enabled bool) (AutoRollbackSettingResource, error)

SetAutoRollback calls PUT /api/v1/apps/{name}/auto-rollback, opting appName into (or out of) automatic rollback on a crashloop. Off by default.

func (*Client) SetAutoRollbackSLOBurn added in v0.2.0

func (c *Client) SetAutoRollbackSLOBurn(ctx context.Context, appName, mode string) (AutoRollbackSLOBurnSettingResource, error)

SetAutoRollbackSLOBurn calls PUT /api/v1/apps/{name}/auto-rollback-slo-burn, setting appName's mode for automatic rollback on an SLO burn-rate alert. mode is one of "off", "auto", "dry_run", "pause_for_human"; "off" by default.

func (*Client) SetBackupSchedule

func (c *Client) SetBackupSchedule(ctx context.Context, name string, req SetBackupScheduleRequest) (BackupScheduleResource, error)

SetBackupSchedule calls PUT /api/v1/databases/{name}/backup-schedule: configures a recurring backup, replacing any previously configured schedule for name.

func (*Client) SetBetaFeature added in v0.2.0

func (c *Client) SetBetaFeature(ctx context.Context, feature string, enabled bool) (BetaFeature, error)

SetBetaFeature calls PUT /api/v1/settings/beta-features/{feature}.

func (*Client) SetBuildCache added in v0.2.0

func (c *Client) SetBuildCache(ctx context.Context, req BuildCacheRequest) (BuildCacheSetting, error)

SetBuildCache calls PUT /api/v1/build-cache.

func (*Client) SetCanaryWeight added in v0.2.0

func (c *Client) SetCanaryWeight(ctx context.Context, appName string, weight int) (CanaryResource, error)

SetCanaryWeight calls PUT /api/v1/apps/{name}/canary; 0 pauses the canary.

func (*Client) SetCancelSuperseded added in v0.2.0

func (c *Client) SetCancelSuperseded(ctx context.Context, appName string, enabled bool) (CancelSupersededResource, error)

SetCancelSuperseded calls PUT /api/v1/apps/{name}/cancel-superseded.

func (*Client) SetCloudflareDNS

SetCloudflareDNS calls PUT /api/v1/settings/cloudflare-dns.

func (*Client) SetCloudflareTunnel

SetCloudflareTunnel calls PUT /api/v1/settings/cloudflare-tunnel.

func (*Client) SetDatabaseNode added in v0.2.0

func (c *Client) SetDatabaseNode(ctx context.Context, name, nodeID string) (DatabaseResource, error)

SetDatabaseNode calls PUT /api/v1/databases/{name}/node (internal/api/databases.go's handleSetDatabaseNode), the database counterpart to SetAppNode: an empty nodeID moves the database back to this control plane's own local node. Reuses SetAppNodeRequest, an identical {node_id} body shape on both routes.

func (*Client) SetDatabaseProject

func (c *Client) SetDatabaseProject(ctx context.Context, name, projectID string) (DatabaseResource, error)

SetDatabaseProject calls PUT /api/v1/databases/{name}/project. An empty projectID clears the assignment. Returns the updated database.

func (*Client) SetDatabasePublicAccess

func (c *Client) SetDatabasePublicAccess(ctx context.Context, name string, port int, bindAddress string) (DatabasePublicAccessResource, error)

SetDatabasePublicAccess calls PUT /api/v1/databases/{name}/public-access: exposes name on the host at port (0 requests auto-assignment) bound to bindAddress ("" requests the server's own default, "private").

func (*Client) SetDatabaseRequireTLS added in v0.2.0

func (c *Client) SetDatabaseRequireTLS(ctx context.Context, name string, require bool) error

SetDatabaseRequireTLS calls PUT /api/v1/databases/{name}/network/tls.

func (*Client) SetDatabaseResources

func (c *Client) SetDatabaseResources(ctx context.Context, name string, resources *ServiceResources) (DatabaseResource, error)

SetDatabaseResources calls PUT /api/v1/databases/{name}/resources: applies memory/CPU limits to name, replacing whatever was set before.

func (*Client) SetDatabaseScope added in v0.2.0

func (c *Client) SetDatabaseScope(ctx context.Context, name, scope string, dryRun, confirm bool) (DatabaseScopeResult, error)

SetDatabaseScope calls PUT /api/v1/databases/{name}/network/scope. With dryRun nothing changes. A scope that would cut apps off is not applied without confirm; the result then has ConfirmRequired set.

func (*Client) SetDatabaseUpgradePolicy added in v0.2.0

func (c *Client) SetDatabaseUpgradePolicy(ctx context.Context, name string, p DBUpgradePolicy) (DBUpgradePolicy, error)

SetDatabaseUpgradePolicy calls PUT /api/v1/databases/{name}/upgrade-policy.

func (*Client) SetDatabaseUserLogin added in v0.2.0

func (c *Client) SetDatabaseUserLogin(ctx context.Context, name, role string, login bool) error

SetDatabaseUserLogin calls POST .../users/{role}/disable or /enable.

func (*Client) SetDatabaseVersion added in v0.2.0

func (c *Client) SetDatabaseVersion(ctx context.Context, name, version string) (DatabaseResource, error)

SetDatabaseVersion calls PUT /api/v1/databases/{name}/version: a minor or patch image change over the same data volume.

func (*Client) SetDeployFreeze added in v0.2.0

func (c *Client) SetDeployFreeze(ctx context.Context, name string, windows []FreezeWindowResource) (DeployFreezeResource, error)

SetDeployFreeze calls PUT /api/v1/apps/{name}/deploy-freeze, replacing the app's windows; an empty list clears them.

func (*Client) SetDeploySafety added in v0.2.0

func (c *Client) SetDeploySafety(ctx context.Context, appName string, overrides DeploySafetyOverrides) (DeploySafetyResource, error)

SetDeploySafety calls PUT /api/v1/apps/{name}/deploy-safety, replacing every override.

func (*Client) SetDomainAliases added in v0.2.0

func (c *Client) SetDomainAliases(ctx context.Context, name, domain string, req AliasesRequest) (DomainRedirectsResource, error)

SetDomainAliases calls PUT .../domains/{domain}/redirects/aliases.

func (*Client) SetDomainAuthGate added in v0.2.0

func (c *Client) SetDomainAuthGate(ctx context.Context, name, domain string, req SetDomainAuthGateRequest) (DomainAuthGateResource, error)

SetDomainAuthGate calls PUT /api/v1/apps/{name}/domains/{domain}/auth-gate.

func (*Client) SetDomainBasicAuth

func (c *Client) SetDomainBasicAuth(ctx context.Context, name, domain string, req SetDomainBasicAuthRequest) (DomainBasicAuthResource, error)

SetDomainBasicAuth calls PUT /api/v1/apps/{name}/domains/{domain}/auth: enables HTTP Basic Auth on domain, enforced by Caddy on the next ingress reconcile pass.

func (*Client) SetDomainCache added in v0.2.0

func (c *Client) SetDomainCache(ctx context.Context, name, domain string, spec trafficpolicy.Cache) (CachePolicyResource, error)

SetDomainCache calls PUT .../domains/{domain}/cache.

func (*Client) SetDomainCanonical added in v0.2.0

func (c *Client) SetDomainCanonical(ctx context.Context, name, domain string, req CanonicalRequest) (DomainRedirectsResource, error)

SetDomainCanonical calls POST .../domains/{domain}/redirects/canonical.

func (*Client) SetDomainErrorPage added in v0.2.0

func (c *Client) SetDomainErrorPage(ctx context.Context, name, domain string, req SetDomainErrorPageRequest) (DomainErrorPagesResource, error)

SetDomainErrorPage calls PUT /api/v1/apps/{name}/domains/{domain}/error-pages: upserts one status-code-to-body mapping for domain, enforced by Caddy on the next ingress reconcile pass.

func (*Client) SetDomainForwarders added in v0.2.0

func (c *Client) SetDomainForwarders(ctx context.Context, name, domain string, spec trafficpolicy.Forwarders) (ForwardersPolicyResource, error)

SetDomainForwarders calls PUT .../domains/{domain}/forwarders.

func (*Client) SetDomainGeo added in v0.2.0

func (c *Client) SetDomainGeo(ctx context.Context, name, domain string, spec trafficpolicy.Geo) (GeoPolicyResource, error)

SetDomainGeo calls PUT .../domains/{domain}/geo.

func (*Client) SetDomainHeaders added in v0.2.0

func (c *Client) SetDomainHeaders(ctx context.Context, name, domain string, spec trafficpolicy.Headers) (HeadersPolicyResource, error)

SetDomainHeaders calls PUT .../domains/{domain}/headers.

func (*Client) SetDomainMaintenance

func (c *Client) SetDomainMaintenance(ctx context.Context, name, domain string) (DomainMaintenanceResource, error)

SetDomainMaintenance calls PUT /api/v1/apps/{name}/domains/{domain}/maintenance: enables maintenance mode on domain, enforced by Caddy on the next ingress reconcile pass.

func (*Client) SetDomainRedirect added in v0.2.0

func (c *Client) SetDomainRedirect(ctx context.Context, name, domain string, req SetDomainRedirectRequest) (DomainRedirectResource, error)

SetDomainRedirect calls PUT /api/v1/apps/{name}/domains/{domain}/redirect: configures domain to redirect to a target URL, enforced by Caddy on the next ingress reconcile pass.

func (*Client) SetDomainRedirectSettings added in v0.2.0

func (c *Client) SetDomainRedirectSettings(ctx context.Context, name, domain string, s trafficpolicy.Redirects) (DomainRedirectsResource, error)

SetDomainRedirectSettings calls PUT .../domains/{domain}/redirects.

func (*Client) SetDomainSearchVisibility added in v0.2.0

func (c *Client) SetDomainSearchVisibility(ctx context.Context, name, domain string, hidden bool) (DomainSearchVisibilityResource, error)

SetDomainSearchVisibility calls PUT .../domains/{domain}/search-visibility.

func (*Client) SetDomainTLSCert

func (c *Client) SetDomainTLSCert(ctx context.Context, name, domain string, req SetDomainTLSCertRequest) (DomainTLSCertResource, error)

SetDomainTLSCert calls PUT /api/v1/apps/{name}/domains/{domain}/tls-cert: uploads a BYO certificate for domain, used by Caddy in place of automatic ACME/ internal issuance on the next ingress reconcile pass.

func (*Client) SetDomainWAF added in v0.2.0

func (c *Client) SetDomainWAF(ctx context.Context, name, domain string, req SetDomainWAFRequest) (DomainWAFResource, error)

SetDomainWAF calls PUT /api/v1/apps/{name}/domains/{domain}/waf: sets WAF and/or rate-limit configuration for domain, enforced by Caddy on the next ingress reconcile pass.

func (*Client) SetEnvironmentEnv

func (c *Client) SetEnvironmentEnv(ctx context.Context, id string, vars map[string]string) (map[string]string, error)

SetEnvironmentEnv calls PUT /api/v1/environments/{id}/env: a full replace, mirroring PUT /apps/{name}'s own env field semantics.

func (*Client) SetExecAccess added in v0.2.0

func (c *Client) SetExecAccess(ctx context.Context, appName string, enabled bool) (ExecAccessResource, error)

SetExecAccess calls PUT /api/v1/apps/{name}/exec-access, opting appName into (or out of) shell/exec access.

func (*Client) SetGitDeploySettings added in v0.2.0

func (c *Client) SetGitDeploySettings(ctx context.Context, name string, req SetGitDeploySettingsRequest) (GitDeploySettings, error)

SetGitDeploySettings calls PUT /api/v1/apps/{name}/git-source/deploy-settings.

func (*Client) SetGitSource

func (c *Client) SetGitSource(ctx context.Context, name string, req SetGitSourceRequest) (GitSourceResource, error)

SetGitSource calls PUT /api/v1/apps/{name}/git-source: connects a repo (creating a new webhook secret) the first time it's called for an app, or edits the connection on every call after.

func (*Client) SetGitSourceBuild added in v0.2.0

func (c *Client) SetGitSourceBuild(ctx context.Context, name string, req SetGitSourceBuildRequest) (GitSourceResource, error)

SetGitSourceBuild calls PUT /api/v1/apps/{name}/git-source/build.

func (*Client) SetGlobalDeployFreeze added in v0.2.0

func (c *Client) SetGlobalDeployFreeze(ctx context.Context, windows []FreezeWindowResource) (DeployFreezeResource, error)

SetGlobalDeployFreeze calls PUT /api/v1/settings/deploy-freeze, replacing the fleet-wide windows; an empty list clears them.

func (*Client) SetHostFirewall added in v0.2.0

func (c *Client) SetHostFirewall(ctx context.Context, enable bool, dryRun bool) (HostFirewallResource, error)

SetHostFirewall calls POST /api/v1/firewall/host/enable or /disable.

func (*Client) SetImageAutoUpdate added in v0.2.0

func (c *Client) SetImageAutoUpdate(ctx context.Context, appName string, enabled bool) (ImageAutoUpdateResource, error)

SetImageAutoUpdate calls PUT /api/v1/apps/{name}/auto-update.

func (*Client) SetJobEnabled added in v0.2.0

func (c *Client) SetJobEnabled(ctx context.Context, app, id string, enabled bool) (ScheduledTaskResource, error)

SetJobEnabled calls POST .../jobs/{id}/enable or /disable.

func (*Client) SetLoadBalancer added in v0.2.0

func (c *Client) SetLoadBalancer(ctx context.Context, name string, cfg LoadBalancerConfig) (LoadBalancerResource, error)

SetLoadBalancer calls PUT /api/v1/apps/{name}/loadbalancer.

func (*Client) SetLoadBalancerUpstreamState added in v0.2.0

func (c *Client) SetLoadBalancerUpstreamState(ctx context.Context, name, id, state string) (LoadBalancerUpstreamStatus, error)

SetLoadBalancerUpstreamState calls PUT /api/v1/apps/{name}/loadbalancer/upstreams/{id}.

func (*Client) SetLogArchivePolicy added in v0.2.0

func (c *Client) SetLogArchivePolicy(ctx context.Context, req LogArchivePolicyRequest) (LogArchivePolicy, error)

SetLogArchivePolicy calls PUT /api/v1/log-archive/policy.

func (*Client) SetLogDrain

func (c *Client) SetLogDrain(ctx context.Context, name string, req SetLogDrainRequest) (LogDrainResource, error)

SetLogDrain calls PUT /api/v1/apps/{name}/log-drain.

func (*Client) SetModelHFToken added in v0.2.0

func (c *Client) SetModelHFToken(ctx context.Context, name, token string) error

SetModelHFToken calls PUT /api/v1/models/{name}/hf-token.

func (*Client) SetModelResidency added in v0.2.0

func (c *Client) SetModelResidency(ctx context.Context, name, residency string, idleTTLSeconds int) error

SetModelResidency calls PUT /api/v1/models/{name}/residency.

func (*Client) SetModelSwapGroup added in v0.2.0

func (c *Client) SetModelSwapGroup(ctx context.Context, name, group string) error

SetModelSwapGroup calls PUT /api/v1/models/{name}/swap-group. An empty group clears it.

func (*Client) SetNodeLabels added in v0.2.0

func (c *Client) SetNodeLabels(ctx context.Context, id string, labels map[string]string) (NodeLabels, error)

SetNodeLabels calls PUT /api/v1/nodes/{id}/labels, replacing the set.

func (*Client) SetNodeProviderCredential added in v0.2.0

func (c *Client) SetNodeProviderCredential(ctx context.Context, req SetNodeProviderCredentialRequest) (NodeProviderResource, error)

SetNodeProviderCredential calls POST /api/v1/node-providers.

func (*Client) SetNodeWorkloads

func (c *Client) SetNodeWorkloads(ctx context.Context, id string, req SetNodeWorkloadsRequest) (NodeResource, error)

SetNodeWorkloads calls PUT /api/v1/nodes/{id}/workloads: a full replace of both workload flags, not a partial patch, matching handleSetNodeWorkloads' own contract.

func (*Client) SetOrganizationEnv

func (c *Client) SetOrganizationEnv(ctx context.Context, id string, vars map[string]string) (map[string]string, error)

SetOrganizationEnv calls PUT /api/v1/organizations/{id}/env: a full replace, mirroring PUT /apps/{name}'s own env field semantics.

func (*Client) SetPipelineSync added in v0.2.0

func (c *Client) SetPipelineSync(ctx context.Context, app string, repoIsTruth bool) (PipelineSyncStatus, error)

SetPipelineSync calls PUT /api/v1/apps/{app}/pipeline-sync.

func (*Client) SetPlacement added in v0.2.0

func (c *Client) SetPlacement(ctx context.Context, kind, name string, selector map[string]string) (PlacementResource, error)

SetPlacement calls PUT /api/v1/{apps|databases}/{name}/placement.

func (*Client) SetPlatformUpgradePolicy added in v0.2.0

func (c *Client) SetPlatformUpgradePolicy(ctx context.Context, p DBUpgradePolicy) (DBUpgradePolicy, error)

SetPlatformUpgradePolicy calls PUT /api/v1/settings/database-upgrades.

func (*Client) SetPreview added in v0.2.0

func (c *Client) SetPreview(ctx context.Context, name string, req PreviewSettingsRequest) (PreviewStatus, error)

SetPreview calls PUT /api/v1/apps/{name}/preview.

func (*Client) SetPreviewEnabled

func (c *Client) SetPreviewEnabled(ctx context.Context, appName string, enabled bool) (PreviewSettingsResource, error)

SetPreviewEnabled calls PUT /api/v1/apps/{name}/preview-settings, touching only the enabled toggle: post_pr_comments, if previously set, is left unchanged (SetPreviewSettingsRequest's own doc comment).

func (*Client) SetPreviewPolicy added in v0.2.0

func (c *Client) SetPreviewPolicy(ctx context.Context, appName string, req SetPreviewPolicyRequest) (PreviewPolicyResource, error)

SetPreviewPolicy calls PUT /api/v1/apps/{name}/preview-policy.

func (*Client) SetPreviewPostPRComments

func (c *Client) SetPreviewPostPRComments(ctx context.Context, appName string, enabled bool) (PreviewSettingsResource, error)

SetPreviewPostPRComments calls PUT /api/v1/apps/{name}/preview-settings, touching only the post_pr_comments toggle: enabled, if previously set, is left unchanged.

func (*Client) SetProjectEnv

func (c *Client) SetProjectEnv(ctx context.Context, id string, vars map[string]string) (map[string]string, error)

SetProjectEnv calls PUT /api/v1/projects/{id}/env: a full replace, mirroring PUT /apps/{name}'s own env field semantics.

func (*Client) SetProjectOrganization

func (c *Client) SetProjectOrganization(ctx context.Context, projectID, orgID string) (ProjectResource, error)

SetProjectOrganization calls PUT /api/v1/projects/{id}/organization. An empty orgID clears the assignment. Returns the updated project.

func (*Client) SetRoute53DNS added in v0.2.0

func (c *Client) SetRoute53DNS(ctx context.Context, req UpdateRoute53DNSRequest) (Route53DNSResource, error)

SetRoute53DNS calls PUT /api/v1/settings/route53-dns.

func (*Client) SetSecret

func (c *Client) SetSecret(ctx context.Context, name, key, value string, overwriteLocked bool) error

SetSecret calls PUT /api/v1/apps/{name}/secrets/{key}. No response body beyond the status (internal/api/secrets.go's handleSetSecret returns 204 on success), matching that handler's own doc comment on why a secret's value is never echoed back. overwriteLocked bypasses the server's 409-if-locked guard, the same escape hatch the dashboard's SecretsEditor exposes.

func (*Client) SetSecretLock

func (c *Client) SetSecretLock(ctx context.Context, name, key string, locked bool) error

SetSecretLock calls POST /api/v1/apps/{name}/secrets/{key}/lock: toggles the accidental-overwrite guard SetSecret's overwriteLocked bypasses. Reversible either direction, not a permanent write-once marker.

func (*Client) SetServerAddress added in v0.2.0

func (c *Client) SetServerAddress(ctx context.Context, override ServerAddressPair) (ServerAddress, error)

SetServerAddress calls PUT /api/v1/system/server-address; both empty clears the override.

func (*Client) SetSetupGuideHidden added in v0.2.0

func (c *Client) SetSetupGuideHidden(ctx context.Context, hidden bool) (SetupGuideResource, error)

SetSetupGuideHidden calls PUT /api/v1/setup/guide/visibility.

func (*Client) SetSetupGuideStep added in v0.2.0

func (c *Client) SetSetupGuideStep(ctx context.Context, id, state string) (SetupGuideResource, error)

SetSetupGuideStep calls PUT /api/v1/setup/guide/steps/{id}; state is "skipped", "done" or "todo" (clears an override).

func (*Client) SetSharedEnvSecret added in v0.2.0

func (c *Client) SetSharedEnvSecret(ctx context.Context, scope, id, key, value string) error

SetSharedEnvSecret calls PUT /api/v1/{scope}s/{id}/env/secrets/{key}: encrypts value and marks key secret. No response body beyond the status, matching SetSecret's own "never echo a value back" rule.

func (*Client) SetSupplyChain added in v0.2.0

func (c *Client) SetSupplyChain(ctx context.Context, name string, req SupplyChainSettingsRequest) (SupplyChainSettings, error)

SetSupplyChain calls PUT /api/v1/apps/{name}/supply-chain.

func (*Client) SetTeamMemberRole added in v0.2.0

func (c *Client) SetTeamMemberRole(ctx context.Context, id, userID, role string) error

SetTeamMemberRole calls PUT /api/v1/teams/{id}/members/{user}.

func (*Client) SetUpdateSettings added in v0.2.0

func (c *Client) SetUpdateSettings(ctx context.Context, req UpdateSettingsResource) (UpdateSettingsResource, error)

SetUpdateSettings calls PUT /api/v1/updates/settings.

func (*Client) SetUpgradePolicy added in v0.2.0

func (c *Client) SetUpgradePolicy(ctx context.Context, req UpgradePolicyRequest) (UpgradePolicy, error)

SetUpgradePolicy calls PUT /api/v1/updates/auto.

func (*Client) SetUsageBudget added in v0.2.0

func (c *Client) SetUsageBudget(ctx context.Context, scope, scopeID string, monthly, warnPct float64) (usagecost.Budget, error)

SetUsageBudget calls PUT /api/v1/usage/budgets.

func (*Client) SetUserEnvironmentGrants added in v0.2.0

func (c *Client) SetUserEnvironmentGrants(ctx context.Context, userID string, environmentIDs []string) (EnvironmentGrants, error)

SetUserEnvironmentGrants calls PUT /api/v1/users/{id}/environment-grants.

func (*Client) SetUserRole added in v0.2.0

func (c *Client) SetUserRole(ctx context.Context, userID, roleID string) (UserResource, error)

SetUserRole calls PUT /api/v1/users/{id}/role.

func (*Client) SetVault added in v0.2.0

SetVault calls PUT /api/v1/settings/vault.

func (*Client) SetVolumeBackupPolicy added in v0.2.0

func (c *Client) SetVolumeBackupPolicy(ctx context.Context, name, volume string, p VolumeBackupPolicyResource) (VolumeBackupPolicyResource, error)

SetVolumeBackupPolicy calls PUT /api/v1/apps/{name}/volumes/{volume}/backup-policy.

func (*Client) SetVolumeBackupSchedule

func (c *Client) SetVolumeBackupSchedule(ctx context.Context, name, volume string, req SetVolumeBackupScheduleRequest) (VolumeBackupScheduleResource, error)

SetVolumeBackupSchedule calls PUT /api/v1/apps/{name}/volumes/{volume}/backup-schedule: the app service volume counterpart of SetBackupSchedule.

func (*Client) SetupProxyIntegration added in v0.2.0

func (c *Client) SetupProxyIntegration(ctx context.Context, req ProxySetupRequest) (ProxyIntegration, error)

SetupProxyIntegration runs setup; without Confirm it is a dry run.

func (*Client) SilenceAlertRule added in v0.2.0

func (c *Client) SilenceAlertRule(ctx context.Context, app, ruleID, duration, reason string) (SilenceResource, error)

SilenceAlertRule calls POST /api/v1/apps/{name}/alerts/{id}/silence.

func (*Client) SimulateIAM added in v0.2.0

func (c *Client) SimulateIAM(ctx context.Context, principalType, principalID, action, resource string) (IAMSimulation, error)

SimulateIAM calls GET /api/v1/iam/simulate.

func (*Client) SleepModel added in v0.2.0

func (c *Client) SleepModel(ctx context.Context, name string) error

SleepModel calls POST /api/v1/models/{name}/sleep.

func (*Client) StageAppImport added in v0.2.0

func (c *Client) StageAppImport(ctx context.Context, id string) (AppImportView, error)

StageAppImport calls POST .../sessions/{id}/stage. A blocked preflight is returned as an *APIError with the status 422.

func (*Client) StartApp

func (c *Client) StartApp(ctx context.Context, name string) (AppResource, error)

StartApp calls POST /api/v1/apps/{name}/start: clears the suspended flag StopApp set, letting the reconciler bring the container back.

func (*Client) StartAppImportCutover added in v0.2.0

func (c *Client) StartAppImportCutover(ctx context.Context, session, item string, body ImportCutoverStart) (ImportCutoverRun, error)

StartAppImportCutover calls POST .../items/{item}/cutover/runs.

func (*Client) StartBackupDrill added in v0.2.0

func (c *Client) StartBackupDrill(ctx context.Context, backupID string) (string, error)

StartBackupDrill calls POST /api/v1/backups/drills and returns the drill ID.

func (*Client) StartCanary added in v0.2.0

func (c *Client) StartCanary(ctx context.Context, appName, image string, weight int) (CanaryResource, error)

StartCanary calls POST /api/v1/apps/{name}/canary. A weight of 0 uses the server default.

func (*Client) StartDatabase added in v0.2.0

func (c *Client) StartDatabase(ctx context.Context, name string) (DatabaseResource, error)

StartDatabase calls POST /api/v1/databases/{name}/start: clears the suspended flag StopDatabase set, letting the reconciler bring the container back against the same data volume.

func (*Client) StartDatabaseDataCopy added in v0.2.0

func (c *Client) StartDatabaseDataCopy(ctx context.Context, name string, src DataCopySource) (DataCopyStatus, error)

StartDatabaseDataCopy calls POST /api/v1/imports/platform/databases/{name}/copy.

func (*Client) StartDeviceAuth

func (c *Client) StartDeviceAuth(ctx context.Context, req DeviceStartRequest) (DeviceStartResponse, error)

StartDeviceAuth calls POST /api/v1/auth/device/start. Unauthenticated by design: call it on a Client built with an empty token (NewClient(baseURL, "")).

func (*Client) StartLogArchiveDump added in v0.2.0

func (c *Client) StartLogArchiveDump(ctx context.Context, req LogArchiveDumpRequest) (LogArchiveRun, error)

StartLogArchiveDump calls POST /api/v1/log-archive/dump.

func (*Client) StartMajorUpgrade added in v0.2.0

func (c *Client) StartMajorUpgrade(ctx context.Context, name, version string) (MajorUpgradeResource, error)

StartMajorUpgrade calls POST /api/v1/databases/{name}/major-upgrade.

func (*Client) StartMove added in v0.2.0

func (c *Client) StartMove(ctx context.Context, kind, name, nodeID string) (NodeMoveResource, error)

StartMove calls POST /api/v1/{apps|databases}/{name}/move. kind is "app" or "database"; an empty nodeID lets the scheduler pick.

func (*Client) StartNodeDrain added in v0.2.0

func (c *Client) StartNodeDrain(ctx context.Context, id, targetNodeID string) (NodeDrainResource, error)

StartNodeDrain calls POST /api/v1/nodes/{id}/drain and returns the drain job.

func (*Client) StartPipelineRun added in v0.2.0

func (c *Client) StartPipelineRun(ctx context.Context, app, name string, req PipelineStartRequest) (PipelineRunResource, error)

StartPipelineRun calls POST /api/v1/apps/{app}/pipelines/{name}/runs.

func (*Client) StartProject added in v0.2.0

func (c *Client) StartProject(ctx context.Context, id string) (ProjectLifecycleResult, error)

StartProject calls POST /api/v1/projects/{id}/start: clears the suspended flag StopProject set on every app and database in the project.

func (*Client) StartSelfUpgrade added in v0.2.0

func (c *Client) StartSelfUpgrade(ctx context.Context, target string, ack []string) (SelfUpgradeStarted, error)

StartSelfUpgrade calls POST /api/v1/updates/self-upgrade.

func (*Client) StatusPagePreview added in v0.2.0

func (c *Client) StatusPagePreview(ctx context.Context) (StatusPageView, error)

StatusPagePreview calls GET /api/v1/status-page/preview.

func (*Client) StopApp

func (c *Client) StopApp(ctx context.Context, name string) (AppResource, error)

StopApp calls POST /api/v1/apps/{name}/stop: marks the service suspended, so the reconciler stops (and leaves stopped) its container on the next pass, without touching desired state otherwise.

func (*Client) StopDatabase added in v0.2.0

func (c *Client) StopDatabase(ctx context.Context, name string) (DatabaseResource, error)

StopDatabase calls POST /api/v1/databases/{name}/stop: marks the database suspended, so the reconciler removes its container on the next pass without touching desired state or its data volume otherwise.

func (*Client) StopOrphanedContainer added in v0.2.0

func (c *Client) StopOrphanedContainer(ctx context.Context, name string) error

StopOrphanedContainer calls POST /api/v1/system/containers/{name}/stop. Server-side re-confirms the container isn't Levelrail-managed (409 if it is); use "apps stop" for a managed app instead.

func (*Client) StopProject added in v0.2.0

func (c *Client) StopProject(ctx context.Context, id string) (ProjectLifecycleResult, error)

StopProject calls POST /api/v1/projects/{id}/stop: suspends every app and database filed under the project, mirroring StopApp's own single- resource shape at the project scope.

func (*Client) StreamDatabaseLogs added in v0.2.0

func (c *Client) StreamDatabaseLogs(ctx context.Context, name string, onEntry func(LogStreamEntry) error) error

StreamDatabaseLogs calls GET /api/v1/databases/{name}/logs/stream (internal/api/database_logs.go's handleLiveDatabaseLogStream), the database counterpart to StreamLogs above.

func (*Client) StreamDeployLog added in v0.2.0

func (c *Client) StreamDeployLog(ctx context.Context, name, deployID string, onEntry func(LogStreamEntry) error) error

StreamDeployLog calls GET /api/v1/apps/{name}/deploys/{deployId}/logs (internal/api/deploy_attempts.go's handleDeployLogStream): the same SSE connection the dashboard's deploy log page opens, replaying the attempt's log so far and then tailing live until the attempt finishes, ctx is canceled, or the server closes the connection. Same wire shape and same onEntry contract as StreamLogs above, just a different endpoint.

func (*Client) StreamDeploySteps added in v0.2.0

func (c *Client) StreamDeploySteps(ctx context.Context, name, deployID string, onStep func(DeployStepEvent) error) error

StreamDeploySteps calls GET /api/v1/apps/{name}/deploys/{deployId}/steps and calls onStep for each step event until onStep returns an error (the server holds the connection open after the last step) or ctx is canceled.

func (*Client) StreamDeployments added in v0.2.0

func (c *Client) StreamDeployments(ctx context.Context, onEvent func(DeploymentEvent) error) error

StreamDeployments calls GET /api/v1/deployments/stream and invokes onEvent for each change until onEvent errors or ctx is canceled.

func (*Client) StreamLogs added in v0.2.0

func (c *Client) StreamLogs(ctx context.Context, name string, onEntry func(LogStreamEntry) error) error

StreamLogs calls GET /api/v1/apps/{name}/logs/stream (internal/api/live_logs.go's handleLiveLogStream): an SSE connection that replays a short recent backfill then tails live output until ctx is canceled or the server closes the connection. See streamLogEvents for the onEntry contract and transport details shared with StreamDeployLog below.

func (*Client) StreamModelLogs added in v0.2.0

func (c *Client) StreamModelLogs(ctx context.Context, name string, onEntry func(LogStreamEntry) error) error

StreamModelLogs calls GET /api/v1/models/{name}/logs/stream.

func (*Client) StreamPipelineRunLogs added in v0.2.0

func (c *Client) StreamPipelineRunLogs(ctx context.Context, app, id, job string, onLine func(PipelineLogLine) error) error

StreamPipelineRunLogs follows GET .../pipeline-runs/{id}/logs/stream until the run finishes or ctx is cancelled.

func (*Client) SweepPreviewEnvironments

func (c *Client) SweepPreviewEnvironments(ctx context.Context) (SweepPreviewEnvironmentsResult, error)

SweepPreviewEnvironments calls POST /api/v1/previews/sweep: the manual trigger for the TTL fallback that tears down any preview environment whose pull-request-closed webhook never arrived, cross-app.

func (*Client) TeardownPreviewEnvironment

func (c *Client) TeardownPreviewEnvironment(ctx context.Context, appName string, prNumber int) error

TeardownPreviewEnvironment calls POST /api/v1/apps/{name}/previews/{number}/teardown: the manual safety net alongside a pull request's own automatic close-triggered teardown.

func (*Client) TestBackupTarget

func (c *Client) TestBackupTarget(ctx context.Context, id string) error

TestBackupTarget calls POST /api/v1/backup-targets/{id}/test: probes the target's stored credentials against its configured bucket, without uploading or deleting anything.

func (*Client) TestExistingNotificationChannel

func (c *Client) TestExistingNotificationChannel(ctx context.Context, id string) error

TestExistingNotificationChannel calls POST /api/v1/notification-channels/{id}/test: the same real send, against an already-saved channel's own kind/notify_url.

func (*Client) TestExportDestination added in v0.2.0

func (c *Client) TestExportDestination(ctx context.Context, id string) (ExportTestResult, error)

TestExportDestination calls POST /api/v1/export/destinations/{id}/test.

func (*Client) TestExternalDatabase added in v0.2.0

func (c *Client) TestExternalDatabase(ctx context.Context, req ExternalDatabaseRequest) (ExternalDatabaseProbe, error)

TestExternalDatabase calls POST /api/v1/external-databases/test.

func (*Client) TestNetworkShare added in v0.2.0

func (c *Client) TestNetworkShare(ctx context.Context, id string) error

TestNetworkShare calls POST /api/v1/network-shares/{id}/test: dials the share's host on its protocol's standard port to confirm it's reachable. This is a reachability check only, never an authentication check.

func (*Client) TestNotificationChannel

func (c *Client) TestNotificationChannel(ctx context.Context, kind, notifyURL string) error

TestNotificationChannel calls POST /api/v1/notification-channels/test: fires a real test message via kind/notifyURL without requiring the channel to exist yet.

func (*Client) TestRegistryCredential

func (c *Client) TestRegistryCredential(ctx context.Context, id string) error

TestRegistryCredential calls POST /api/v1/registry-credentials/{id}/test: authenticates the credential's stored username/password against its registry host, without pulling anything.

func (*Client) TestStorageDestination added in v0.2.0

func (c *Client) TestStorageDestination(ctx context.Context, id string) (StorageProbeResult, error)

TestStorageDestination calls POST /api/v1/storage/destinations/{id}/test.

func (*Client) TrafficSummary added in v0.2.0

func (c *Client) TrafficSummary(ctx context.Context) (TrafficSummary, error)

TrafficSummary calls GET /api/v1/traffic/summary.

func (*Client) TransferAppImportImages added in v0.2.0

func (c *Client) TransferAppImportImages(ctx context.Context, id string, body AppImportImagesTransfer) (AppImportImages, error)

TransferAppImportImages calls POST .../sessions/{id}/images/transfer.

func (*Client) TransferTeam added in v0.2.0

func (c *Client) TransferTeam(ctx context.Context, id, userID string) error

TransferTeam calls POST /api/v1/teams/{id}/transfer.

func (*Client) TriggerBackup

func (c *Client) TriggerBackup(ctx context.Context, name, targetID string) (BackupHistoryResource, error)

TriggerBackup calls POST /api/v1/databases/{name}/backups: starts a real backup of name to targetID and returns as soon as the attempt is recorded and under way, not once the dump and upload actually finish. ListBackups is how a caller finds out whether it did.

func (*Client) TriggerBaseBackup added in v0.2.0

func (c *Client) TriggerBaseBackup(ctx context.Context, name, targetID string) (BaseBackupHistoryResource, error)

TriggerBaseBackup calls POST /api/v1/databases/{name}/base-backups: starts a real physical base backup, the point-in-time-restore counterpart of TriggerBackup.

func (*Client) TriggerBuild

func (c *Client) TriggerBuild(ctx context.Context, name string, req BuildTriggerRequest) (BuildTriggerResponse, error)

TriggerBuild calls POST /api/v1/apps/{name}/builds.

func (*Client) TriggerCloneRestore

func (c *Client) TriggerCloneRestore(ctx context.Context, name string, req TriggerCloneRestoreRequest) (CloneRestoreResource, error)

TriggerCloneRestore calls POST /api/v1/databases/{name}/restore-as-new: the non-destructive counterpart to TriggerRestore above. Creates a brand-new database and restores a previously succeeded backup of name into it, never touching name's own live data.

func (*Client) TriggerPITRRestore added in v0.2.0

func (c *Client) TriggerPITRRestore(ctx context.Context, name, baseBackupID, targetTime string) (PITRRestoreHistoryResource, error)

TriggerPITRRestore calls POST /api/v1/databases/{name}/pitr-restore: starts a real point-in-time restore to targetTime, replaying archived WAL forward from baseBackupID.

func (*Client) TriggerRestore

func (c *Client) TriggerRestore(ctx context.Context, name, backupID string) (RestoreHistoryResource, error)

TriggerRestore calls POST /api/v1/databases/{name}/restore: overwrites name's live data in place from a previously succeeded backup attempt. The single most destructive call this Client makes; callers must gate this behind their own explicit confirmation before ever reaching it.

func (*Client) TriggerVolumeBackup

func (c *Client) TriggerVolumeBackup(ctx context.Context, name, volume, targetID string) (BackupHistoryResource, error)

TriggerVolumeBackup calls POST /api/v1/apps/{name}/volumes/{volume}/backups: the app service volume counterpart of TriggerBackup.

func (*Client) TriggerVolumeCloneRestore

func (c *Client) TriggerVolumeCloneRestore(ctx context.Context, name, volume string, req TriggerVolumeCloneRestoreRequest) (VolumeCloneRestoreResource, error)

TriggerVolumeCloneRestore calls POST /api/v1/apps/{name}/volumes/{volume}/restore-as-new: the app service volume counterpart of TriggerCloneRestore. Creates a brand-new, standalone Docker volume and restores a previously succeeded backup of name/volume into it, never touching that volume's own live contents.

func (*Client) TriggerVolumeRestore

func (c *Client) TriggerVolumeRestore(ctx context.Context, name, volume, backupID string) (RestoreHistoryResource, error)

TriggerVolumeRestore calls POST /api/v1/apps/{name}/volumes/{volume}/restore: overwrites the named app service volume's live contents in place from a previously succeeded backup attempt, the app service volume counterpart of TriggerRestore. The same "single most destructive call" warning TriggerRestore's own doc comment gives applies identically here.

func (*Client) UncordonNode

func (c *Client) UncordonNode(ctx context.Context, id string) (NodeResource, error)

UncordonNode calls POST /api/v1/nodes/{id}/uncordon: the inverse of CordonNode.

func (*Client) UndoAutomationRun added in v0.2.0

func (c *Client) UndoAutomationRun(ctx context.Context, id string) (UndoResult, error)

UndoAutomationRun calls POST /api/v1/domains/automation/runs/{id}/undo.

func (*Client) UnrestrictDomainPort added in v0.2.0

func (c *Client) UnrestrictDomainPort(ctx context.Context, name, domain string, port int) (DomainPortsResource, error)

UnrestrictDomainPort calls DELETE .../ports/{port}/restrict.

func (*Client) UpdateAIAssistantSettings added in v0.2.0

func (c *Client) UpdateAIAssistantSettings(ctx context.Context, req UpdateAIAssistantSettingsRequest) (AIAssistantSettingsResource, error)

UpdateAIAssistantSettings calls PUT /api/v1/settings/ai-assistant.

func (*Client) UpdateAIControl added in v0.2.0

func (c *Client) UpdateAIControl(ctx context.Context, req UpdateAIControlRequest) (AIControlResource, error)

UpdateAIControl calls PUT /api/v1/settings/ai-control.

func (*Client) UpdateAlertRule added in v0.2.0

func (c *Client) UpdateAlertRule(ctx context.Context, name, id string, req UpdateAlertRuleRequest) (AlertRuleResource, error)

UpdateAlertRule calls PUT /api/v1/apps/{name}/alerts/{id}: a full replace of the rule's configuration.

func (*Client) UpdateApp added in v0.2.0

func (c *Client) UpdateApp(ctx context.Context, name string, app AppResource) (AppResource, error)

UpdateApp calls PUT /api/v1/apps/{name} with the full app, returning the saved app. The server replaces the whole desired state, so callers should start from GetApp and change only the fields they mean to.

func (*Client) UpdateBackupTarget

func (c *Client) UpdateBackupTarget(ctx context.Context, id string, req UpdateBackupTargetRequest) (BackupTargetResource, error)

UpdateBackupTarget calls PUT /api/v1/backup-targets/{id}: a full replace of name/provider/endpoint/region/bucket, matching handleUpdateBackupTarget's own contract. Credentials rotate only when req carries both AccessKeyID and SecretAccessKey.

func (*Client) UpdateCodeLoginSettings added in v0.2.0

func (c *Client) UpdateCodeLoginSettings(ctx context.Context, in CodeLoginSettingsUpdate) (CodeLoginSettings, error)

UpdateCodeLoginSettings calls PUT /api/v1/settings/auth/code-login (root).

func (*Client) UpdateControlPlaneDR added in v0.2.0

func (c *Client) UpdateControlPlaneDR(ctx context.Context, s ControlPlaneDRSettings) (ControlPlaneDR, error)

UpdateControlPlaneDR calls PUT /api/v1/system/control-plane-dr/settings.

func (*Client) UpdateDNSRecord added in v0.2.0

func (c *Client) UpdateDNSRecord(ctx context.Context, name, domain string, req UpdateDNSRecordRequest) (DNSRecordsResponse, error)

UpdateDNSRecord calls PUT .../dns-records: replaces one exact record (req.Original) with a new value (req.Record).

func (*Client) UpdateDNSZoneRecord added in v0.2.0

func (c *Client) UpdateDNSZoneRecord(ctx context.Context, provider, zone string, original DNSRecordKey, rs DNSRecordSet) (DNSRecordWrite, error)

UpdateDNSZoneRecord calls PUT /api/v1/dns/zones/{zone}/records.

func (*Client) UpdateDashboardURL added in v0.2.0

func (c *Client) UpdateDashboardURL(ctx context.Context, req DashboardURLResource) (DashboardURLResource, error)

UpdateDashboardURL calls PUT /api/v1/settings/dashboard-url.

func (*Client) UpdateDockerGuard added in v0.2.0

func (c *Client) UpdateDockerGuard(ctx context.Context, req UpdateDockerGuardRequest) (DockerGuardResource, error)

UpdateDockerGuard calls PUT /api/v1/system/docker-guard.

func (*Client) UpdateDomainAutomation added in v0.2.0

func (c *Client) UpdateDomainAutomation(ctx context.Context, p DomainAutomationOverride) (DomainAutomationResource, error)

UpdateDomainAutomation calls PUT /api/v1/settings/domain-automation.

func (*Client) UpdateEmailSettings added in v0.2.0

func (c *Client) UpdateEmailSettings(ctx context.Context, req EmailSettingsResource) (EmailSettingsResource, error)

UpdateEmailSettings calls PUT /api/v1/settings/email.

func (*Client) UpdateEnvSettings added in v0.2.0

func (c *Client) UpdateEnvSettings(ctx context.Context, app string, in EnvSettingsUpdate) (EnvSettings, error)

UpdateEnvSettings calls PUT /api/v1/apps/{name}/env/settings.

func (*Client) UpdateEnvironment

func (c *Client) UpdateEnvironment(ctx context.Context, id string, req UpdateEnvironmentRequest) (EnvironmentResource, error)

UpdateEnvironment calls PATCH /api/v1/environments/{id}.

func (*Client) UpdateExportDestination added in v0.2.0

func (c *Client) UpdateExportDestination(ctx context.Context, id string, req UpdateExportDestinationRequest) (ExportDestinationResource, error)

UpdateExportDestination calls PATCH /api/v1/export/destinations/{id}.

func (*Client) UpdateFeatureFlag

func (c *Client) UpdateFeatureFlag(ctx context.Context, name, id string, req FeatureFlagRequest) (FeatureFlagResource, error)

UpdateFeatureFlag calls PUT /api/v1/apps/{name}/flags/{id}: a full replace of Name/Description/Enabled/RolloutPercentage, not a partial patch, matching handleUpdateFeatureFlag's own contract. Key is never updated once created.

func (*Client) UpdateIngressSettings added in v0.2.0

func (c *Client) UpdateIngressSettings(ctx context.Context, req IngressSettingsResource) (IngressSettingsResource, error)

UpdateIngressSettings calls PUT /api/v1/settings/ingress.

func (*Client) UpdateJob added in v0.2.0

func (c *Client) UpdateJob(ctx context.Context, app, id string, req ScheduledTaskRequest) (ScheduledTaskResource, error)

UpdateJob calls PUT /api/v1/apps/{name}/jobs/{id}. Fields the request leaves out keep their stored value.

func (*Client) UpdateMaintenanceWindow added in v0.2.0

func (c *Client) UpdateMaintenanceWindow(ctx context.Context, id string, req MaintenanceWindowResource) (MaintenanceWindowResource, error)

UpdateMaintenanceWindow calls PUT /api/v1/alert-maintenance-windows/{id}.

func (*Client) UpdateMeshSettings added in v0.2.0

func (c *Client) UpdateMeshSettings(ctx context.Context, req UpdateMeshSettingsRequest) (MeshSettings, error)

UpdateMeshSettings calls PUT /api/v1/mesh/settings.

func (*Client) UpdateNetworkShare added in v0.2.0

func (c *Client) UpdateNetworkShare(ctx context.Context, id string, req UpdateNetworkShareRequest) (NetworkShareResource, error)

UpdateNetworkShare calls PUT /api/v1/network-shares/{id}: a full replace of name/protocol/host/remote_path/mount_options/username. A blank Password in req keeps the share's existing stored password.

func (*Client) UpdateNotificationChannel added in v0.2.0

func (c *Client) UpdateNotificationChannel(ctx context.Context, id string, req UpdateNotificationChannelRequest) (NotificationChannelResource, error)

UpdateNotificationChannel calls PUT /api/v1/notification-channels/{id}: a full replace of the channel's configuration.

func (*Client) UpdateOAuthProviderSettings added in v0.2.0

func (c *Client) UpdateOAuthProviderSettings(ctx context.Context, provider string, req UpdateOAuthProviderSettingsRequest) (OAuthProviderSettingsResource, error)

UpdateOAuthProviderSettings calls PUT /api/v1/settings/oauth/{provider}.

func (*Client) UpdatePipeline added in v0.2.0

func (c *Client) UpdatePipeline(ctx context.Context, app, name string, req PipelineSaveRequest) (PipelineResource, error)

UpdatePipeline calls PUT /api/v1/apps/{app}/pipelines/{name}.

func (*Client) UpdatePolicy

func (c *Client) UpdatePolicy(ctx context.Context, id string, req PolicyRequest) (PolicyResource, error)

UpdatePolicy calls PUT /api/v1/iam/policies/{id}.

func (*Client) UpdateProxyIntegrationSettings added in v0.2.0

func (c *Client) UpdateProxyIntegrationSettings(ctx context.Context, s ProxyIntegrationSettings) (ProxyIntegrationSettings, error)

UpdateProxyIntegrationSettings replaces the settings.

func (*Client) UpdateRegistryCredential

func (c *Client) UpdateRegistryCredential(ctx context.Context, id string, req UpdateRegistryCredentialRequest) (RegistryCredentialResource, error)

UpdateRegistryCredential calls PUT /api/v1/registry-credentials/{id}: a full replace of name/registry_host/username, matching handleUpdateRegistryCredential's own contract. The password rotates only when req carries one.

func (*Client) UpdateRegistrySettings

func (c *Client) UpdateRegistrySettings(ctx context.Context, req UpdateRegistrySettingsRequest) (RegistrySettingsResource, error)

UpdateRegistrySettings calls PUT /api/v1/settings/registry.

func (*Client) UpdateRole added in v0.2.0

func (c *Client) UpdateRole(ctx context.Context, id string, req RoleRequest) (RoleResource, error)

UpdateRole calls PUT /api/v1/roles/{id}.

func (*Client) UpdateScheduledTask

func (c *Client) UpdateScheduledTask(ctx context.Context, name, id string, req ScheduledTaskRequest) (ScheduledTaskResource, error)

UpdateScheduledTask calls PUT /api/v1/apps/{name}/scheduled-tasks/{id}: a full replace of Command/Schedule/Enabled, not a partial patch, matching handleUpdateScheduledTask's own contract.

func (*Client) UpdateSecurityPolicy added in v0.2.0

func (c *Client) UpdateSecurityPolicy(ctx context.Context, in SecurityPolicyUpdate) (SecurityPolicy, error)

UpdateSecurityPolicy calls PUT /api/v1/security/policy (root).

func (*Client) UpdateStandaloneDomain added in v0.2.0

func (c *Client) UpdateStandaloneDomain(ctx context.Context, domain string, req StandaloneDomainRequest) (StandaloneDomain, error)

UpdateStandaloneDomain calls PUT /api/v1/domains/standalone/{domain}.

func (*Client) UpdateUsageSettings added in v0.2.0

func (c *Client) UpdateUsageSettings(ctx context.Context, u UsageSettingsUpdate) (UsageSettings, error)

UpdateUsageSettings calls PUT /api/v1/usage/settings.

func (*Client) UpdateUserAbilities

func (c *Client) UpdateUserAbilities(ctx context.Context, id string, req UpdateUserAbilitiesRequest) (UserResource, error)

UpdateUserAbilities calls PUT /api/v1/users/{id}/abilities.

func (*Client) UpgradeBackupNow added in v0.2.0

func (c *Client) UpgradeBackupNow(ctx context.Context) (UpgradeBackupNowResult, error)

UpgradeBackupNow calls POST /api/v1/updates/backup-now.

func (*Client) UpgradeDatabaseNow added in v0.2.0

func (c *Client) UpgradeDatabaseNow(ctx context.Context, name, version, confirm string) (DBUpgradeRun, error)

UpgradeDatabaseNow calls POST /api/v1/databases/{name}/upgrade-now.

func (*Client) UseBitbucketRepoAsSource added in v0.2.0

func (c *Client) UseBitbucketRepoAsSource(ctx context.Context, workspace, repoSlug string, req UseRepoAsSourceRequest) (GitSourceResource, error)

UseBitbucketRepoAsSource calls POST /api/v1/bitbucket-app/repos/{workspace}/{repoSlug}/use-as-source.

func (*Client) UseGitHubRepoAsSource added in v0.2.0

func (c *Client) UseGitHubRepoAsSource(ctx context.Context, owner, repo string, req UseRepoAsSourceRequest) (UseGitHubRepoAsSourceResponse, error)

UseGitHubRepoAsSource calls POST /api/v1/github-app/repos/{owner}/{repo}/use-as-source: connects the repo as req.AppName's git source and registers a push webhook.

func (*Client) UseGitLabProjectAsSource added in v0.2.0

func (c *Client) UseGitLabProjectAsSource(ctx context.Context, projectID int64, req UseRepoAsSourceRequest) (GitSourceResource, error)

UseGitLabProjectAsSource calls POST /api/v1/gitlab-app/projects/{id}/use-as-source.

func (*Client) UseGiteaRepoAsSource added in v0.2.0

func (c *Client) UseGiteaRepoAsSource(ctx context.Context, owner, repo string, req UseRepoAsSourceRequest) (GitSourceResource, error)

UseGiteaRepoAsSource calls POST /api/v1/gitea-app/repos/{owner}/{repo}/use-as-source.

func (*Client) ValidatePipeline added in v0.2.0

func (c *Client) ValidatePipeline(ctx context.Context, yamlText string) (PipelineValidation, error)

ValidatePipeline calls POST /api/v1/pipelines/validate.

func (*Client) VerifyAppImport added in v0.2.0

func (c *Client) VerifyAppImport(ctx context.Context, id string, items []string) (AppImportView, error)

VerifyAppImport calls POST .../sessions/{id}/verify.

func (*Client) VerifyBackup

func (c *Client) VerifyBackup(ctx context.Context, name, historyID string) (BackupVerificationResource, error)

VerifyBackup calls POST /api/v1/databases/{name}/backups/{historyId}/verify: re-downloads a previously succeeded backup and checks it for corruption, returning as soon as the attempt is recorded and under way, not once the download and checks actually finish. ListBackupVerifications is how a caller finds out whether it passed.

func (*Client) VerifyControlPlaneBackup added in v0.2.0

func (c *Client) VerifyControlPlaneBackup(ctx context.Context, name string) (ControlPlaneBackupVerification, error)

VerifyControlPlaneBackup calls POST /api/v1/system/backups/{name}/verify. A failed check is a normal response with ok false, not an error.

func (*Client) VerifyProxyIntegration added in v0.2.0

func (c *Client) VerifyProxyIntegration(ctx context.Context, domain string) (ProxyIntegration, error)

VerifyProxyIntegration probes every route, or only domain when set.

func (*Client) VerifyVolumeBackup

func (c *Client) VerifyVolumeBackup(ctx context.Context, name, volume, historyID string) (BackupVerificationResource, error)

VerifyVolumeBackup calls POST /api/v1/apps/{name}/volumes/{volume}/backups/{historyId}/verify: the app service volume counterpart of VerifyBackup.

func (*Client) WaitForDeploy added in v0.2.0

func (c *Client) WaitForDeploy(ctx context.Context, name, deployID string, opts WaitOptions) (WaitResult, error)

WaitForDeploy polls one deploy until it is healthy, failed, canceled, superseded or blocked, or the window elapses. An empty or "latest" deployID is resolved once to a concrete id, so a newer deploy cannot take over the wait.

func (*Client) WakeApp added in v0.2.0

func (c *Client) WakeApp(ctx context.Context, appName string) (AppSleepResource, error)

WakeApp calls POST /api/v1/apps/{name}/sleep/wake.

func (*Client) WakeModel added in v0.2.0

func (c *Client) WakeModel(ctx context.Context, name string) error

WakeModel calls POST /api/v1/models/{name}/wake.

func (*Client) Whoami added in v0.2.0

func (c *Client) Whoami(ctx context.Context) (WhoamiResource, error)

Whoami calls GET /api/v1/auth/whoami, which accepts a bearer token as well as a session cookie.

type CloneAppRequest added in v0.2.0

type CloneAppRequest struct {
	NewName       string `json:"new_name"`
	CopySecrets   bool   `json:"copy_secrets,omitempty"`
	Domains       string `json:"domains,omitempty"`
	DomainSuffix  string `json:"domain_suffix,omitempty"`
	EnvironmentID string `json:"environment_id,omitempty"`
}

CloneAppRequest mirrors internal/api's cloneAppRequest (internal/api/apps_clone.go): POST /api/v1/apps/{name}/clone's request body.

type ClonePreview added in v0.2.0

type ClonePreview struct {
	Source      string   `json:"source"`
	WillCopy    []string `json:"will_copy"`
	WillNotCopy []string `json:"will_not_copy"`
	SecretNames []string `json:"secret_names"`
	Domains     []string `json:"source_domains"`
}

ClonePreview is GET /api/v1/apps/{name}/clone/preview's body.

type CloneRestoreResource

type CloneRestoreResource struct {
	ID                 string `json:"id"`
	SourceDatabaseName string `json:"source_database_name"`
	NewDatabaseName    string `json:"new_database_name"`
	BackupHistoryID    string `json:"backup_history_id"`
	Status             string `json:"status"`
	Error              string `json:"error,omitempty"`
	StartedAt          string `json:"started_at"`
	FinishedAt         string `json:"finished_at,omitempty"`
}

CloneRestoreResource mirrors internal/api's cloneRestoreResource (internal/api/database_clone_restore.go): one "restore as new database" attempt.

type CloudflareDNSResource

type CloudflareDNSResource struct {
	Enabled  bool `json:"enabled"`
	HasToken bool `json:"has_token"`
}

CloudflareDNSResource mirrors internal/api's cloudflareDNSResource (internal/api/cloudflare_dns.go): GET/PUT/DELETE /api/v1/settings/cloudflare-dns's wire shape. The token itself never appears here in either direction.

type CloudflareTunnelResource

type CloudflareTunnelResource struct {
	Enabled  bool   `json:"enabled"`
	HasToken bool   `json:"has_token"`
	Status   string `json:"status"`
	Message  string `json:"message,omitempty"`
}

CloudflareTunnelResource mirrors internal/api's cloudflareTunnelResource (internal/api/cloudflare_tunnel.go): GET/PUT/DELETE /api/v1/settings/cloudflare-tunnel's wire shape. The token itself never appears here in either direction. A distinct credential and endpoint from CloudflareDNSResource: this one runs the cloudflared container, that one configures ACME's DNS-01 challenge.

type CodeLoginSettings added in v0.2.0

type CodeLoginSettings struct {
	Admins            bool `json:"admins"`
	Others            bool `json:"others"`
	Saved             bool `json:"saved"`
	NewDeviceApproval bool `json:"new_device_approval"`
}

CodeLoginSettings mirrors internal/api's codeLoginSettingsResource.

type CodeLoginSettingsUpdate added in v0.2.0

type CodeLoginSettingsUpdate struct {
	Admins *bool `json:"admins,omitempty"`
	Others *bool `json:"others,omitempty"`
}

CodeLoginSettingsUpdate is the PUT body; nil fields keep their value.

type ComposeDeployResult

type ComposeDeployResult struct {
	AppID    string        `json:"app_id"`
	Services []AppResource `json:"services"`
}

ComposeDeployResult mirrors internal/api's composeDeployResponse (internal/api/apps_compose.go).

type ComposeDownResult added in v0.2.0

type ComposeDownResult struct {
	AppID           string   `json:"app_id"`
	Removed         []string `json:"removed"`
	TeardownPending []string `json:"teardown_pending,omitempty"`
	VolumesKept     []string `json:"volumes_kept,omitempty"`
	VolumesRemoved  []string `json:"volumes_removed,omitempty"`
	VolumeErrors    []string `json:"volume_errors,omitempty"`
}

ComposeDownResult mirrors DELETE /api/v1/apps/{name}/compose.

type ComposePreview added in v0.2.0

type ComposePreview struct {
	Valid    bool     `json:"valid"`
	Errors   []string `json:"errors,omitempty"`
	Services []struct {
		Key       string   `json:"key"`
		Image     string   `json:"image,omitempty"`
		Port      int      `json:"port,omitempty"`
		Domain    string   `json:"domain,omitempty"`
		Volumes   []string `json:"volumes,omitempty"`
		DependsOn []string `json:"depends_on,omitempty"`
		Env       []struct {
			Key       string `json:"key"`
			Generated bool   `json:"generated,omitempty"`
			Required  bool   `json:"required,omitempty"`
		} `json:"env,omitempty"`
	} `json:"services"`
	Profiles []string `json:"profiles,omitempty"`
	Skipped  []string `json:"skipped_services,omitempty"`
	Warnings []string `json:"warnings,omitempty"`
	Notices  []struct {
		Level   string `json:"level"`
		Message string `json:"message"`
	} `json:"notices,omitempty"`
	NeedsRoot bool `json:"needs_root,omitempty"`
}

ComposePreview mirrors POST /api/v1/compose/preview.

type ComposeRevision added in v0.2.0

type ComposeRevision struct {
	Revision   int      `json:"revision"`
	Source     string   `json:"source"`
	TemplateID string   `json:"template_id,omitempty"`
	Profiles   []string `json:"profiles,omitempty"`
	CreatedBy  string   `json:"created_by,omitempty"`
	CreatedAt  string   `json:"created_at"`
	Compose    string   `json:"compose,omitempty"`
}

ComposeRevision mirrors one compose revision.

type ComposeRollbackResult added in v0.2.0

type ComposeRollbackResult struct {
	AppID        string             `json:"app_id"`
	RolledBackTo int                `json:"rolled_back_to"`
	Deploy       ComposeStackDeploy `json:"deploy"`
}

ComposeRollbackResult mirrors POST /api/v1/apps/{name}/compose/rollback.

type ComposeStack added in v0.2.0

type ComposeStack struct {
	AppID      string                `json:"app_id"`
	Phase      string                `json:"phase"`
	Revision   int                   `json:"revision,omitempty"`
	DeployedAt string                `json:"deployed_at,omitempty"`
	Source     string                `json:"source,omitempty"`
	TemplateID string                `json:"template_id,omitempty"`
	Profiles   []string              `json:"profiles,omitempty"`
	Services   []ComposeStackService `json:"services"`
}

ComposeStack mirrors GET /api/v1/apps/{name}/compose.

type ComposeStackDeploy added in v0.2.0

type ComposeStackDeploy struct {
	AppID    string        `json:"app_id"`
	Services []AppResource `json:"services"`
	Notices  []struct {
		Level   string `json:"level"`
		Message string `json:"message"`
	} `json:"notices,omitempty"`
	Revision int      `json:"revision,omitempty"`
	Skipped  []string `json:"skipped_services,omitempty"`
}

ComposeStackDeploy is a compose deploy response with its revision.

type ComposeStackService added in v0.2.0

type ComposeStackService struct {
	Key              string   `json:"key"`
	Name             string   `json:"name"`
	Image            string   `json:"image"`
	Port             int      `json:"port,omitempty"`
	Domains          []string `json:"domains,omitempty"`
	DependsOn        []string `json:"depends_on,omitempty"`
	DependsOnHealthy []string `json:"depends_on_healthy,omitempty"`
	Volumes          []string `json:"volumes,omitempty"`
	Replicas         int      `json:"replicas"`
	Suspended        bool     `json:"suspended,omitempty"`
	Ready            string   `json:"ready"`
	Reason           string   `json:"reason,omitempty"`
	Message          string   `json:"message,omitempty"`
	Since            string   `json:"since,omitempty"`
}

ComposeStackService mirrors one entry of GET /api/v1/apps/{name}/compose.

type ConditionResource

type ConditionResource struct {
	Type               string    `json:"Type"`
	Status             string    `json:"Status"`
	Reason             string    `json:"Reason"`
	Message            string    `json:"Message"`
	LastTransitionTime time.Time `json:"LastTransitionTime"`
}

ConditionResource mirrors internal/reconcile.Condition, the wire shape both GET /api/v1/apps/{name}/deploys (internal/api/deploys.go's handleDeployHistory) and GET /api/v1/databases/{name}/status (internal/api/databases.go's handleDatabaseStatus) return. The source type carries no json struct tags, so its field names are the wire field names verbatim; the tags here just make that explicit rather than relying on encoding/json's case-insensitive match.

type ConnectableDatabaseResource added in v0.2.0

type ConnectableDatabaseResource struct {
	Name             string   `json:"name"`
	Engine           string   `json:"engine"`
	NodeID           string   `json:"node_id,omitempty"`
	CrossNode        bool     `json:"cross_node"`
	AlreadyConnected bool     `json:"already_connected"`
	ConnectedEnvVars []string `json:"connected_env_vars,omitempty"`
}

ConnectableDatabaseResource mirrors internal/api's connectableDatabaseResource: GET /api/v1/apps/{name}/connectable-databases' wire shape for one candidate database.

type ContainerPortResource

type ContainerPortResource struct {
	ContainerPort int    `json:"container_port"`
	HostPort      int    `json:"host_port"`
	Protocol      string `json:"protocol"`
}

ContainerPortResource mirrors internal/api's containerPortResource.

type ContainerResource

type ContainerResource struct {
	Name    string                  `json:"name"`
	Image   string                  `json:"image"`
	Running bool                    `json:"running"`
	Ports   []ContainerPortResource `json:"ports"`
}

ContainerResource mirrors internal/api's containerResource (internal/api/containers.go): every container on this node, Levelrail-managed or not. Read-only, no id: see that file's own doc comment on why a stop/restart action doesn't belong on this endpoint.

type ControlPlaneBackup added in v0.2.0

type ControlPlaneBackup struct {
	Name      string `json:"name"`
	SizeBytes int64  `json:"size_bytes"`
	CreatedAt string `json:"created_at"`
	SHA256    string `json:"sha256"`
	// VerifiedAt and VerifiedOK are set once the snapshot has been verified.
	VerifiedAt string `json:"verified_at,omitempty"`
	VerifiedOK *bool  `json:"verified_ok,omitempty"`
}

ControlPlaneBackup mirrors internal/cpbackup.Info: one control plane database snapshot.

type ControlPlaneBackupCheck added in v0.2.0

type ControlPlaneBackupCheck struct {
	Name   string `json:"name"`
	OK     bool   `json:"ok"`
	Detail string `json:"detail"`
}

ControlPlaneBackupCheck is one step of a backup verification.

type ControlPlaneBackupVerification added in v0.2.0

type ControlPlaneBackupVerification struct {
	Name       string                    `json:"name"`
	OK         bool                      `json:"ok"`
	Checks     []ControlPlaneBackupCheck `json:"checks"`
	VerifiedAt string                    `json:"verified_at"`
}

ControlPlaneBackupVerification mirrors internal/cpbackup.VerifyResult.

type ControlPlaneDR added in v0.2.0

type ControlPlaneDR struct {
	Enabled                 bool                    `json:"enabled"`
	Configured              bool                    `json:"configured"`
	TargetID                string                  `json:"target_id"`
	TargetName              string                  `json:"target_name,omitempty"`
	InstallID               string                  `json:"install_id"`
	Recipients              []string                `json:"recipients"`
	Schedule                string                  `json:"schedule"`
	DrillSchedule           string                  `json:"drill_schedule"`
	RetainDaily             int                     `json:"retain_daily"`
	RetainWeekly            int                     `json:"retain_weekly"`
	RetainMonthly           int                     `json:"retain_monthly"`
	EscrowTargetID          string                  `json:"escrow_target_id"`
	EscrowGeneratedAt       string                  `json:"escrow_generated_at,omitempty"`
	EscrowAckedAt           string                  `json:"escrow_acked_at,omitempty"`
	NextBackupAt            string                  `json:"next_backup_at,omitempty"`
	NextDrillAt             string                  `json:"next_drill_at,omitempty"`
	LastBackupAt            string                  `json:"last_backup_at,omitempty"`
	LastBackupKey           string                  `json:"last_backup_key,omitempty"`
	LastBackupError         string                  `json:"last_backup_error,omitempty"`
	LastAttemptAt           string                  `json:"last_attempt_at,omitempty"`
	LastDrill               ControlPlaneDRDrill     `json:"last_drill"`
	DrillIdentityConfigured bool                    `json:"drill_identity_configured"`
	BackupRunning           bool                    `json:"backup_running"`
	DrillRunning            bool                    `json:"drill_running"`
	Checklist               ControlPlaneDRChecklist `json:"checklist"`
	Warnings                []ControlPlaneDRWarning `json:"warnings"`
}

ControlPlaneDR mirrors internal/cpbackup.Status: off-box backup configuration and health. It carries public recipients only.

type ControlPlaneDRChecklist added in v0.2.0

type ControlPlaneDRChecklist struct {
	DestinationChosen  bool `json:"destination_chosen"`
	RecipientSet       bool `json:"recipient_set"`
	EscrowAcknowledged bool `json:"escrow_acknowledged"`
	DrillPassed        bool `json:"drill_passed"`
}

ControlPlaneDRChecklist mirrors internal/cpbackup.Checklist.

type ControlPlaneDRDrill added in v0.2.0

type ControlPlaneDRDrill struct {
	At         string `json:"at,omitempty"`
	OK         bool   `json:"ok"`
	Partial    bool   `json:"partial"`
	Detail     string `json:"detail"`
	DurationMs int64  `json:"duration_ms"`
}

ControlPlaneDRDrill mirrors internal/cpbackup.DrillStatus.

type ControlPlaneDRSettings added in v0.2.0

type ControlPlaneDRSettings struct {
	Enabled        bool     `json:"enabled"`
	TargetID       string   `json:"target_id"`
	Recipients     []string `json:"recipients"`
	Schedule       string   `json:"schedule"`
	DrillSchedule  string   `json:"drill_schedule"`
	RetainDaily    int      `json:"retain_daily"`
	RetainWeekly   int      `json:"retain_weekly"`
	RetainMonthly  int      `json:"retain_monthly"`
	EscrowTargetID string   `json:"escrow_target_id"`
}

ControlPlaneDRSettings is the body of PUT /system/control-plane-dr/settings.

type ControlPlaneDRWarning added in v0.2.0

type ControlPlaneDRWarning struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

ControlPlaneDRWarning mirrors internal/cpbackup.Warning.

type ControlPlaneEscrowBundle added in v0.2.0

type ControlPlaneEscrowBundle struct {
	Armored        string `json:"armored"`
	Instructions   string `json:"instructions"`
	Fingerprint    string `json:"fingerprint"`
	RecipientCount int    `json:"recipient_count"`
	CreatedAt      string `json:"created_at"`
	UploadedKey    string `json:"uploaded_key,omitempty"`
}

ControlPlaneEscrowBundle mirrors internal/cpbackup.EscrowBundle.

type ControlPlaneOffboxBackup added in v0.2.0

type ControlPlaneOffboxBackup struct {
	Key         string `json:"key"`
	ManifestKey string `json:"manifest_key"`
	CreatedAt   string `json:"created_at"`
	SizeBytes   int64  `json:"size_bytes"`
	Complete    bool   `json:"complete"`
}

ControlPlaneOffboxBackup mirrors internal/cpbackup.Remote.

type CostEstimateProviderResource added in v0.2.0

type CostEstimateProviderResource struct {
	Key            string  `json:"key"`
	Label          string  `json:"label"`
	CPUCostUSD     float64 `json:"cpu_cost_usd"`
	MemoryCostUSD  float64 `json:"memory_cost_usd"`
	TotalUSD       float64 `json:"total_usd"`
	MinimumApplied bool    `json:"minimum_applied"`
}

CostEstimateProviderResource mirrors internal/api's costEstimateProviderResource: one reference provider's resulting monthly estimate.

type CostEstimateResource added in v0.2.0

type CostEstimateResource struct {
	ServiceName string                         `json:"service_name"`
	VCPUCores   float64                        `json:"vcpu_cores"`
	MemoryGiB   float64                        `json:"memory_gib"`
	CPUBasis    string                         `json:"cpu_basis"`
	MemoryBasis string                         `json:"memory_basis"`
	Providers   []CostEstimateProviderResource `json:"providers"`
	Note        string                         `json:"note"`
}

CostEstimateResource mirrors internal/api's costEstimateResource: the response shape for GET /api/v1/apps/{name}/cost-estimate (internal/api/cost_estimate.go), a deterministic "what this would cost elsewhere" estimate (internal/costestimate) derived from the app's declared or observed CPU/memory. Note always restates that this is an estimate, not a real bill.

type CoverageRowResource added in v0.2.0

type CoverageRowResource struct {
	Kind            string `json:"kind"`
	AppName         string `json:"app_name,omitempty"`
	Name            string `json:"name"`
	Scratch         bool   `json:"scratch,omitempty"`
	State           string `json:"state"`
	Reason          string `json:"reason,omitempty"`
	PrimaryAction   string `json:"primary_action"`
	Schedule        string `json:"schedule,omitempty"`
	TargetID        string `json:"target_id,omitempty"`
	NextRun         string `json:"next_run,omitempty"`
	LastBackupAt    string `json:"last_backup_at,omitempty"`
	LastVerifiedAt  string `json:"last_verified_at,omitempty"`
	TotalBytes      int64  `json:"total_bytes"`
	BackupCount     int    `json:"backup_count"`
	Encrypted       bool   `json:"encrypted"`
	ProtectionLevel string `json:"protection_level,omitempty"`
}

CoverageRowResource mirrors internal/api's coverageRowResource.

type CoverageSummaryResource added in v0.2.0

type CoverageSummaryResource struct {
	Total               int    `json:"total"`
	Protected           int    `json:"protected"`
	Verified            int    `json:"verified"`
	Unverified          int    `json:"unverified"`
	NeverRan            int    `json:"never_ran"`
	Failing             int    `json:"failing"`
	Unprotected         int    `json:"unprotected"`
	Scratch             int    `json:"scratch"`
	StorageBytes        int64  `json:"storage_bytes"`
	LastVerifiedRestore string `json:"last_verified_restore,omitempty"`
	NextRun             string `json:"next_run,omitempty"`
}

CoverageSummaryResource mirrors internal/api's coverageSummaryResource.

type CreateAIChatMessageRequest added in v0.2.0

type CreateAIChatMessageRequest struct {
	Content string `json:"content"`
}

CreateAIChatMessageRequest mirrors internal/api's createAIChatMessageRequest: POST /api/v1/ai/sessions/{id}/messages's request body.

type CreateAlertRuleRequest

type CreateAlertRuleRequest struct {
	Name                  string  `json:"name"`
	Kind                  string  `json:"kind"`
	Metric                string  `json:"metric,omitempty"`
	Comparator            string  `json:"comparator,omitempty"`
	Threshold             float64 `json:"threshold,omitempty"`
	ForDuration           string  `json:"for_duration,omitempty"`
	RestartCountThreshold int     `json:"restart_count_threshold,omitempty"`
	RestartWindow         string  `json:"restart_window,omitempty"`
	// ScheduledTaskID is kind=scheduled_task_failure-only: which of this
	// app's scheduled tasks the rule watches. RestartCountThreshold above
	// doubles as its consecutive-failure threshold.
	ScheduledTaskID string `json:"scheduled_task_id,omitempty"`
	// BackupResourceKind/BackupDatabaseName/BackupServiceName/
	// BackupVolumeName are kind=backup_missing-only: which database or
	// service volume the rule watches. ForDuration above doubles as its
	// overdue grace period.
	BackupResourceKind string `json:"backup_resource_kind,omitempty"`
	BackupDatabaseName string `json:"backup_database_name,omitempty"`
	BackupServiceName  string `json:"backup_service_name,omitempty"`
	BackupVolumeName   string `json:"backup_volume_name,omitempty"`
	// SLO is kind=slo_burn-only: the request-based SLO the rule watches.
	SLO *AlertSLOConfig `json:"slo,omitempty"`
	// LogRule is kind=log_pattern and log_level_rate only.
	LogRule    *AlertLogRule `json:"log_rule,omitempty"`
	ChannelID  string        `json:"channel_id,omitempty"`
	NotifyURL  string        `json:"notify_url,omitempty"`
	NotifyKind string        `json:"notify_kind,omitempty"`
	Enabled    bool          `json:"enabled"`

	Severity            string            `json:"severity,omitempty"`
	Labels              map[string]string `json:"labels,omitempty"`
	ConsecutiveFailures int               `json:"consecutive_failures,omitempty"`
	FlapThreshold       int               `json:"flap_threshold,omitempty"`
	FlapWindow          string            `json:"flap_window,omitempty"`
}

CreateAlertRuleRequest mirrors the fields internal/api's ruleResource actually reads from a create request body; id and resource_id always come from the server (alerting.NewRuleID, the app name in the URL), never the body, so this type has no fields for either. A kind=cert_expiry rule needs none of the threshold or crashloop fields below: it watches every stored certificate platform-wide, not this rule's own resource_id.

type CreateAppConnectionRequest added in v0.2.0

type CreateAppConnectionRequest struct {
	Database string `json:"database"`
	Field    string `json:"field,omitempty"`
	EnvVar   string `json:"env_var,omitempty"`
}

CreateAppConnectionRequest mirrors internal/api's createAppConnectionRequest (apps_connections.go). Field and EnvVar are both optional: the server defaults Field to "url" and generates a collision-safe EnvVar (see defaultConnectionEnvVar's own doc comment) when left blank.

type CreateAppStreamRequest added in v0.2.0

type CreateAppStreamRequest struct {
	ContainerPort int    `json:"container_port"`
	HostPort      int    `json:"host_port"`
	Protocol      string `json:"protocol,omitempty"`
}

CreateAppStreamRequest mirrors internal/api's createAppStreamRequest.

type CreateBackupTargetRequest

type CreateBackupTargetRequest struct {
	Name            string `json:"name"`
	Provider        string `json:"provider"`
	Endpoint        string `json:"endpoint,omitempty"`
	Region          string `json:"region,omitempty"`
	Bucket          string `json:"bucket"`
	AccessKeyID     string `json:"access_key_id"`
	SecretAccessKey string `json:"secret_access_key"`
}

CreateBackupTargetRequest mirrors internal/api's createBackupTargetRequest: AccessKeyID/SecretAccessKey are required here, unlike UpdateBackupTargetRequest where they're optional.

type CreateDeployNotifyTargetRequest added in v0.2.0

type CreateDeployNotifyTargetRequest struct {
	ChannelID string `json:"channel_id"`
	Enabled   bool   `json:"enabled"`
}

CreateDeployNotifyTargetRequest mirrors internal/api's createDeployTargetRequest: attach an already-connected channel by ID.

type CreateEnvironmentRequest

type CreateEnvironmentRequest struct {
	Name      string `json:"name"`
	Protected bool   `json:"protected,omitempty"`
}

CreateEnvironmentRequest mirrors internal/api's createEnvironmentRequest.

type CreateExportDestinationRequest added in v0.2.0

type CreateExportDestinationRequest struct {
	Name     string            `json:"name"`
	Kind     string            `json:"kind"`
	Endpoint string            `json:"endpoint,omitempty"`
	Enabled  *bool             `json:"enabled,omitempty"`
	Apps     []string          `json:"apps,omitempty"`
	MinLevel string            `json:"min_level,omitempty"`
	Options  ExportOptions     `json:"options"`
	Headers  map[string]string `json:"headers,omitempty"`
	HMACKey  string            `json:"hmac_key,omitempty"`
}

CreateExportDestinationRequest is the body of POST /api/v1/export/destinations.

type CreateFirewallRuleRequest added in v0.2.0

type CreateFirewallRuleRequest struct {
	Port       int    `json:"port"`
	Protocol   string `json:"protocol,omitempty"`
	SourceCIDR string `json:"source_cidr,omitempty"`
	Action     string `json:"action,omitempty"`
	Label      string `json:"label,omitempty"`
}

CreateFirewallRuleRequest mirrors internal/api's createFirewallRuleRequest.

type CreateGlobalEnvironmentRequest added in v0.2.0

type CreateGlobalEnvironmentRequest struct {
	Name      string `json:"name"`
	Kind      string `json:"kind,omitempty"`
	Protected bool   `json:"protected,omitempty"`
	SortOrder int    `json:"sort_order,omitempty"`
}

CreateGlobalEnvironmentRequest mirrors internal/api's createGlobalEnvironmentRequest.

type CreateInviteRequest

type CreateInviteRequest struct {
	Email     string   `json:"email"`
	Role      string   `json:"role,omitempty"`
	Abilities []string `json:"abilities,omitempty"`
}

CreateInviteRequest mirrors internal/api's createInviteRequest. Role, when set, takes precedence server-side over Abilities, same precedence CreateUserRequest documents.

type CreateInviteResponse

type CreateInviteResponse struct {
	InviteResource
	Link string `json:"link"`
}

CreateInviteResponse mirrors internal/api's createInviteResponse: the invite plus Link, the accept URL to hand or send to the invited person.

type CreateModelKeyRequest added in v0.2.0

type CreateModelKeyRequest struct {
	Name        string     `json:"name"`
	ExpiresAt   *time.Time `json:"expires_at,omitempty"`
	RPM         int        `json:"rpm,omitempty"`
	TPM         int        `json:"tpm,omitempty"`
	TPD         int        `json:"tpd,omitempty"`
	MaxParallel int        `json:"max_parallel,omitempty"`
	AllowPaths  []string   `json:"allow_paths,omitempty"`
	AllowModels []string   `json:"allow_models,omitempty"`
}

CreateModelKeyRequest is the body of POST /api/v1/models/{name}/keys.

type CreateModelRequest added in v0.2.0

type CreateModelRequest struct {
	Name          string   `json:"name"`
	Engine        string   `json:"engine"`
	Model         string   `json:"model"`
	NodeID        string   `json:"node_id,omitempty"`
	GPUCount      int      `json:"gpu_count,omitempty"`
	GPUDeviceIDs  []string `json:"gpu_device_ids,omitempty"`
	ContextLength int      `json:"context_length,omitempty"`
	Quantization  string   `json:"quantization,omitempty"`
	Domain        string   `json:"domain,omitempty"`
	HFToken       string   `json:"hf_token,omitempty"`
	Residency     string   `json:"residency,omitempty"`
	IdleTTLSecs   int      `json:"idle_ttl_seconds,omitempty"`
	SwapGroup     string   `json:"swap_group,omitempty"`
}

CreateModelRequest mirrors internal/api's createModelRequest.

type CreateModelResponse added in v0.2.0

type CreateModelResponse struct {
	ModelResource
	APIKey string `json:"api_key"`
}

CreateModelResponse is a ModelResource plus the one-time API key.

type CreateNetworkShareRequest added in v0.2.0

type CreateNetworkShareRequest struct {
	Name         string `json:"name"`
	Protocol     string `json:"protocol"`
	Host         string `json:"host"`
	RemotePath   string `json:"remote_path"`
	MountOptions string `json:"mount_options,omitempty"`
	Username     string `json:"username,omitempty"`
	Password     string `json:"password,omitempty"`
}

CreateNetworkShareRequest mirrors internal/api's createNetworkShareRequest. Password is required for a cifs share, ignored for nfs.

type CreateNodeJoinTokenRequest added in v0.2.0

type CreateNodeJoinTokenRequest struct {
	ControlPlaneAddr string `json:"control_plane_addr,omitempty"`
	NodeName         string `json:"node_name,omitempty"`
	Mesh             bool   `json:"mesh,omitempty"`
}

CreateNodeJoinTokenRequest optionally tailors the returned join commands.

type CreateNodeJoinTokenResponse

type CreateNodeJoinTokenResponse struct {
	Token            string        `json:"token"`
	ExpiresAt        time.Time     `json:"expires_at"`
	CAFingerprint    string        `json:"ca_fingerprint,omitempty"`
	ControlPlaneAddr string        `json:"control_plane_addr,omitempty"`
	JoinCommands     *JoinCommands `json:"join_commands,omitempty"`
}

CreateNodeJoinTokenResponse mirrors internal/api's createNodeJoinTokenResponse: a join token's one and only plaintext appearance, the same "shown once, never recoverable again" shape a created API token uses.

type CreateNodeProvisionRequest added in v0.2.0

type CreateNodeProvisionRequest struct {
	Provider         string `json:"provider"`
	Region           string `json:"region"`
	Size             string `json:"size"`
	Name             string `json:"name"`
	Role             string `json:"role,omitempty"`
	ControlPlaneAddr string `json:"control_plane_addr"`
	// AllowSSHInbound is aws-only; other providers ignore it. Off by
	// default, matching this platform's no-inbound-ports architecture.
	AllowSSHInbound bool `json:"allow_ssh_inbound,omitempty"`
}

CreateNodeProvisionRequest is POST /api/v1/nodes/provision's body.

type CreateNotificationChannelRequest

type CreateNotificationChannelRequest struct {
	Name      string `json:"name"`
	Kind      string `json:"kind"`
	NotifyURL string `json:"notify_url"`
	Enabled   *bool  `json:"enabled,omitempty"`
	// NotifyDeviceLogin opts the channel into the CLI-login-waiting notice.
	NotifyDeviceLogin bool `json:"notify_device_login,omitempty"`
	// NotifyDeviceLoginExpired opts the channel into the login-expired notice.
	NotifyDeviceLoginExpired bool `json:"notify_device_login_expired,omitempty"`
}

CreateNotificationChannelRequest mirrors internal/api's createNotificationChannelRequest.

type CreateOrganizationRequest

type CreateOrganizationRequest struct {
	Name string `json:"name"`
}

CreateOrganizationRequest mirrors internal/api's createOrganizationRequest.

type CreateProjectRequest

type CreateProjectRequest struct {
	Name string `json:"name"`
}

CreateProjectRequest mirrors internal/api's createProjectRequest.

type CreateRegistryCredentialRequest

type CreateRegistryCredentialRequest struct {
	Name         string     `json:"name"`
	RegistryHost string     `json:"registry_host"`
	Username     string     `json:"username"`
	Password     string     `json:"password"`
	ExpiresAt    *time.Time `json:"expires_at,omitempty"`
}

CreateRegistryCredentialRequest mirrors internal/api's createRegistryCredentialRequest: Password is required here, unlike UpdateRegistryCredentialRequest where it's optional.

type CreateSSHNodeProvisionRequest added in v0.2.0

type CreateSSHNodeProvisionRequest struct {
	Host             string                      `json:"host"`
	Port             int                         `json:"port,omitempty"`
	Username         string                      `json:"username"`
	Auth             SSHNodeProvisionAuthRequest `json:"auth"`
	Name             string                      `json:"name"`
	Role             string                      `json:"role,omitempty"`
	ControlPlaneAddr string                      `json:"control_plane_addr"`
}

CreateSSHNodeProvisionRequest is POST /api/v1/nodes/ssh-provision's body.

type CreateSilenceRequest added in v0.2.0

type CreateSilenceRequest struct {
	Matchers SilenceMatchers `json:"matchers"`
	StartsAt *time.Time      `json:"starts_at,omitempty"`
	EndsAt   *time.Time      `json:"ends_at,omitempty"`
	Duration string          `json:"duration,omitempty"`
	Reason   string          `json:"reason,omitempty"`
}

CreateSilenceRequest is the body of POST /api/v1/alert-silences. Set Duration or EndsAt; StartsAt defaults to now.

type CreateTagRequest added in v0.2.0

type CreateTagRequest struct {
	Name string `json:"name"`
}

CreateTagRequest mirrors internal/api's tagResource decode shape for POST /api/v1/tags: only Name is read on create.

type CreateTeamInviteRequest added in v0.2.0

type CreateTeamInviteRequest struct {
	Email          string `json:"email,omitempty"`
	Role           string `json:"role"`
	ExpiresInHours int    `json:"expires_in_hours,omitempty"`
}

CreateTeamInviteRequest is POST /api/v1/teams/{id}/invites' body.

type CreateUserRequest

type CreateUserRequest struct {
	Email       string   `json:"email"`
	DisplayName string   `json:"display_name,omitempty"`
	Password    string   `json:"password"`
	Abilities   []string `json:"abilities,omitempty"`
	Role        string   `json:"role,omitempty"`
}

CreateUserRequest mirrors internal/api's createUserRequest. Role, when set, takes precedence server-side over Abilities (roles.go's resolveAbilities): set one or the other, not both.

type CreatedModelKeyResource added in v0.2.0

type CreatedModelKeyResource struct {
	ModelKeyResource
	APIKey string `json:"api_key"`
}

CreatedModelKeyResource is a key plus its one-time plaintext.

type Credentials

type Credentials struct {
	APIURL string
	Token  string
}

Credentials is ReadCredentialsFile/WriteCredentialsFile's in-memory shape: the same two values as EnvAPIURL/EnvAPIToken.

func ReadCredentialsFile

func ReadCredentialsFile(prog, profile string) (Credentials, error)

ReadCredentialsFile reads profile's section from prog's credentials file. A missing file is a plain error the caller treats as "no credentials file," not logged or reported: this is the lowest-priority source in ResolveToken/ResolveAPIURL's precedence chain, its absence is the common case, not a problem. A file that exists but has no section named profile returns a zero Credentials and no error, the same "nothing configured here" shape, since asking for an unconfigured profile is not itself a failure to read the file.

type CustomTemplateDetail added in v0.2.0

type CustomTemplateDetail struct {
	ID                    string   `json:"id"`
	Name                  string   `json:"name"`
	Description           string   `json:"description"`
	SourceApp             string   `json:"source_app,omitempty"`
	Compose               string   `json:"compose"`
	RequiresConfiguration bool     `json:"requires_configuration"`
	RequiredEnvKeys       []string `json:"required_env_keys,omitempty"`
	CreatedAt             string   `json:"created_at"`
}

CustomTemplateDetail mirrors internal/api's customTemplateDetail: POST /api/v1/apps/{name}/save-as-template's own response, including the derived compose.yaml body and which env var keys ended up required (never which secret values: see compose. FromDesiredServices' own doc comment for why there never are any).

type CustomTemplateListItem added in v0.2.0

type CustomTemplateListItem struct {
	ID                    string `json:"id"`
	Name                  string `json:"name"`
	Description           string `json:"description"`
	SourceApp             string `json:"source_app,omitempty"`
	RequiresConfiguration bool   `json:"requires_configuration"`
	CreatedAt             string `json:"created_at"`
}

CustomTemplateListItem mirrors internal/api's customTemplateListItem: one entry in GET /api/v1/templates/custom, without the full compose body (see CustomTemplateDetail).

type CutoverChange added in v0.2.0

type CutoverChange struct {
	Type     string `json:"type"`
	Name     string `json:"name"`
	Value    string `json:"value"`
	TTL      uint32 `json:"ttl"`
	Replaces string `json:"replaces,omitempty"`
}

CutoverChange is the exact DNS edit to make.

type CutoverCheck added in v0.2.0

type CutoverCheck struct {
	ID     string `json:"id"`
	Status string `json:"status"`
	Detail string `json:"detail"`
	Fix    string `json:"fix,omitempty"`
}

CutoverCheck is one named check with what to do about it.

type CutoverDomain added in v0.2.0

type CutoverDomain struct {
	App     string         `json:"app"`
	Domain  string         `json:"domain"`
	Verdict string         `json:"verdict"`
	Checks  []CutoverCheck `json:"checks"`
	Change  *CutoverChange `json:"change,omitempty"`
}

CutoverDomain is the go or no-go for one domain.

type CutoverReport added in v0.2.0

type CutoverReport struct {
	Verdict   string          `json:"verdict"`
	Phase     string          `json:"phase"`
	TargetIPs []string        `json:"target_ips"`
	Domains   []CutoverDomain `json:"domains"`
	Guidance  []string        `json:"guidance"`
}

CutoverReport is the pre-switch or post-switch result.

type DBUpgradeAdvice added in v0.2.0

type DBUpgradeAdvice struct {
	Engine         string            `json:"engine"`
	Current        string            `json:"current"`
	Comparable     bool              `json:"comparable"`
	Floating       bool              `json:"floating"`
	Line           string            `json:"line,omitempty"`
	EOL            string            `json:"eol,omitempty"`
	Support        string            `json:"support"`
	Advisories     []string          `json:"advisories,omitempty"`
	Targets        []DBUpgradeTarget `json:"targets"`
	AutoMax        string            `json:"auto_max"`
	ImageRevert    bool              `json:"image_revert"`
	ManualReason   string            `json:"manual_reason,omitempty"`
	Notes          string            `json:"notes,omitempty"`
	Note           string            `json:"note,omitempty"`
	CatalogUpdated string            `json:"catalog_updated"`
}

DBUpgradeAdvice is the advisor's view of a database's version.

type DBUpgradePolicy added in v0.2.0

type DBUpgradePolicy struct {
	Inherit               bool     `json:"inherit,omitempty"`
	AutoUpgrade           string   `json:"auto_upgrade"`
	WindowCron            string   `json:"window_cron"`
	WindowDurationSeconds int64    `json:"window_duration_seconds"`
	WindowTimezone        string   `json:"window_timezone"`
	BackupBefore          bool     `json:"backup_before"`
	VerifyAfter           bool     `json:"verify_after"`
	RevertOnFailure       bool     `json:"revert_on_failure"`
	Notify                []string `json:"notify"`
	Inherited             bool     `json:"inherited,omitempty"`
}

DBUpgradePolicy is a database's or the platform default's upgrade policy.

type DBUpgradeRun added in v0.2.0

type DBUpgradeRun struct {
	ID              string            `json:"id"`
	DatabaseName    string            `json:"database_name"`
	Engine          string            `json:"engine"`
	FromVersion     string            `json:"from_version"`
	ToVersion       string            `json:"to_version"`
	Kind            string            `json:"kind"`
	Source          string            `json:"source"`
	State           string            `json:"state"`
	Phase           string            `json:"phase,omitempty"`
	VerifyAfter     bool              `json:"verify_after"`
	RevertOnFailure bool              `json:"revert_on_failure"`
	BackupID        string            `json:"backup_id,omitempty"`
	VerificationID  string            `json:"verification_id,omitempty"`
	FromImageDigest string            `json:"from_image_digest,omitempty"`
	SnapshotVolume  string            `json:"snapshot_volume,omitempty"`
	RevertPath      string            `json:"revert_path,omitempty"`
	Reason          string            `json:"reason,omitempty"`
	RequestedBy     string            `json:"requested_by,omitempty"`
	Timings         map[string]string `json:"timings"`
	CreatedAt       string            `json:"created_at"`
	FinishedAt      string            `json:"finished_at,omitempty"`
}

DBUpgradeRun is one upgrade attempt.

type DBUpgradeSummary added in v0.2.0

type DBUpgradeSummary struct {
	Items         []DBUpgradeSummaryItem `json:"items"`
	SecurityCount int                    `json:"security_count"`
	EOLCount      int                    `json:"eol_count"`
}

DBUpgradeSummary is GET /api/v1/databases/upgrade-summary.

type DBUpgradeSummaryItem added in v0.2.0

type DBUpgradeSummaryItem struct {
	Database    string   `json:"database"`
	Engine      string   `json:"engine"`
	Version     string   `json:"version"`
	Support     string   `json:"support"`
	EOL         string   `json:"eol,omitempty"`
	Security    bool     `json:"security"`
	Advisories  []string `json:"advisories,omitempty"`
	Available   int      `json:"available"`
	ActiveState string   `json:"active_state,omitempty"`
	LastState   string   `json:"last_state,omitempty"`
	LastReason  string   `json:"last_reason,omitempty"`
}

DBUpgradeSummaryItem is one database in the upgrade summary.

type DBUpgradeTarget added in v0.2.0

type DBUpgradeTarget struct {
	Version    string   `json:"version"`
	Kind       string   `json:"kind"`
	Security   bool     `json:"security"`
	Advisories []string `json:"advisories,omitempty"`
	EOL        string   `json:"eol,omitempty"`
	Automatic  bool     `json:"automatic"`
}

DBUpgradeTarget is one version the advisor offers.

type DBUpgradesResource added in v0.2.0

type DBUpgradesResource struct {
	Database   string           `json:"database"`
	Engine     string           `json:"engine"`
	Version    string           `json:"version"`
	Advice     DBUpgradeAdvice  `json:"advice"`
	Policy     DBUpgradePolicy  `json:"policy"`
	WindowOpen bool             `json:"window_open"`
	NextWindow string           `json:"next_window,omitempty"`
	NextTarget *DBUpgradeTarget `json:"next_target,omitempty"`
	Blockers   []string         `json:"blockers"`
	Active     *DBUpgradeRun    `json:"active,omitempty"`
	History    []DBUpgradeRun   `json:"history"`
}

DBUpgradesResource is GET /api/v1/databases/{name}/upgrades.

type DNSCapabilities added in v0.2.0

type DNSCapabilities struct {
	Proxied      bool `json:"proxied"`
	Routing      bool `json:"routing"`
	HealthChecks bool `json:"health_checks"`
	ApexCNAME    bool `json:"apex_cname"`
}

DNSCapabilities mirrors internal/dnszones.Capabilities.

type DNSChange added in v0.2.0

type DNSChange struct {
	Action string       `json:"action"`
	Set    DNSRecordSet `json:"set"`
	Issues []DNSIssue   `json:"issues,omitempty"`
}

DNSChange is one planned change.

type DNSDelegation added in v0.2.0

type DNSDelegation struct {
	Delegation struct {
		Domain    string                  `json:"domain"`
		State     string                  `json:"state"`
		Expected  []string                `json:"expected"`
		Resolvers []DNSResolverDelegation `json:"resolvers"`
		Elsewhere []string                `json:"elsewhere,omitempty"`
	} `json:"delegation"`
	CheckedAt string `json:"checked_at"`
}

DNSDelegation is GET .../delegation.

type DNSHealthCheck added in v0.2.0

type DNSHealthCheck struct {
	ID               string `json:"id,omitempty"`
	Type             string `json:"type"`
	IPAddress        string `json:"ip_address,omitempty"`
	FQDN             string `json:"fqdn,omitempty"`
	Port             int32  `json:"port,omitempty"`
	ResourcePath     string `json:"resource_path,omitempty"`
	RequestInterval  int32  `json:"request_interval,omitempty"`
	FailureThreshold int32  `json:"failure_threshold,omitempty"`
}

DNSHealthCheck mirrors internal/dnszones.HealthCheck.

type DNSImportRequest added in v0.2.0

type DNSImportRequest struct {
	Format  string `json:"format"`
	Content string `json:"content"`
	Replace bool   `json:"replace,omitempty"`
	Apply   bool   `json:"apply,omitempty"`
	Confirm string `json:"confirm,omitempty"`
}

DNSImportRequest is POST .../records/import.

type DNSImportResult added in v0.2.0

type DNSImportResult struct {
	Plan struct {
		Changes []DNSChange    `json:"changes"`
		Summary map[string]int `json:"summary"`
		Blocked bool           `json:"blocked"`
	} `json:"plan"`
	Warnings []string `json:"warnings,omitempty"`
	Errors   []string `json:"errors,omitempty"`
	Applied  int      `json:"applied"`
}

DNSImportResult is the import and template response.

type DNSIssue added in v0.2.0

type DNSIssue struct {
	Severity string `json:"severity"`
	Code     string `json:"code"`
	Message  string `json:"message"`
}

DNSIssue is a conflict or warning on a record set.

type DNSPropagation added in v0.2.0

type DNSPropagation struct {
	Name     string                 `json:"name"`
	Type     string                 `json:"type"`
	Expected []string               `json:"expected,omitempty"`
	Answers  []DNSPropagationAnswer `json:"answers"`
	Agree    bool                   `json:"agree"`
}

DNSPropagation is GET /api/v1/dns/check.

type DNSPropagationAnswer added in v0.2.0

type DNSPropagationAnswer struct {
	Server  string   `json:"server"`
	Source  string   `json:"source"`
	Values  []string `json:"values,omitempty"`
	TTL     uint32   `json:"ttl"`
	CNAME   string   `json:"cname,omitempty"`
	Error   string   `json:"error,omitempty"`
	Matches *bool    `json:"matches,omitempty"`
}

DNSPropagationAnswer is one server's answer in a check.

type DNSRecordKey added in v0.2.0

type DNSRecordKey struct {
	Name          string `json:"name"`
	Type          string `json:"type"`
	SetIdentifier string `json:"set_identifier,omitempty"`
}

DNSRecordKey identifies a record set.

type DNSRecordResource added in v0.2.0

type DNSRecordResource struct {
	Name       string `json:"name"`
	Type       string `json:"type"`
	Value      string `json:"value"`
	TTLSeconds int    `json:"ttl_seconds"`
	Status     string `json:"status,omitempty"`
}

DNSRecordResource mirrors internal/api's dnsRecordResource (internal/api/dns_records.go): one A/AAAA/CNAME/TXT/MX/SRV/CAA record, used both in GET .../dns-records's own Records list and as the request body shape for create/update/delete.

type DNSRecordSet added in v0.2.0

type DNSRecordSet struct {
	Name          string   `json:"name"`
	Type          string   `json:"type"`
	TTL           int      `json:"ttl"`
	Values        []string `json:"values"`
	Proxied       bool     `json:"proxied,omitempty"`
	Routing       string   `json:"routing,omitempty"`
	SetIdentifier string   `json:"set_identifier,omitempty"`
	Weight        *int64   `json:"weight,omitempty"`
	Failover      string   `json:"failover,omitempty"`
	HealthCheckID string   `json:"health_check_id,omitempty"`
	Managed       bool     `json:"managed,omitempty"`
	Alias         *struct {
		DNSName string `json:"dns_name"`
	} `json:"alias,omitempty"`
}

DNSRecordSet mirrors internal/dnszones.RecordSet.

type DNSRecordSuggestion added in v0.2.0

type DNSRecordSuggestion struct {
	Type        string `json:"type"`
	Name        string `json:"name"`
	Value       string `json:"value"`
	Alternative bool   `json:"alternative,omitempty"`
}

DNSRecordSuggestion is one record to create so a domain reaches this server.

type DNSRecordWrite added in v0.2.0

type DNSRecordWrite struct {
	Record DNSRecordSet `json:"record"`
	Issues []DNSIssue   `json:"issues,omitempty"`
}

DNSRecordWrite is the create and update response.

type DNSRecordsList added in v0.2.0

type DNSRecordsList struct {
	Zone     DNSZone        `json:"zone"`
	Provider string         `json:"provider"`
	Records  []DNSRecordSet `json:"records"`
	Total    int            `json:"total"`
}

DNSRecordsList is GET /api/v1/dns/zones/{zone}/records.

type DNSRecordsResponse added in v0.2.0

type DNSRecordsResponse struct {
	Domain   string              `json:"domain"`
	Provider string              `json:"provider"`
	Zone     string              `json:"zone"`
	Records  []DNSRecordResource `json:"records"`
}

DNSRecordsResponse mirrors internal/api's dnsRecordsResponse: GET/ POST/PUT/DELETE .../dns-records all return this same shape, so the caller always sees the zone's full, current record list.

type DNSResolverDelegation added in v0.2.0

type DNSResolverDelegation struct {
	Server      string   `json:"server"`
	NameServers []string `json:"name_servers,omitempty"`
	Verdict     string   `json:"verdict"`
	Error       string   `json:"error,omitempty"`
}

DNSResolverDelegation is one resolver's NS answer.

type DNSZone added in v0.2.0

type DNSZone struct {
	ID          string   `json:"id"`
	Name        string   `json:"name"`
	Provider    string   `json:"provider"`
	Status      string   `json:"status,omitempty"`
	RecordCount *int     `json:"record_count,omitempty"`
	NameServers []string `json:"name_servers"`
	Private     bool     `json:"private,omitempty"`
	ModifiedAt  string   `json:"modified_at,omitempty"`
}

DNSZone mirrors internal/dnszones.Zone.

type DNSZoneResult added in v0.2.0

type DNSZoneResult struct {
	Domain     string `json:"domain"`
	Provider   string `json:"provider"`
	Configured bool   `json:"configured"`
	Found      bool   `json:"found"`
	Zone       string `json:"zone,omitempty"`
	Message    string `json:"message,omitempty"`
}

DNSZoneResult mirrors GET /api/v1/dns/zone.

type DNSZonesList added in v0.2.0

type DNSZonesList struct {
	Provider     string          `json:"provider"`
	Providers    []string        `json:"providers"`
	Capabilities DNSCapabilities `json:"capabilities"`
	Zones        []DNSZone       `json:"zones"`
}

DNSZonesList is GET /api/v1/dns/zones.

type DashboardURLResource added in v0.2.0

type DashboardURLResource struct {
	DashboardURL string `json:"dashboard_url"`
}

DashboardURLResource mirrors internal/api's dashboardURLResource (GET/PUT /api/v1/settings/dashboard-url).

type DataCopyFailure added in v0.2.0

type DataCopyFailure struct {
	Code      string `json:"code"`
	Summary   string `json:"summary"`
	Hint      string `json:"hint"`
	Technical string `json:"technical,omitempty"`
}

DataCopyFailure is a failed copy in plain words, with the redacted raw error under Technical.

type DataCopySource added in v0.2.0

type DataCopySource struct {
	Host         string `json:"host"`
	Port         int    `json:"port,omitempty"`
	User         string `json:"user,omitempty"`
	Password     string `json:"password,omitempty"`
	Database     string `json:"database,omitempty"`
	AuthDatabase string `json:"auth_database,omitempty"`
	TLS          bool   `json:"tls,omitempty"`
}

DataCopySource locates the database to copy from. Password is sent in the request body only and is never stored by the control plane.

type DataCopyStatus added in v0.2.0

type DataCopyStatus struct {
	Database       string           `json:"database"`
	Engine         string           `json:"engine"`
	Status         string           `json:"status"`
	Reason         string           `json:"reason,omitempty"`
	Failure        *DataCopyFailure `json:"failure,omitempty"`
	NextAction     string           `json:"next_action,omitempty"`
	SourceHost     string           `json:"source_host,omitempty"`
	SourcePort     int              `json:"source_port,omitempty"`
	SourceDatabase string           `json:"source_database,omitempty"`
	Checked        int              `json:"checked"`
	Mismatched     int              `json:"mismatched"`
	Tables         []DataCopyTable  `json:"tables,omitempty"`
	StartedAt      string           `json:"started_at,omitempty"`
	FinishedAt     string           `json:"finished_at,omitempty"`
}

DataCopyStatus is one database's copy state.

type DataCopyTable added in v0.2.0

type DataCopyTable struct {
	Name   string `json:"name"`
	Source int64  `json:"source"`
	Target int64  `json:"target"`
	OK     bool   `json:"ok"`
}

DataCopyTable is one table or collection compared across both sides.

type DatabaseClient added in v0.2.0

type DatabaseClient struct {
	App         string `json:"app"`
	Via         string `json:"via"`
	ProjectName string `json:"project_name,omitempty"`
	Environment string `json:"environment,omitempty"`
	InScope     bool   `json:"in_scope"`
	ScopeReason string `json:"scope_reason,omitempty"`
}

DatabaseClient is one app that reaches a database.

type DatabaseColumnResource added in v0.2.0

type DatabaseColumnResource struct {
	Name       string `json:"name"`
	Type       string `json:"type"`
	Nullable   bool   `json:"nullable"`
	Default    string `json:"default,omitempty"`
	PrimaryKey bool   `json:"primary_key"`
}

DatabaseColumnResource is one column in GET /databases/{name}/schema.

type DatabaseCredential added in v0.2.0

type DatabaseCredential struct {
	Username     string `json:"username"`
	Password     string `json:"password"`
	Database     string `json:"database"`
	Host         string `json:"host"`
	Port         int    `json:"port"`
	SSLMode      string `json:"sslmode"`
	InternalURL  string `json:"internal_url"`
	ExternalURL  string `json:"external_url,omitempty"`
	ExternalNote string `json:"external_note,omitempty"`
	ExpiresAt    string `json:"expires_at,omitempty"`
}

DatabaseCredential is shown once by the server and is never stored.

type DatabaseEngineResource

type DatabaseEngineResource struct {
	ID             string `json:"id"`
	Label          string `json:"label"`
	DefaultVersion string `json:"default_version"`
}

DatabaseEngineResource mirrors internal/api's databaseEngineResource (internal/api/database_engines.go): one entry from GET /api/v1/database-engines, the dynamic registry backing the creation wizard's engine picker.

type DatabaseGrant added in v0.2.0

type DatabaseGrant struct {
	PolicyName string   `json:"policy_name"`
	Principal  string   `json:"principal"`
	Applied    bool     `json:"applied"`
	Notes      []string `json:"notes"`
}

DatabaseGrant is the grant response.

type DatabaseGrantRequest added in v0.2.0

type DatabaseGrantRequest struct {
	Template      string `json:"template"`
	PrincipalType string `json:"principal_type"`
	PrincipalID   string `json:"principal_id"`
	Preview       bool   `json:"preview,omitempty"`
}

DatabaseGrantRequest is POST /databases/{name}/access/grants.

type DatabaseIndexResource added in v0.2.0

type DatabaseIndexResource struct {
	Name       string `json:"name"`
	Definition string `json:"definition"`
	Unique     bool   `json:"unique"`
	Primary    bool   `json:"primary"`
}

DatabaseIndexResource is one index in the schema listing.

type DatabaseNetwork added in v0.2.0

type DatabaseNetwork struct {
	Database string `json:"database"`
	Running  bool   `json:"running"`
	Internal struct {
		Host    string `json:"host"`
		Address string `json:"address,omitempty"`
		Port    int    `json:"port"`
	} `json:"internal"`
	Networks []struct {
		Name    string `json:"name"`
		Address string `json:"address,omitempty"`
		Kind    string `json:"kind"`
	} `json:"networks"`
	Published *struct {
		HostPort      int      `json:"host_port"`
		ContainerPort int      `json:"container_port"`
		Bind          []string `json:"bind"`
		Class         string   `json:"class"`
	} `json:"published,omitempty"`
	Clients []DatabaseClient `json:"clients"`
	Verdict struct {
		Level string `json:"level"`
		Text  string `json:"text"`
	} `json:"verdict"`
	Rules struct {
		Port         int            `json:"port,omitempty"`
		Active       bool           `json:"active"`
		Allow        []DatabaseRule `json:"allow"`
		Missing      []string       `json:"missing,omitempty"`
		Extra        []string       `json:"extra,omitempty"`
		CanRestrict  bool           `json:"can_restrict"`
		CannotReason string         `json:"cannot_restrict_reason,omitempty"`
	} `json:"rules"`
	Scope struct {
		Current     string `json:"current"`
		ProjectName string `json:"project_name,omitempty"`
		Environment string `json:"environment,omitempty"`
	} `json:"scope"`
	TLS struct {
		Supported bool   `json:"supported"`
		Enabled   bool   `json:"enabled"`
		Required  bool   `json:"required"`
		State     string `json:"state,omitempty"`
		Drift     bool   `json:"drift"`
	} `json:"tls"`
	Caveats []string `json:"caveats"`
}

DatabaseNetwork is GET /databases/{name}/network.

type DatabasePolicyRef added in v0.2.0

type DatabasePolicyRef struct {
	ID          string   `json:"id"`
	Name        string   `json:"name"`
	Principals  []string `json:"principals"`
	ScopedToOne bool     `json:"scoped_to_database"`
}

DatabasePolicyRef is a policy that touches a database.

type DatabasePrincipal added in v0.2.0

type DatabasePrincipal struct {
	Type      string   `json:"type"`
	ID        string   `json:"id"`
	Name      string   `json:"name"`
	Effective []string `json:"effective"`
	Via       []string `json:"via"`
}

DatabasePrincipal is a user or token with effective abilities on a database.

type DatabasePublicAccessResource

type DatabasePublicAccessResource struct {
	DatabaseName       string `json:"database_name"`
	PubliclyAccessible bool   `json:"publicly_accessible"`
	PublicPort         int    `json:"public_port,omitempty"`
	// BindAddress: see SetDatabasePublicAccessRequest's own field doc
	// comment for what this holds.
	BindAddress string `json:"bind_address,omitempty"`
}

DatabasePublicAccessResource mirrors internal/api's databasePublicAccessResource (internal/api/database_public_access.go): PUT/DELETE .../public-access only ever touch these three fields.

type DatabaseQueryRequest added in v0.2.0

type DatabaseQueryRequest struct {
	SQL     string `json:"sql"`
	Analyze bool   `json:"analyze,omitempty"`
	Confirm string `json:"confirm,omitempty"`
}

DatabaseQueryRequest is the body of the query, write, and explain routes.

type DatabaseQueryResult added in v0.2.0

type DatabaseQueryResult struct {
	Columns     []string    `json:"columns"`
	Rows        [][]*string `json:"rows"`
	RowCount    int         `json:"row_count"`
	Truncated   bool        `json:"truncated"`
	DurationMs  int64       `json:"duration_ms"`
	Mode        string      `json:"mode"`
	Kind        string      `json:"kind"`
	Fingerprint string      `json:"fingerprint"`
}

DatabaseQueryResult is the response of the query routes. A nil cell is NULL.

type DatabaseResource

type DatabaseResource struct {
	Name    string `json:"name"`
	Engine  string `json:"engine"`
	Version string `json:"version"`
	NodeID  string `json:"node_id,omitempty"`
	// AutoPlaced mirrors internal/api's databaseResource.AutoPlaced: see
	// AppResource's identically-named field doc comment.
	AutoPlaced bool `json:"auto_placed,omitempty"`
	// ProjectID mirrors internal/api's databaseResource.ProjectID:
	// response-only, set via PUT /api/v1/databases/{name}/project.
	ProjectID string `json:"project_id,omitempty"`
	// ExistingVolume is request-only: "reuse" or "discard" the data volume a
	// deleted database of the same name left behind.
	ExistingVolume string `json:"existing_volume,omitempty"`
	// Resources, PubliclyAccessible, PublicPort, and the Backup* fields
	// are set through their own dedicated routes (SetDatabaseResources,
	// SetDatabasePublicAccess, SetBackupSchedule), never through this
	// resource's own create/update body; see internal/api's
	// databaseResource for the identical boundary server-side.
	Resources          *ServiceResources `json:"resources,omitempty"`
	PubliclyAccessible bool              `json:"publicly_accessible,omitempty"`
	PublicPort         int               `json:"public_port,omitempty"`
	BackupTargetID     string            `json:"backup_target_id,omitempty"`
	BackupSchedule     string            `json:"backup_schedule,omitempty"`
	BackupRetain       int               `json:"backup_retain,omitempty"`
	BackupRetainDays   int               `json:"backup_retain_days,omitempty"`
	// Suspended is set via POST /api/v1/databases/{name}/stop and
	// .../start (StopDatabase/StartDatabase), the same response-only
	// boundary NodeID/ProjectID already establish.
	Suspended bool `json:"suspended,omitempty"`
	// TLSEnabled mirrors internal/api's databaseResource.TLSEnabled:
	// response-only, computed fresh on every read, true when this
	// database's connection string (DATABASE_URL/REDIS_URL, injected
	// into consuming app containers) is TLS-encrypted.
	TLSEnabled bool `json:"tls_enabled,omitempty"`
}

DatabaseResource mirrors internal/api's databaseResource (internal/api/databases.go). NodeID is response-only on update, but settable at create time as an explicit placement override, the same boundary AppResource's own NodeID field documents.

type DatabaseRule added in v0.2.0

type DatabaseRule struct {
	Source      string `json:"source"`
	Description string `json:"description,omitempty"`
}

DatabaseRule is one allowed source.

type DatabaseRulesPlan added in v0.2.0

type DatabaseRulesPlan struct {
	Commands []string `json:"commands"`
	Drops    string   `json:"drops"`
	Allow    []string `json:"allow"`
	Warnings []string `json:"warnings"`
	Applied  bool     `json:"applied"`
}

DatabaseRulesPlan is the rules preview or apply response.

type DatabaseRulesRequest added in v0.2.0

type DatabaseRulesRequest struct {
	Allow           []DatabaseRule `json:"allow"`
	LocalContainers bool           `json:"local_containers,omitempty"`
	Confirm         bool           `json:"confirm,omitempty"`
}

DatabaseRulesRequest is the body of the network rules preview and apply calls.

type DatabaseSchemaNodeResource added in v0.2.0

type DatabaseSchemaNodeResource struct {
	Name   string                  `json:"name"`
	Tables []DatabaseTableResource `json:"tables"`
}

DatabaseSchemaNodeResource groups tables under one schema.

type DatabaseSchemaResource added in v0.2.0

type DatabaseSchemaResource struct {
	Engine  string                       `json:"engine"`
	Schemas []DatabaseSchemaNodeResource `json:"schemas"`
}

DatabaseSchemaResource is GET /api/v1/databases/{name}/schema.

type DatabaseScopeResult added in v0.2.0

type DatabaseScopeResult struct {
	Scope           string                 `json:"scope"`
	Applied         bool                   `json:"applied"`
	ConfirmRequired bool                   `json:"confirm_required"`
	Verdicts        []DatabaseScopeVerdict `json:"verdicts"`
	Lost            []DatabaseScopeVerdict `json:"lost"`
	Notes           []string               `json:"notes"`
}

DatabaseScopeResult is the scope dry-run or apply response.

type DatabaseScopeVerdict added in v0.2.0

type DatabaseScopeVerdict struct {
	App struct {
		Name string `json:"name"`
	} `json:"app"`
	Allowed bool   `json:"allowed"`
	Reason  string `json:"reason,omitempty"`
}

DatabaseScopeVerdict is one referencing app's fate under a scope.

type DatabaseTTLLimits added in v0.2.0

type DatabaseTTLLimits struct {
	MinMinutes     int `json:"min_minutes"`
	MaxMinutes     int `json:"max_minutes"`
	DefaultMinutes int `json:"default_minutes"`
}

DatabaseTTLLimits are the allowed temporary credential lifetimes.

type DatabaseTableResource added in v0.2.0

type DatabaseTableResource struct {
	Name        string                   `json:"name"`
	Kind        string                   `json:"kind"`
	RowEstimate int64                    `json:"row_estimate"`
	SizeBytes   int64                    `json:"size_bytes"`
	Columns     []DatabaseColumnResource `json:"columns"`
	Indexes     []DatabaseIndexResource  `json:"indexes"`
}

DatabaseTableResource is one table or view in the schema listing.

type DatabaseTemp added in v0.2.0

type DatabaseTemp struct {
	ID        string `json:"id"`
	Role      string `json:"role"`
	Preset    string `json:"preset"`
	CreatedBy string `json:"created_by"`
	CreatedAt string `json:"created_at"`
	ExpiresAt string `json:"expires_at"`
	State     string `json:"state"`
}

DatabaseTemp is one tracked temporary credential, without its secret.

type DatabaseTempIssued added in v0.2.0

type DatabaseTempIssued struct {
	Temp       DatabaseTemp       `json:"temp"`
	Credential DatabaseCredential `json:"credential"`
	Clamped    bool               `json:"clamped"`
	Limits     DatabaseTTLLimits  `json:"limits"`
}

DatabaseTempIssued is the issue response.

type DatabaseTempList added in v0.2.0

type DatabaseTempList struct {
	Items  []DatabaseTemp    `json:"items"`
	Limits DatabaseTTLLimits `json:"limits"`
}

DatabaseTempList is GET /databases/{name}/access/temp.

type DatabaseUser added in v0.2.0

type DatabaseUser struct {
	Name            string `json:"name"`
	Kind            string `json:"kind"`
	Preset          string `json:"preset,omitempty"`
	CanLogin        bool   `json:"can_login"`
	Superuser       bool   `json:"superuser"`
	CreateDB        bool   `json:"create_db"`
	CreateRole      bool   `json:"create_role"`
	ConnectionLimit int    `json:"connection_limit"`
	ValidUntil      string `json:"valid_until,omitempty"`
	Expired         bool   `json:"expired"`
	Connections     int    `json:"connections"`
	Protected       bool   `json:"protected"`
	Managed         bool   `json:"managed"`
	CreatedBy       string `json:"created_by,omitempty"`
	CreatedAt       string `json:"created_at,omitempty"`
}

DatabaseUser mirrors internal/api's databaseUserResource. It never holds a secret.

type DatabaseUserCreateRequest added in v0.2.0

type DatabaseUserCreateRequest struct {
	Name            string `json:"name"`
	Preset          string `json:"preset,omitempty"`
	ConnectionLimit int    `json:"connection_limit,omitempty"`
	ExpiresAt       string `json:"expires_at,omitempty"`
}

DatabaseUserCreateRequest is POST /databases/{name}/users.

type DatabaseUserCreated added in v0.2.0

type DatabaseUserCreated struct {
	User       DatabaseUser       `json:"user"`
	Credential DatabaseCredential `json:"credential"`
}

DatabaseUserCreated is the create response.

type DatabaseWho added in v0.2.0

type DatabaseWho struct {
	Database   string              `json:"database"`
	Principals []DatabasePrincipal `json:"principals"`
	Policies   []DatabasePolicyRef `json:"policies"`
	Templates  []string            `json:"grant_templates"`
}

DatabaseWho is GET /databases/{name}/access/principals.

type DeleteAppResult added in v0.2.0

type DeleteAppResult struct {
	Pending bool   `json:"pending"`
	Message string `json:"message,omitempty"`
	Error   string `json:"error,omitempty"`
}

DeleteAppResult is DELETE /api/v1/apps/{name}'s outcome: Pending is true when the app is deleted but its containers are not yet confirmed gone.

type DeployApprovalDecisionResult added in v0.2.0

type DeployApprovalDecisionResult struct {
	Approval DeployApprovalResource `json:"approval"`
	App      AppResource            `json:"app"`
}

DeployApprovalDecisionResult mirrors internal/api's deployApprovalDecisionResponse (POST .../deploy-approvals/{id}/approve).

type DeployApprovalListResult added in v0.2.0

type DeployApprovalListResult struct {
	Approvals []DeployApprovalResource `json:"approvals"`
}

DeployApprovalListResult mirrors internal/api's deployApprovalListResponse (GET /api/v1/deploy-approvals).

type DeployApprovalResource added in v0.2.0

type DeployApprovalResource struct {
	ID                string `json:"id"`
	ServiceName       string `json:"service_name"`
	SourceServiceName string `json:"source_service_name,omitempty"`
	EnvironmentID     string `json:"environment_id"`
	Action            string `json:"action"`
	Image             string `json:"image"`
	Status            string `json:"status"`
	RequestedByType   string `json:"requested_by_type"`
	RequestedBy       string `json:"requested_by"`
	RequestedByName   string `json:"requested_by_name"`
	ApprovedByType    string `json:"approved_by_type,omitempty"`
	ApprovedBy        string `json:"approved_by,omitempty"`
	ApprovedByName    string `json:"approved_by_name,omitempty"`
	Reason            string `json:"reason,omitempty"`
	CreatedAt         string `json:"created_at"`
	ExpiresAt         string `json:"expires_at"`
	DecidedAt         string `json:"decided_at,omitempty"`
}

DeployApprovalResource mirrors internal/api's deployApprovalResource (deploy_approvals.go): a pending or decided two-person approval gate on a deploy/promote into a protected environment.

type DeployAttemptResource added in v0.2.0

type DeployAttemptResource struct {
	ID          string     `json:"id"`
	ServiceName string     `json:"service_name"`
	Image       string     `json:"image"`
	CommitSHA   string     `json:"commit_sha,omitempty"`
	Source      string     `json:"source,omitempty"`
	Status      string     `json:"status"`
	StartedAt   time.Time  `json:"started_at"`
	FinishedAt  *time.Time `json:"finished_at,omitempty"`
	Error       string     `json:"error,omitempty"`
	// DetectedFramework is the wizard's pre-flight detection result for
	// this build, e.g. "Node.js"; empty when detection was skipped
	// (a CLI or webhook-triggered build) or found nothing buildable.
	DetectedFramework string `json:"detected_framework,omitempty"`

	ImageDigest    string `json:"image_digest,omitempty"`
	DigestReason   string `json:"digest_reason,omitempty"`
	RolloutState   string `json:"rollout_state,omitempty"`
	RunningImageID string `json:"running_image_id,omitempty"`
	Sequence       int64  `json:"sequence,omitempty"`
	Reason         string `json:"reason,omitempty"`

	QueuedAt      *time.Time  `json:"queued_at,omitempty"`
	QueuePosition int         `json:"queue_position,omitempty"`
	WaitReason    string      `json:"wait_reason,omitempty"`
	BlockedBy     string      `json:"blocked_by,omitempty"`
	SupersededBy  string      `json:"superseded_by,omitempty"`
	CanceledBy    string      `json:"canceled_by,omitempty"`
	SBOMPackages  *int        `json:"sbom_packages,omitempty"`
	VulnCounts    *VulnCounts `json:"vuln_counts,omitempty"`
	// Failure classifies why the deploy failed or is blocked; absent otherwise.
	Failure *DeployFailure `json:"failure,omitempty"`
	// Outcome is set by GetDeploy only: in_progress, healthy, failed,
	// canceled, superseded or blocked.
	Outcome string `json:"outcome,omitempty"`
}

DeployAttemptResource mirrors internal/api's deployAttemptResource (internal/api/deploy_attempts.go): one row of GET /api/v1/apps/{name}/deploy-attempts, additive to the reconcile conditions GetDeployStatus already returns, not a replacement for it.

type DeployCompareField

type DeployCompareField struct {
	Field string `json:"field"`
	From  string `json:"from"`
	To    string `json:"to"`
}

DeployCompareField mirrors internal/api's deployCompareField: one field that differs between From and To.

type DeployCompareResource

type DeployCompareResource struct {
	ServiceName         string               `json:"service_name"`
	From                DeployCompareSide    `json:"from"`
	To                  DeployCompareSide    `json:"to"`
	Changes             []DeployCompareField `json:"changes"`
	UnsnapshottedFields []string             `json:"unsnapshotted_fields"`
	Note                string               `json:"note"`
}

DeployCompareResource mirrors internal/api's deployCompareResource, GET /api/v1/apps/{name}/deploys/compare's response. UnsnapshottedFields and Note are the honest limitation this task's own design note requires: deploy_attempts never snapshotted env/resources/ domains/etc per attempt, so those cannot be diffed across past deploys, only reported as not tracked.

type DeployCompareSide

type DeployCompareSide struct {
	DeployID   string     `json:"deploy_id,omitempty"`
	IsCurrent  bool       `json:"is_current"`
	Image      string     `json:"image"`
	CommitSHA  string     `json:"commit_sha,omitempty"`
	Source     string     `json:"source,omitempty"`
	Status     string     `json:"status,omitempty"`
	StartedAt  *time.Time `json:"started_at,omitempty"`
	FinishedAt *time.Time `json:"finished_at,omitempty"`
}

DeployCompareSide mirrors internal/api's deployCompareSide (internal/api/deploy_compare.go): one side of a deploy comparison. IsCurrent true and DeployID empty means this side is the app's current live desired state, not a stored attempt.

type DeployFailure added in v0.2.0

type DeployFailure struct {
	Code         string    `json:"code"`
	Cause        string    `json:"cause"`
	FailingStep  string    `json:"failing_step,omitempty"`
	LogExcerpt   string    `json:"log_excerpt,omitempty"`
	SuggestedFix string    `json:"suggested_fix"`
	DocsURL      string    `json:"docs_url"`
	Retryable    bool      `json:"retryable"`
	DeployID     string    `json:"deploy_id"`
	App          string    `json:"app"`
	At           time.Time `json:"at"`
}

DeployFailure mirrors internal/failure's Failure: the structured cause of a failed or blocked deploy, identical across the API, CLI and MCP.

type DeployFreezeResource added in v0.2.0

type DeployFreezeResource struct {
	Windows   []FreezeWindowResource `json:"windows"`
	Inherited []FreezeWindowResource `json:"inherited,omitempty"`
	Status    struct {
		Frozen bool       `json:"frozen"`
		Until  *time.Time `json:"until,omitempty"`
		Reason string     `json:"reason,omitempty"`
	} `json:"status"`
}

DeployFreezeResource mirrors internal/api's deployFreezeResource.

type DeployGateResource added in v0.2.0

type DeployGateResource struct {
	DeployID    string                       `json:"deploy_id"`
	Image       string                       `json:"image"`
	Status      string                       `json:"status"`
	Reason      string                       `json:"reason,omitempty"`
	Error       string                       `json:"error,omitempty"`
	Stage       string                       `json:"stage"`
	Terminal    bool                         `json:"terminal"`
	Failed      bool                         `json:"failed"`
	Superseded  bool                         `json:"superseded"`
	Events      []GateEventResource          `json:"events"`
	Settings    DeploySafetySettingsResource `json:"settings"`
	RollbackPin *RollbackTargetResource      `json:"rollback_pin"`
}

DeployGateResource is GET /api/v1/apps/{name}/deploys/{deployId}/gate.

type DeployNotifyTargetResource added in v0.2.0

type DeployNotifyTargetResource struct {
	ID         string `json:"id,omitempty"`
	ResourceID string `json:"resource_id,omitempty"`
	ChannelID  string `json:"channel_id,omitempty"`
	NotifyURL  string `json:"notify_url,omitempty"`
	NotifyKind string `json:"notify_kind,omitempty"`
	Enabled    bool   `json:"enabled"`
}

DeployNotifyTargetResource mirrors internal/api's deployTargetResource (internal/api/deploy_notify_targets.go). NotifyURL/NotifyKind are always the resolved values from the attached channel, response-only.

type DeploySafetyOverrides added in v0.2.0

type DeploySafetyOverrides struct {
	SuccessThreshold *int     `json:"success_threshold"`
	StableWindow     *string  `json:"stable_window"`
	DrainTimeout     *string  `json:"drain_timeout"`
	WatchWindow      *string  `json:"watch_window"`
	WatchMaxRestarts *int     `json:"watch_max_restarts"`
	WatchErrorRate   *float64 `json:"watch_error_rate"`
	WatchMinRequests *int     `json:"watch_min_requests"`
	AutoRollback     *bool    `json:"auto_rollback"`
}

DeploySafetyOverrides is one app's overrides; a nil field inherits the default.

type DeploySafetyResource added in v0.2.0

type DeploySafetyResource struct {
	Overrides DeploySafetyOverrides        `json:"overrides"`
	Defaults  DeploySafetySettingsResource `json:"defaults"`
	Effective DeploySafetySettingsResource `json:"effective"`
}

DeploySafetyResource is GET and PUT /api/v1/apps/{name}/deploy-safety.

type DeploySafetySettingsResource added in v0.2.0

type DeploySafetySettingsResource struct {
	SuccessThreshold int     `json:"success_threshold"`
	StableWindow     string  `json:"stable_window"`
	DrainTimeout     string  `json:"drain_timeout"`
	WatchWindow      string  `json:"watch_window"`
	WatchMaxRestarts int     `json:"watch_max_restarts"`
	WatchErrorRate   float64 `json:"watch_error_rate"`
	WatchMinRequests int     `json:"watch_min_requests"`
	AutoRollback     bool    `json:"auto_rollback"`
	RollbackPins     int     `json:"rollback_pins"`
}

DeploySafetySettingsResource is a fully resolved set of gate and watch settings.

type DeploySpecRequest

type DeploySpecRequest struct {
	RepoURL       string                       `json:"repo_url"`
	Ref           string                       `json:"ref"`
	ImageRepoBase string                       `json:"image_repo_base,omitempty"`
	Services      map[string]DeploySpecService `json:"services"`
	// SingleServiceName overrides the default "<name>-<serviceKey>"
	// naming for the sole entry in Services. Rejected unless Services has
	// exactly one entry.
	SingleServiceName string `json:"single_service_name,omitempty"`
}

DeploySpecRequest mirrors internal/api's deploySpecRequest (internal/api/apps_multi.go): POST /api/v1/apps/{name}/deploy-spec's body, one app.yaml services: map fanned out under app name.

type DeploySpecResult

type DeploySpecResult struct {
	AppID        string                    `json:"app_id"`
	Services     []DeploySpecServiceResult `json:"services"`
	AllSucceeded bool                      `json:"all_succeeded"`
}

DeploySpecResult mirrors internal/api's deploySpecResponse. AllSucceeded false means at least one ServiceKey's own Error is set; the request as a whole still succeeded at fanning out.

type DeploySpecService

type DeploySpecService struct {
	Build     DeploySpecServiceBuild          `json:"build"`
	Domains   []string                        `json:"domains,omitempty"`
	Port      int                             `json:"port,omitempty"`
	Health    *DeploySpecServiceHealth        `json:"health,omitempty"`
	Resources *DeploySpecServiceResources     `json:"resources,omitempty"`
	Env       map[string]DeploySpecServiceEnv `json:"env,omitempty"`
	Replicas  int                             `json:"replicas,omitempty"`
	Strategy  string                          `json:"strategy,omitempty"`
	Hooks     *DeploySpecServiceHooks         `json:"hooks,omitempty"`
}

DeploySpecService mirrors one entry in app.yaml's services: map (internal/spec.Service) as POST /api/v1/apps/{name}/deploy-spec expects to receive it directly, field for field.

type DeploySpecServiceBuild

type DeploySpecServiceBuild struct {
	Type               string `json:"type"`
	Path               string `json:"path,omitempty"`
	BaseDirectory      string `json:"baseDirectory,omitempty"`
	Image              string `json:"image,omitempty"`
	RegistryCredential string `json:"registryCredential,omitempty"`
}

DeploySpecServiceBuild mirrors internal/spec.Build's JSON wire shape: human-written field names, not AppResource's bytes/nanoCPUs encoding.

type DeploySpecServiceEnv

type DeploySpecServiceEnv struct {
	Value    string `json:"value,omitempty"`
	From     string `json:"from,omitempty"`
	Secret   bool   `json:"secret,omitempty"`
	Required bool   `json:"required,omitempty"`
}

DeploySpecServiceEnv mirrors internal/spec.EnvVar's JSON shape. Unlike app.yaml's YAML parsing, no plain-string shorthand: use Value for a literal.

type DeploySpecServiceHealth

type DeploySpecServiceHealth struct {
	Readiness    *DeploySpecServiceProbe `json:"readiness,omitempty"`
	Liveness     *DeploySpecServiceProbe `json:"liveness,omitempty"`
	ReadyTimeout string                  `json:"readyTimeout,omitempty"`
}

DeploySpecServiceHealth mirrors internal/spec.Health.

type DeploySpecServiceHooks

type DeploySpecServiceHooks struct {
	PreDeploy  string `json:"preDeploy,omitempty"`
	PostDeploy string `json:"postDeploy,omitempty"`
}

DeploySpecServiceHooks mirrors internal/spec.Hooks.

type DeploySpecServiceProbe

type DeploySpecServiceProbe struct {
	Path            string   `json:"path,omitempty"`
	Scheme          string   `json:"scheme,omitempty"`
	Host            string   `json:"host,omitempty"`
	TLSSkipVerify   bool     `json:"tls_skip_verify,omitempty"`
	FollowRedirects *bool    `json:"follow_redirects,omitempty"`
	ExpectedStatus  string   `json:"expected_status,omitempty"`
	Exec            []string `json:"exec,omitempty"`
	Interval        string   `json:"interval,omitempty"`
	Timeout         string   `json:"timeout,omitempty"`
	Failures        int      `json:"failures,omitempty"`
}

DeploySpecServiceProbe mirrors internal/spec.Probe: human-readable duration strings ("5s"), not ServiceProbe's nanosecond encoding.

type DeploySpecServiceResources

type DeploySpecServiceResources struct {
	Memory string  `json:"memory,omitempty"`
	CPU    float64 `json:"cpu,omitempty"`
}

DeploySpecServiceResources mirrors internal/spec.Resources: human-readable "512Mi"/0.5 values, not ServiceResources' bytes/ nanoCPUs encoding.

type DeploySpecServiceResult

type DeploySpecServiceResult struct {
	ServiceKey  string `json:"service_key"`
	ServiceName string `json:"service_name"`
	Image       string `json:"image,omitempty"`
	Error       string `json:"error,omitempty"`
}

DeploySpecServiceResult mirrors internal/api's deploySpecServiceResult: one service key's own build+deploy outcome. Error is set on failure, Image on success, matching deploy.ServiceOutcome's own "never both" contract.

type DeployStepEvent added in v0.2.0

type DeployStepEvent struct {
	Step      string `json:"step"`
	Status    string `json:"status"`
	Timestamp string `json:"timestamp"`
}

DeployStepEvent mirrors internal/api's sseStepEvent.

type DeploySuggestion added in v0.2.0

type DeploySuggestion struct {
	ID       string            `json:"id"`
	Severity string            `json:"severity"`
	Reason   string            `json:"reason"`
	Params   map[string]string `json:"params,omitempty"`
}

DeploySuggestion is one computed next step for an app's deploys.

type DeployTriggerRequest

type DeployTriggerRequest struct {
	Image   string `json:"image"`
	Confirm bool   `json:"confirm,omitempty"`
	// Pull re-resolves the tag and fails if the registry is unreachable.
	Pull           bool   `json:"pull,omitempty"`
	OverrideFreeze bool   `json:"override_freeze,omitempty"`
	OverrideReason string `json:"override_reason,omitempty"`
}

DeployTriggerRequest mirrors internal/api's deployTriggerRequest (internal/api/deploys.go).

type DeployTriggerResult added in v0.2.0

type DeployTriggerResult struct {
	*AppResource
	PendingApproval *DeployApprovalResource `json:"pending_approval,omitempty"`
}

DeployTriggerResult mirrors internal/api's deployTriggerResult (deploys.go): the common case is a flat AppResource on the wire (*AppResource is embedded so those fields promote to the top level, unchanged from before this type existed), PendingApproval is only ever set instead, when the target environment is protected and the deploy/promote was accepted as a pending approval rather than applied.

type DeploymentDay added in v0.2.0

type DeploymentDay struct {
	Date   string `json:"date"`
	Total  int    `json:"total"`
	Failed int    `json:"failed"`
}

DeploymentDay is one sparkline bucket of the deployments summary.

type DeploymentEvent added in v0.2.0

type DeploymentEvent struct {
	Type string `json:"type"`
	Step *struct {
		Name   string `json:"name"`
		Status string `json:"status"`
	} `json:"step,omitempty"`
	Deployment DeploymentResource `json:"deployment"`
}

DeploymentEvent is one message of GET /api/v1/deployments/stream.

type DeploymentList added in v0.2.0

type DeploymentList struct {
	Items      []DeploymentResource `json:"items"`
	NextCursor string               `json:"next_cursor"`
}

DeploymentList is the GET /api/v1/deployments response.

type DeploymentListOptions added in v0.2.0

type DeploymentListOptions struct {
	Statuses    []string
	App         string
	Branch      string
	Triggers    []string
	Environment string
	Since       string
	Until       string
	Query       string
	Live        bool
	PR          int
	Limit       int
	Cursor      string
}

DeploymentListOptions are the GET /api/v1/deployments filters.

func (DeploymentListOptions) Values added in v0.2.0

func (o DeploymentListOptions) Values() url.Values

Values renders the options as a query string, omitting unset filters.

type DeploymentResource added in v0.2.0

type DeploymentResource struct {
	ID              string           `json:"id"`
	App             string           `json:"app"`
	Status          string           `json:"status"`
	Trigger         string           `json:"trigger"`
	Environment     string           `json:"environment"`
	Image           string           `json:"image"`
	ImageRef        string           `json:"image_ref"`
	ImageDigest     string           `json:"image_digest"`
	DigestReason    string           `json:"digest_reason"`
	RolloutState    string           `json:"rollout_state"`
	CommitSHA       string           `json:"commit_sha"`
	Branch          string           `json:"branch"`
	CommitMessage   string           `json:"commit_message"`
	Author          string           `json:"author"`
	PRNumber        *int             `json:"pr_number"`
	StartedAt       time.Time        `json:"started_at"`
	FinishedAt      *time.Time       `json:"finished_at"`
	DurationMS      *int64           `json:"duration_ms"`
	Steps           *DeploymentSteps `json:"steps"`
	ErrorSummary    *string          `json:"error_summary"`
	ReasonCode      string           `json:"reason_code"`
	Reason          string           `json:"reason"`
	RollbackOf      *string          `json:"rollback_of"`
	RolledBackBy    *string          `json:"rolled_back_by"`
	SupersededBy    *string          `json:"superseded_by"`
	IsLive          bool             `json:"is_live"`
	ApprovalID      *string          `json:"approval_id"`
	PreviewImageURL *string          `json:"preview_image_url"`
	SBOMPackages    *int             `json:"sbom_packages"`
	VulnCounts      *VulnCounts      `json:"vuln_counts"`
	Failure         *DeployFailure   `json:"failure,omitempty"`
}

DeploymentResource is one row of GET /api/v1/deployments.

type DeploymentSteps added in v0.2.0

type DeploymentSteps struct {
	Done        int    `json:"done"`
	Running     int    `json:"running"`
	Failed      int    `json:"failed"`
	FailingStep string `json:"failing_step,omitempty"`
}

DeploymentSteps is a live deployment's step tally.

type DeploymentSummary added in v0.2.0

type DeploymentSummary struct {
	Window         string         `json:"window"`
	Counts         map[string]int `json:"counts"`
	InProgress     int            `json:"in_progress"`
	NeedsAttention int            `json:"needs_attention"`
	FailureRate24h *float64       `json:"failure_rate_24h"`
	Duration       struct {
		MedianMS *int64 `json:"median_ms"`
		P95MS    *int64 `json:"p95_ms"`
		Samples  int    `json:"samples"`
	} `json:"duration"`
	PerDay []DeploymentDay `json:"per_day"`
}

DeploymentSummary is the GET /api/v1/deployments/summary response.

type DetectFrameworkResource added in v0.2.0

type DetectFrameworkResource struct {
	Provider      string `json:"provider,omitempty"`
	FrameworkName string `json:"framework_name,omitempty"`
	Detected      bool   `json:"detected"`
}

DetectFrameworkResource mirrors internal/api's detectFrameworkResponse.

type DeviceActivity added in v0.2.0

type DeviceActivity struct {
	ID          string    `json:"id"`
	State       string    `json:"state"`
	ClientName  string    `json:"client_name"`
	RequesterIP string    `json:"requester_ip"`
	UserAgent   string    `json:"user_agent"`
	CreatedAt   time.Time `json:"created_at"`
	ExpiresAt   time.Time `json:"expires_at"`
	Dismissible bool      `json:"dismissible"`
	Dismissed   bool      `json:"dismissed"`
	AuditPath   string    `json:"audit_path"`
}

DeviceActivity is one recent CLI login in any state. It never carries a user code or device code.

type DevicePendingLogin added in v0.2.0

type DevicePendingLogin struct {
	ClientName  string    `json:"client_name"`
	RequesterIP string    `json:"requester_ip"`
	UserAgent   string    `json:"user_agent"`
	CreatedAt   time.Time `json:"created_at"`
	ExpiresAt   time.Time `json:"expires_at"`
}

DevicePendingLogin is one waiting CLI login as the read-only summary shows it. It never carries a user code or device code.

type DeviceStartRequest

type DeviceStartRequest struct {
	ClientName string `json:"client_name,omitempty"`
}

DeviceStartRequest mirrors internal/api's deviceStartRequest.

type DeviceStartResponse

type DeviceStartResponse struct {
	DeviceCode              string `json:"device_code"`
	UserCode                string `json:"user_code"`
	VerificationURI         string `json:"verification_uri"`
	VerificationURIComplete string `json:"verification_uri_complete"`
	ExpiresIn               int    `json:"expires_in"`
	Interval                int    `json:"interval"`
}

DeviceStartResponse mirrors internal/api's deviceStartResponse.

type DeviceTokenRequest

type DeviceTokenRequest struct {
	DeviceCode string `json:"device_code"`
}

DeviceTokenRequest mirrors internal/api's deviceTokenRequest.

type DeviceTokenResponse

type DeviceTokenResponse struct {
	ID         string     `json:"id"`
	Name       string     `json:"name"`
	Abilities  []string   `json:"abilities"`
	CreatedAt  time.Time  `json:"created_at"`
	LastUsedAt *time.Time `json:"last_used_at,omitempty"`
	ExpiresAt  *time.Time `json:"expires_at,omitempty"`
	RevokedAt  *time.Time `json:"revoked_at,omitempty"`
	Token      string     `json:"token"`
}

DeviceTokenResponse mirrors internal/api's createTokenResponse, the shape POST /api/v1/auth/device/token returns once a request is approved.

type DiagnosisCause added in v0.2.0

type DiagnosisCause struct {
	Code        string            `json:"code"`
	Title       string            `json:"title"`
	Explanation string            `json:"explanation"`
	Confidence  string            `json:"confidence"`
	Evidence    []DiagnosisSignal `json:"evidence"`
	Fixes       []DiagnosisFix    `json:"fixes"`
}

DiagnosisCause is one typed, evidence-backed reason for a failure.

type DiagnosisChange added in v0.2.0

type DiagnosisChange struct {
	Field      string `json:"field"`
	From       string `json:"from"`
	To         string `json:"to"`
	NeedsInput bool   `json:"needs_input,omitempty"`
}

DiagnosisChange is one field edit a fix proposes, on the app resource's own JSON paths ("port", "health.readiness.path", "resources.memory_bytes", "env.NAME").

type DiagnosisFix added in v0.2.0

type DiagnosisFix struct {
	N        int               `json:"n"`
	Label    string            `json:"label"`
	Kind     string            `json:"kind"`
	Changes  []DiagnosisChange `json:"changes"`
	Hint     string            `json:"hint,omitempty"`
	Redeploy bool              `json:"redeploy,omitempty"`
}

DiagnosisFix is one remedy for a cause. Kind is "patch", "input" or "manual"; only the first two carry changes.

func FindDiagnosisFix added in v0.2.0

func FindDiagnosisFix(d DiagnosisResource, n int) (DiagnosisFix, bool)

FindDiagnosisFix returns fix number n across every cause.

type DiagnosisResource

type DiagnosisResource struct {
	Explanation     string            `json:"explanation"`
	Suggestion      string            `json:"suggestion"`
	Confidence      string            `json:"confidence"`
	MatchedSignals  []DiagnosisSignal `json:"matched_signals"`
	DeployAttemptID string            `json:"deploy_attempt_id,omitempty"`
	Causes          []DiagnosisCause  `json:"causes,omitempty"`
	Fixable         bool              `json:"fixable,omitempty"`
	Failure         *DeployFailure    `json:"failure,omitempty"`

	// RecentChanges is what changed on the app shortly before the diagnosis.
	RecentChanges *RecentChangesResource `json:"recent_changes,omitempty"`
}

DiagnosisResource mirrors internal/api's diagnosisResource (internal/api/diagnose.go): GET /api/v1/apps/{name}/diagnose's response, a deterministic explanation of a deploy failure or crashloop synthesized from internal/diagnose, never from an external model.

type DiagnosisSignal

type DiagnosisSignal struct {
	Source  string `json:"source"`
	Excerpt string `json:"excerpt"`
}

DiagnosisSignal mirrors internal/api's diagnosisSignalResource: one piece of evidence a diagnosis signature matched against.

type DimensionRecommendationResource

type DimensionRecommendationResource struct {
	Dimension      string  `json:"dimension"`
	SampleCount    int     `json:"sample_count"`
	DataSufficient bool    `json:"data_sufficient"`
	Confidence     string  `json:"confidence"`
	CurrentLimit   int64   `json:"current_limit"`
	P95Usage       float64 `json:"p95_usage"`
	P99Usage       float64 `json:"p99_usage"`
	SuggestedLimit int64   `json:"suggested_limit"`
	Action         string  `json:"action,omitempty"`
	Reason         string  `json:"reason"`
}

DimensionRecommendationResource mirrors internal/api's dimensionRecommendationResource (internal/api/resource_recommendation.go): one resource dimension's (memory or cpu) right-sizing suggestion. CurrentLimit/SuggestedLimit are bytes for memory, nano-CPUs for cpu, the same raw-unit convention AppResource.Resources already uses. Action is "" when there isn't enough data, or no limit is currently set, to responsibly suggest a change.

type DockerGuardResource added in v0.2.0

type DockerGuardResource struct {
	Mode            string                   `json:"mode"`
	Source          string                   `json:"source"`
	Effective       string                   `json:"effective"`
	Running         bool                     `json:"running"`
	Socket          string                   `json:"socket,omitempty"`
	Upstream        string                   `json:"upstream,omitempty"`
	RestartRequired bool                     `json:"restart_required"`
	ConfigError     string                   `json:"config_error,omitempty"`
	StartError      string                   `json:"start_error,omitempty"`
	AuditSince      string                   `json:"audit_since,omitempty"`
	SinceBoot       []DockerGuardRuleCount   `json:"since_boot"`
	Rules           []string                 `json:"rules"`
	Configured      bool                     `json:"configured"`
	WindowSeconds   int64                    `json:"window_seconds"`
	Window          []DockerGuardRuleSummary `json:"window"`
	WouldDenyTotal  int                      `json:"would_deny_total"`
	DeniedTotal     int                      `json:"denied_total"`
	ReadyToEnforce  bool                     `json:"ready_to_enforce"`
}

DockerGuardResource mirrors GET /api/v1/system/docker-guard.

type DockerGuardRuleCount added in v0.2.0

type DockerGuardRuleCount struct {
	Rule      string `json:"rule"`
	Denied    int64  `json:"denied"`
	WouldDeny int64  `json:"would_deny"`
	LastSeen  string `json:"last_seen"`
	LastPath  string `json:"last_path"`
}

DockerGuardRuleCount mirrors one since-boot counter in the guard status.

type DockerGuardRuleSummary added in v0.2.0

type DockerGuardRuleSummary struct {
	Rule      string `json:"rule"`
	Denied    int    `json:"denied"`
	WouldDeny int    `json:"would_deny"`
	LastSeen  string `json:"last_seen"`
	LastPath  string `json:"last_path"`
}

DockerGuardRuleSummary mirrors one rule's audit history over the window.

type DoctorAction added in v0.2.0

type DoctorAction struct {
	Kind  string `json:"kind"`
	Label string `json:"label"`
	API   string `json:"api,omitempty"`
	Value string `json:"value,omitempty"`
}

DoctorAction mirrors domaindoctor.Action.

type DoctorCheck added in v0.2.0

type DoctorCheck struct {
	ID     string     `json:"id"`
	Title  string     `json:"title"`
	State  string     `json:"state"`
	Tier   int        `json:"tier"`
	Detail string     `json:"detail,omitempty"`
	Fix    *DoctorFix `json:"fix,omitempty"`
}

DoctorCheck mirrors domaindoctor.Check.

type DoctorCheckResource

type DoctorCheckResource struct {
	Code     string `json:"code"`
	Name     string `json:"name"`
	Status   string `json:"status"`
	Message  string `json:"message"`
	Fix      string `json:"fix,omitempty"`
	DocsPath string `json:"docs_path,omitempty"`
	// Class is "incident" or "recommendation" for a check that is not ok.
	Class string `json:"class,omitempty"`
}

DoctorCheckResource mirrors internal/api's doctorCheckResource: one preflight check's result (Status is "ok", "warn", "fail", or "unknown"). Fix/DocsPath are empty when the check is ok or has no single actionable command.

type DoctorFix added in v0.2.0

type DoctorFix struct {
	Summary string        `json:"summary"`
	Action  *DoctorAction `json:"action,omitempty"`
}

DoctorFix mirrors domaindoctor.Fix.

type DomainAuthGateResource added in v0.2.0

type DomainAuthGateResource struct {
	Domain                string   `json:"domain"`
	Configured            bool     `json:"configured"`
	Enabled               bool     `json:"enabled"`
	AuthURL               string   `json:"auth_url"`
	CheckPath             string   `json:"check_path"`
	CopyHeaders           []string `json:"copy_headers"`
	TimeoutSeconds        int      `json:"timeout_seconds"`
	DefaultTimeoutSeconds int      `json:"default_timeout_seconds"`
	UpdatedAt             string   `json:"updated_at,omitempty"`
	// Provider is "external" or "builtin"; Allow only applies to builtin.
	Provider         string         `json:"provider"`
	Allow            []AuthGateRule `json:"allow"`
	LiveSessions     int            `json:"live_sessions"`
	BuiltinAvailable bool           `json:"builtin_available"`
}

DomainAuthGateResource mirrors internal/api's domainAuthGateResource.

type DomainAutomationOverride added in v0.2.0

type DomainAutomationOverride struct {
	AutoDNS               *bool   `json:"auto_dns,omitempty"`
	AutoProxyRoute        *bool   `json:"auto_proxy_route,omitempty"`
	ForceHTTPS            *bool   `json:"force_https,omitempty"`
	WWWPolicy             *string `json:"www_policy,omitempty"`
	AttachWWWCounterpart  *bool   `json:"attach_www_counterpart,omitempty"`
	WildcardForBaseDomain *bool   `json:"wildcard_for_base_domain,omitempty"`
	VerifyAfter           *bool   `json:"verify_after,omitempty"`
}

DomainAutomationOverride sets only the keys given.

type DomainAutomationPolicy added in v0.2.0

type DomainAutomationPolicy struct {
	AutoDNS               bool   `json:"auto_dns"`
	AutoProxyRoute        bool   `json:"auto_proxy_route"`
	ForceHTTPS            bool   `json:"force_https"`
	WWWPolicy             string `json:"www_policy"`
	AttachWWWCounterpart  bool   `json:"attach_www_counterpart"`
	WildcardForBaseDomain bool   `json:"wildcard_for_base_domain"`
	VerifyAfter           bool   `json:"verify_after"`
}

DomainAutomationPolicy mirrors internal/api's domainAutomationPolicy.

type DomainAutomationResource added in v0.2.0

type DomainAutomationResource struct {
	DomainAutomationPolicy
	DNSProvider      string           `json:"dns_provider"`
	ProxyIntegration bool             `json:"proxy_integration_enabled"`
	WildcardDNS      *DomainDNSResult `json:"wildcard_dns,omitempty"`
}

DomainAutomationResource mirrors GET/PUT /api/v1/settings/domain-automation.

type DomainBasicAuthResource

type DomainBasicAuthResource struct {
	Domain      string `json:"domain"`
	Enabled     bool   `json:"enabled"`
	Username    string `json:"username,omitempty"`
	HasPassword bool   `json:"has_password"`
}

DomainBasicAuthResource mirrors internal/api's domainBasicAuthResource (internal/api/domain_basic_auth.go): GET/PUT/DELETE /api/v1/apps/{name}/domains/{domain}/auth's wire shape. The password itself never appears here in either direction.

type DomainCheckResource added in v0.2.0

type DomainCheckResource struct {
	Domain        string   `json:"domain"`
	ExpectedHost  string   `json:"expected_host,omitempty"`
	HostInferred  bool     `json:"host_inferred,omitempty"`
	Resolved      bool     `json:"resolved"`
	ResolvedHosts []string `json:"resolved_hosts,omitempty"`
	Status        string   `json:"status"`
	ExpectedIPv4  []string `json:"expected_ipv4,omitempty"`
	ExpectedIPv6  []string `json:"expected_ipv6,omitempty"`
	// ExpectedPrivate is true when the node address is private/LAN.
	ExpectedPrivate bool `json:"expected_private,omitempty"`
	// Challenge is "http-01" or "dns-01-required".
	Challenge   string       `json:"challenge,omitempty"`
	DNSProvider string       `json:"dns_provider,omitempty"`
	ACMEFailure *ACMEFailure `json:"acme_failure,omitempty"`
}

DomainCheckResource mirrors internal/api's domainCheckResponse (internal/api/domain_check.go): GET /api/v1/apps/{name}/domains/{domain}/check's wire shape.

type DomainDNSResult added in v0.2.0

type DomainDNSResult struct {
	Domain   string              `json:"domain"`
	DNS      string              `json:"dns"`
	Planned  string              `json:"planned,omitempty"`
	Provider string              `json:"provider,omitempty"`
	Zone     string              `json:"zone,omitempty"`
	Record   *DNSRecordResource  `json:"record,omitempty"`
	Replaced []DNSRecordResource `json:"replaced,omitempty"`
	Proxied  bool                `json:"proxied,omitempty"`
	Message  string              `json:"message,omitempty"`
}

DomainDNSResult mirrors internal/api's domainDNSResult.

type DomainDoctorReport added in v0.2.0

type DomainDoctorReport struct {
	Domain    string        `json:"domain"`
	App       string        `json:"app,omitempty"`
	CheckedAt time.Time     `json:"checked_at"`
	Status    string        `json:"status"`
	Probed    bool          `json:"probed"`
	ProbeNote string        `json:"probe_note,omitempty"`
	Checks    []DoctorCheck `json:"checks"`
}

DomainDoctorReport is POST .../domains/{domain}/doctor's body.

type DomainErrorPageEntry added in v0.2.0

type DomainErrorPageEntry struct {
	StatusCode int    `json:"status_code"`
	Body       string `json:"body"`
}

DomainErrorPageEntry mirrors internal/api's domainErrorPageEntry: one status-code-to-body mapping.

type DomainErrorPagesResource added in v0.2.0

type DomainErrorPagesResource struct {
	Domain string                 `json:"domain"`
	Pages  []DomainErrorPageEntry `json:"pages"`
}

DomainErrorPagesResource mirrors internal/api's domainErrorPagesResource (internal/api/domain_error_pages.go): GET/PUT/DELETE /api/v1/apps/{name}/domains/{domain}/error-pages's wire shape.

type DomainMaintenanceResource

type DomainMaintenanceResource struct {
	Domain  string `json:"domain"`
	Enabled bool   `json:"enabled"`
}

DomainMaintenanceResource mirrors internal/api's domainMaintenanceResource: GET/PUT/DELETE /api/v1/apps/{name}/domains/{domain}/maintenance's wire shape.

type DomainPoliciesResource added in v0.2.0

type DomainPoliciesResource struct {
	Domain    string                       `json:"domain"`
	App       string                       `json:"app"`
	Policy    trafficpolicy.Policy         `json:"policy"`
	UpdatedAt map[string]string            `json:"updated_at"`
	TLSReal   bool                         `json:"tls_real"`
	Geo       GeoStatus                    `json:"geo"`
	Cache     CacheStats                   `json:"cache"`
	Limits    PolicyLimits                 `json:"limits"`
	Preview   []trafficpolicy.Step         `json:"preview"`
	Warnings  []string                     `json:"warnings,omitempty"`
	Security  trafficpolicy.SecurityPreset `json:"security_preset"`
}

DomainPoliciesResource is GET .../domains/{domain}/policies.

type DomainPortsResource added in v0.2.0

type DomainPortsResource struct {
	App             string       `json:"app"`
	Domain          string       `json:"domain"`
	PublicHTTPSPort int          `json:"public_https_port"`
	Streams         []PortStream `json:"streams"`
	DetectionNote   string       `json:"detection_note,omitempty"`
}

DomainPortsResource is GET .../domains/{domain}/ports.

type DomainReachability added in v0.2.0

type DomainReachability struct {
	URL    string `json:"reachable_url,omitempty"`
	Reason string `json:"reachable_reason,omitempty"`
}

DomainReachability is one entry of AppEnvironmentDomains.Reachability.

type DomainRedirectResource added in v0.2.0

type DomainRedirectResource struct {
	Domain     string `json:"domain"`
	Enabled    bool   `json:"enabled"`
	TargetURL  string `json:"target_url,omitempty"`
	StatusCode int    `json:"status_code"`
}

DomainRedirectResource mirrors internal/api's domainRedirectResource (internal/api/domain_redirect.go): GET/PUT/DELETE /api/v1/apps/{name}/domains/{domain}/redirect's wire shape.

type DomainRedirectsResource added in v0.2.0

type DomainRedirectsResource struct {
	Domain     string                  `json:"domain"`
	Configured bool                    `json:"configured"`
	Settings   trafficpolicy.Redirects `json:"settings"`
	Effective  RedirectEffective       `json:"effective"`
	AppDomains []RedirectDomainRow     `json:"app_domains"`
	Canonical  CanonicalState          `json:"canonical"`
	Samples    []PolicyPreviewHops     `json:"samples"`
	Warnings   []string                `json:"warnings,omitempty"`
}

DomainRedirectsResource is GET .../domains/{domain}/redirects.

type DomainResource

type DomainResource struct {
	Domain      string `json:"domain"`
	ServiceName string `json:"service_name"`
	// Automatic marks a generated sslip.io hostname rather than a configured domain.
	Automatic bool `json:"automatic,omitempty"`
	// TLSOwner is who terminates TLS: acme, internal, proxy or custom.
	TLSOwner string `json:"tls_owner,omitempty"`
	// ReachableURL is the link to open; ReachableReason says why it is empty.
	ReachableURL    string `json:"reachable_url,omitempty"`
	ReachableReason string `json:"reachable_reason,omitempty"`
	// Kind is app or standalone; Target is where a standalone domain proxies.
	Kind   string `json:"kind,omitempty"`
	Target string `json:"target,omitempty"`
}

DomainResource mirrors internal/api's domainResource (internal/api/ingress_settings.go).

type DomainRewrite added in v0.2.0

type DomainRewrite struct {
	Prefix  string `json:"prefix,omitempty"`
	Find    string `json:"find,omitempty"`
	Replace string `json:"replace,omitempty"`
}

DomainRewrite mirrors store.DomainRewrite: Prefix is prepended to every copied hostname, or Find (a hostname or parent domain) is swapped for Replace.

type DomainSearchVisibilityResource added in v0.2.0

type DomainSearchVisibilityResource struct {
	Domain string `json:"domain"`
	Hidden bool   `json:"hidden"`
}

DomainSearchVisibilityResource is the state of one domain's search engine visibility.

type DomainTLSCertResource

type DomainTLSCertResource struct {
	Domain     string `json:"domain"`
	Enabled    bool   `json:"enabled"`
	UploadedAt string `json:"uploaded_at,omitempty"`
	ExpiresAt  string `json:"expires_at,omitempty"`
}

DomainTLSCertResource mirrors internal/api's domainTLSCertResource (internal/api/domain_tls_cert.go): GET/PUT/DELETE /api/v1/apps/{name}/domains/{domain}/tls-cert's wire shape. Neither the certificate nor the private key ever appears here.

type DomainWAFResource added in v0.2.0

type DomainWAFResource struct {
	Domain           string `json:"domain"`
	WAFEnabled       bool   `json:"waf_enabled"`
	WAFMode          string `json:"waf_mode"`
	RateLimitEnabled bool   `json:"rate_limit_enabled"`
	RateLimitRPS     int    `json:"rate_limit_rps"`
	RateLimitBurst   int    `json:"rate_limit_burst"`
}

DomainWAFResource mirrors internal/api's domainWAFResource (internal/api/domain_waf.go): GET/PUT/DELETE /api/v1/apps/{name}/domains/{domain}/waf's wire shape.

type DrainBlocked added in v0.2.0

type DrainBlocked struct {
	Kind   string `json:"kind"`
	Name   string `json:"name"`
	Reason string `json:"reason"`
}

DrainBlocked is a resource a drain could not move.

type DrainBlockedResource added in v0.2.0

type DrainBlockedResource struct {
	Kind   string `json:"kind"`
	Name   string `json:"name"`
	Reason string `json:"reason"`
}

DrainBlockedResource mirrors internal/api's drainBlocked.

type DrainNodeResponse

type DrainNodeResponse struct {
	TargetNodeID   string   `json:"target_node_id"`
	MovedServices  []string `json:"moved_services"`
	MovedDatabases []string `json:"moved_databases"`
	Errors         []string `json:"errors,omitempty"`
	AutoPlaced     bool     `json:"auto_placed,omitempty"`
	// Warnings lists checks that could not run, so the drain may be incomplete.
	Warnings []string `json:"warnings,omitempty"`
	// Blocked names apps and models left on the node, with the reason.
	Blocked []DrainBlockedResource `json:"blocked,omitempty"`
}

DrainNodeResponse mirrors internal/api's drainNodeResponse. A partial failure is not itself a Go error from DrainNode: it comes back as a successful response with Errors populated, naming exactly which resource didn't move so the caller can retry just that one.

type DrillSummaryResource added in v0.2.0

type DrillSummaryResource struct {
	ID      string `json:"id"`
	At      string `json:"at"`
	Status  string `json:"status"`
	Stage   string `json:"stage,omitempty"`
	Error   string `json:"error,omitempty"`
	Trigger string `json:"trigger,omitempty"`
	Files   int64  `json:"files,omitempty"`
}

DrillSummaryResource mirrors internal/api's drillSummaryResource.

type EdgeGuidance added in v0.2.0

type EdgeGuidance struct {
	Commit          string   `json:"commit,omitempty"`
	CommitURL       string   `json:"commit_url,omitempty"`
	Image           string   `json:"image"`
	RunsInContainer bool     `json:"runs_in_container"`
	Installable     bool     `json:"installable"`
	PullCommand     string   `json:"pull_command,omitempty"`
	RecreateCommand string   `json:"recreate_command,omitempty"`
	ComposeSnippet  string   `json:"compose_snippet,omitempty"`
	SwitchTo        []string `json:"switch_to,omitempty"`
}

EdgeGuidance is what the edge channel means for this install: a moving container image tag rather than a release binary.

type EditDomainsRequest added in v0.2.0

type EditDomainsRequest struct {
	Set    *[]string `json:"set,omitempty"`
	Add    []string  `json:"add,omitempty"`
	Remove []string  `json:"remove,omitempty"`
	// Environment (ID, name or kind) targets that environment's own set.
	Environment string `json:"environment,omitempty"`
	// DNS is auto (default), off or preview. Replace overwrites a
	// conflicting record, RemoveDNS deletes records Levelrail created for
	// removed domains, Automation overrides the go-live policy.
	DNS        string                    `json:"dns,omitempty"`
	Replace    bool                      `json:"replace,omitempty"`
	RemoveDNS  bool                      `json:"remove_dns,omitempty"`
	Automation *DomainAutomationOverride `json:"automation,omitempty"`
}

EditDomainsRequest mirrors internal/api's editDomainsRequest: Set, or Add and Remove.

type EditDomainsResult added in v0.2.0

type EditDomainsResult struct {
	App           string            `json:"app"`
	Domains       []string          `json:"domains"`
	Changed       bool              `json:"changed"`
	EnvironmentID string            `json:"environment_id,omitempty"`
	DNSResults    []DomainDNSResult `json:"dns_results,omitempty"`
	GoLive        []GoLiveResult    `json:"go_live,omitempty"`
}

EditDomainsResult mirrors internal/api's editDomainsResponse.

type EmailSettingsResource added in v0.2.0

type EmailSettingsResource struct {
	Backend               string `json:"backend"`
	SMTPHost              string `json:"smtp_host,omitempty"`
	SMTPPort              int    `json:"smtp_port,omitempty"`
	SMTPUsername          string `json:"smtp_username,omitempty"`
	SMTPFrom              string `json:"smtp_from,omitempty"`
	SMTPPassword          string `json:"smtp_password,omitempty"`
	SMTPPasswordSet       bool   `json:"smtp_password_set,omitempty"`
	SESRegion             string `json:"ses_region,omitempty"`
	SESAccessKeyID        string `json:"ses_access_key_id,omitempty"`
	SESFrom               string `json:"ses_from,omitempty"`
	SESSecretAccessKey    string `json:"ses_secret_access_key,omitempty"`
	SESSecretAccessKeySet bool   `json:"ses_secret_access_key_set,omitempty"`
}

EmailSettingsResource mirrors internal/api's emailSettingsResource (internal/api/email_settings.go): the shape of both GET and PUT /api/v1/settings/email. Credential fields are write-only; the corresponding *Set booleans report presence instead.

type EnableHTTPSRequest added in v0.2.0

type EnableHTTPSRequest struct {
	Email   string `json:"email"`
	Staging bool   `json:"staging"`
}

EnableHTTPSRequest is POST /api/v1/settings/ingress/https's body.

type EngineHealth added in v0.2.0

type EngineHealth struct {
	State   string   `json:"state"`
	Summary string   `json:"summary"`
	Reasons []string `json:"reasons"`
}

EngineHealth mirrors internal/models.EngineHealth.

type EngineMetricPoint added in v0.2.0

type EngineMetricPoint struct {
	T time.Time `json:"t"`
	V float64   `json:"v"`
}

EngineMetricPoint is one stored engine reading.

type EngineMetricSeries added in v0.2.0

type EngineMetricSeries struct {
	ID        string              `json:"id"`
	Label     string              `json:"label"`
	Unit      string              `json:"unit"`
	Supported bool                `json:"supported"`
	Latest    *float64            `json:"latest"`
	Points    []EngineMetricPoint `json:"points"`
}

EngineMetricSeries mirrors internal/models.EngineMetricSeries.

type EngineMetricsReport added in v0.2.0

type EngineMetricsReport struct {
	Model      string               `json:"model"`
	Engine     string               `json:"engine"`
	From       time.Time            `json:"from"`
	To         time.Time            `json:"to"`
	Collecting bool                 `json:"collecting"`
	Note       string               `json:"note"`
	Health     EngineHealth         `json:"health"`
	Series     []EngineMetricSeries `json:"series"`
}

EngineMetricsReport mirrors internal/models.EngineMetricsReport.

type EnvSettings added in v0.2.0

type EnvSettings struct {
	RevealPolicy       string          `json:"reveal_policy"`
	PolicyValid        bool            `json:"policy_valid"`
	TokenReveal        bool            `json:"token_reveal"`
	SecretsWriteOnly   bool            `json:"secrets_write_only"`
	SensitiveOverrides map[string]bool `json:"sensitive_overrides"`
	GrantTTLSeconds    int             `json:"grant_ttl_seconds"`
	HideAfterSeconds   int             `json:"hide_after_seconds"`
	SecretsConfigured  bool            `json:"secrets_configured"`
}

EnvSettings mirrors GET /api/v1/apps/{name}/env/settings.

type EnvSettingsUpdate added in v0.2.0

type EnvSettingsUpdate struct {
	SensitiveOverrides map[string]*bool `json:"sensitive_overrides,omitempty"`
	SecretsWriteOnly   *bool            `json:"secrets_write_only,omitempty"`
	StepUp             *StepUpProof     `json:"step_up,omitempty"`
}

EnvSettingsUpdate is PUT /api/v1/apps/{name}/env/settings's body. A nil override value clears that key's override.

type EnvironmentCloneAppInput added in v0.2.0

type EnvironmentCloneAppInput struct {
	SourceApp string   `json:"source_app"`
	NewName   string   `json:"new_name,omitempty"`
	Domains   []string `json:"domains,omitempty"`
}

EnvironmentCloneAppInput mirrors internal/api's environmentCloneAppInput: an optional per-app override inside a clone request. Omitted entirely for a source app means "use the auto-suggested name, assign no domains".

type EnvironmentCloneAppPreview added in v0.2.0

type EnvironmentCloneAppPreview struct {
	SourceApp             string   `json:"source_app"`
	SuggestedNewName      string   `json:"suggested_new_name"`
	Image                 string   `json:"image"`
	EnvVarCount           int      `json:"env_var_count"`
	SecretEnvKeys         []string `json:"secret_env_keys"`
	CurrentDomains        []string `json:"current_domains"`
	VolumeCount           int      `json:"volume_count"`
	BindMountCount        int      `json:"bind_mount_count"`
	HasHealthCheck        bool     `json:"has_health_check"`
	HasDatabaseAttachment bool     `json:"has_database_attachment"`
	HasHostPortPin        bool     `json:"has_host_port_pin"`
	ScheduledTaskCount    int      `json:"scheduled_task_count"`
}

EnvironmentCloneAppPreview mirrors internal/api's environmentCloneAppPreview (internal/api/environment_clone.go): one source app's own view inside GET .../clone/preview.

type EnvironmentCloneAppResult added in v0.2.0

type EnvironmentCloneAppResult struct {
	SourceApp string `json:"source_app"`
	NewApp    string `json:"new_app"`
	Image     string `json:"image"`
}

EnvironmentCloneAppResult mirrors internal/api's environmentCloneAppResult: one cloned app's own entry inside POST .../clone's response.

type EnvironmentClonePreviewResource added in v0.2.0

type EnvironmentClonePreviewResource struct {
	SourceEnvironment        EnvironmentResource          `json:"source_environment"`
	NewEnvironmentName       string                       `json:"new_environment_name"`
	Apps                     []EnvironmentCloneAppPreview `json:"apps"`
	EnvironmentEnvVarKeys    []string                     `json:"environment_env_var_keys"`
	EnvironmentSecretEnvKeys []string                     `json:"environment_secret_env_keys"`
	UnclonedFields           []string                     `json:"uncloned_fields"`
	Note                     string                       `json:"note"`
}

EnvironmentClonePreviewResource mirrors internal/api's environmentClonePreviewResource, GET .../clone/preview's response.

type EnvironmentCloneRequest added in v0.2.0

type EnvironmentCloneRequest struct {
	NewEnvironmentName string                     `json:"new_environment_name"`
	CopySecretValues   bool                       `json:"copy_secret_values,omitempty"`
	Apps               []EnvironmentCloneAppInput `json:"apps,omitempty"`
	CopyDomains        bool                       `json:"copy_domains,omitempty"`
	DomainRewrite      *DomainRewrite             `json:"domain_rewrite,omitempty"`
}

EnvironmentCloneRequest mirrors internal/api's environmentCloneRequest, POST /api/v1/environments/{id}/clone's body.

type EnvironmentCloneResultResource added in v0.2.0

type EnvironmentCloneResultResource struct {
	Environment        EnvironmentResource         `json:"environment"`
	Apps               []EnvironmentCloneAppResult `json:"apps"`
	CopiedSecretValues bool                        `json:"copied_secret_values"`
	Note               string                      `json:"note"`
}

EnvironmentCloneResultResource mirrors internal/api's environmentCloneResultResource, POST .../clone's response.

type EnvironmentCompareResource added in v0.2.0

type EnvironmentCompareResource struct {
	ProjectID string                    `json:"project_id"`
	A         EnvironmentCompareSide    `json:"a"`
	B         EnvironmentCompareSide    `json:"b"`
	Diff      []EnvironmentEnvDiffEntry `json:"diff"`
	Note      string                    `json:"note"`
}

EnvironmentCompareResource mirrors internal/api's environmentCompareResource, GET /api/v1/projects/{id}/environments/compare's response: each of two named environments' resolved effective env vars (organization, project, and environment shared-env tiers merged in internal/reconcile/application's resolveEnv precedence), secret values always redacted, plus the keys that differ between them.

type EnvironmentCompareSide added in v0.2.0

type EnvironmentCompareSide struct {
	Environment EnvironmentResource           `json:"environment"`
	Env         []EnvironmentEnvEntryResource `json:"env"`
}

EnvironmentCompareSide mirrors internal/api's environmentCompareSide: one side (A or B) of GET .../environments/compare's response.

type EnvironmentDomainSet added in v0.2.0

type EnvironmentDomainSet struct {
	EnvironmentID string   `json:"environment_id"`
	Name          string   `json:"name"`
	Kind          string   `json:"kind"`
	Active        bool     `json:"active"`
	Domains       []string `json:"domains"`
}

EnvironmentDomainSet is one environment's domain set for an app.

type EnvironmentEnvDiffEntry added in v0.2.0

type EnvironmentEnvDiffEntry struct {
	Key    string `json:"key"`
	Secret bool   `json:"secret"`
	Status string `json:"status"`
	A      string `json:"a,omitempty"`
	B      string `json:"b,omitempty"`
}

EnvironmentEnvDiffEntry mirrors internal/api's environmentEnvDiffEntry: one key that differs between A and B. Status is one of "only_in_a", "only_in_b", "changed", or "masked". A/B are only ever populated for a non-secret, present-on-both-sides "changed" entry or a non-secret present-on-one-side "only_in_a"/"only_in_b" entry: a secret-marked key never carries a value here, on either side.

type EnvironmentEnvEntryResource added in v0.2.0

type EnvironmentEnvEntryResource struct {
	Key    string `json:"key"`
	Value  string `json:"value,omitempty"`
	Secret bool   `json:"secret"`
}

EnvironmentEnvEntryResource mirrors internal/api's environmentEnvEntryResource: one resolved key inside EnvironmentCompareSide.Env. Value is only ever populated when Secret is false.

type EnvironmentGrants added in v0.2.0

type EnvironmentGrants struct {
	EnvironmentIDs []string `json:"environment_ids"`
}

EnvironmentGrants is the body of the user environment-grants routes.

type EnvironmentResource

type EnvironmentResource struct {
	ID        string `json:"id"`
	ProjectID string `json:"project_id"`
	Name      string `json:"name"`
	Protected bool   `json:"protected"`
	CreatedAt string `json:"created_at"`
	Kind      string `json:"kind,omitempty"`
	Scope     string `json:"scope,omitempty"`
	SortOrder int    `json:"sort_order,omitempty"`
}

EnvironmentResource mirrors internal/api's environmentResource (internal/api/environments.go).

type EvaluateFlagResource

type EvaluateFlagResource struct {
	Key     string `json:"key"`
	Enabled bool   `json:"enabled"`
}

EvaluateFlagResource mirrors internal/api's evaluateFlagResource: the tiny shape GET /api/v1/flags/evaluate/{key} returns.

type ExecAccessResource added in v0.2.0

type ExecAccessResource struct {
	Enabled bool `json:"enabled"`
}

ExecAccessResource mirrors internal/api's execAccessResource: both GET and PUT /api/v1/apps/{name}/exec-access's response, whether shell/exec access is even attempted for this app regardless of the caller's own IAM abilities. Default true, unlike AutoRollbackSettingResource.

type ExecRequest

type ExecRequest struct {
	Command        string   `json:"command"`
	Args           []string `json:"args,omitempty"`
	TimeoutSeconds int      `json:"timeout_seconds,omitempty"`
}

ExecRequest mirrors internal/api's execRequest (internal/api/exec.go). Command is required server-side and is never shell-interpreted: a caller who wants shell features (pipes, redirection, env expansion) passes Command: "sh", Args: []string{"-c", "..."} explicitly, the same contract the server documents.

type ExecResponse

type ExecResponse struct {
	Stdout    string `json:"stdout"`
	Stderr    string `json:"stderr,omitempty"`
	ExitCode  int    `json:"exit_code"`
	Truncated bool   `json:"truncated,omitempty"`
}

ExecResponse mirrors internal/api's execResponse. ExitCode is always the remote command's real exit code, never a client-level sentinel.

type ExportDestinationResource added in v0.2.0

type ExportDestinationResource struct {
	ID          string        `json:"id"`
	Name        string        `json:"name"`
	Kind        string        `json:"kind"`
	Endpoint    string        `json:"endpoint"`
	Enabled     bool          `json:"enabled"`
	Apps        []string      `json:"apps"`
	MinLevel    string        `json:"min_level"`
	Options     ExportOptions `json:"options"`
	HeaderNames []string      `json:"header_names"`
	HasHMACKey  bool          `json:"has_hmac_key"`
	Status      ExportStatus  `json:"status"`
	CreatedAt   string        `json:"created_at"`
	UpdatedAt   string        `json:"updated_at"`
}

ExportDestinationResource is one data export destination. Header values and signing keys are never returned.

type ExportOptions added in v0.2.0

type ExportOptions struct {
	StorageTargetID string            `json:"storage_target_id,omitempty"`
	Prefix          string            `json:"prefix,omitempty"`
	Labels          map[string]string `json:"labels,omitempty"`
	IntervalSeconds int               `json:"interval_seconds,omitempty"`
	Backfill        bool              `json:"backfill,omitempty"`
}

ExportOptions are the non-secret, kind-specific destination settings.

type ExportStatus added in v0.2.0

type ExportStatus struct {
	LastSuccessAt string `json:"last_success_at"`
	LastError     string `json:"last_error"`
	LastErrorAt   string `json:"last_error_at"`
	SentTotal     int64  `json:"sent_total"`
	DroppedTotal  int64  `json:"dropped_total"`
	FailuresTotal int64  `json:"failures_total"`
	QueueDepth    int64  `json:"queue_depth"`
	CircuitOpen   bool   `json:"circuit_open"`
	CursorAt      string `json:"cursor_at,omitempty"`
}

ExportStatus is a destination's delivery state.

type ExportTestResult added in v0.2.0

type ExportTestResult struct {
	OK    bool   `json:"ok"`
	Error string `json:"error,omitempty"`
}

ExportTestResult is the answer of the destination test probe.

type ExposureFinding added in v0.2.0

type ExposureFinding struct {
	Container         string               `json:"container"`
	Image             string               `json:"image"`
	Owner             ExposureOwner        `json:"owner"`
	ImageKind         string               `json:"image_kind"`
	Protocol          string               `json:"protocol"`
	HostPort          int                  `json:"host_port"`
	ContainerPort     int                  `json:"container_port"`
	Binds             []string             `json:"binds"`
	Class             string               `json:"class"`
	Severity          string               `json:"severity"`
	AllowedSources    []string             `json:"allowed_sources,omitempty"`
	Rules             []string             `json:"rules,omitempty"`
	Managed           bool                 `json:"managed"`
	Explanation       string               `json:"explanation"`
	Recommendation    string               `json:"recommendation,omitempty"`
	CanRestrict       bool                 `json:"can_restrict"`
	CannotRestrictWhy string               `json:"cannot_restrict_reason,omitempty"`
	Restriction       *ExposureRestriction `json:"restriction,omitempty"`
	Outside           ExposureOutsideCheck `json:"outside_check"`
}

ExposureFinding mirrors internal/api's exposureFindingResource.

type ExposureNode added in v0.2.0

type ExposureNode struct {
	NodeID        string            `json:"node_id"`
	NodeName      string            `json:"node_name"`
	Local         bool              `json:"local"`
	Status        string            `json:"status"`
	Error         string            `json:"error,omitempty"`
	RulesReadable bool              `json:"rules_readable"`
	RulesNote     string            `json:"rules_note,omitempty"`
	PublicAddress string            `json:"public_address,omitempty"`
	Findings      []ExposureFinding `json:"findings"`
}

ExposureNode mirrors internal/api's exposureNodeResource.

type ExposureOutsideCheck added in v0.2.0

type ExposureOutsideCheck struct {
	Status string `json:"status"`
	Detail string `json:"detail,omitempty"`
}

ExposureOutsideCheck mirrors internal/api's exposureOutsideResource.

type ExposureOwner added in v0.2.0

type ExposureOwner struct {
	Kind        string `json:"kind"`
	Name        string `json:"name,omitempty"`
	Intentional bool   `json:"intentional,omitempty"`
}

ExposureOwner mirrors internal/exposure.Owner.

type ExposurePlan added in v0.2.0

type ExposurePlan struct {
	Commands    []string `json:"commands"`
	Drops       string   `json:"drops"`
	Tag         string   `json:"tag"`
	Persistence string   `json:"persistence"`
	Port        int      `json:"port"`
	Protocol    string   `json:"protocol"`
	Allow       []string `json:"allow"`
	Warnings    []string `json:"warnings"`
	Applied     bool     `json:"applied"`
}

ExposurePlan mirrors internal/api's exposurePlanResource.

type ExposureReport added in v0.2.0

type ExposureReport struct {
	GeneratedAt string         `json:"generated_at"`
	Nodes       []ExposureNode `json:"nodes"`
	Exposed     int            `json:"exposed"`
	High        int            `json:"high"`
}

ExposureReport mirrors internal/api's exposureReportResource.

type ExposureRestrictRequest added in v0.2.0

type ExposureRestrictRequest struct {
	Node            string   `json:"node,omitempty"`
	Port            int      `json:"port,omitempty"`
	Protocol        string   `json:"protocol,omitempty"`
	Allow           []string `json:"allow"`
	LocalContainers bool     `json:"local_containers,omitempty"`
	Confirm         bool     `json:"confirm,omitempty"`
}

ExposureRestrictRequest mirrors internal/api's exposureRestrictRequest.

type ExposureRestriction added in v0.2.0

type ExposureRestriction struct {
	Allow     []string `json:"allow"`
	CreatedAt string   `json:"created_at,omitempty"`
}

ExposureRestriction mirrors internal/api's exposureRestrictionResource.

type ExternalDatabase added in v0.2.0

type ExternalDatabase struct {
	Name            string                  `json:"name"`
	Engine          string                  `json:"engine"`
	Host            string                  `json:"host"`
	Port            int                     `json:"port"`
	Username        string                  `json:"username,omitempty"`
	Database        string                  `json:"database,omitempty"`
	TLSMode         string                  `json:"tls_mode"`
	Network         string                  `json:"network,omitempty"`
	NodeID          string                  `json:"node_id,omitempty"`
	ProjectID       string                  `json:"project_id,omitempty"`
	SourceContainer string                  `json:"source_container,omitempty"`
	HasPassword     bool                    `json:"has_password"`
	Health          *ExternalDatabaseHealth `json:"health,omitempty"`
}

ExternalDatabase mirrors internal/api's externalDatabaseResource. It never carries a password.

type ExternalDatabaseCandidate added in v0.2.0

type ExternalDatabaseCandidate struct {
	ContainerID   string   `json:"container_id"`
	Container     string   `json:"container"`
	Image         string   `json:"image"`
	Engine        string   `json:"engine"`
	Port          int      `json:"port"`
	SuggestedHost string   `json:"suggested_host,omitempty"`
	Network       string   `json:"network,omitempty"`
	Networks      []string `json:"networks,omitempty"`
	PublishedPort int      `json:"published_port,omitempty"`
	SuggestedUser string   `json:"suggested_user,omitempty"`
	Note          string   `json:"note,omitempty"`
}

ExternalDatabaseCandidate is a running database container that can be adopted.

type ExternalDatabaseHealth added in v0.2.0

type ExternalDatabaseHealth struct {
	Status    string `json:"status"`
	Reason    string `json:"reason,omitempty"`
	LatencyMs int    `json:"latency_ms"`
	CheckedAt string `json:"checked_at,omitempty"`
}

ExternalDatabaseHealth mirrors the API's last probe outcome.

type ExternalDatabaseProbe added in v0.2.0

type ExternalDatabaseProbe struct {
	Status    string   `json:"status"`
	Reason    string   `json:"reason,omitempty"`
	LatencyMs int      `json:"latency_ms"`
	Version   string   `json:"version,omitempty"`
	User      string   `json:"user,omitempty"`
	Database  string   `json:"database,omitempty"`
	Databases []string `json:"databases,omitempty"`
}

ExternalDatabaseProbe is one connectivity probe result.

type ExternalDatabaseRequest added in v0.2.0

type ExternalDatabaseRequest struct {
	Name         string `json:"name,omitempty"`
	Engine       string `json:"engine,omitempty"`
	Host         string `json:"host,omitempty"`
	Port         int    `json:"port,omitempty"`
	Username     string `json:"username,omitempty"`
	Password     string `json:"password,omitempty"`
	Database     string `json:"database,omitempty"`
	AuthDatabase string `json:"auth_database,omitempty"`
	TLSMode      string `json:"tls_mode,omitempty"`
	Network      string `json:"network,omitempty"`
	NodeID       string `json:"node_id,omitempty"`
	ProjectID    string `json:"project_id,omitempty"`
	Container    string `json:"container,omitempty"`
}

ExternalDatabaseRequest is the connect, test and adopt body.

type FailedDeployResource added in v0.2.0

type FailedDeployResource struct {
	DeployAttemptResource
	LastGoodImage string `json:"last_good_image,omitempty"`
}

FailedDeployResource is one entry of GET /api/v1/deploys/failed: an app's latest failed deploy attempt plus the image of its newest good one.

type FailureContextDeploy added in v0.2.0

type FailureContextDeploy struct {
	ID         string     `json:"id"`
	Status     string     `json:"status"`
	Image      string     `json:"image"`
	Commit     string     `json:"commit,omitempty"`
	StartedAt  time.Time  `json:"started_at"`
	FinishedAt *time.Time `json:"finished_at,omitempty"`
	Error      string     `json:"error,omitempty"`
}

FailureContextDeploy is the failed deploy attempt, when there is one.

type FailureContextLine added in v0.2.0

type FailureContextLine struct {
	Timestamp time.Time `json:"timestamp"`
	Stream    string    `json:"stream"`
	Message   string    `json:"message"`
	Level     string    `json:"level,omitempty"`
}

FailureContextLine is one log line of a failure context.

type FailureContextResource added in v0.2.0

type FailureContextResource struct {
	State         string                `json:"state"`
	Since         *time.Time            `json:"since,omitempty"`
	Restarts      int                   `json:"restarts_in_window"`
	WindowSeconds float64               `json:"window_seconds"`
	ContainerID   string                `json:"container_id,omitempty"`
	Deploy        *FailureContextDeploy `json:"deploy,omitempty"`
	Lines         []FailureContextLine  `json:"lines"`
	TotalLines    int                   `json:"total_lines"`
	LinesSource   string                `json:"lines_source,omitempty"`
}

FailureContextResource mirrors internal/api's failureContextResponse.

type FeatureFlagRequest

type FeatureFlagRequest struct {
	Key               string `json:"key,omitempty"`
	Name              string `json:"name"`
	Description       string `json:"description,omitempty"`
	Enabled           bool   `json:"enabled"`
	RolloutPercentage int    `json:"rollout_percentage"`
}

FeatureFlagRequest mirrors the fields internal/api's featureFlagResource actually reads from a create/update request body. Key is only read on create; an update ignores it (ID and ServiceName always come from the URL, same as ScheduledTaskRequest above).

type FeatureFlagResource

type FeatureFlagResource struct {
	ID                string    `json:"id,omitempty"`
	Key               string    `json:"key"`
	Name              string    `json:"name"`
	Description       string    `json:"description,omitempty"`
	ServiceName       string    `json:"service_name,omitempty"`
	Enabled           bool      `json:"enabled"`
	RolloutPercentage int       `json:"rollout_percentage"`
	CreatedAt         time.Time `json:"created_at,omitempty"`
	UpdatedAt         time.Time `json:"updated_at,omitempty"`
}

FeatureFlagResource mirrors internal/api's featureFlagResource (internal/api/feature_flags.go). Key is globally unique across the whole platform, not just within ServiceName: see that file's own migration comment for why.

type FirewallRuleResource added in v0.2.0

type FirewallRuleResource struct {
	ID         string `json:"id"`
	NodeID     string `json:"node_id"`
	Port       int    `json:"port"`
	Protocol   string `json:"protocol"`
	SourceCIDR string `json:"source_cidr,omitempty"`
	Action     string `json:"action"`
	Label      string `json:"label,omitempty"`
	CreatedAt  string `json:"created_at"`
}

FirewallRuleResource mirrors internal/api's firewallRuleResource.

type FleetResourceUsageResource added in v0.2.0

type FleetResourceUsageResource struct {
	Nodes []NodeResourceUsageResource `json:"nodes"`
	Fleet FleetResourceUsageRollup    `json:"fleet"`
}

FleetResourceUsageResource mirrors internal/api's fleetResourceUsageResponse: one row per node plus the fleet-wide rollup, GET /api/v1/nodes/resource-usage's full body.

type FleetResourceUsageRollup added in v0.2.0

type FleetResourceUsageRollup struct {
	NodeCount               int      `json:"node_count"`
	TotalCPUPercent         *float64 `json:"total_cpu_percent,omitempty"`
	TotalMemoryUsageBytes   *float64 `json:"total_memory_usage_bytes,omitempty"`
	TotalMemoryBytes        *float64 `json:"total_memory_bytes,omitempty"`
	MemoryUsedPercent       *float64 `json:"memory_used_percent,omitempty"`
	NodesWithMemoryCapacity int      `json:"nodes_with_memory_capacity"`
	TotalDiskUsedBytes      *float64 `json:"total_disk_used_bytes,omitempty"`
	TotalDiskBytes          *float64 `json:"total_disk_bytes,omitempty"`
	DiskUsedPercent         *float64 `json:"disk_used_percent,omitempty"`
	NodesWithDiskCapacity   int      `json:"nodes_with_disk_capacity"`
}

FleetResourceUsageRollup mirrors internal/api's fleetResourceUsageRollup: fleet-wide sums, with *Percent fields only computed from nodes that actually reported a capacity figure (see NodesWithMemoryCapacity/NodesWithDiskCapacity).

type ForwardersPolicyResource added in v0.2.0

type ForwardersPolicyResource struct {
	Domain     string                   `json:"domain"`
	Kind       string                   `json:"kind"`
	Configured bool                     `json:"configured"`
	Spec       trafficpolicy.Forwarders `json:"spec"`
	UpdatedAt  string                   `json:"updated_at,omitempty"`
}

ForwardersPolicyResource is GET/PUT .../domains/{domain}/forwarders.

type FreezeWindowResource added in v0.2.0

type FreezeWindowResource struct {
	ID       string `json:"id,omitempty"`
	Cron     string `json:"cron"`
	Duration string `json:"duration"`
	Timezone string `json:"timezone,omitempty"`
	Reason   string `json:"reason,omitempty"`
	Scope    string `json:"scope,omitempty"`
}

FreezeWindowResource mirrors internal/api's freezeWindowResource.

type GPUDeviceResource added in v0.2.0

type GPUDeviceResource struct {
	Index              int    `json:"index"`
	UUID               string `json:"uuid"`
	Name               string `json:"name"`
	VRAMTotalMiB       int64  `json:"vram_total_mib"`
	VRAMUsedMiB        int64  `json:"vram_used_mib"`
	UtilizationPercent int    `json:"utilization_percent"`
}

GPUDeviceResource mirrors internal/api's gpuDeviceResource.

type GPUNodeResource added in v0.2.0

type GPUNodeResource struct {
	NodeID           string              `json:"node_id"`
	Name             string              `json:"name"`
	IsLocal          bool                `json:"is_local"`
	Present          bool                `json:"present"`
	DriverVersion    string              `json:"driver_version,omitempty"`
	RuntimeInstalled bool                `json:"runtime_installed"`
	GPUCount         int                 `json:"gpu_count"`
	TotalVRAMMiB     int64               `json:"total_vram_mib"`
	UsedVRAMMiB      int64               `json:"used_vram_mib"`
	ModelCount       int                 `json:"model_count"`
	ReservedGPUs     int                 `json:"reserved_gpus"`
	FreeGPUs         int                 `json:"free_gpus"`
	Reservations     []string            `json:"reservations"`
	Schedulable      bool                `json:"schedulable"`
	Hint             string              `json:"hint,omitempty"`
	Devices          []GPUDeviceResource `json:"devices"`
	UpdatedAt        time.Time           `json:"updated_at"`
}

GPUNodeResource mirrors internal/api's gpuNodeResource.

type GateEventResource added in v0.2.0

type GateEventResource struct {
	Phase     string    `json:"phase"`
	Status    string    `json:"status"`
	Reason    string    `json:"reason,omitempty"`
	Message   string    `json:"message"`
	Container string    `json:"container,omitempty"`
	At        time.Time `json:"at"`
}

GateEventResource is one step of a deploy's gate timeline.

type GeoIPLookupResource added in v0.2.0

type GeoIPLookupResource struct {
	Status  GeoStatus `json:"status"`
	IP      string    `json:"ip,omitempty"`
	Country string    `json:"country,omitempty"`
	Source  string    `json:"source,omitempty"`
	Private bool      `json:"private,omitempty"`
	Note    string    `json:"note,omitempty"`
}

GeoIPLookupResource is GET /api/v1/system/geoip.

type GeoPolicyResource added in v0.2.0

type GeoPolicyResource struct {
	Domain     string             `json:"domain"`
	Kind       string             `json:"kind"`
	Configured bool               `json:"configured"`
	Spec       *trafficpolicy.Geo `json:"spec"`
	UpdatedAt  string             `json:"updated_at,omitempty"`
}

GeoPolicyResource is GET/PUT .../domains/{domain}/geo. Spec is nil when no geo rule is configured.

type GeoStatus added in v0.2.0

type GeoStatus struct {
	Active       bool     `json:"active"`
	Sources      []string `json:"sources"`
	Header       string   `json:"header,omitempty"`
	HeaderNeeds  string   `json:"header_needs,omitempty"`
	DBPath       string   `json:"db_path,omitempty"`
	DBType       string   `json:"db_type,omitempty"`
	DBBuildEpoch uint     `json:"db_build_epoch,omitempty"`
	Error        string   `json:"error,omitempty"`
}

GeoStatus mirrors the ingress's country source report.

type GitAppBranchResource added in v0.2.0

type GitAppBranchResource struct {
	Name      string `json:"name"`
	CommitSHA string `json:"commit_sha"`
}

GitAppBranchResource mirrors the identical branch wire shape every git provider App integration returns: internal/api's gitHubAppBranchResource, gitLabAppBranchResource, and bitbucketAppBranchResource are structurally the same two fields, so this client uses one type for all three.

type GitBuildDetection added in v0.2.0

type GitBuildDetection struct {
	Branch             string               `json:"branch"`
	LooksLikeMonorepo  bool                 `json:"looks_like_monorepo"`
	RootHasApp         bool                 `json:"root_has_app"`
	Tools              []string             `json:"tools"`
	Dockerfiles        []string             `json:"dockerfiles"`
	ComposeFiles       []string             `json:"compose_files"`
	Suggestions        []GitBuildSuggestion `json:"suggestions"`
	Truncated          bool                 `json:"truncated"`
	NeedsBuildSettings bool                 `json:"needs_build_settings"`
}

GitBuildDetection mirrors internal/api's detectGitSourceResponse.

type GitBuildSuggestion added in v0.2.0

type GitBuildSuggestion struct {
	BuildType      string `json:"build_type"`
	DockerfilePath string `json:"dockerfile_path,omitempty"`
	BaseDirectory  string `json:"base_directory,omitempty"`
	Reason         string `json:"reason"`
	ReasonCode     string `json:"reason_code"`
	Recommended    bool   `json:"recommended"`
}

GitBuildSuggestion mirrors internal/repolayout's Suggestion.

type GitCommit added in v0.2.0

type GitCommit struct {
	SHA          string    `json:"sha"`
	Message      string    `json:"message"`
	Author       string    `json:"author"`
	AuthoredAt   time.Time `json:"authored_at"`
	URL          string    `json:"url,omitempty"`
	DeployStatus string    `json:"deploy_status,omitempty"`
	DeployID     string    `json:"deploy_id,omitempty"`
}

GitCommit is one commit of the connected branch with its deploy outcome.

type GitDeploySettings added in v0.2.0

type GitDeploySettings struct {
	DeployPaths       []string `json:"deploy_paths"`
	DeployPathsIgnore []string `json:"deploy_paths_ignore"`
	ReportStatus      bool     `json:"report_status"`
}

GitDeploySettings mirrors internal/api's gitDeploySettings.

type GitHubAppInstallationListResource added in v0.2.0

type GitHubAppInstallationListResource struct {
	Installations []GitHubAppInstallationResource `json:"installations"`
	AddOrgURL     string                          `json:"add_org_url,omitempty"`
	AppPublic     *bool                           `json:"app_public,omitempty"`
	MakePublicURL string                          `json:"make_public_url,omitempty"`
}

GitHubAppInstallationListResource mirrors internal/api's gitHubAppInstallationListResource: GET /api/v1/github-app/installations's response. AddOrgURL is empty when the connection predates migrations/0282's slug column and hasn't been re-registered since.

type GitHubAppInstallationResource added in v0.2.0

type GitHubAppInstallationResource struct {
	ID             int64  `json:"id"`
	InstallationID int64  `json:"installation_id"`
	AccountLogin   string `json:"account_login"`
	AccountType    string `json:"account_type"`
	ConnectedAt    string `json:"connected_at"`
}

GitHubAppInstallationResource mirrors internal/api's gitHubAppInstallationResource: one entry of GET /api/v1/github-app/installations.

type GitHubAppRepoListErrResource added in v0.2.0

type GitHubAppRepoListErrResource struct {
	AccountLogin string `json:"account_login"`
	Error        string `json:"error"`
}

GitHubAppRepoListErrResource is one entry of GitHubAppRepoListResource.Errors.

type GitHubAppRepoListResource added in v0.2.0

type GitHubAppRepoListResource struct {
	Repos  []GitHubAppRepoResource        `json:"repos"`
	Errors []GitHubAppRepoListErrResource `json:"errors,omitempty"`
}

GitHubAppRepoListResource mirrors internal/api's gitHubAppRepoListResource: GET /api/v1/github-app/repos's response, repos from every connected installation plus one error per installation that failed to list.

type GitHubAppRepoResource added in v0.2.0

type GitHubAppRepoResource struct {
	FullName      string `json:"full_name"`
	Name          string `json:"name"`
	OwnerLogin    string `json:"owner_login"`
	Private       bool   `json:"private"`
	DefaultBranch string `json:"default_branch"`
	CloneURL      string `json:"clone_url"`
	// AccountType is "user" or "organization" (migrations/0282): which
	// connected installation this repo came from.
	AccountType string `json:"account_type"`
}

GitHubAppRepoResource mirrors internal/api's gitHubAppRepoResource: one entry of GET /api/v1/github-app/repos.

type GitHubAppStatusResource added in v0.2.0

type GitHubAppStatusResource struct {
	Connected          bool   `json:"connected"`
	AppID              int64  `json:"app_id,omitempty"`
	ClientID           string `json:"client_id,omitempty"`
	InstanceURL        string `json:"instance_url,omitempty"`
	Installed          bool   `json:"installed"`
	InstallationStatus string `json:"installation_status,omitempty"`
	AccountLogin       string `json:"account_login,omitempty"`
	CreatedAt          string `json:"created_at,omitempty"`
	BaseURL            string `json:"base_url,omitempty"`
}

GitHubAppStatusResource mirrors internal/api's gitHubAppStatusResource: GET /api/v1/github-app's response. No secret fields ever appear here.

type GitLabAppProjectResource added in v0.2.0

type GitLabAppProjectResource struct {
	ID                int64  `json:"id"`
	Name              string `json:"name"`
	PathWithNamespace string `json:"path_with_namespace"`
	CloneURL          string `json:"clone_url"`
	DefaultBranch     string `json:"default_branch"`
	Visibility        string `json:"visibility"`
	WebURL            string `json:"web_url"`
}

GitLabAppProjectResource mirrors internal/api's gitLabAppProjectResource: one entry of GET /api/v1/gitlab-app/projects.

type GitLabAppStatusResource added in v0.2.0

type GitLabAppStatusResource struct {
	Connected   bool   `json:"connected"`
	InstanceURL string `json:"instance_url,omitempty"`
	ClientID    string `json:"client_id,omitempty"`
	CreatedAt   string `json:"created_at,omitempty"`
	Authorized  bool   `json:"authorized"`
	BaseURL     string `json:"base_url,omitempty"`
}

GitLabAppStatusResource mirrors internal/api's gitLabAppStatusResource: GET /api/v1/gitlab-app's response.

type GitProviderResource added in v0.2.0

type GitProviderResource struct {
	Provider           string `json:"provider"`
	Connected          bool   `json:"connected"`
	CanListBranches    bool   `json:"can_list_branches"`
	CanRegisterWebhook bool   `json:"can_register_webhook"`
	CanAuthClone       bool   `json:"can_auth_clone"`
}

GitProviderResource mirrors internal/api's gitProviderResource: one entry of GET /api/v1/git-providers, a capability summary for one git provider (github, gitlab, bitbucket, gitea).

type GitSourceCommits added in v0.2.0

type GitSourceCommits struct {
	Branch          string             `json:"branch"`
	ConnectedBranch string             `json:"connected_branch"`
	Provider        string             `json:"provider"`
	Head            *GitCommit         `json:"head,omitempty"`
	Commits         []GitCommit        `json:"commits"`
	Branches        []string           `json:"branches"`
	AheadBy         *int               `json:"ahead_by,omitempty"`
	UpToDate        bool               `json:"up_to_date"`
	Suggestions     []DeploySuggestion `json:"suggestions"`
	Degraded        bool               `json:"degraded"`
	BuildType       string             `json:"build_type"`
	Build           struct {
		Summary string `json:"summary"`
	} `json:"build"`
}

GitSourceCommits mirrors GET /api/v1/apps/{name}/git-source/commits.

type GitSourceResolvedBuild added in v0.2.0

type GitSourceResolvedBuild struct {
	ContextDir     string `json:"context_dir"`
	DockerfilePath string `json:"dockerfile_path,omitempty"`
	Summary        string `json:"summary"`
}

GitSourceResolvedBuild mirrors internal/api's gitSourceResolvedBuild.

type GitSourceResource

type GitSourceResource struct {
	ServiceName string `json:"service_name"`
	RepoURL     string `json:"repo_url"`
	Branch      string `json:"branch"`
	BuildType   string `json:"build_type"`
	BuildPath   string `json:"build_path,omitempty"`
	// BaseDirectory is the build context, relative to the repository root.
	BaseDirectory string `json:"base_directory,omitempty"`
	// ResolvedBuild states what a deploy builds, in plain terms.
	ResolvedBuild GitSourceResolvedBuild `json:"resolved_build"`
	// TriggerMode mirrors store.GitSource.TriggerMode: "push" (default)
	// or "release", see internal/api's normalizeGitSourceTriggerMode.
	TriggerMode    string `json:"trigger_mode,omitempty"`
	HasToken       bool   `json:"has_token"`
	WebhookURL     string `json:"webhook_url"`
	WebhookSecret  string `json:"webhook_secret,omitempty"`
	PreviewEnabled bool   `json:"preview_enabled"`
	// PostPRComments mirrors store.GitSource.PostPRComments: the opt-in
	// toggle for a preview deploy's GitHub PR comment/commit status, set
	// via SetPreviewPostPRComments (preview-settings, same route as
	// PreviewEnabled).
	PostPRComments bool `json:"post_pr_comments"`
	// DeployPaths, DeployPathsIgnore and ReportStatus mirror the store
	// fields of the same names, set via SetGitDeploySettings.
	DeployPaths       []string `json:"deploy_paths"`
	DeployPathsIgnore []string `json:"deploy_paths_ignore"`
	ReportStatus      bool     `json:"report_status"`
	CreatedAt         string   `json:"created_at"`
	UpdatedAt         string   `json:"updated_at"`
}

GitSourceResource mirrors internal/api's gitSourceResource (internal/api/git_sources.go). AdditionalServices/Services (the multi-service fan-out fields) are deliberately not carried here: this client's SetGitSourceRequest only covers the single-service connect flow "apps deploy-spec" already handles for the multi-service case.

type GiteaAppRepoResource added in v0.2.0

type GiteaAppRepoResource struct {
	FullName      string `json:"full_name"`
	Name          string `json:"name"`
	Private       bool   `json:"private"`
	DefaultBranch string `json:"default_branch"`
	CloneURL      string `json:"clone_url"`
	WebURL        string `json:"web_url"`
}

GiteaAppRepoResource mirrors internal/api's giteaAppRepoResource: one entry of GET /api/v1/gitea-app/repos.

type GiteaAppStatusResource added in v0.2.0

type GiteaAppStatusResource struct {
	Connected   bool   `json:"connected"`
	InstanceURL string `json:"instance_url,omitempty"`
	ClientID    string `json:"client_id,omitempty"`
	CreatedAt   string `json:"created_at,omitempty"`
	Authorized  bool   `json:"authorized"`
	BaseURL     string `json:"base_url,omitempty"`
}

GiteaAppStatusResource mirrors internal/api's giteaAppStatusResource: GET /api/v1/gitea-app's response.

type GlobalEnvironmentResource added in v0.2.0

type GlobalEnvironmentResource struct {
	ID            string `json:"id"`
	ProjectID     string `json:"project_id"`
	Name          string `json:"name"`
	Protected     bool   `json:"protected"`
	CreatedAt     string `json:"created_at"`
	Kind          string `json:"kind"`
	Scope         string `json:"scope"`
	SortOrder     int    `json:"sort_order"`
	AppCount      int    `json:"app_count"`
	DatabaseCount int    `json:"database_count"`
}

GlobalEnvironmentResource mirrors internal/api's environmentListResource, one row of GET /api/v1/environments.

type GoLivePlanRequest added in v0.2.0

type GoLivePlanRequest struct {
	Domain     string                    `json:"domain,omitempty"`
	Domains    []string                  `json:"domains,omitempty"`
	Automation *DomainAutomationOverride `json:"automation,omitempty"`
}

GoLivePlanRequest is the body of POST .../domains/go-live/plan.

type GoLivePlanResponse added in v0.2.0

type GoLivePlanResponse struct {
	Plans []GoLiveResult `json:"plans"`
}

GoLivePlanResponse is the dry run result.

type GoLiveRequest added in v0.2.0

type GoLiveRequest struct {
	Automation *DomainAutomationOverride `json:"automation,omitempty"`
	DNS        string                    `json:"dns,omitempty"`
	Replace    bool                      `json:"replace,omitempty"`
}

GoLiveRequest is the body of POST .../go-live.

type GoLiveResult added in v0.2.0

type GoLiveResult struct {
	RunID     string                 `json:"run_id,omitempty"`
	App       string                 `json:"app"`
	Domain    string                 `json:"domain"`
	State     string                 `json:"state"`
	URL       string                 `json:"url,omitempty"`
	Steps     []GoLiveStep           `json:"steps"`
	DNS       []DomainDNSResult      `json:"dns,omitempty"`
	Policy    DomainAutomationPolicy `json:"policy"`
	Undoable  bool                   `json:"undoable,omitempty"`
	CheckedAt string                 `json:"checked_at"`
}

GoLiveResult mirrors internal/api's goLiveResult.

type GoLiveStep added in v0.2.0

type GoLiveStep struct {
	ID         string             `json:"id"`
	State      string             `json:"state"`
	Detail     string             `json:"detail,omitempty"`
	Provider   string             `json:"provider,omitempty"`
	Record     *DNSRecordResource `json:"record,omitempty"`
	Resolvers  []ResolverResult   `json:"resolvers,omitempty"`
	Issuer     string             `json:"issuer,omitempty"`
	NotAfter   *time.Time         `json:"not_after,omitempty"`
	URL        string             `json:"url,omitempty"`
	HTTPStatus int                `json:"http_status,omitempty"`
}

GoLiveStep mirrors internal/api's goLiveStep.

type HTTPSPreflightPort added in v0.2.0

type HTTPSPreflightPort struct {
	Port      int  `json:"port"`
	Reachable bool `json:"reachable"`
}

HTTPSPreflightPort is one self-dial result; false is a hint, not proof.

type HTTPSStatusResource added in v0.2.0

type HTTPSStatusResource struct {
	State            string     `json:"state"`
	Domain           string     `json:"domain,omitempty"`
	PublicHost       string     `json:"public_host,omitempty"`
	PublicHostSource string     `json:"public_host_source,omitempty"`
	SuggestedDomain  string     `json:"suggested_domain,omitempty"`
	Staging          bool       `json:"staging"`
	Issuer           string     `json:"issuer,omitempty"`
	NotAfter         *time.Time `json:"not_after,omitempty"`
	Error            string     `json:"error,omitempty"`
	Hint             string     `json:"hint,omitempty"`
	DashboardURL     string     `json:"dashboard_url,omitempty"`
	// Preflight is set on the enable response only.
	Preflight []HTTPSPreflightPort `json:"preflight,omitempty"`
}

HTTPSStatusResource mirrors internal/api's httpsStatusResource (GET/POST /api/v1/settings/ingress/https): state is off, pending, issued or failed.

type HeadersPolicyResource added in v0.2.0

type HeadersPolicyResource struct {
	Domain     string                `json:"domain"`
	Kind       string                `json:"kind"`
	Configured bool                  `json:"configured"`
	Spec       trafficpolicy.Headers `json:"spec"`
	UpdatedAt  string                `json:"updated_at,omitempty"`
}

HeadersPolicyResource is GET/PUT .../domains/{domain}/headers.

type HealthDiscoveryAttempt added in v0.2.0

type HealthDiscoveryAttempt struct {
	Path      string `json:"path"`
	Success   bool   `json:"success"`
	Error     string `json:"error,omitempty"`
	LatencyMs int64  `json:"latency_ms"`
}

HealthDiscoveryAttempt mirrors internal/api's healthDiscoveryAttempt (internal/api/apps_health_discover.go).

type HealthDiscoveryResponse added in v0.2.0

type HealthDiscoveryResponse struct {
	Name     string                   `json:"name"`
	Attempts []HealthDiscoveryAttempt `json:"attempts"`
	Found    string                   `json:"found,omitempty"`
}

HealthDiscoveryResponse mirrors internal/api's healthDiscoveryResponse. Found is set only when exactly one candidate path succeeded.

type HookRunResource

type HookRunResource struct {
	HookType string    `json:"hook_type"`
	Command  string    `json:"command"`
	ExitCode int       `json:"exit_code"`
	Success  bool      `json:"success"`
	Output   string    `json:"output"`
	RanAt    time.Time `json:"ran_at"`
}

HookRunResource mirrors internal/api's hookRunResource (apps_hooks.go): one pre/post-deploy hook's most recent outcome.

type HostFirewallActionRequest added in v0.2.0

type HostFirewallActionRequest struct {
	DryRun bool `json:"dry_run"`
}

HostFirewallActionRequest mirrors internal/api's hostFirewallActionRequest.

type HostFirewallPort added in v0.2.0

type HostFirewallPort struct {
	Port     int    `json:"port"`
	Protocol string `json:"protocol"`
}

HostFirewallPort mirrors internal/api's hostFirewallPort.

type HostFirewallResource added in v0.2.0

type HostFirewallResource struct {
	Installed       bool               `json:"installed"`
	Active          bool               `json:"active"`
	DefaultIncoming string             `json:"default_incoming,omitempty"`
	Required        []HostFirewallPort `json:"required"`
	Commands        []string           `json:"commands"`
}

HostFirewallResource mirrors internal/api's hostFirewallResource.

type HubCheck added in v0.2.0

type HubCheck struct {
	ID         string `json:"id"`
	Severity   string `json:"severity"`
	Message    string `json:"message"`
	NextAction string `json:"next_action,omitempty"`
}

HubCheck is one preflight finding.

type HubItem added in v0.2.0

type HubItem struct {
	SourceDB      string          `json:"source_db"`
	SizeBytes     int64           `json:"size_bytes"`
	Tables        int             `json:"tables"`
	Extensions    []string        `json:"extensions,omitempty"`
	TargetName    string          `json:"target_name"`
	TargetVersion string          `json:"target_version"`
	Selected      bool            `json:"selected"`
	Status        string          `json:"status"`
	Reason        string          `json:"reason,omitempty"`
	Preflight     HubPreflight    `json:"preflight"`
	Checked       int             `json:"checked"`
	Mismatched    int             `json:"mismatched"`
	TableCounts   []DataCopyTable `json:"table_counts,omitempty"`
}

HubItem is one source database in a session.

type HubLocalSource added in v0.2.0

type HubLocalSource struct {
	Container string `json:"container"`
	Image     string `json:"image"`
	Engine    string `json:"engine"`
	Running   bool   `json:"running"`
	Network   string `json:"network,omitempty"`
	Host      string `json:"host,omitempty"`
	Port      int    `json:"port,omitempty"`
	Problem   string `json:"problem,omitempty"`
}

HubLocalSource is a database container on the node, with how to reach it.

type HubPreflight added in v0.2.0

type HubPreflight struct {
	Checks          []HubCheck `json:"checks"`
	TargetVersion   string     `json:"target_version"`
	RequiredBytes   int64      `json:"required_bytes"`
	EstimateSeconds int        `json:"estimate_seconds"`
	Blocked         bool       `json:"blocked"`
}

HubPreflight is the checks for one database.

type HubSelection added in v0.2.0

type HubSelection struct {
	SourceDB      string  `json:"source_db"`
	Selected      *bool   `json:"selected,omitempty"`
	TargetName    *string `json:"target_name,omitempty"`
	TargetVersion *string `json:"target_version,omitempty"`
}

HubSelection changes one item's plan. Nil fields are left alone.

type HubSession added in v0.2.0

type HubSession struct {
	ID            string     `json:"id"`
	Engine        string     `json:"engine"`
	Host          string     `json:"host"`
	Port          int        `json:"port"`
	User          string     `json:"user,omitempty"`
	ServerVersion string     `json:"server_version"`
	FreeBytes     int64      `json:"free_bytes"`
	Step          string     `json:"step"`
	Container     string     `json:"source_container,omitempty"`
	HelperNetwork string     `json:"helper_network,omitempty"`
	PasswordHeld  bool       `json:"password_held"`
	Running       bool       `json:"running"`
	Items         []HubItem  `json:"items"`
	Summary       HubSummary `json:"summary"`
}

HubSession is a migration session with its plan and progress.

type HubSource added in v0.2.0

type HubSource struct {
	Engine   string `json:"engine"`
	Host     string `json:"host"`
	Port     int    `json:"port,omitempty"`
	User     string `json:"user,omitempty"`
	Password string `json:"password,omitempty"`
	TLS      bool   `json:"tls,omitempty"`
	NodeID   string `json:"node_id,omitempty"`
	// Container names a local database container to read over its own network.
	Container string `json:"container,omitempty"`
}

HubSource locates a source server. Password travels in the request body only and is never stored by the control plane.

type HubSummary added in v0.2.0

type HubSummary struct {
	Databases       int   `json:"databases"`
	Selected        int   `json:"selected"`
	Blocked         int   `json:"blocked"`
	Warnings        int   `json:"warnings"`
	Verified        int   `json:"verified"`
	Failed          int   `json:"failed"`
	Copying         int   `json:"copying"`
	TotalBytes      int64 `json:"total_bytes"`
	RequiredBytes   int64 `json:"required_bytes"`
	EstimateSeconds int   `json:"estimate_seconds"`
	CanApply        bool  `json:"can_apply"`
}

HubSummary is the plan totals.

type IAMAnalysis added in v0.2.0

type IAMAnalysis struct {
	Score    int            `json:"score"`
	Counts   map[string]int `json:"counts"`
	Findings []IAMFinding   `json:"findings"`
}

IAMAnalysis mirrors internal/api's analysisResponse.

type IAMEffective added in v0.2.0

type IAMEffective struct {
	Principal  IAMPrincipal          `json:"principal"`
	Policies   []IAMPolicyBrief      `json:"policies"`
	Restricted bool                  `json:"restricted"`
	Abilities  []IAMEffectiveAbility `json:"abilities"`
}

IAMEffective mirrors internal/api's effectiveResponse.

type IAMEffectiveAbility added in v0.2.0

type IAMEffectiveAbility struct {
	Ability         string   `json:"ability"`
	Risk            string   `json:"risk"`
	Flat            bool     `json:"flat"`
	All             bool     `json:"all"`
	Allowed         int      `json:"allowed"`
	Total           int      `json:"total"`
	Apps            []string `json:"apps"`
	Databases       []string `json:"databases"`
	GrantedByPolicy int      `json:"granted_by_policy"`
	DeniedByPolicy  int      `json:"denied_by_policy"`
}

IAMEffectiveAbility mirrors internal/api's effectiveAbility.

type IAMFinding added in v0.2.0

type IAMFinding struct {
	Kind           string `json:"kind"`
	Severity       string `json:"severity"`
	PolicyID       string `json:"policy_id,omitempty"`
	PolicyName     string `json:"policy_name,omitempty"`
	StatementIndex *int   `json:"statement_index,omitempty"`
	PrincipalType  string `json:"principal_type,omitempty"`
	PrincipalID    string `json:"principal_id,omitempty"`
	Message        string `json:"message"`
	Fix            string `json:"fix"`
}

IAMFinding mirrors internal/api's finding.

type IAMPolicyBrief added in v0.2.0

type IAMPolicyBrief struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

IAMPolicyBrief is a policy id and name.

type IAMPrincipal added in v0.2.0

type IAMPrincipal struct {
	PrincipalType string   `json:"principal_type"`
	PrincipalID   string   `json:"principal_id"`
	Name          string   `json:"name"`
	Detail        string   `json:"detail,omitempty"`
	Abilities     []string `json:"abilities"`
	Active        bool     `json:"active"`
	PolicyIDs     []string `json:"policy_ids"`
}

IAMPrincipal mirrors internal/api's iamPrincipal.

type IAMSimulation added in v0.2.0

type IAMSimulation struct {
	PrincipalType        string            `json:"principal_type"`
	PrincipalID          string            `json:"principal_id"`
	PrincipalName        string            `json:"principal_name"`
	Action               string            `json:"action"`
	Resource             string            `json:"resource"`
	Allowed              bool              `json:"allowed"`
	DecidedBy            string            `json:"decided_by"`
	DecidingStatement    *IAMStatementRef  `json:"deciding_statement"`
	MatchedStatements    []IAMStatementRef `json:"matched_statements"`
	BaseAbilityGrants    bool              `json:"base_ability_grants"`
	EnvironmentResources []string          `json:"environment_resources"`
}

IAMSimulation mirrors internal/api's simulation.

type IAMStatementRef added in v0.2.0

type IAMStatementRef struct {
	PolicyID       string   `json:"policy_id"`
	PolicyName     string   `json:"policy_name"`
	StatementIndex int      `json:"statement_index"`
	Effect         string   `json:"effect"`
	Action         []string `json:"action"`
	Resource       []string `json:"resource"`
}

IAMStatementRef mirrors internal/api's statementRef.

type IaCFile added in v0.2.0

type IaCFile struct {
	Name    string `json:"name"`
	Content string `json:"content"`
}

IaCFile is one resource file sent to plan or apply.

type IaCIssuesError added in v0.2.0

type IaCIssuesError struct{ Issues []iac.Issue }

IaCIssuesError carries the line numbered validation issues of a 422.

func (*IaCIssuesError) Error added in v0.2.0

func (e *IaCIssuesError) Error() string

type IaCRequest added in v0.2.0

type IaCRequest struct {
	Files            []IaCFile         `json:"files"`
	Source           string            `json:"source,omitempty"`
	Project          string            `json:"project,omitempty"`
	Prune            bool              `json:"prune,omitempty"`
	Vars             map[string]string `json:"vars,omitempty"`
	Secrets          map[string]string `json:"secrets,omitempty"`
	NoDeploy         bool              `json:"no_deploy,omitempty"`
	ContinueOnError  bool              `json:"continue_on_error,omitempty"`
	ExpectedPlanHash string            `json:"expected_plan_hash,omitempty"`
}

IaCRequest mirrors internal/api's iacRequest, the body of POST /api/v1/apply/plan and /api/v1/apply.

type ImageAutoUpdateResource added in v0.2.0

type ImageAutoUpdateResource struct {
	Enabled       bool       `json:"enabled"`
	LastCheckedAt *time.Time `json:"last_checked_at,omitempty"`
	LastResult    string     `json:"last_result,omitempty"`
	HasWebhook    bool       `json:"has_webhook"`
}

ImageAutoUpdateResource mirrors internal/api's imageAutoUpdateResource.

type ImageResource added in v0.2.0

type ImageResource struct {
	Tag       string    `json:"tag"`
	CreatedAt time.Time `json:"created_at"`
}

ImageResource mirrors internal/api's imageResource (internal/api/images.go): one element of GET /api/v1/apps/{name}/images's wire shape.

type ImageUpdateWebhookResource added in v0.2.0

type ImageUpdateWebhookResource struct {
	Path  string `json:"path"`
	Token string `json:"token"`
}

ImageUpdateWebhookResource is the freshly minted webhook; Token is shown once.

type ImportAnalysis added in v0.2.0

type ImportAnalysis struct {
	RepoURL      string      `json:"repo_url"`
	Branch       string      `json:"branch"`
	Monorepo     bool        `json:"monorepo"`
	AppDirectory string      `json:"app_directory,omitempty"`
	Name         AnalyzeText `json:"name"`
	Stack        struct {
		Runtime   string `json:"runtime"`
		Framework string `json:"framework,omitempty"`
		Evidence  string `json:"evidence"`
	} `json:"stack"`
	Build AnalyzeBuild `json:"build"`
	Port  struct {
		Value    int    `json:"value"`
		Evidence string `json:"evidence"`
	} `json:"port"`
	Health AnalyzeText `json:"health"`
	Memory struct {
		Bytes    int64  `json:"bytes"`
		Evidence string `json:"evidence"`
	} `json:"memory"`
	Domain    AnalyzeText       `json:"domain"`
	Env       []AnalyzeEnvKey   `json:"env"`
	Databases []AnalyzeDatabase `json:"databases"`
	Warnings  []ImportWarning   `json:"warnings"`
	FilesRead int               `json:"files_read"`
}

ImportAnalysis mirrors internal/appwizard's Analysis.

type ImportAnalyzeRequest added in v0.2.0

type ImportAnalyzeRequest struct {
	RepoURL        string `json:"repo_url"`
	Ref            string `json:"ref,omitempty"`
	BaseDirectory  string `json:"base_directory,omitempty"`
	DockerfilePath string `json:"dockerfile_path,omitempty"`
	BuildType      string `json:"build_type,omitempty"`
	Name           string `json:"name,omitempty"`
	Token          string `json:"token,omitempty"`
}

ImportAnalyzeRequest is POST /api/v1/imports/analyze's body.

type ImportCutoverAction added in v0.2.0

type ImportCutoverAction struct {
	Kind  string `json:"kind"`
	Label string `json:"label"`
	API   string `json:"api,omitempty"`
	Value string `json:"value,omitempty"`
}

ImportCutoverAction is the one thing a readiness fix offers.

type ImportCutoverCheck added in v0.2.0

type ImportCutoverCheck struct {
	ID     string            `json:"id"`
	Title  string            `json:"title"`
	Status string            `json:"status"`
	Detail string            `json:"detail,omitempty"`
	Fix    *ImportCutoverFix `json:"fix,omitempty"`
}

ImportCutoverCheck is one readiness item.

type ImportCutoverDomainPlan added in v0.2.0

type ImportCutoverDomainPlan struct {
	Domain   string                `json:"domain"`
	Method   string                `json:"method"`
	Current  []string              `json:"current,omitempty"`
	Provider string                `json:"provider,omitempty"`
	Zone     string                `json:"zone,omitempty"`
	Desired  *ImportCutoverRecord  `json:"desired,omitempty"`
	Replace  []ImportCutoverRecord `json:"replace,omitempty"`
	Message  string                `json:"message,omitempty"`
}

ImportCutoverDomainPlan is what switching one domain involves.

type ImportCutoverDomainRun added in v0.2.0

type ImportCutoverDomainRun struct {
	Domain       string                `json:"domain"`
	Method       string                `json:"method"`
	Previous     []ImportCutoverRecord `json:"previous,omitempty"`
	Applied      *ImportCutoverRecord  `json:"applied,omitempty"`
	Manual       *ImportCutoverRecord  `json:"manual,omitempty"`
	ProbeStatus  int                   `json:"probe_status,omitempty"`
	Switched     bool                  `json:"switched"`
	Restored     bool                  `json:"restored"`
	Verified     bool                  `json:"verified"`
	VerifyDetail string                `json:"verify_detail,omitempty"`
	Message      string                `json:"message,omitempty"`
}

ImportCutoverDomainRun is one domain's progress inside a run.

type ImportCutoverFix added in v0.2.0

type ImportCutoverFix struct {
	Summary string               `json:"summary"`
	Action  *ImportCutoverAction `json:"action,omitempty"`
}

ImportCutoverFix is the remedy for a warning or blocking check.

type ImportCutoverPlan added in v0.2.0

type ImportCutoverPlan struct {
	App        string                    `json:"app"`
	Verdict    string                    `json:"verdict"`
	Checks     []ImportCutoverCheck      `json:"checks"`
	Domains    []ImportCutoverDomainPlan `json:"domains"`
	HealthPath string                    `json:"health_path"`
	CheckedAt  string                    `json:"checked_at"`
}

ImportCutoverPlan is the readiness checklist for one staged app.

type ImportCutoverRecord added in v0.2.0

type ImportCutoverRecord struct {
	Name  string `json:"name"`
	Type  string `json:"type"`
	Value string `json:"value"`
	TTL   int    `json:"ttl_seconds,omitempty"`
}

ImportCutoverRecord is one DNS record.

type ImportCutoverRun added in v0.2.0

type ImportCutoverRun struct {
	ID           string                   `json:"id"`
	App          string                   `json:"app"`
	Mode         string                   `json:"mode"`
	State        string                   `json:"state"`
	Method       string                   `json:"method,omitempty"`
	Awaiting     string                   `json:"awaiting,omitempty"`
	Domains      []ImportCutoverDomainRun `json:"domains"`
	Steps        []ImportCutoverStep      `json:"steps"`
	Plan         *ImportCutoverPlan       `json:"plan,omitempty"`
	Error        string                   `json:"error,omitempty"`
	CreatedAt    time.Time                `json:"created_at"`
	UpdatedAt    time.Time                `json:"updated_at"`
	Rollbackable bool                     `json:"rollbackable"`
	InFlight     bool                     `json:"in_flight"`
}

ImportCutoverRun is one dry run or switch.

func (ImportCutoverRun) Settled added in v0.2.0

func (r ImportCutoverRun) Settled() bool

Settled reports whether the run needs nothing more from a poller.

type ImportCutoverStart added in v0.2.0

type ImportCutoverStart struct {
	Mode           string `json:"mode"`
	Confirm        string `json:"confirm,omitempty"`
	AcceptWarnings bool   `json:"accept_warnings,omitempty"`
}

ImportCutoverStart is the body of POST .../cutover/runs.

type ImportCutoverStep added in v0.2.0

type ImportCutoverStep struct {
	Name       string `json:"name"`
	State      string `json:"state"`
	Domain     string `json:"domain,omitempty"`
	Detail     string `json:"detail,omitempty"`
	DurationMS int64  `json:"duration_ms"`
}

ImportCutoverStep is one timed entry of a run.

type ImportEnvVar added in v0.2.0

type ImportEnvVar struct {
	Key        string `json:"key"`
	Value      string `json:"value,omitempty"`
	Required   bool   `json:"required"`
	HasDefault bool   `json:"has_default"`
	Secret     bool   `json:"secret"`
	Source     string `json:"source,omitempty"`
}

ImportEnvVar mirrors internal/importplan's EnvVar.

type ImportPlan added in v0.2.0

type ImportPlan struct {
	Source             string          `json:"source"`
	SuggestedName      string          `json:"suggested_name"`
	Deploy             string          `json:"deploy"`
	RepoURL            string          `json:"repo_url,omitempty"`
	Ref                string          `json:"ref,omitempty"`
	ComposeYAML        string          `json:"compose_yaml,omitempty"`
	Services           []ImportService `json:"services"`
	DomainSuggestion   string          `json:"domain_suggestion,omitempty"`
	Warnings           []ImportWarning `json:"warnings"`
	MissingRequiredEnv []string        `json:"missing_required_env"`
}

ImportPlan mirrors internal/importplan's DeploymentPlan.

type ImportPlanRequest added in v0.2.0

type ImportPlanRequest struct {
	Text string            `json:"text"`
	Kind string            `json:"kind,omitempty"`
	Ref  string            `json:"ref,omitempty"`
	Name string            `json:"name,omitempty"`
	Port int               `json:"port,omitempty"`
	Env  map[string]string `json:"env,omitempty"`
}

ImportPlanRequest is POST /api/v1/imports/plan's body.

type ImportPort added in v0.2.0

type ImportPort struct {
	Host      int `json:"host,omitempty"`
	Container int `json:"container"`
}

ImportPort mirrors internal/importplan's PortMapping.

type ImportService added in v0.2.0

type ImportService struct {
	Name        string         `json:"name"`
	Image       string         `json:"image,omitempty"`
	Build       string         `json:"build"`
	BuildReason string         `json:"build_reason,omitempty"`
	Port        int            `json:"port,omitempty"`
	Ports       []ImportPort   `json:"ports,omitempty"`
	Command     []string       `json:"command,omitempty"`
	Entrypoint  []string       `json:"entrypoint,omitempty"`
	HealthPath  string         `json:"health_path,omitempty"`
	Env         []ImportEnvVar `json:"env,omitempty"`
	Volumes     []ImportVolume `json:"volumes,omitempty"`
	Restart     string         `json:"restart,omitempty"`
	MemoryBytes int64          `json:"memory_bytes,omitempty"`
	NanoCPUs    int64          `json:"nano_cpus,omitempty"`
}

ImportService mirrors internal/importplan's ServicePlan.

type ImportVolume added in v0.2.0

type ImportVolume struct {
	Name          string `json:"name,omitempty"`
	HostPath      string `json:"host_path,omitempty"`
	ContainerPath string `json:"container_path"`
	ReadOnly      bool   `json:"read_only,omitempty"`
	NeedsApproval bool   `json:"needs_approval,omitempty"`
}

ImportVolume mirrors internal/importplan's VolumeMount.

type ImportWarning added in v0.2.0

type ImportWarning struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

ImportWarning mirrors internal/importplan's Warning.

type IngressConnectivity added in v0.2.0

type IngressConnectivity struct {
	Host           string                    `json:"host,omitempty"`
	HostInferred   bool                      `json:"host_inferred,omitempty"`
	Addresses      []string                  `json:"addresses"`
	Private        bool                      `json:"private"`
	Ports          []IngressConnectivityPort `json:"ports"`
	HTTP01Possible bool                      `json:"http01_possible"`
	DNSProvider    string                    `json:"dns_provider"`
	Guidance       string                    `json:"guidance"`
}

IngressConnectivity mirrors internal/api's ingressConnectivityResource.

type IngressConnectivityPort added in v0.2.0

type IngressConnectivityPort struct {
	Port      int    `json:"port"`
	Address   string `json:"address"`
	Reachable bool   `json:"reachable"`
}

IngressConnectivityPort is one probed ingress port.

type IngressSettingsResource added in v0.2.0

type IngressSettingsResource struct {
	PrimaryDomain    string `json:"primary_domain,omitempty"`
	ACMEEnabled      bool   `json:"acme_enabled"`
	ACMEEmail        string `json:"acme_email,omitempty"`
	ACMEDirectoryURL string `json:"acme_directory_url,omitempty"`
	HSTSEnabled      bool   `json:"hsts_enabled"`
	// FallbackDomainsEnabled toggles the automatic <app>.<dashed-ip>.sslip.io hostnames.
	FallbackDomainsEnabled bool `json:"fallback_domains_enabled"`
	// PublicHost and PublicHostSource are read-only (env, detected, disabled, none).
	PublicHost       string `json:"public_host,omitempty"`
	PublicHostSource string `json:"public_host_source,omitempty"`
	// PublicHTTPSPort is the port clients use behind a proxy; 0 means the ingress listen port.
	PublicHTTPSPort int `json:"public_https_port,omitempty"`
	// TLSTerminatedUpstream: a proxy owns TLS, ACME is never attempted here.
	TLSTerminatedUpstream bool `json:"tls_terminated_upstream,omitempty"`
	// ACMESkippedUpstream and TrustedProxiesMissing are read-only.
	ACMESkippedUpstream   bool `json:"acme_skipped_upstream,omitempty"`
	TrustedProxiesMissing bool `json:"trusted_proxies_missing,omitempty"`
	// AppsBaseDomain gives new apps without a domain <app>.<base> and creates
	// the DNS record; the DNS fields tune the records Levelrail creates.
	AppsBaseDomain string `json:"apps_base_domain,omitempty"`
	DNSCNAMETarget string `json:"dns_cname_target,omitempty"`
	DNSTTLSeconds  int    `json:"dns_ttl_seconds,omitempty"`
	DNSProxied     bool   `json:"dns_proxied,omitempty"`
}

IngressSettingsResource mirrors internal/api's ingressSettingsResource (internal/api/ingress_settings.go): the shape of both GET and PUT /api/v1/settings/ingress.

type IntegrationCatalogEntryResource added in v0.2.0

type IntegrationCatalogEntryResource struct {
	Key         string                             `json:"key"`
	Name        string                             `json:"name"`
	Description string                             `json:"description"`
	DocsURL     string                             `json:"docs_url"`
	EnvVars     []IntegrationCatalogEnvVarResource `json:"env_vars"`
	Frameworks  []string                           `json:"frameworks,omitempty"`
}

IntegrationCatalogEntryResource mirrors internal/api's integrationCatalogEntry: one internal/integrations.Catalog entry, GET /api/v1/integrations' wire shape.

type IntegrationCatalogEnvVarResource added in v0.2.0

type IntegrationCatalogEnvVarResource struct {
	Name        string `json:"name"`
	Type        string `json:"type"`
	Required    bool   `json:"required"`
	Default     string `json:"default,omitempty"`
	Placeholder string `json:"placeholder,omitempty"`
}

IntegrationCatalogEnvVarResource mirrors internal/api's integrationCatalogEnvVar (internal/api/app_integrations.go).

type InvestigateEvent added in v0.2.0

type InvestigateEvent struct {
	At          time.Time `json:"at"`
	Kind        string    `json:"kind"`
	Severity    string    `json:"severity"`
	Title       string    `json:"title"`
	Detail      string    `json:"detail,omitempty"`
	Ref         string    `json:"ref,omitempty"`
	LikelyCause bool      `json:"likely_cause,omitempty"`
}

InvestigateEvent is one What changed timeline entry.

type InvestigateRoute added in v0.2.0

type InvestigateRoute struct {
	Route        string  `json:"route"`
	Requests     float64 `json:"requests"`
	Share        float64 `json:"share"`
	ErrorRate4xx float64 `json:"error_rate_4xx"`
	ErrorRate5xx float64 `json:"error_rate_5xx"`
	AvgMs        float64 `json:"avg_ms"`
}

InvestigateRoute is one route's share of a window.

type InvestigateStatus added in v0.2.0

type InvestigateStatus struct {
	Status int     `json:"status"`
	Count  float64 `json:"count"`
	Share  float64 `json:"share"`
}

InvestigateStatus is one exact status code's count.

type InvestigateSummary added in v0.2.0

type InvestigateSummary struct {
	HasTraffic   bool    `json:"has_traffic"`
	Requests     float64 `json:"requests"`
	RatePerSec   float64 `json:"rate_per_sec"`
	ErrorRate4xx float64 `json:"error_rate_4xx"`
	ErrorRate5xx float64 `json:"error_rate_5xx"`
	P50Ms        float64 `json:"p50_ms"`
	P95Ms        float64 `json:"p95_ms"`
	P99Ms        float64 `json:"p99_ms"`
}

InvestigateSummary is one window's request health.

type InvestigationResource added in v0.2.0

type InvestigationResource struct {
	App             string              `json:"app"`
	From            time.Time           `json:"from"`
	To              time.Time           `json:"to"`
	Summary         InvestigateSummary  `json:"summary"`
	Baseline        InvestigateSummary  `json:"baseline"`
	RoutesAvailable bool                `json:"routes_available"`
	TopRoutes       []InvestigateRoute  `json:"top_routes"`
	StatusCodes     []InvestigateStatus `json:"status_codes"`
	Timeline        []InvestigateEvent  `json:"timeline"`
}

InvestigationResource mirrors internal/api's investigateResponse.

type InviteResource

type InviteResource struct {
	ID        string    `json:"id"`
	Email     string    `json:"email"`
	Role      string    `json:"role,omitempty"`
	Abilities []string  `json:"abilities"`
	CreatedBy string    `json:"created_by,omitempty"`
	CreatedAt time.Time `json:"created_at"`
	ExpiresAt time.Time `json:"expires_at"`
	Expired   bool      `json:"expired"`
}

InviteResource mirrors internal/api's inviteResource (internal/api/invites.go).

type JobRunResource added in v0.2.0

type JobRunResource struct {
	ID           string     `json:"id"`
	TaskID       string     `json:"task_id"`
	JobName      string     `json:"job_name,omitempty"`
	ServiceName  string     `json:"service_name"`
	Trigger      string     `json:"trigger"`
	Status       string     `json:"status"`
	ScheduledFor *time.Time `json:"scheduled_for,omitempty"`
	StartedAt    time.Time  `json:"started_at"`
	FinishedAt   *time.Time `json:"finished_at,omitempty"`
	ExitCode     *int       `json:"exit_code,omitempty"`
	DurationMS   int64      `json:"duration_ms"`
	Attempts     int        `json:"attempts"`
	NodeID       string     `json:"node_id,omitempty"`
	Mode         string     `json:"mode,omitempty"`
	Message      string     `json:"message,omitempty"`
	Output       string     `json:"output,omitempty"`
}

JobRunResource mirrors internal/api's scheduledTaskRunResource: one job run. Output is only populated when a single run is fetched.

type JoinCommands added in v0.2.0

type JoinCommands struct {
	Docker string `json:"docker"`
	Binary string `json:"binary"`
}

JoinCommands are ready-to-paste commands that enroll a server.

type ListAppsOptions added in v0.2.0

type ListAppsOptions struct {
	Limit, Offset int
	Environment   string
}

ListAppsOptions pages GET /api/v1/apps, matching the limit/offset query params internal/api/apps_list.go's own parseAppListFilter already accepts. Both zero means every matching app in one response, ListApps's own unpaged behavior.

type ListAuditLogOptions

type ListAuditLogOptions struct {
	Limit      int
	Before     string
	Path       string
	Method     string
	ClientKind string
	Search     string // case-insensitive substring across actor, ability, method, path, remote addr
	FailedOnly bool   // only entries with status_code >= 400
	Agent      string // only entries made with a token labeled with this agent name
	Resource   string // "domain:<name>", "zone:<name>" or "app:<name>"
	Actions    string // comma separated action prefixes, e.g. "dns_record.,domain."
}

ListAuditLogOptions is ListAuditLog's and DownloadAuditLogCSV's shared query input, mirroring GET /api/v1/audit-log's own ?limit/?before/ ?path/?method/?client_kind params (internal/api/audit.go). Zero values omit the param, the same convention ListBackupsOptions establishes.

type ListBackupsOptions

type ListBackupsOptions struct {
	Limit  int
	Before string
}

ListBackupsOptions is ListBackups' pagination input, mirroring the server's ?limit/?before query params. Zero values omit the param (Limit <= 0 uses the server default, Before == "" is the first page).

type ListNodesOptions added in v0.2.0

type ListNodesOptions struct {
	Query  string
	Limit  int
	Offset int
}

ListNodesOptions are the GET /api/v1/nodes filters, mirroring DeploymentListOptions' Values() shape.

func (ListNodesOptions) Values added in v0.2.0

func (o ListNodesOptions) Values() url.Values

Values renders the options as a query string, omitting unset filters.

type ListWebhookDeliveriesOptions

type ListWebhookDeliveriesOptions struct {
	Limit  int
	Before string
}

ListWebhookDeliveriesOptions is ListWebhookDeliveries' pagination input, the same shape ListBackupsOptions establishes.

type LoadBalancerActiveHealth added in v0.2.0

type LoadBalancerActiveHealth = loadbalancer.ActiveHealth

LoadBalancerActiveHealth is the active health check block.

type LoadBalancerArtifact added in v0.2.0

type LoadBalancerArtifact struct {
	Format      string   `json:"format"`
	Filename    string   `json:"filename"`
	ContentType string   `json:"content_type"`
	Body        string   `json:"body"`
	Warnings    []string `json:"warnings,omitempty"`
}

LoadBalancerArtifact is one generated infrastructure-as-code file.

type LoadBalancerCheck added in v0.2.0

type LoadBalancerCheck struct {
	Results []loadbalancer.CheckResult `json:"results"`
	Note    string                     `json:"note,omitempty"`
}

LoadBalancerCheck is POST /api/v1/apps/{name}/loadbalancer/check's body.

type LoadBalancerConfig added in v0.2.0

type LoadBalancerConfig = loadbalancer.Config

LoadBalancerConfig is a service's load balancer settings.

type LoadBalancerHistory added in v0.2.0

type LoadBalancerHistory struct {
	Upstreams []loadbalancer.UpstreamHistory `json:"upstreams"`
}

LoadBalancerHistory is GET /api/v1/apps/{name}/loadbalancer/history's body.

type LoadBalancerList added in v0.2.0

type LoadBalancerList struct {
	Items  []LoadBalancerSummary `json:"items"`
	Total  int                   `json:"total"`
	Limit  int                   `json:"limit"`
	Offset int                   `json:"offset"`
}

LoadBalancerList is GET /api/v1/loadbalancers' body.

type LoadBalancerListParams added in v0.2.0

type LoadBalancerListParams struct {
	State  string
	Search string
	Limit  int
	Offset int
}

LoadBalancerListParams filters and pages ListLoadBalancers; zero values are omitted.

type LoadBalancerPassiveHealth added in v0.2.0

type LoadBalancerPassiveHealth = loadbalancer.PassiveHealth

LoadBalancerPassiveHealth is the passive health check block.

type LoadBalancerRateLimit added in v0.2.0

type LoadBalancerRateLimit = loadbalancer.RateLimit

LoadBalancerRateLimit is the rate limit block.

type LoadBalancerResource added in v0.2.0

type LoadBalancerResource struct {
	AppName    string              `json:"app_name"`
	Configured bool                `json:"configured"`
	Config     *LoadBalancerConfig `json:"config,omitempty"`
	Algorithms []string            `json:"algorithms"`
	Formats    []string            `json:"export_formats"`
}

LoadBalancerResource is GET/PUT /api/v1/apps/{name}/loadbalancer's body.

type LoadBalancerRetries added in v0.2.0

type LoadBalancerRetries = loadbalancer.Retries

LoadBalancerRetries is the retry block.

type LoadBalancerStatus added in v0.2.0

type LoadBalancerStatus = loadbalancer.Status

LoadBalancerStatus is the live view of a service's load balancer.

type LoadBalancerSummary added in v0.2.0

type LoadBalancerSummary struct {
	App               string     `json:"app"`
	Service           string     `json:"service"`
	Algorithm         string     `json:"algorithm"`
	State             string     `json:"state"`
	UpstreamsTotal    int        `json:"upstreams_total"`
	UpstreamsHealthy  int        `json:"upstreams_healthy"`
	Reason            string     `json:"reason,omitempty"`
	LastCheck         *time.Time `json:"last_check,omitempty"`
	ConfigUpdatedAt   string     `json:"config_updated_at"`
	ActiveHealthCheck bool       `json:"active_health_check"`
}

LoadBalancerSummary is one row of GET /api/v1/loadbalancers.

type LoadBalancerUpstreamStatus added in v0.2.0

type LoadBalancerUpstreamStatus = loadbalancer.UpstreamStatus

LoadBalancerUpstreamStatus is one upstream's live view.

type LoadBalancerUpstreamTLS added in v0.2.0

type LoadBalancerUpstreamTLS = loadbalancer.UpstreamTLS

LoadBalancerUpstreamTLS is the upstream TLS block.

type LogArchiveDumpRequest added in v0.2.0

type LogArchiveDumpRequest struct {
	AppName  string `json:"app_name"`
	TargetID string `json:"target_id"`
	From     string `json:"from"`
	To       string `json:"to"`
}

LogArchiveDumpRequest exports a time range now.

type LogArchiveObject added in v0.2.0

type LogArchiveObject struct {
	Key          string `json:"key"`
	Size         int64  `json:"size"`
	LastModified string `json:"last_modified"`
}

LogArchiveObject is one archived object.

type LogArchiveObjects added in v0.2.0

type LogArchiveObjects struct {
	Objects []LogArchiveObject `json:"objects"`
	Next    string             `json:"next,omitempty"`
}

LogArchiveObjects is one page of archived objects.

type LogArchivePolicy added in v0.2.0

type LogArchivePolicy struct {
	ID              string `json:"id"`
	AppName         string `json:"app_name"`
	TargetID        string `json:"target_id"`
	Enabled         bool   `json:"enabled"`
	Interval        string `json:"interval"`
	IntervalSeconds int64  `json:"interval_seconds"`
	RetentionDays   int    `json:"retention_days"`
	LastRunAt       string `json:"last_run_at,omitempty"`
	LastSuccessAt   string `json:"last_success_at,omitempty"`
	LastError       string `json:"last_error,omitempty"`
	CreatedAt       string `json:"created_at"`
}

LogArchivePolicy is a log archive schedule for one app, or all apps when AppName is empty.

type LogArchivePolicyRequest added in v0.2.0

type LogArchivePolicyRequest struct {
	AppName       string `json:"app_name"`
	TargetID      string `json:"target_id"`
	Interval      string `json:"interval,omitempty"`
	RetentionDays int    `json:"retention_days"`
	Enabled       *bool  `json:"enabled,omitempty"`
}

LogArchivePolicyRequest sets a policy.

type LogArchiveRun added in v0.2.0

type LogArchiveRun struct {
	ID         string `json:"id"`
	AppName    string `json:"app_name"`
	TargetID   string `json:"target_id"`
	Kind       string `json:"kind"`
	From       string `json:"from"`
	To         string `json:"to"`
	Status     string `json:"status"`
	Objects    int    `json:"objects"`
	Lines      int64  `json:"lines"`
	Bytes      int64  `json:"bytes"`
	Error      string `json:"error,omitempty"`
	StartedAt  string `json:"started_at"`
	FinishedAt string `json:"finished_at,omitempty"`
}

LogArchiveRun is one archive attempt.

type LogDrainResource

type LogDrainResource struct {
	AppName string `json:"app_name"`
	Type    string `json:"type"`
	Target  string `json:"target"`
	Enabled bool   `json:"enabled"`
}

LogDrainResource mirrors internal/api's logDrainResource (apps_log_drain.go): GET/PUT /api/v1/apps/{name}/log-drain's wire shape. Type is "http" or "syslog", validated server-side.

type LogEntryResource

type LogEntryResource struct {
	Timestamp  time.Time       `json:"timestamp"`
	Stream     string          `json:"stream"`
	Message    string          `json:"message"`
	Structured bool            `json:"structured"`
	FieldsJSON json.RawMessage `json:"fields,omitempty"`
	// Level is the server-detected level, empty when the line has none.
	Level string `json:"level,omitempty"`
}

LogEntryResource mirrors internal/api's logEntryResource (internal/api/logs.go).

type LogExcerpt added in v0.2.0

type LogExcerpt struct {
	App     string   `json:"app"`
	From    string   `json:"from"`
	To      string   `json:"to"`
	Matched int      `json:"matched"`
	Shown   int      `json:"shown"`
	Lines   []string `json:"lines"`
	Notice  string   `json:"notice,omitempty"`
}

LogExcerpt is a capped, compact view of a log query result.

func BuildLogExcerpt added in v0.2.0

func BuildLogExcerpt(app string, from, to time.Time, entries []LogEntryResource, total, maxBytes int) LogExcerpt

BuildLogExcerpt renders entries (oldest first) as one line each and drops the oldest lines until the output fits maxBytes. total is how many lines matched before any trimming.

type LogQuery added in v0.2.0

type LogQuery struct {
	App    string
	Deploy string
	Level  string
	Since  string
	Until  string
	Text   string
	// MaxLines caps returned lines; 0 means DefaultLogMaxLines.
	MaxLines int
}

LogQuery selects log lines of one app.

type LogQuerySpec added in v0.2.0

type LogQuerySpec struct {
	Q         string     `json:"q,omitempty"`
	Level     string     `json:"level,omitempty"`
	Stream    string     `json:"stream,omitempty"`
	Fields    []string   `json:"fields,omitempty"`
	Container string     `json:"container,omitempty"`
	Range     string     `json:"range,omitempty"`
	From      *time.Time `json:"from,omitempty"`
	To        *time.Time `json:"to,omitempty"`
}

LogQuerySpec is the search a saved log query reproduces.

type LogSearch added in v0.2.0

type LogSearch struct {
	Text      string
	Level     string
	Container string
	Stream    string
	Fields    []string
	From      time.Time
	To        time.Time
	Limit     int
}

LogSearch selects stored log lines with the structured filters.

type LogSearchContainer added in v0.2.0

type LogSearchContainer struct {
	ID    string `json:"id"`
	Count int    `json:"count"`
}

LogSearchContainer is a container seen in a search, with its line count.

type LogSearchEntry added in v0.2.0

type LogSearchEntry struct {
	Timestamp time.Time `json:"timestamp"`
	Stream    string    `json:"stream"`
	Message   string    `json:"message"`
	Level     string    `json:"level,omitempty"`
	Container string    `json:"container,omitempty"`
}

LogSearchEntry is one stored log line.

type LogSearchResource added in v0.2.0

type LogSearchResource struct {
	Entries    []LogSearchEntry     `json:"entries"`
	Total      int                  `json:"total"`
	Containers []LogSearchContainer `json:"containers"`
}

LogSearchResource mirrors internal/api's logsResponse.

type LogSignature added in v0.2.0

type LogSignature struct {
	ID        string    `json:"id"`
	Template  string    `json:"template"`
	Level     string    `json:"level"`
	Count     int       `json:"count"`
	FirstSeen time.Time `json:"first_seen"`
	LastSeen  time.Time `json:"last_seen"`
	Buckets   []int     `json:"buckets"`
	Sample    string    `json:"sample"`
	New       bool      `json:"new,omitempty"`
}

LogSignature is one cluster of similar error lines.

type LogSignatureQuery added in v0.2.0

type LogSignatureQuery struct {
	From     time.Time
	To       time.Time
	Level    string
	Text     string
	Limit    int
	Baseline bool
}

LogSignatureQuery selects the window and shape of a signature report.

type LogSignatures added in v0.2.0

type LogSignatures struct {
	From        time.Time      `json:"from"`
	To          time.Time      `json:"to"`
	Scanned     int            `json:"scanned"`
	MaxRows     int            `json:"max_rows"`
	Truncated   bool           `json:"truncated"`
	Total       int            `json:"total"`
	NewCount    int            `json:"new_count"`
	HasBaseline bool           `json:"has_baseline"`
	Signatures  []LogSignature `json:"signatures"`
}

LogSignatures mirrors internal/api's logSignaturesResponse.

type LogStreamEntry added in v0.2.0

type LogStreamEntry struct {
	Line   string `json:"line"`
	Stream string `json:"stream"`
}

LogStreamEntry mirrors internal/api's sseLogEvent (internal/api/deploy_attempts.go), the exact JSON payload GET /api/v1/apps/{name}/logs/stream sends on each SSE "data:" line: no timestamp, unlike LogEntryResource's historical shape, since a live tail has no persisted-store round trip to attach one from.

type MaintenanceWindowResource added in v0.2.0

type MaintenanceWindowResource struct {
	ID          string     `json:"id,omitempty"`
	Name        string     `json:"name"`
	Cron        string     `json:"cron"`
	Duration    string     `json:"duration"`
	Timezone    string     `json:"timezone,omitempty"`
	Scope       string     `json:"scope"`
	Targets     []string   `json:"targets,omitempty"`
	Enabled     bool       `json:"enabled"`
	CreatedBy   string     `json:"created_by,omitempty"`
	CreatedAt   *time.Time `json:"created_at,omitempty"`
	Active      bool       `json:"active"`
	ActiveUntil *time.Time `json:"active_until,omitempty"`
	NextStart   *time.Time `json:"next_start,omitempty"`
}

MaintenanceWindowResource mirrors internal/api's maintenanceWindowResource.

type MajorUpgradeResource added in v0.2.0

type MajorUpgradeResource struct {
	ID             string `json:"id"`
	DatabaseName   string `json:"database_name"`
	FromVersion    string `json:"from_version"`
	ToVersion      string `json:"to_version"`
	Status         string `json:"status"`
	Phase          string `json:"phase,omitempty"`
	SnapshotVolume string `json:"snapshot_volume,omitempty"`
	Error          string `json:"error,omitempty"`
	StartedAt      string `json:"started_at"`
	FinishedAt     string `json:"finished_at,omitempty"`
}

MajorUpgradeResource mirrors internal/api's majorUpgradeResource.

type MeshCheck added in v0.2.0

type MeshCheck struct {
	ID     string `json:"id"`
	Status string `json:"status"`
	Detail string `json:"detail"`
	Hint   string `json:"hint,omitempty"`
}

MeshCheck mirrors one readiness check of GET /api/v1/mesh/settings.

type MeshConnectivity added in v0.2.0

type MeshConnectivity struct {
	Nodes     []MeshConnectivityNode `json:"nodes"`
	Pairs     []MeshPair             `json:"pairs"`
	CheckedAt time.Time              `json:"checked_at"`
}

MeshConnectivity mirrors GET /api/v1/mesh/connectivity.

type MeshConnectivityNode added in v0.2.0

type MeshConnectivityNode struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	MeshAddress string `json:"mesh_address"`
	ViewError   string `json:"view_error,omitempty"`
}

MeshConnectivityNode is one mesh member and whether its view was readable.

type MeshLink struct {
	State         string     `json:"state"`
	LastHandshake *time.Time `json:"last_handshake,omitempty"`
	Endpoint      string     `json:"endpoint,omitempty"`
}

MeshLink is one direction of a node pair.

type MeshPair added in v0.2.0

type MeshPair struct {
	A      string   `json:"a"`
	B      string   `json:"b"`
	Status string   `json:"status"`
	AToB   MeshLink `json:"a_to_b"`
	BToA   MeshLink `json:"b_to_a"`
	Hint   string   `json:"hint,omitempty"`
}

MeshPair is one node pair's connectivity.

type MeshPeerResource added in v0.2.0

type MeshPeerResource struct {
	NodeID        string     `json:"node_id"`
	Name          string     `json:"name,omitempty"`
	PublicKey     string     `json:"public_key"`
	MeshAddress   string     `json:"mesh_address,omitempty"`
	Endpoint      string     `json:"endpoint,omitempty"`
	LastHandshake *time.Time `json:"last_handshake_at,omitempty"`
	Healthy       bool       `json:"healthy"`
	TransferRx    int64      `json:"transfer_rx_bytes"`
	TransferTx    int64      `json:"transfer_tx_bytes"`
	Live          bool       `json:"live"`
}

MeshPeerResource mirrors internal/api's meshPeerResource (internal/api/mesh.go): one WireGuard peer as this node's own device sees it, joined with the store's record of that node's identity. Live is false for a peer this control plane only knows about from the store (no live device peer entry for it yet), true for one the local device actually has, real UAPI-backed handshake data and all.

type MeshRotationResource added in v0.2.0

type MeshRotationResource struct {
	NodeID       string     `json:"node_id"`
	OldPublicKey string     `json:"old_public_key"`
	NewPublicKey string     `json:"new_public_key"`
	StartedAt    time.Time  `json:"started_at"`
	Confirmed    bool       `json:"confirmed"`
	ConfirmedAt  *time.Time `json:"confirmed_at,omitempty"`
}

MeshRotationResource mirrors internal/api's meshRotationResource: one key rotation's tracked confirmation state.

type MeshSettings added in v0.2.0

type MeshSettings struct {
	Configured      bool        `json:"configured"`
	Effective       bool        `json:"effective"`
	Source          string      `json:"source"`
	EnvVar          string      `json:"env_var"`
	RestartRequired bool        `json:"restart_required"`
	RestartHint     string      `json:"restart_hint,omitempty"`
	RemoteNodes     int         `json:"remote_nodes"`
	Checks          []MeshCheck `json:"checks"`
	CanEnable       bool        `json:"can_enable"`
	StartError      string      `json:"start_error,omitempty"`
	UpdatedBy       string      `json:"updated_by,omitempty"`
}

MeshSettings mirrors GET /api/v1/mesh/settings.

type MeshStatusResource added in v0.2.0

type MeshStatusResource struct {
	Enabled     bool                  `json:"enabled"`
	Backend     string                `json:"backend,omitempty"`
	Interface   string                `json:"interface,omitempty"`
	LocalNodeID string                `json:"local_node_id,omitempty"`
	PublicKey   string                `json:"public_key,omitempty"`
	MeshAddress string                `json:"mesh_address,omitempty"`
	ListenPort  int                   `json:"listen_port,omitempty"`
	Peers       []MeshPeerResource    `json:"peers"`
	Rotation    *MeshRotationResource `json:"rotation,omitempty"`
}

MeshStatusResource mirrors internal/api's meshStatusResource (GET /api/v1/mesh). Enabled is false only via a 501 response (mesh networking not turned on for this control plane at all), which GetMeshStatus surfaces as an error rather than a false-valued response, so in practice a caller that got a MeshStatusResource back at all always has Enabled true; the field is kept for parity with the wire response rather than assumed away.

type MetricPointResource

type MetricPointResource struct {
	Timestamp time.Time `json:"timestamp"`
	Value     float64   `json:"value"`
	Count     int       `json:"count"`
}

MetricPointResource mirrors internal/api's metricPoint (internal/api/metrics.go): one aggregated bucket of a queried metric.

type MetricSeriesPoint added in v0.2.0

type MetricSeriesPoint struct {
	Timestamp time.Time `json:"timestamp"`
	Value     float64   `json:"value"`
	Count     int       `json:"count"`
	Max       float64   `json:"max"`
}

MetricSeriesPoint is one bucket; Max keeps spikes visible after averaging.

type MetricsQueryOptions added in v0.2.0

type MetricsQueryOptions struct {
	Step      time.Duration
	MaxPoints int
	Compare   bool
}

MetricsQueryOptions are the optional downsampling and comparison controls of GET /api/v1/apps/{name}/metrics.

type MetricsSeriesResource added in v0.2.0

type MetricsSeriesResource struct {
	Metric         string              `json:"metric"`
	StepSeconds    float64             `json:"step_seconds"`
	Downsampled    bool                `json:"downsampled"`
	Points         []MetricSeriesPoint `json:"points"`
	PreviousPoints []MetricSeriesPoint `json:"previous_points,omitempty"`
}

MetricsSeriesResource mirrors internal/api's metricsResponse.

type MobileDevice added in v0.2.0

type MobileDevice struct {
	ID         string     `json:"id"`
	Name       string     `json:"name"`
	Platform   string     `json:"platform"`
	TokenID    string     `json:"token_id"`
	CreatedAt  time.Time  `json:"created_at"`
	LastSeenAt *time.Time `json:"last_seen_at,omitempty"`
	ExpiresAt  *time.Time `json:"expires_at,omitempty"`
	Expired    bool       `json:"expired"`
}

MobileDevice is one paired phone.

type MobilePairingCode added in v0.2.0

type MobilePairingCode struct {
	Code      string    `json:"code"`
	ExpiresAt time.Time `json:"expires_at"`
	ServerURL string    `json:"server_url"`
	PairURL   string    `json:"pair_url"`
	QRPayload string    `json:"qr_payload"`
}

MobilePairingCode is the one-time code a phone exchanges for a device token.

type ModelAPIKeyResource added in v0.2.0

type ModelAPIKeyResource struct {
	APIKey string `json:"api_key"`
}

ModelAPIKeyResource mirrors internal/api's modelAPIKeyResponse.

type ModelCacheEntry added in v0.2.0

type ModelCacheEntry struct {
	Volume         string     `json:"volume"`
	Model          string     `json:"model,omitempty"`
	Engine         string     `json:"engine,omitempty"`
	ModelRef       string     `json:"model_ref,omitempty"`
	SizeBytes      *int64     `json:"size_bytes"`
	LastUsedAt     *time.Time `json:"last_used_at"`
	LastUsedSource string     `json:"last_used_source"`
	UnusedDays     int        `json:"unused_days"`
	Unused         bool       `json:"unused"`
	InUse          bool       `json:"in_use"`
	Configured     bool       `json:"configured"`
	DuplicateOf    string     `json:"duplicate_of,omitempty"`
	Prunable       bool       `json:"prunable"`
	KeepReason     string     `json:"keep_reason,omitempty"`
}

ModelCacheEntry mirrors internal/models' CacheEntry.

type ModelCacheNode added in v0.2.0

type ModelCacheNode struct {
	NodeID           string            `json:"node_id"`
	Name             string            `json:"name"`
	IsLocal          bool              `json:"is_local"`
	Supported        bool              `json:"supported"`
	Message          string            `json:"message,omitempty"`
	Entries          []ModelCacheEntry `json:"entries"`
	TotalBytes       int64             `json:"total_bytes"`
	UniqueBytes      int64             `json:"unique_bytes"`
	ReclaimableBytes int64             `json:"reclaimable_bytes"`
	DiskFreeBytes    *int64            `json:"disk_free_bytes"`
}

ModelCacheNode mirrors internal/models' CacheNode.

type ModelCachePruneResult added in v0.2.0

type ModelCachePruneResult struct {
	DryRun         bool              `json:"dry_run"`
	Candidates     []ModelCacheEntry `json:"candidates"`
	Removed        []string          `json:"removed"`
	Skipped        []ModelCacheSkip  `json:"skipped"`
	ReclaimedBytes int64             `json:"reclaimed_bytes"`
}

ModelCachePruneResult mirrors internal/models' CachePruneResult.

type ModelCacheReport added in v0.2.0

type ModelCacheReport struct {
	UnusedDays int              `json:"unused_days"`
	Nodes      []ModelCacheNode `json:"nodes"`
	Note       string           `json:"note"`
}

ModelCacheReport mirrors internal/models' CacheReport.

type ModelCacheSkip added in v0.2.0

type ModelCacheSkip struct {
	Volume string `json:"volume"`
	Reason string `json:"reason"`
}

ModelCacheSkip mirrors internal/models' CacheSkip.

type ModelFitReport added in v0.2.0

type ModelFitReport struct {
	Model string    `json:"model,omitempty"`
	Nodes []NodeFit `json:"nodes"`
	Note  string    `json:"note"`
}

ModelFitReport mirrors internal/models.FitReport.

type ModelFitRequest added in v0.2.0

type ModelFitRequest struct {
	Engine        string   `json:"engine"`
	Model         string   `json:"model"`
	Quantization  string   `json:"quantization,omitempty"`
	ContextLength int      `json:"context_length,omitempty"`
	GPUCount      int      `json:"gpu_count,omitempty"`
	GPUDeviceIDs  []string `json:"gpu_device_ids,omitempty"`
	WeightsBytes  int64    `json:"weights_bytes,omitempty"`
	NodeID        *string  `json:"node_id,omitempty"`
}

ModelFitRequest is the body of POST /api/v1/models/fit. NodeID nil rates every GPU node.

type ModelKeyResource added in v0.2.0

type ModelKeyResource struct {
	ID          string     `json:"id"`
	Name        string     `json:"name"`
	KeyPrefix   string     `json:"key_prefix"`
	Status      string     `json:"status"`
	RPM         int        `json:"rpm"`
	TPM         int        `json:"tpm"`
	TPD         int        `json:"tpd"`
	MaxParallel int        `json:"max_parallel"`
	AllowPaths  []string   `json:"allow_paths"`
	AllowModels []string   `json:"allow_models"`
	ReplacedBy  string     `json:"replaced_by,omitempty"`
	InFlight    int        `json:"in_flight"`
	CreatedAt   time.Time  `json:"created_at"`
	ExpiresAt   *time.Time `json:"expires_at,omitempty"`
	RevokedAt   *time.Time `json:"revoked_at,omitempty"`
	LastUsedAt  *time.Time `json:"last_used_at,omitempty"`
	CreatedBy   string     `json:"created_by,omitempty"`
}

ModelKeyResource mirrors internal/api's modelKeyResource. It never carries key material, only the prefix.

type ModelKeyUsage added in v0.2.0

type ModelKeyUsage struct {
	KeyID     string `json:"key_id"`
	Name      string `json:"name"`
	KeyPrefix string `json:"key_prefix"`
	Status    string `json:"status"`
	InFlight  int    `json:"in_flight"`
	ModelUsageTotals
}

ModelKeyUsage is one key's usage in the window.

type ModelLimits added in v0.2.0

type ModelLimits struct {
	MaxBodyBytes           int64 `json:"max_body_bytes"`
	MaxN                   int   `json:"max_n"`
	MaxTokens              int   `json:"max_tokens"`
	MaxInflight            int   `json:"max_inflight_requests"`
	ResponseHeaderTimeoutS int   `json:"response_header_timeout_seconds"`
	StreamIdleTimeoutS     int   `json:"stream_idle_timeout_seconds"`
}

ModelLimits mirrors internal/models' GatewayLimitsSummary. Zero means the limit is disabled.

type ModelPreflightRequest added in v0.2.0

type ModelPreflightRequest struct {
	Repo    string `json:"repo"`
	Engine  string `json:"engine,omitempty"`
	File    string `json:"file,omitempty"`
	Quant   string `json:"quant,omitempty"`
	NodeID  string `json:"node_id,omitempty"`
	HFToken string `json:"hf_token,omitempty"`
}

ModelPreflightRequest mirrors internal/api's modelPreflightRequest.

type ModelPreflightResult added in v0.2.0

type ModelPreflightResult struct {
	Repo               string              `json:"repo"`
	Status             string              `json:"status"`
	Exists             bool                `json:"exists"`
	Message            string              `json:"message"`
	NextStep           string              `json:"next_step,omitempty"`
	RetryAfterSeconds  int                 `json:"retry_after_seconds,omitempty"`
	Gated              string              `json:"gated,omitempty"`
	Access             string              `json:"access,omitempty"`
	Private            bool                `json:"private"`
	License            string              `json:"license,omitempty"`
	TotalBytes         int64               `json:"total_bytes"`
	FileCount          int                 `json:"file_count"`
	Files              []PreflightFile     `json:"files"`
	FilesTruncated     bool                `json:"files_truncated"`
	HasGGUF            bool                `json:"has_gguf"`
	HasSafetensors     bool                `json:"has_safetensors"`
	CompatibleEngines  []string            `json:"compatible_engines"`
	EngineHint         string              `json:"engine_hint"`
	Quants             []PreflightQuant    `json:"quants"`
	RecommendedQuant   string              `json:"recommended_quant,omitempty"`
	RecommendationNote string              `json:"recommendation_note,omitempty"`
	Selected           *PreflightSelection `json:"selected,omitempty"`
	Node               PreflightNode       `json:"node"`
	Disk               PreflightDisk       `json:"disk"`
	Warnings           []string            `json:"warnings"`
	EstimateNote       string              `json:"estimate_note"`
	Cached             bool                `json:"cached"`
}

ModelPreflightResult mirrors internal/models' PreflightResult.

type ModelResource added in v0.2.0

type ModelResource struct {
	Name          string              `json:"name"`
	Engine        string              `json:"engine"`
	Model         string              `json:"model"`
	NodeID        string              `json:"node_id"`
	GPUCount      int                 `json:"gpu_count"`
	GPUDeviceIDs  []string            `json:"gpu_device_ids,omitempty"`
	ContextLength int                 `json:"context_length,omitempty"`
	Quantization  string              `json:"quantization,omitempty"`
	Domain        string              `json:"domain,omitempty"`
	EndpointURL   string              `json:"endpoint_url,omitempty"`
	APIKeyPrefix  string              `json:"api_key_prefix"`
	HFTokenSet    bool                `json:"hf_token_set"`
	Limits        ModelLimits         `json:"limits"`
	Status        ModelStatusResource `json:"status"`
	CreatedAt     time.Time           `json:"created_at"`
	UpdatedAt     time.Time           `json:"updated_at"`

	Residency               string     `json:"residency"`
	IdleTTLSeconds          int        `json:"idle_ttl_seconds"`
	EffectiveIdleTTLSeconds int        `json:"effective_idle_ttl_seconds"`
	ResidencyState          string     `json:"residency_state"`
	LastActiveAt            *time.Time `json:"last_active_at,omitempty"`

	// SwapGroup is empty (no group) or a name shared by other models on
	// the same node/GPU. SharesGPUWith lists every other model
	// currently in that same group on the same node.
	SwapGroup     string   `json:"swap_group,omitempty"`
	SharesGPUWith []string `json:"shares_gpu_with,omitempty"`
}

ModelResource mirrors internal/api's modelResource.

type ModelStatusResource added in v0.2.0

type ModelStatusResource struct {
	Ready   bool   `json:"ready"`
	Reason  string `json:"reason"`
	Message string `json:"message,omitempty"`
}

ModelStatusResource mirrors internal/api's modelStatusResource.

type ModelUsagePoint added in v0.2.0

type ModelUsagePoint struct {
	Hour time.Time `json:"hour"`
	ModelUsageTotals
}

ModelUsagePoint is one hour of usage.

type ModelUsageReport added in v0.2.0

type ModelUsageReport struct {
	Model    string            `json:"model"`
	From     time.Time         `json:"from"`
	To       time.Time         `json:"to"`
	Totals   ModelUsageTotals  `json:"totals"`
	Series   []ModelUsagePoint `json:"series"`
	Keys     []ModelKeyUsage   `json:"keys"`
	InFlight int               `json:"in_flight"`
	Note     string            `json:"note"`
}

ModelUsageReport mirrors models.UsageReport.

type ModelUsageTotals added in v0.2.0

type ModelUsageTotals struct {
	Requests      int64 `json:"requests"`
	Status2xx     int64 `json:"status_2xx"`
	Status4xx     int64 `json:"status_4xx"`
	Status5xx     int64 `json:"status_5xx"`
	RateLimited   int64 `json:"rate_limited"`
	UsageRequests int64 `json:"usage_requests"`
	InputTokens   int64 `json:"input_tokens"`
	OutputTokens  int64 `json:"output_tokens"`
	BytesOut      int64 `json:"bytes_out"`
	AvgDurationMs int64 `json:"avg_duration_ms"`
	AvgTTFTMs     int64 `json:"avg_ttft_ms"`
}

ModelUsageTotals mirrors models.UsageTotals.

type MoveAppWithVolumesRequest added in v0.2.0

type MoveAppWithVolumesRequest struct {
	NodeID string `json:"node_id"`
}

MoveAppWithVolumesRequest mirrors internal/api's moveAppWithVolumesRequest, the same node_id shape SetAppNodeRequest establishes.

type MoveEnvironmentRequest added in v0.2.0

type MoveEnvironmentRequest struct {
	EnvironmentID string `json:"environment_id"`
	Confirm       bool   `json:"confirm,omitempty"`
}

MoveEnvironmentRequest is the body of PUT .../{name}/environment.

type MoveEnvironmentResult added in v0.2.0

type MoveEnvironmentResult struct {
	Name            string                  `json:"name"`
	EnvironmentID   string                  `json:"environment_id"`
	PendingApproval *DeployApprovalResource `json:"pending_approval,omitempty"`
}

MoveEnvironmentResult is the 200 resource or the 202 pending approval a move into or out of a protected environment returns.

type NetworkProxyDomainResource added in v0.2.0

type NetworkProxyDomainResource struct {
	Domain      string `json:"domain"`
	App         string `json:"app"`
	NodeID      string `json:"node_id"`
	NodeName    string `json:"node_name,omitempty"`
	IsLocalNode bool   `json:"is_local_node"`
	Port        int    `json:"port"`
	Reachable   bool   `json:"reachable"`
	Reason      string `json:"reason,omitempty"`
	FixCommand  string `json:"fix_command,omitempty"`
	TLSStatus   string `json:"tls_status,omitempty"`
	TLSIssuer   string `json:"tls_issuer,omitempty"`
	TLSSource   string `json:"tls_source,omitempty"`
}

NetworkProxyDomainResource mirrors internal/api's networkProxyDomainResource: one domain's reachability and TLS status row on the Traffic dashboard page.

type NetworkProxyResource added in v0.2.0

type NetworkProxyResource struct {
	Domains []NetworkProxyDomainResource `json:"domains"`
}

NetworkProxyResource mirrors internal/api's networkProxyResponse, GET /api/v1/network/proxy's response body.

type NetworkResource

type NetworkResource struct {
	ContainerPort int  `json:"container_port"`
	HostPort      int  `json:"host_port,omitempty"`
	Running       bool `json:"running"`
	// FallbackURL is the zero-config sslip.io URL this app is reachable
	// at when it has no operator-configured domain and this control
	// plane's own APP_PUBLIC_HOST is a real, publicly routable IP; see
	// internal/api's own networkResource.FallbackURL doc comment.
	FallbackURL string `json:"fallback_url,omitempty"`
	// FallbackEnabled is the platform-wide automatic hostname toggle.
	FallbackEnabled bool `json:"fallback_enabled"`
	// PublicHost is the server address the fallback hostname is built from.
	PublicHost string `json:"public_host,omitempty"`
}

NetworkResource mirrors internal/api's networkResource (internal/api/network.go): the live traffic path, container's declared port plus whatever host port Docker currently has bound.

type NetworkShareResource added in v0.2.0

type NetworkShareResource struct {
	ID           string `json:"id"`
	Name         string `json:"name"`
	Protocol     string `json:"protocol"`
	Host         string `json:"host"`
	RemotePath   string `json:"remote_path"`
	MountOptions string `json:"mount_options,omitempty"`
	Username     string `json:"username,omitempty"`
	CreatedAt    string `json:"created_at"`
}

NetworkShareResource mirrors internal/api's networkShareResource. Deliberately no password field: never echoed back by the API.

type NetworkTopologyAppResource added in v0.2.0

type NetworkTopologyAppResource struct {
	Name        string   `json:"name"`
	NodeID      string   `json:"node_id"`
	Domains     []string `json:"domains,omitempty"`
	DNSName     string   `json:"dns_name,omitempty"`
	MeshAddress string   `json:"mesh_address,omitempty"`
}

NetworkTopologyAppResource mirrors internal/api's networkTopologyAppResource.

type NetworkTopologyConnectionResource added in v0.2.0

type NetworkTopologyConnectionResource struct {
	App      string `json:"app"`
	Database string `json:"database"`
	EnvVar   string `json:"env_var,omitempty"`
}

NetworkTopologyConnectionResource mirrors internal/api's networkTopologyConnectionResource.

type NetworkTopologyDatabaseResource added in v0.2.0

type NetworkTopologyDatabaseResource struct {
	Name        string `json:"name"`
	Engine      string `json:"engine"`
	NodeID      string `json:"node_id"`
	DNSName     string `json:"dns_name,omitempty"`
	MeshAddress string `json:"mesh_address,omitempty"`
}

NetworkTopologyDatabaseResource mirrors internal/api's networkTopologyDatabaseResource.

type NetworkTopologyLoadBalancerResource added in v0.2.0

type NetworkTopologyLoadBalancerResource struct {
	Service   string `json:"service"`
	Algorithm string `json:"algorithm"`
}

NetworkTopologyLoadBalancerResource mirrors internal/api's networkTopologyLoadBalancerResource.

type NetworkTopologyNodeResource added in v0.2.0

type NetworkTopologyNodeResource struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Region      string `json:"region,omitempty"`
	Status      string `json:"status"`
	Schedulable bool   `json:"schedulable"`
	MeshAddress string `json:"mesh_address,omitempty"`
	IsLocal     bool   `json:"is_local"`
}

NetworkTopologyNodeResource mirrors internal/api's networkTopologyNodeResource.

type NetworkTopologyResource added in v0.2.0

type NetworkTopologyResource struct {
	Zone          string                                `json:"zone"`
	MeshEnabled   bool                                  `json:"mesh_enabled"`
	Nodes         []NetworkTopologyNodeResource         `json:"nodes"`
	Apps          []NetworkTopologyAppResource          `json:"apps"`
	Databases     []NetworkTopologyDatabaseResource     `json:"databases"`
	LoadBalancers []NetworkTopologyLoadBalancerResource `json:"load_balancers"`
	Connections   []NetworkTopologyConnectionResource   `json:"connections"`
}

NetworkTopologyResource mirrors internal/api's networkTopologyResponse, GET /api/v1/network/topology's response body.

type NodeAgentResource added in v0.2.0

type NodeAgentResource struct {
	Version             string     `json:"version,omitempty"`
	Commit              string     `json:"commit,omitempty"`
	OS                  string     `json:"os,omitempty"`
	Arch                string     `json:"arch,omitempty"`
	ReportedAt          *time.Time `json:"reported_at,omitempty"`
	Outdated            bool       `json:"outdated"`
	MinVersion          string     `json:"min_version,omitempty"`
	ControlPlaneVersion string     `json:"control_plane_version"`
}

NodeAgentResource mirrors internal/api's nodeAgentResource.

type NodeAlertStatusResource

type NodeAlertStatusResource struct {
	PatchStatus       string `json:"patch_status"`
	NodeDiskSpace     string `json:"node_disk_space"`
	NodeResourceUsage string `json:"node_resource_usage"`
}

NodeAlertStatusResource mirrors internal/api's nodeAlertStatusResource (internal/api/nodes.go): each field is "ok", "firing", or "unknown", a live re-evaluation of this one node's own standing for that node-scoped, platform-wide alert kind, not a rule's stored aggregate value.

type NodeCapacityForecastResource added in v0.2.0

type NodeCapacityForecastResource struct {
	NodeID         string                  `json:"node_id"`
	LookbackWindow string                  `json:"lookback_window"`
	Disk           *CapacityForecastMetric `json:"disk,omitempty"`
	Memory         *CapacityForecastMetric `json:"memory,omitempty"`
	Note           string                  `json:"note"`
}

NodeCapacityForecastResource mirrors internal/api's nodeCapacityForecastResponse: GET /api/v1/nodes/{id}/capacity-forecast's wire shape. Note is always present, a plain-English restatement of this being a rough trend projection, not a guarantee.

type NodeCertResource added in v0.2.0

type NodeCertResource struct {
	// State is ok, expiring, critical, expired, revoked, or unknown.
	State              string     `json:"state"`
	NotAfter           *time.Time `json:"not_after,omitempty"`
	DaysRemaining      *int       `json:"days_remaining,omitempty"`
	RenewedAt          *time.Time `json:"renewed_at,omitempty"`
	Generation         int        `json:"generation"`
	KeyOrigin          string     `json:"key_origin"`
	PreviousValidUntil *time.Time `json:"previous_valid_until,omitempty"`
	RevokedAt          *time.Time `json:"revoked_at,omitempty"`
	WarningDays        int        `json:"warning_days"`
	CriticalDays       int        `json:"critical_days"`
}

NodeCertResource mirrors internal/api's nodeCertResource.

type NodeDrainResource added in v0.2.0

type NodeDrainResource struct {
	ID           string             `json:"id"`
	NodeID       string             `json:"node_id"`
	TargetNodeID string             `json:"target_node_id,omitempty"`
	Status       string             `json:"status"`
	Error        string             `json:"error,omitempty"`
	Blocked      []DrainBlocked     `json:"blocked"`
	Moves        []NodeMoveResource `json:"moves"`
	StartedAt    string             `json:"started_at"`
	UpdatedAt    string             `json:"updated_at"`
	FinishedAt   string             `json:"finished_at,omitempty"`
}

NodeDrainResource mirrors internal/api's nodeDrainResource.

func (NodeDrainResource) Done added in v0.2.0

func (d NodeDrainResource) Done() bool

Done reports whether the drain reached a final status.

type NodeFit added in v0.2.0

type NodeFit struct {
	NodeID         string   `json:"node_id"`
	Name           string   `json:"name"`
	IsLocal        bool     `json:"is_local"`
	Eligible       bool     `json:"eligible"`
	Current        bool     `json:"current"`
	GPUs           int      `json:"gpus"`
	TotalBytes     int64    `json:"total_bytes"`
	ReservedBytes  int64    `json:"reserved_bytes"`
	Verdict        string   `json:"verdict"`
	WeightsSource  string   `json:"weights_source"`
	WeightsBytes   int64    `json:"weights_bytes"`
	KVBytes        int64    `json:"kv_bytes"`
	OverheadBytes  int64    `json:"overhead_bytes"`
	NeedBytes      int64    `json:"need_bytes"`
	FreeBytes      int64    `json:"free_bytes"`
	ContextTokens  int      `json:"context_tokens"`
	ContextAssumed bool     `json:"context_assumed"`
	Arithmetic     string   `json:"arithmetic"`
	Reason         string   `json:"reason,omitempty"`
	Suggestions    []string `json:"suggestions"`
}

NodeFit mirrors internal/models.NodeFit.

type NodeGPUResource added in v0.2.0

type NodeGPUResource struct {
	Present          bool     `json:"present"`
	RuntimeInstalled bool     `json:"runtime_installed"`
	DriverVersion    string   `json:"driver_version,omitempty"`
	GPUCount         int      `json:"gpu_count"`
	ReservedGPUs     int      `json:"reserved_gpus"`
	FreeGPUs         int      `json:"free_gpus"`
	TotalVRAMMiB     int64    `json:"total_vram_mib"`
	UsedVRAMMiB      int64    `json:"used_vram_mib"`
	Reservations     []string `json:"reservations"`
}

NodeGPUResource mirrors internal/api's nodeGPUResource, the GPU summary on a node.

type NodeLabels added in v0.2.0

type NodeLabels struct {
	Labels map[string]string `json:"labels"`
}

NodeLabels is the body of the node labels routes.

type NodeMetricsResource added in v0.2.0

type NodeMetricsResource struct {
	Metric        string                `json:"metric"`
	Points        []MetricPointResource `json:"points"`
	ResourceCount int                   `json:"resource_count"`
}

NodeMetricsResource mirrors internal/api's nodeMetricsResponse (internal/api/node_metrics.go): AppMetricsResource's fields plus ResourceCount, how many of the node's placed services actually contributed a sample to this response.

type NodeMoveResource added in v0.2.0

type NodeMoveResource struct {
	ID         string         `json:"id"`
	Kind       string         `json:"kind"`
	Resource   string         `json:"resource"`
	FromNodeID string         `json:"from_node_id"`
	ToNodeID   string         `json:"to_node_id"`
	Stateful   bool           `json:"stateful"`
	Volumes    []string       `json:"volumes"`
	Phase      string         `json:"phase"`
	Status     string         `json:"status"`
	Error      string         `json:"error,omitempty"`
	DrainID    string         `json:"drain_id,omitempty"`
	Steps      []NodeMoveStep `json:"steps"`
	StartedAt  string         `json:"started_at"`
	UpdatedAt  string         `json:"updated_at"`
	FinishedAt string         `json:"finished_at,omitempty"`
}

NodeMoveResource mirrors internal/api's nodeMoveResource.

func (NodeMoveResource) Done added in v0.2.0

func (m NodeMoveResource) Done() bool

Done reports whether the move reached a final status.

type NodeMoveStep added in v0.2.0

type NodeMoveStep struct {
	Phase   string `json:"phase"`
	Outcome string `json:"outcome"`
	Message string `json:"message,omitempty"`
	At      string `json:"at"`
}

NodeMoveStep is one recorded phase of a node move.

type NodePatchStatusResource

type NodePatchStatusResource struct {
	Checked   bool       `json:"checked"`
	Total     int        `json:"total"`
	Security  int        `json:"security"`
	CheckedAt *time.Time `json:"checked_at,omitempty"`
}

NodePatchStatusResource mirrors internal/api's nodePatchStatusResponse (internal/api/node_patch_status.go). Checked distinguishes "never checked" (Total/Security both zero-valued and meaningless) from checked-and-genuinely-up-to-date (Checked true, Total 0): callers must branch on Checked first.

type NodeProviderRegionResource added in v0.2.0

type NodeProviderRegionResource struct {
	ID   string `json:"id"`
	Name string `json:"name"`
}

NodeProviderRegionResource mirrors internal/api's nodeProviderRegionResource.

type NodeProviderResource added in v0.2.0

type NodeProviderResource struct {
	Provider string `json:"provider"`
	HasToken bool   `json:"has_token"`
}

NodeProviderResource mirrors internal/api's nodeProviderResource.

type NodeProviderSizeResource added in v0.2.0

type NodeProviderSizeResource struct {
	ID           string `json:"id"`
	Name         string `json:"name"`
	VCPUs        int    `json:"vcpus"`
	MemoryMB     int    `json:"memory_mb"`
	DiskGB       int    `json:"disk_gb"`
	PriceMonthly string `json:"price_monthly,omitempty"`
	Currency     string `json:"currency,omitempty"`
}

NodeProviderSizeResource mirrors internal/api's nodeProviderSizeResource.

type NodeProvisionResource added in v0.2.0

type NodeProvisionResource struct {
	ID            string    `json:"id"`
	Provider      string    `json:"provider"`
	Region        string    `json:"region"`
	Size          string    `json:"size"`
	Name          string    `json:"name"`
	Role          string    `json:"role"`
	Status        string    `json:"status"`
	IPAddress     string    `json:"ip_address,omitempty"`
	NodeID        string    `json:"node_id,omitempty"`
	FailureReason string    `json:"failure_reason,omitempty"`
	CreatedAt     time.Time `json:"created_at"`
	UpdatedAt     time.Time `json:"updated_at"`
}

NodeProvisionResource mirrors internal/api's nodeProvisionResource.

type NodeReenrollTokenResponse added in v0.2.0

type NodeReenrollTokenResponse struct {
	Token         string    `json:"token"`
	NodeID        string    `json:"node_id"`
	ExpiresAt     time.Time `json:"expires_at"`
	CAFingerprint string    `json:"ca_fingerprint,omitempty"`
	AgentBinary   string    `json:"agent_binary"`
}

NodeReenrollTokenResponse mirrors internal/api's reenrollTokenResponse: the only time the token is shown.

type NodeResource

type NodeResource struct {
	ID              string     `json:"id"`
	Name            string     `json:"name"`
	Address         string     `json:"address,omitempty"`
	Status          string     `json:"status"`
	CertFingerprint string     `json:"cert_fingerprint,omitempty"`
	JoinedAt        *time.Time `json:"joined_at,omitempty"`
	LastSeenAt      *time.Time `json:"last_seen_at,omitempty"`
	// Schedulable is the cordon state: false means the node refuses new
	// placements while whatever's already running there keeps running.
	Schedulable           bool      `json:"schedulable"`
	AcceptsAppWorkloads   bool      `json:"accepts_app_workloads"`
	AcceptsBuildWorkloads bool      `json:"accepts_build_workloads"`
	CreatedAt             time.Time `json:"created_at"`
	// AlertStatus is only set by GET /api/v1/nodes/{id} (a single-node
	// fetch), never the list endpoint; nil when telemetry isn't
	// configured on the control plane.
	AlertStatus *NodeAlertStatusResource `json:"alert_status,omitempty"`
	// IsLocal is true for the one node running the control plane process
	// itself, the only node with real disk/memory host metrics.
	IsLocal bool `json:"is_local"`
	// StatusReason is a machine-readable code for a status needing
	// operator action, e.g. "enrolled_never_connected".
	StatusReason string `json:"status_reason,omitempty"`
	// GPU is set when the node reported an NVIDIA GPU.
	GPU *NodeGPUResource `json:"gpu,omitempty"`
	// Cert and Agent mirror the node's agent certificate lifecycle and the
	// agent's self-reported build (node_cert.go in this package).
	Cert  *NodeCertResource  `json:"cert,omitempty"`
	Agent *NodeAgentResource `json:"agent,omitempty"`
}

NodeResource mirrors internal/api's nodeResource (internal/api/nodes.go).

type NodeResourceUsageResource added in v0.2.0

type NodeResourceUsageResource struct {
	NodeID           string   `json:"node_id"`
	Name             string   `json:"name"`
	IsLocal          bool     `json:"is_local"`
	CPUPercent       *float64 `json:"cpu_percent,omitempty"`
	MemoryUsageBytes *float64 `json:"memory_usage_bytes,omitempty"`
	MemoryTotalBytes *float64 `json:"memory_total_bytes,omitempty"`
	DiskUsedBytes    *float64 `json:"disk_used_bytes,omitempty"`
	DiskTotalBytes   *float64 `json:"disk_total_bytes,omitempty"`

	LevelrailMemoryBytes       *float64                `json:"levelrail_memory_bytes,omitempty"`
	OtherContainersMemoryBytes *float64                `json:"other_containers_memory_bytes,omitempty"`
	OtherContainers            []UnmanagedContainerUse `json:"other_containers,omitempty"`
	SystemMemoryBytes          *float64                `json:"system_memory_bytes,omitempty"`
}

NodeResourceUsageResource mirrors internal/api's nodeResourceUsageResource (internal/api/node_resource_usage.go): one node's latest known CPU/memory/disk reading. CPUPercent/ MemoryUsageBytes are the sum of every placed service's latest sample, not a true host read; MemoryTotalBytes/DiskUsedBytes/DiskTotalBytes are real host reads but (today) only ever populated for the node running the control plane itself. A nil field means no data yet, not zero usage.

type NodeStatusEventResource added in v0.2.0

type NodeStatusEventResource struct {
	FromStatus string    `json:"from_status"`
	ToStatus   string    `json:"to_status"`
	CreatedAt  time.Time `json:"created_at"`
}

NodeStatusEventResource mirrors internal/api's nodeStatusEventResource.

type NotificationChannelResource

type NotificationChannelResource struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	Kind      string `json:"kind"`
	NotifyURL string `json:"notify_url"`
	Enabled   bool   `json:"enabled"`
	// NotifyDeviceLogin is true when the channel gets a link-only notice
	// while a CLI login awaits approval.
	NotifyDeviceLogin bool `json:"notify_device_login"`
	// NotifyDeviceLoginExpired is true when the channel is told a pending
	// CLI login expired unapproved.
	NotifyDeviceLoginExpired bool   `json:"notify_device_login_expired"`
	CreatedAt                string `json:"created_at"`
	UpdatedAt                string `json:"updated_at"`
}

NotificationChannelResource mirrors internal/api's notificationChannelResource (internal/api/notification_channels.go).

type NotificationDeliveryResource

type NotificationDeliveryResource struct {
	ID        string `json:"id"`
	ChannelID string `json:"channel_id"`
	Trigger   string `json:"trigger"`
	Success   bool   `json:"success"`
	Error     string `json:"error,omitempty"`
	CreatedAt string `json:"created_at"`
}

NotificationDeliveryResource mirrors internal/api's notificationDeliveryResource (internal/api/notification_channels.go).

type OAuthProviderSettingsResource added in v0.2.0

type OAuthProviderSettingsResource struct {
	Provider           string `json:"provider"`
	Enabled            bool   `json:"enabled"`
	ClientID           string `json:"client_id,omitempty"`
	AllowedEmailDomain string `json:"allowed_email_domain,omitempty"`
	IssuerURL          string `json:"issuer_url,omitempty"`
	DisplayName        string `json:"display_name,omitempty"`
	HasClientSecret    bool   `json:"has_client_secret"`
}

OAuthProviderSettingsResource mirrors internal/api's oauthProviderSettingsResource (internal/api/oauth_settings.go): GET/PUT /api/v1/settings/oauth[/{provider}]'s wire shape. ClientSecret is never included in a response, only HasClientSecret.

type OnboardingStateResource

type OnboardingStateResource struct {
	Completed   bool              `json:"completed"`
	CurrentStep string            `json:"current_step,omitempty"`
	Steps       map[string]string `json:"steps,omitempty"`
}

OnboardingStateResource mirrors internal/api's onboardingStateResource (internal/api/onboarding.go).

type OpenAPIRouteResource added in v0.2.0

type OpenAPIRouteResource struct {
	Method       string          `json:"method"`
	Path         string          `json:"path"`
	Ability      string          `json:"ability"`
	Group        string          `json:"group"`
	Handler      string          `json:"handler"`
	Description  string          `json:"description,omitempty"`
	RequestBody  json.RawMessage `json:"requestBody,omitempty"`
	ResponseBody json.RawMessage `json:"responseBody,omitempty"`
}

OpenAPIRouteResource mirrors internal/api's openAPISpecRoute exactly: one registered route plus, for a hand-annotated few, a worked request/response example (see internal/api/openapi.go).

type OpenAPISpecResource added in v0.2.0

type OpenAPISpecResource struct {
	Version      int                    `json:"version"`
	Count        int                    `json:"count"`
	ExampleCount int                    `json:"exampleCount"`
	Routes       []OpenAPIRouteResource `json:"routes"`
}

OpenAPISpecResource mirrors internal/api's openAPISpec: the "levelrail-cli api-docs" and web API explorer's shared data source, generated at build time by scripts/gen-api-reference from the routes*.go registrations.

type Option

type Option func(*Client)

Option configures a Client at construction time. See WithUserAgent.

func WithUserAgent

func WithUserAgent(userAgent string) Option

WithUserAgent sets the User-Agent header on every request this Client sends, so the control plane's audit log (internal/api's clientKindFromUserAgent) can tell which real client made a call rather than lumping every bearer-token caller into one bucket. Each of this project's own callers passes its own value: cmd/levelrail-cli sets "levelrail-cli/<version>", cmd/levelrail-mcp sets "levelrail-mcp/<version>".

type OrganizationResource

type OrganizationResource struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	CreatedAt string `json:"created_at"`
}

OrganizationResource mirrors internal/api's organizationResource (internal/api/organizations.go).

type OrphanFailure added in v0.2.0

type OrphanFailure struct {
	OrphanResource
	Error string `json:"error"`
}

OrphanFailure is an orphan the reaper could not remove.

type OrphanFinding added in v0.2.0

type OrphanFinding struct {
	OrphanResource
	FirstSeenAt *string `json:"first_seen_at,omitempty"`
	ReapAfter   *string `json:"reap_after,omitempty"`
	Due         bool    `json:"due"`
}

OrphanFinding is an OrphanResource plus its grace period status.

type OrphanReport added in v0.2.0

type OrphanReport struct {
	DryRun      bool             `json:"dry_run"`
	Findings    []OrphanFinding  `json:"findings"`
	Removed     []OrphanResource `json:"removed"`
	Failed      []OrphanFailure  `json:"failed,omitempty"`
	Unreachable []string         `json:"unreachable,omitempty"`
	Halted      string           `json:"halted,omitempty"`
}

OrphanReport mirrors internal/orphans.Report.

type OrphanResource added in v0.2.0

type OrphanResource struct {
	Kind      string `json:"kind"`
	Name      string `json:"name"`
	ID        string `json:"id,omitempty"`
	NodeID    string `json:"node_id"`
	Reason    string `json:"reason"`
	Image     string `json:"image,omitempty"`
	SizeBytes int64  `json:"size_bytes,omitempty"`
	PlacedOn  string `json:"placed_on,omitempty"`
	Skip      string `json:"skip,omitempty"`
}

OrphanResource mirrors internal/orphans.Orphan: a leftover container or volume that desired state no longer accounts for.

type OrphanedVolumeResource added in v0.2.0

type OrphanedVolumeResource struct {
	Name      string `json:"name"`
	SizeBytes *int64 `json:"size_bytes,omitempty"`
	CreatedAt string `json:"created_at,omitempty"`
}

OrphanedVolumeResource mirrors internal/api's orphanedVolumeResource: one of this instance's own named Docker volumes that current desired state no longer references. SizeBytes is nil when the volume driver didn't report a size, never a fabricated 0.

type PITRRestoreHistoryResource added in v0.2.0

type PITRRestoreHistoryResource struct {
	ID                  string `json:"id"`
	DatabaseName        string `json:"database_name"`
	BaseBackupHistoryID string `json:"base_backup_history_id"`
	TargetTimestamp     string `json:"target_timestamp"`
	Status              string `json:"status"`
	Error               string `json:"error,omitempty"`
	StartedAt           string `json:"started_at"`
	FinishedAt          string `json:"finished_at,omitempty"`
}

PITRRestoreHistoryResource mirrors internal/api's pitrRestoreHistoryResource: GET/POST .../pitr-restore(s).

type PITRStatusResource added in v0.2.0

type PITRStatusResource struct {
	Enabled       bool   `json:"enabled"`
	EnabledAt     string `json:"enabled_at,omitempty"`
	HasBaseBackup bool   `json:"has_base_backup"`
	WindowStart   string `json:"window_start,omitempty"`
	WindowEnd     string `json:"window_end,omitempty"`
	WindowError   string `json:"window_error,omitempty"`
	// WALShip is the last shipping outcome of the WAL archive to the backup
	// target; nil until a pass has run.
	WALShip *WALShipResource `json:"wal_ship,omitempty"`
}

PITRStatusResource mirrors internal/api's pitrStatusResource (internal/api/pitr.go): GET /api/v1/databases/{name}/pitr.

type PatchEnvironmentRequest added in v0.2.0

type PatchEnvironmentRequest struct {
	Name      *string `json:"name,omitempty"`
	Kind      *string `json:"kind,omitempty"`
	SortOrder *int    `json:"sort_order,omitempty"`
	Protected *bool   `json:"protected,omitempty"`
}

PatchEnvironmentRequest mirrors internal/api's updateEnvironmentRequest; nil fields are left unchanged.

type PendingChange added in v0.2.0

type PendingChange struct {
	Kind  string   `json:"kind"`
	Keys  []string `json:"keys,omitempty"`
	Since string   `json:"since"`
}

PendingChange mirrors internal/api's pendingChange.

type PendingChanges added in v0.2.0

type PendingChanges struct {
	Pending     bool            `json:"pending"`
	Changes     []PendingChange `json:"changes"`
	ApplyAction string          `json:"apply_action"`
}

PendingChanges mirrors internal/api's pendingChangesResource.

type PipelineApproval added in v0.2.0

type PipelineApproval struct {
	ID              int64      `json:"id"`
	Job             string     `json:"job"`
	StepIndex       int        `json:"step_index"`
	Message         string     `json:"message"`
	RequiredAbility string     `json:"required_ability"`
	Decision        string     `json:"decision,omitempty"`
	DecidedBy       string     `json:"decided_by,omitempty"`
	Comment         string     `json:"comment,omitempty"`
	ExpiresAt       *time.Time `json:"expires_at,omitempty"`
	CreatedAt       time.Time  `json:"created_at"`
	DecidedAt       *time.Time `json:"decided_at,omitempty"`
}

PipelineApproval is one manual approval gate of a run.

type PipelineHold added in v0.2.0

type PipelineHold struct {
	State  string     `json:"state"`
	Reason string     `json:"reason"`
	By     string     `json:"by,omitempty"`
	At     *time.Time `json:"at,omitempty"`
}

PipelineHold is a run held for approval, such as a fork pull request.

type PipelineIssue added in v0.2.0

type PipelineIssue struct {
	Path    string `json:"path"`
	Line    int    `json:"line"`
	Message string `json:"message"`
}

PipelineIssue is one validation problem in a pipeline definition.

type PipelineJobView added in v0.2.0

type PipelineJobView struct {
	Key        string             `json:"key"`
	Name       string             `json:"name"`
	Stage      string             `json:"stage,omitempty"`
	Needs      []string           `json:"needs"`
	Matrix     map[string]string  `json:"matrix,omitempty"`
	NodeID     string             `json:"node_id,omitempty"`
	Status     string             `json:"status"`
	Reason     string             `json:"reason,omitempty"`
	Attempt    int                `json:"attempt"`
	Outputs    map[string]string  `json:"outputs,omitempty"`
	StartedAt  *time.Time         `json:"started_at,omitempty"`
	FinishedAt *time.Time         `json:"finished_at,omitempty"`
	Steps      []PipelineStepView `json:"steps"`
}

PipelineJobView is one job of a run with its steps.

type PipelineLogLine added in v0.2.0

type PipelineLogLine struct {
	ID     int64     `json:"id"`
	Job    string    `json:"job"`
	Step   int       `json:"step"`
	Stream string    `json:"stream"`
	Line   string    `json:"line"`
	Time   time.Time `json:"time"`
}

PipelineLogLine is one output line of a run.

type PipelineOIDCResource added in v0.2.0

type PipelineOIDCResource struct {
	Configured        bool   `json:"configured"`
	IssuerURL         string `json:"issuer_url,omitempty"`
	JWKSURL           string `json:"jwks_url,omitempty"`
	RotationSupported bool   `json:"rotation_supported"`
}

PipelineOIDCResource mirrors internal/api's oidcInfoResource: whether pipeline jobs can mint OIDC tokens on this control plane, and the URLs an operator wires into a cloud provider's OIDC trust policy.

type PipelineOIDCRotation added in v0.2.0

type PipelineOIDCRotation struct {
	OldKID        string    `json:"old_kid"`
	NewKID        string    `json:"new_kid"`
	RetireAt      time.Time `json:"retire_at"`
	RetiringCount int       `json:"retiring_count"`
}

PipelineOIDCRotation mirrors internal/api's rotatePipelineOIDCKeyResponse.

type PipelineReport added in v0.2.0

type PipelineReport struct {
	Provider string `json:"provider,omitempty"`
	State    string `json:"state,omitempty"`
	URL      string `json:"url,omitempty"`
	Warning  string `json:"warning,omitempty"`
}

PipelineReport mirrors internal/api's pipelineReport: the run's commit status as posted to the git forge.

type PipelineResource added in v0.2.0

type PipelineResource struct {
	ID        string    `json:"id"`
	App       string    `json:"app"`
	Name      string    `json:"name"`
	Source    string    `json:"source"`
	Enabled   bool      `json:"enabled"`
	YAML      string    `json:"yaml,omitempty"`
	Triggers  []string  `json:"triggers,omitempty"`
	Jobs      int       `json:"jobs"`
	LastRun   *RunBrief `json:"last_run,omitempty"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
	SourceSHA string    `json:"source_sha,omitempty"`
	Diverged  bool      `json:"diverged,omitempty"`
}

PipelineResource mirrors internal/api's pipelineResource.

type PipelineRunResource added in v0.2.0

type PipelineRunResource struct {
	ID           string             `json:"id"`
	PipelineID   string             `json:"pipeline_id"`
	PipelineName string             `json:"pipeline_name"`
	App          string             `json:"app"`
	Number       int                `json:"number"`
	Trigger      string             `json:"trigger"`
	Actor        string             `json:"actor,omitempty"`
	Ref          string             `json:"ref,omitempty"`
	CommitSHA    string             `json:"commit_sha,omitempty"`
	Inputs       map[string]string  `json:"inputs,omitempty"`
	Status       string             `json:"status"`
	Reason       string             `json:"reason,omitempty"`
	CreatedAt    time.Time          `json:"created_at"`
	StartedAt    *time.Time         `json:"started_at,omitempty"`
	FinishedAt   *time.Time         `json:"finished_at,omitempty"`
	Jobs         []PipelineJobView  `json:"jobs,omitempty"`
	Approvals    []PipelineApproval `json:"approvals,omitempty"`
	Hold         *PipelineHold      `json:"hold,omitempty"`
	Report       *PipelineReport    `json:"report,omitempty"`
}

PipelineRunResource mirrors internal/api's pipelineRunResource.

type PipelineRunRow added in v0.2.0

type PipelineRunRow struct {
	ID              string     `json:"id"`
	App             string     `json:"app"`
	Pipeline        string     `json:"pipeline"`
	Number          int        `json:"number"`
	Status          string     `json:"status"`
	Reason          string     `json:"reason,omitempty"`
	Trigger         string     `json:"trigger"`
	Ref             string     `json:"ref,omitempty"`
	ShortSHA        string     `json:"short_sha,omitempty"`
	CreatedAt       time.Time  `json:"created_at"`
	StartedAt       *time.Time `json:"started_at,omitempty"`
	DurationSeconds *int64     `json:"duration_seconds,omitempty"`
	ApprovalPending bool       `json:"approval_pending"`
	ApprovalID      int64      `json:"approval_id,omitempty"`
	HoldPending     bool       `json:"hold_pending"`
	CanDecide       bool       `json:"can_decide"`
}

PipelineRunRow mirrors internal/api's pipelineRunRowResource.

type PipelineRunRowsPage added in v0.2.0

type PipelineRunRowsPage struct {
	Runs       []PipelineRunRow `json:"runs"`
	NextCursor string           `json:"next_cursor,omitempty"`
}

PipelineRunRowsPage is one page of cross-app runs.

type PipelineRunsQuery added in v0.2.0

type PipelineRunsQuery struct {
	Status   string
	App      string
	Pipeline string
	Trigger  string
	Cursor   string
	Limit    int
}

PipelineRunsQuery filters ListAllPipelineRuns. Empty fields are not sent.

type PipelineSaveRequest added in v0.2.0

type PipelineSaveRequest struct {
	Name    string `json:"name,omitempty"`
	YAML    string `json:"yaml"`
	Enabled *bool  `json:"enabled,omitempty"`
}

PipelineSaveRequest is the body of create and update.

type PipelineStartRequest added in v0.2.0

type PipelineStartRequest struct {
	Ref    string            `json:"ref,omitempty"`
	SHA    string            `json:"sha,omitempty"`
	Inputs map[string]string `json:"inputs,omitempty"`
}

PipelineStartRequest is the body of a manual or API run.

type PipelineStepView added in v0.2.0

type PipelineStepView struct {
	Index      int        `json:"index"`
	Name       string     `json:"name"`
	Kind       string     `json:"kind"`
	Status     string     `json:"status"`
	Reason     string     `json:"reason,omitempty"`
	ExitCode   *int       `json:"exit_code,omitempty"`
	Attempt    int        `json:"attempt"`
	StartedAt  *time.Time `json:"started_at,omitempty"`
	FinishedAt *time.Time `json:"finished_at,omitempty"`
}

PipelineStepView is one step of a job.

type PipelineSyncItem added in v0.2.0

type PipelineSyncItem struct {
	File    string `json:"file"`
	Name    string `json:"name"`
	Outcome string `json:"outcome"`
	Message string `json:"message,omitempty"`
}

PipelineSyncItem is the outcome for one pipeline file.

type PipelineSyncResult added in v0.2.0

type PipelineSyncResult struct {
	SHA   string             `json:"sha"`
	Dir   string             `json:"dir,omitempty"`
	Items []PipelineSyncItem `json:"items"`
}

PipelineSyncResult is the outcome of one repository sync.

type PipelineSyncStatus added in v0.2.0

type PipelineSyncStatus struct {
	Connected    bool       `json:"connected"`
	RepoIsTruth  bool       `json:"repo_is_truth"`
	LastSHA      string     `json:"last_sha,omitempty"`
	LastSyncedAt *time.Time `json:"last_synced_at,omitempty"`
	LastError    string     `json:"last_error,omitempty"`
}

PipelineSyncStatus is an app's repository sync settings and last outcome.

type PipelineTrigger added in v0.2.0

type PipelineTrigger struct {
	ID        int64     `json:"id"`
	Pipeline  string    `json:"pipeline,omitempty"`
	Event     string    `json:"event"`
	Ref       string    `json:"ref,omitempty"`
	SHA       string    `json:"sha,omitempty"`
	Decision  string    `json:"decision"`
	Reason    string    `json:"reason"`
	RunID     string    `json:"run_id,omitempty"`
	CreatedAt time.Time `json:"created_at"`
}

PipelineTrigger is one recorded decision about a git event.

type PipelineValidation added in v0.2.0

type PipelineValidation struct {
	Valid    bool            `json:"valid"`
	Issues   []PipelineIssue `json:"issues"`
	Triggers []string        `json:"triggers,omitempty"`
	Jobs     int             `json:"jobs,omitempty"`
}

PipelineValidation is the result of POST /api/v1/pipelines/validate.

type PlacementRejection added in v0.2.0

type PlacementRejection struct {
	NodeID string `json:"node_id"`
	Reason string `json:"reason"`
}

PlacementRejection says why a node is not eligible.

type PlacementResource added in v0.2.0

type PlacementResource struct {
	Kind         string               `json:"kind"`
	Name         string               `json:"name"`
	NodeID       string               `json:"node_id"`
	NodeSelector map[string]string    `json:"node_selector"`
	Eligible     []string             `json:"eligible_node_ids"`
	Rejected     []PlacementRejection `json:"rejected"`
}

PlacementResource mirrors internal/api's placementResource.

type PlatformImportItem added in v0.2.0

type PlatformImportItem struct {
	Kind       string   `json:"kind"`
	SourceID   string   `json:"source_id"`
	SourceName string   `json:"source_name"`
	Target     string   `json:"target,omitempty"`
	Status     string   `json:"status"`
	Reasons    []string `json:"reasons,omitempty"`
	Manual     []string `json:"manual,omitempty"`
}

PlatformImportItem is one row of a platform import report.

type PlatformImportReport added in v0.2.0

type PlatformImportReport struct {
	Platform string               `json:"platform"`
	Items    []PlatformImportItem `json:"items"`
	Counts   map[string]int       `json:"counts"`
	Notes    []string             `json:"notes,omitempty"`
}

PlatformImportReport is the discover or apply result.

type PlatformImportRequest added in v0.2.0

type PlatformImportRequest struct {
	Platform      string   `json:"platform"`
	URL           string   `json:"url"`
	Token         string   `json:"token"`
	InsecureTLS   bool     `json:"insecure_tls,omitempty"`
	AllowPrivate  bool     `json:"allow_private,omitempty"`
	AllowLoopback bool     `json:"allow_loopback,omitempty"`
	Only          []string `json:"only,omitempty"`
	Collision     string   `json:"collision,omitempty"`
}

PlatformImportRequest is the body of the platform import routes. Token is the source platform's credential and is sent only in this body.

type PolicyAttachmentResource

type PolicyAttachmentResource struct {
	ID            string    `json:"id"`
	PolicyID      string    `json:"policy_id"`
	PrincipalType string    `json:"principal_type"`
	PrincipalID   string    `json:"principal_id"`
	CreatedAt     time.Time `json:"created_at"`
}

PolicyAttachmentResource mirrors internal/api's policyAttachmentResource.

type PolicyDocument added in v0.2.0

type PolicyDocument struct {
	Statement []PolicyStatement `json:"Statement"`
}

PolicyDocument is a policy body, typed so tool output schemas stay exact.

type PolicyLimits added in v0.2.0

type PolicyLimits struct {
	MaxHeaderRules    int   `json:"max_header_rules"`
	MaxForwarders     int   `json:"max_forwarders"`
	MaxCacheRules     int   `json:"max_cache_rules"`
	MaxRegexLen       int   `json:"max_regex_len"`
	MaxHeaderValueLen int   `json:"max_header_value_len"`
	CacheMaxObject    int64 `json:"cache_max_object_bytes"`
	CacheTotalBytes   int64 `json:"cache_total_bytes"`
	ForwardTimeoutSec int   `json:"forward_timeout_seconds"`
}

PolicyLimits are the instance caps for traffic controls.

type PolicyPreviewHops added in v0.2.0

type PolicyPreviewHops struct {
	URL   string              `json:"url"`
	Hops  []trafficpolicy.Hop `json:"hops"`
	Error string              `json:"error,omitempty"`
}

PolicyPreviewHops is one sample URL's redirect chain.

type PolicyPreviewRequest added in v0.2.0

type PolicyPreviewRequest struct {
	Policy          *trafficpolicy.Policy `json:"policy,omitempty"`
	Method          string                `json:"method,omitempty"`
	Path            string                `json:"path,omitempty"`
	URLs            []string              `json:"urls,omitempty"`
	CanonicalPreset string                `json:"canonical_preset,omitempty"`
}

PolicyPreviewRequest overlays draft sections and asks what happens to one request and to sample URLs.

type PolicyPreviewResponse added in v0.2.0

type PolicyPreviewResponse struct {
	Steps  []trafficpolicy.Step       `json:"steps"`
	Hops   []PolicyPreviewHops        `json:"hops,omitempty"`
	Errors []trafficpolicy.FieldError `json:"errors,omitempty"`
}

PolicyPreviewResponse is POST .../policies/preview's result.

type PolicyRequest

type PolicyRequest struct {
	Name        string          `json:"name"`
	Description string          `json:"description,omitempty"`
	Document    json.RawMessage `json:"document"`
}

PolicyRequest mirrors internal/api's policyRequest, the body for both CreatePolicy and UpdatePolicy.

type PolicyResource

type PolicyResource struct {
	ID          string          `json:"id"`
	Name        string          `json:"name"`
	Description string          `json:"description"`
	Document    json.RawMessage `json:"document"`
	CreatedAt   time.Time       `json:"created_at"`
	UpdatedAt   time.Time       `json:"updated_at"`
}

PolicyResource mirrors internal/api's policyResource (internal/api/iam_handlers.go).

type PolicyStatement added in v0.2.0

type PolicyStatement struct {
	Effect   string   `json:"Effect"`
	Action   []string `json:"Action"`
	Resource []string `json:"Resource"`
}

PolicyStatement is one Allow or Deny rule of a policy document.

type PolicyTemplate added in v0.2.0

type PolicyTemplate struct {
	ID          string                `json:"id"`
	Name        string                `json:"name"`
	Description string                `json:"description"`
	Params      []PolicyTemplateParam `json:"params"`
	Document    PolicyDocument        `json:"document"`
}

PolicyTemplate mirrors internal/api's policyTemplateResource.

type PolicyTemplateList added in v0.2.0

type PolicyTemplateList struct {
	Version   int              `json:"version"`
	Templates []PolicyTemplate `json:"templates"`
}

PolicyTemplateList mirrors internal/api's policyTemplateListResponse.

type PolicyTemplateParam added in v0.2.0

type PolicyTemplateParam struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Required    bool   `json:"required"`
}

PolicyTemplateParam mirrors internal/api's policyTemplateParam.

type PortHolder added in v0.2.0

type PortHolder struct {
	Container string `json:"container"`
	Image     string `json:"image"`
}

PortHolder is a container already publishing a host port.

type PortStream added in v0.2.0

type PortStream struct {
	ID             string       `json:"id"`
	Protocol       string       `json:"protocol"`
	HostPort       int          `json:"host_port"`
	ContainerPort  int          `json:"container_port"`
	Target         string       `json:"target"`
	OpenToAll      bool         `json:"open_to_all"`
	AllowedSources []string     `json:"allowed_sources"`
	Conflicts      []string     `json:"conflicts"`
	Holders        []PortHolder `json:"holders"`
}

PortStream is one of the app's raw TCP/UDP streams.

type PostureCounts added in v0.2.0

type PostureCounts struct {
	Critical int `json:"critical"`
	High     int `json:"high"`
	Medium   int `json:"medium"`
	Low      int `json:"low"`
	Unknown  int `json:"unknown"`
	Passing  int `json:"passing"`
}

PostureCounts mirrors internal/api's postureCounts.

type PostureFix added in v0.2.0

type PostureFix struct {
	Kind   string            `json:"kind"`
	Link   string            `json:"link,omitempty"`
	Action string            `json:"action,omitempty"`
	Params map[string]string `json:"params,omitempty"`
	CLI    string            `json:"cli,omitempty"`
}

PostureFix mirrors internal/api's postureFix: a dashboard link, a named one-click action, and an optional CLI command without the program name.

type PostureItem added in v0.2.0

type PostureItem struct {
	ID       string      `json:"id"`
	Severity string      `json:"severity"`
	Status   string      `json:"status"`
	Count    int         `json:"count"`
	Subjects []string    `json:"subjects,omitempty"`
	Detail   string      `json:"detail,omitempty"`
	Fix      *PostureFix `json:"fix,omitempty"`
}

PostureItem mirrors internal/api's postureItem.

type PreflightCheck added in v0.2.0

type PreflightCheck struct {
	ID     string `json:"id"`
	Name   string `json:"name"`
	Status string `json:"status"`
	Reason string `json:"reason"`
	Fix    string `json:"fix,omitempty"`
}

PreflightCheck is one preflight result.

type PreflightDisk added in v0.2.0

type PreflightDisk struct {
	Status        string `json:"status"`
	RequiredBytes int64  `json:"required_bytes"`
	FreeBytes     *int64 `json:"free_bytes"`
	Message       string `json:"message"`
}

PreflightDisk mirrors internal/models' PreflightDisk.

type PreflightFile added in v0.2.0

type PreflightFile struct {
	Name  string `json:"name"`
	Bytes int64  `json:"bytes"`
}

PreflightFile mirrors internal/models' PreflightFile.

type PreflightNode added in v0.2.0

type PreflightNode struct {
	NodeID         string `json:"node_id"`
	GPUPresent     bool   `json:"gpu_present"`
	VRAMTotalBytes *int64 `json:"vram_total_bytes"`
	VRAMFreeBytes  *int64 `json:"vram_free_bytes"`
	DiskFreeBytes  *int64 `json:"disk_free_bytes"`
	DiskTotalBytes *int64 `json:"disk_total_bytes"`
}

PreflightNode mirrors internal/models' PreflightNode. Nil is unknown.

type PreflightQuant added in v0.2.0

type PreflightQuant struct {
	Name        string   `json:"name"`
	Bytes       int64    `json:"bytes"`
	Files       []string `json:"files"`
	Fit         string   `json:"fit"`
	Recommended bool     `json:"recommended"`
}

PreflightQuant mirrors internal/models' Quant.

type PreflightReport added in v0.2.0

type PreflightReport struct {
	Status string           `json:"status"`
	Checks []PreflightCheck `json:"checks"`
}

PreflightReport mirrors internal/preflight.Report.

type PreflightSelection added in v0.2.0

type PreflightSelection struct {
	Label string `json:"label"`
	Bytes int64  `json:"bytes"`
	Fit   string `json:"fit"`
}

PreflightSelection mirrors internal/models' PreflightSelection.

type PreviewDatabaseIsolationResource added in v0.2.0

type PreviewDatabaseIsolationResource struct {
	SourceKey    string `json:"source_key"`
	DatabaseName string `json:"database_name"`
	RoleName     string `json:"role_name"`
	Isolated     bool   `json:"isolated"`
	Status       string `json:"status"`
	StatusReason string `json:"status_reason,omitempty"`
	CreatedAt    string `json:"created_at"`
	UpdatedAt    string `json:"updated_at"`
}

PreviewDatabaseIsolationResource mirrors internal/api's previewDatabaseIsolationResource (preview_environments_handlers.go). The role's password is never included here.

type PreviewEnvironmentResource

type PreviewEnvironmentResource struct {
	AppName      string `json:"app_name"`
	PRNumber     int    `json:"pr_number"`
	PreviewAppID string `json:"preview_app_id"`
	Branch       string `json:"branch"`
	HeadSHA      string `json:"head_sha"`
	Domain       string `json:"domain,omitempty"`
	Status       string `json:"status"`
	StatusReason string `json:"status_reason,omitempty"`
	CreatedAt    string `json:"created_at"`
	UpdatedAt    string `json:"updated_at"`
	Stale        bool   `json:"stale"`
	ExpiresAt    string `json:"expires_at,omitempty"`
	Extended     bool   `json:"extended"`
	IsFork       bool   `json:"is_fork"`
	HeadRepo     string `json:"head_repo,omitempty"`
	// EphemeralDatabases mirrors internal/api's own EphemeralDatabases
	// field: every disposable, preview-scoped database instance
	// provisioned for this preview (spec.Database.EphemeralInPreviews),
	// empty when none were declared or none opted in.
	EphemeralDatabases []PreviewEphemeralDatabaseResource `json:"ephemeral_databases,omitempty"`
	// DatabaseIsolations mirrors internal/api's own DatabaseIsolations
	// field: every isolated Postgres role provisioned on an existing
	// database for this preview (spec.Database.IsolatedInPreviews).
	DatabaseIsolations []PreviewDatabaseIsolationResource `json:"database_isolations,omitempty"`
}

PreviewEnvironmentResource mirrors internal/api's previewEnvironmentResource (internal/api/preview_environments_handlers.go).

type PreviewEphemeralDatabaseResource added in v0.2.0

type PreviewEphemeralDatabaseResource struct {
	SourceKey    string           `json:"source_key"`
	DatabaseName string           `json:"database_name"`
	Engine       string           `json:"engine"`
	Version      string           `json:"version"`
	Status       string           `json:"status"`
	StatusReason string           `json:"status_reason,omitempty"`
	Ready        AppStatusSummary `json:"ready"`
	CreatedAt    string           `json:"created_at"`
	UpdatedAt    string           `json:"updated_at"`
}

PreviewEphemeralDatabaseResource mirrors internal/api's previewEphemeralDatabaseResource (preview_environments_handlers.go). Ready reuses AppStatusSummary's exact shape: it's computed the same way, from the same database.Controller reconcile conditions GET /api/v1/databases already summarizes per database.

type PreviewLimitsResource added in v0.2.0

type PreviewLimitsResource struct {
	MaxPerApp int `json:"max_per_app"`
	MaxTotal  int `json:"max_total"`
	LiveTotal int `json:"live_total"`
}

PreviewLimitsResource mirrors internal/api's previewLimitsResource.

type PreviewPolicyResource added in v0.2.0

type PreviewPolicyResource struct {
	OnLimit           string `json:"on_limit"`
	AllowForkPreviews bool   `json:"allow_fork_previews"`
	TTLHours          int    `json:"ttl_hours"`
	EffectiveTTLHours int    `json:"effective_ttl_hours"`
	MaxPerApp         int    `json:"max_per_app"`
	LiveCount         int    `json:"live_count"`
	MaxTotal          int    `json:"max_total"`
	LiveTotal         int    `json:"live_total"`

	MaxPreviews               int     `json:"max_previews"`
	MemoryLimit               string  `json:"memory_limit"`
	CPULimit                  float64 `json:"cpu_limit"`
	EffectiveMemory           string  `json:"effective_memory"`
	EffectiveCPU              float64 `json:"effective_cpu"`
	IdleSleepMinutes          int     `json:"idle_sleep_minutes"`
	EffectiveIdleSleepMinutes int     `json:"effective_idle_sleep_minutes"`
	DatabaseStrategy          string  `json:"database_strategy"`
	SeedDatabase              string  `json:"seed_database"`
	AllowForkSecrets          bool    `json:"allow_fork_secrets"`
	GateBasicAuth             bool    `json:"gate_basic_auth"`
	GateUsername              string  `json:"gate_username"`
	GatePasswordSet           bool    `json:"gate_password_set"`
	AllowIndexing             bool    `json:"allow_indexing"`
}

PreviewPolicyResource mirrors internal/api's previewPolicyResource.

type PreviewPruneResult added in v0.2.0

type PreviewPruneResult struct {
	Removed    int   `json:"removed"`
	FreedBytes int64 `json:"freed_bytes"`
}

PreviewPruneResult is POST /api/v1/apps/{name}/preview/prune's body.

type PreviewRecord added in v0.2.0

type PreviewRecord struct {
	DeploymentID string    `json:"deployment_id"`
	Status       string    `json:"status"`
	Reason       string    `json:"reason,omitempty"`
	Detail       string    `json:"detail,omitempty"`
	HTTPStatus   int       `json:"http_status,omitempty"`
	Path         string    `json:"path"`
	Source       string    `json:"source,omitempty"`
	Bytes        int64     `json:"bytes"`
	CapturedAt   time.Time `json:"captured_at"`
	ImageURL     string    `json:"image_url,omitempty"`
}

PreviewRecord is one deployment's preview outcome.

type PreviewSettingsRequest added in v0.2.0

type PreviewSettingsRequest struct {
	Mode    *string `json:"mode,omitempty"`
	Enabled *bool   `json:"enabled,omitempty"`
	Path    *string `json:"path,omitempty"`
	WaitMS  *int    `json:"wait_ms,omitempty"`
}

PreviewSettingsRequest is PUT /api/v1/apps/{name}/preview's body; nil fields are left unchanged.

type PreviewSettingsResource

type PreviewSettingsResource struct {
	Enabled        bool `json:"enabled"`
	PostPRComments bool `json:"post_pr_comments"`
}

PreviewSettingsResource mirrors internal/api's previewSettingsResource: the resulting state of both preview-settings toggles after a SetPreviewSettingsRequest is applied.

type PreviewStatus added in v0.2.0

type PreviewStatus struct {
	App           string `json:"app"`
	Enabled       bool   `json:"enabled"`
	Mode          string `json:"mode"`
	DefaultMode   string `json:"default_mode"`
	Path          string `json:"path"`
	WaitMS        int    `json:"wait_ms"`
	ServerEnabled bool   `json:"server_enabled"`
	Capturing     bool   `json:"capturing"`
	Image         string `json:"image"`
	BrowserImage  *struct {
		Ref        string     `json:"ref"`
		LastUsedAt *time.Time `json:"last_used_at,omitempty"`
	} `json:"browser_image,omitempty"`
	KeepPerApp int   `json:"keep_per_app"`
	TTLDays    int   `json:"ttl_days"`
	MaxTotalMB int64 `json:"max_total_mb"`
	Storage    struct {
		AppBytes   int64 `json:"app_bytes"`
		AppCount   int   `json:"app_count"`
		TotalBytes int64 `json:"total_bytes"`
		TotalCount int   `json:"total_count"`
	} `json:"storage"`
	Latest *PreviewRecord `json:"latest,omitempty"`
}

PreviewStatus is GET /api/v1/apps/{name}/preview's body.

type PreviewsOverview added in v0.2.0

type PreviewsOverview struct {
	Limits   PreviewLimitsResource        `json:"limits"`
	PerApp   map[string]int               `json:"live_per_app"`
	Previews []PreviewEnvironmentResource `json:"previews"`
}

PreviewsOverview is GET /api/v1/previews's body.

type ProbeAttempt added in v0.2.0

type ProbeAttempt struct {
	ID         int64  `json:"id"`
	Target     string `json:"target"`
	Success    bool   `json:"success"`
	StatusCode int    `json:"status_code,omitempty"`
	ExitCode   int    `json:"exit_code,omitempty"`
	Error      string `json:"error,omitempty"`
	LatencyMS  int64  `json:"latency_ms"`
	ProbedAt   string `json:"probed_at"`
}

ProbeAttempt is one readiness-probe attempt made during a deploy cutover.

type ProfileSummary

type ProfileSummary struct {
	Name   string
	APIURL string
}

ProfileSummary is ListProfiles' element type: a profile's name and API URL, deliberately never its token. See ListProfiles.

func ListProfiles

func ListProfiles(prog string) ([]ProfileSummary, error)

ListProfiles returns every profile section configured in prog's credentials file, in the order they first appear, each with its API URL but never its token: see ProfileSummary. Returns a nil slice, no error, for a missing file, the same "nothing configured" shape ReadCredentialsFile's own doc comment describes.

type ProjectLifecycleResult added in v0.2.0

type ProjectLifecycleResult struct {
	SucceededApps      []string `json:"succeeded_apps"`
	SucceededDatabases []string `json:"succeeded_databases"`
	FailedApps         []string `json:"failed_apps,omitempty"`
	FailedDatabases    []string `json:"failed_databases,omitempty"`
}

ProjectLifecycleResult mirrors internal/api's projectLifecycleResult: the response for StopProject/StartProject, which apps and databases in the project succeeded or failed the requested state change.

type ProjectResource

type ProjectResource struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	CreatedAt string `json:"created_at"`
	OrgID     string `json:"org_id,omitempty"`
}

ProjectResource mirrors internal/api's projectResource (internal/api/projects.go). OrgID is empty when the project isn't filed under any organization.

type ProjectRestartResponse added in v0.2.0

type ProjectRestartResponse struct {
	RestartedCount int      `json:"restarted_count"`
	Apps           []string `json:"apps"`
	Failed         []string `json:"failed,omitempty"`
}

ProjectRestartResponse mirrors internal/api's projectRestartResponse (internal/api/project_restart.go): which apps a bulk restart succeeded or failed on.

type ProjectTopologyEdgeResource added in v0.2.0

type ProjectTopologyEdgeResource struct {
	From string `json:"from"`
	To   string `json:"to"`
	Kind string `json:"kind"`
}

ProjectTopologyEdgeResource mirrors internal/api's topologyEdge.

type ProjectTopologyNodeResource added in v0.2.0

type ProjectTopologyNodeResource struct {
	ID     string                     `json:"id"`
	Kind   string                     `json:"kind"`
	Label  string                     `json:"label"`
	Status *ProjectTopologyNodeStatus `json:"status,omitempty"`
}

ProjectTopologyNodeResource mirrors internal/api's topologyNode.

type ProjectTopologyNodeStatus added in v0.2.0

type ProjectTopologyNodeStatus struct {
	Label   string `json:"label"`
	Variant string `json:"variant"`
}

ProjectTopologyNodeStatus mirrors internal/api's appStatusSummary.

type ProjectTopologyResource added in v0.2.0

type ProjectTopologyResource struct {
	Nodes []ProjectTopologyNodeResource `json:"nodes"`
	Edges []ProjectTopologyEdgeResource `json:"edges"`
}

ProjectTopologyResource mirrors internal/api's topologyGraph, GET /api/v1/projects/{id}/topology's response body.

type PromoteAppRequest

type PromoteAppRequest struct {
	To         string `json:"to"`
	Target     string `json:"target,omitempty"`
	Confirm    bool   `json:"confirm,omitempty"`
	IncludeEnv bool   `json:"include_env,omitempty"`
	Force      bool   `json:"force,omitempty"`
	// OverrideFreeze and OverrideReason bypass an active deploy freeze window.
	OverrideFreeze bool   `json:"override_freeze,omitempty"`
	OverrideReason string `json:"override_reason,omitempty"`
}

PromoteAppRequest mirrors internal/api's promoteTriggerRequest: POST /api/v1/apps/{name}/promote's body. Target is optional, the same "auto-discover the sole candidate, or disambiguate" contract PromotePreview's own Target query param has.

type PromoteDiff added in v0.2.0

type PromoteDiff struct {
	Image        *DeployCompareField `json:"image,omitempty"`
	Replicas     *DeployCompareField `json:"replicas,omitempty"`
	Resources    *DeployCompareField `json:"resources,omitempty"`
	Health       *DeployCompareField `json:"health,omitempty"`
	EnvAdded     []string            `json:"env_added"`
	EnvRemoved   []string            `json:"env_removed"`
	EnvChanged   []string            `json:"env_changed"`
	SecretsAdded []string            `json:"secret_keys_added"`
	SecretsGone  []string            `json:"secret_keys_removed"`
	Untouched    []string            `json:"untouched"`
}

PromoteDiff mirrors internal/api's promoteDiff. Env values are never sent.

type PromotePreviewResource

type PromotePreviewResource struct {
	SourceApp           string               `json:"source_app"`
	TargetApp           string               `json:"target_app"`
	Environment         EnvironmentResource  `json:"environment"`
	From                PromotePreviewSide   `json:"from"`
	To                  PromotePreviewSide   `json:"to"`
	Changes             []DeployCompareField `json:"changes"`
	UnsnapshottedFields []string             `json:"unsnapshotted_fields"`
	Note                string               `json:"note"`
	Diff                PromoteDiff          `json:"diff"`
	Blockers            []string             `json:"blockers"`
	NeedsConfirmation   bool                 `json:"needs_confirmation"`
	Frozen              bool                 `json:"frozen"`
	FreezeReason        string               `json:"freeze_reason,omitempty"`
}

PromotePreviewResource mirrors internal/api's promotePreviewResource, GET /api/v1/apps/{name}/promote/preview's response.

type PromotePreviewSide

type PromotePreviewSide struct {
	AppName string `json:"app_name"`
	Image   string `json:"image"`
}

PromotePreviewSide mirrors internal/api's promotePreviewSide (internal/api/promote.go): one side of a promotion preview, always live desired state (there is no DeployID/CommitSHA/Status to show).

type ProtectAllRequest added in v0.2.0

type ProtectAllRequest struct {
	TargetID       string        `json:"target_id"`
	Schedule       string        `json:"schedule,omitempty"`
	Retain         *int          `json:"retain,omitempty"`
	RetainDays     *int          `json:"retain_days,omitempty"`
	IncludeScratch bool          `json:"include_scratch,omitempty"`
	Only           []ProtectItem `json:"only,omitempty"`
	Apply          bool          `json:"apply"`
}

ProtectAllRequest is POST /api/v1/backups/protect-all's body.

type ProtectAllResponse added in v0.2.0

type ProtectAllResponse struct {
	Applied    bool          `json:"applied"`
	TargetID   string        `json:"target_id"`
	Schedule   string        `json:"schedule"`
	Retain     int           `json:"retain"`
	RetainDays int           `json:"retain_days"`
	Plan       []ProtectItem `json:"plan"`
	Done       []ProtectItem `json:"done,omitempty"`
	Failed     []struct {
		ProtectItem
		Error string `json:"error"`
	} `json:"failed,omitempty"`
}

ProtectAllResponse mirrors internal/api's protectAllResponse.

type ProtectItem added in v0.2.0

type ProtectItem struct {
	Kind    string `json:"kind"`
	AppName string `json:"app_name,omitempty"`
	Name    string `json:"name"`
	Scratch bool   `json:"scratch,omitempty"`
}

ProtectItem names one resource in a protect-all plan.

type ProxyCertificate added in v0.2.0

type ProxyCertificate struct {
	Issuer   string `json:"issuer"`
	NotAfter string `json:"not_after"`
	Valid    bool   `json:"valid"`
}

ProxyCertificate is the certificate the proxy served for a domain.

type ProxyDetection added in v0.2.0

type ProxyDetection struct {
	Kind            string   `json:"kind"`
	Container       string   `json:"container"`
	Image           string   `json:"image"`
	PublishedPorts  []int    `json:"published_ports"`
	DynamicDir      string   `json:"dynamic_dir"`
	EntrypointHTTP  string   `json:"entrypoint_http"`
	EntrypointHTTPS string   `json:"entrypoint_https"`
	CertResolver    string   `json:"cert_resolver"`
	UpstreamHost    string   `json:"upstream_host"`
	Complete        bool     `json:"complete"`
	Missing         []string `json:"missing"`
}

ProxyDetection is what was read from the container holding ports 80/443.

type ProxyDomain added in v0.2.0

type ProxyDomain struct {
	Domain      string            `json:"domain"`
	Target      string            `json:"target"`
	App         string            `json:"app"`
	File        string            `json:"file"`
	State       string            `json:"state"`
	ProxyLoaded *bool             `json:"proxy_loaded"`
	Reachable   bool              `json:"reachable"`
	Certificate *ProxyCertificate `json:"certificate"`
	LastError   string            `json:"last_error"`
	CheckedAt   string            `json:"checked_at"`
}

ProxyDomain is one managed route.

type ProxyIngress added in v0.2.0

type ProxyIngress struct {
	HTTPPort              int    `json:"http_port"`
	HTTPSPort             int    `json:"https_port"`
	DashboardAddr         string `json:"dashboard_addr"`
	TLSTerminatedUpstream bool   `json:"tls_terminated_upstream"`
	PublicHTTPSPort       int    `json:"public_https_port"`
}

ProxyIngress is how this instance's ingress is set up for the proxy.

type ProxyIntegration added in v0.2.0

type ProxyIntegration struct {
	Detected ProxyDetection           `json:"detected"`
	Settings ProxyIntegrationSettings `json:"settings"`
	Ingress  ProxyIngress             `json:"ingress"`
	Domains  []ProxyDomain            `json:"domains"`
	Steps    []ProxyStep              `json:"steps"`
	// DryRun and Changes are set by setup only.
	DryRun  bool     `json:"dry_run,omitempty"`
	Changes []string `json:"changes,omitempty"`
}

ProxyIntegration is GET /api/v1/system/proxy-integration.

type ProxyIntegrationSettings added in v0.2.0

type ProxyIntegrationSettings struct {
	Integration     string `json:"integration"`
	DynamicDir      string `json:"dynamic_dir"`
	EntrypointHTTP  string `json:"entrypoint_http"`
	EntrypointHTTPS string `json:"entrypoint_https"`
	CertResolver    string `json:"cert_resolver"`
	UpstreamHost    string `json:"upstream_host"`
}

ProxyIntegrationSettings is PUT /api/v1/settings/proxy-integration's body.

type ProxySetupRequest added in v0.2.0

type ProxySetupRequest struct {
	Confirm    bool   `json:"confirm"`
	DynamicDir string `json:"dynamic_dir,omitempty"`
}

ProxySetupRequest is POST /api/v1/system/proxy-integration/setup's body.

type ProxyStep added in v0.2.0

type ProxyStep struct {
	ID     string `json:"id"`
	State  string `json:"state"`
	Detail string `json:"detail"`
}

ProxyStep is one item of the setup checklist.

type PurgeAuditLogResult

type PurgeAuditLogResult struct {
	Deleted int64 `json:"deleted"`
}

PurgeAuditLogResult is POST /api/v1/audit-log/purge's response shape (internal/api/audit_retention.go's purgeAuditLogResponse).

type PurgeCacheRequest added in v0.2.0

type PurgeCacheRequest struct {
	Scope string `json:"scope"`
	Value string `json:"value,omitempty"`
}

PurgeCacheRequest selects what to purge: scope url, prefix or all.

type PurgeCacheResponse added in v0.2.0

type PurgeCacheResponse struct {
	Domain string `json:"domain"`
	Purged int    `json:"purged"`
}

PurgeCacheResponse reports how many entries were removed.

type PushSubscriptionResource added in v0.2.0

type PushSubscriptionResource struct {
	ID        string `json:"id"`
	UserAgent string `json:"user_agent"`
	CreatedAt string `json:"created_at"`
}

PushSubscriptionResource mirrors internal/api's pushSubscriptionResource (internal/api/push_subscriptions.go): one browser registered for the "webpush" notification-channel kind.

type PutDeployFreezeRequest added in v0.2.0

type PutDeployFreezeRequest struct {
	Windows []FreezeWindowResource `json:"windows"`
}

PutDeployFreezeRequest is PUT .../deploy-freeze's body.

type ReadinessCheck added in v0.2.0

type ReadinessCheck struct {
	ID     string `json:"id"`
	Name   string `json:"name"`
	Status string `json:"status"`
	Detail string `json:"detail"`
	Fix    string `json:"fix"`
}

ReadinessCheck is one server readiness check.

type RecentChange added in v0.2.0

type RecentChange struct {
	At          time.Time `json:"at"`
	Kind        string    `json:"kind"`
	Actor       string    `json:"actor"`
	Title       string    `json:"title"`
	Detail      string    `json:"detail,omitempty"`
	Keys        []string  `json:"keys,omitempty"`
	Ref         string    `json:"ref,omitempty"`
	LikelyCause bool      `json:"likely_cause,omitempty"`
}

RecentChange mirrors internal/changes.Change: one config, deploy or lifecycle change on an app. Keys are names only, never values.

type RecentChangesResource added in v0.2.0

type RecentChangesResource struct {
	App           string         `json:"app"`
	Since         time.Time      `json:"since"`
	Until         time.Time      `json:"until"`
	WindowSeconds int64          `json:"window_seconds"`
	Changes       []RecentChange `json:"changes"`
	Total         int            `json:"total"`
	Truncated     bool           `json:"truncated,omitempty"`
}

RecentChangesResource mirrors internal/changes.Result.

type ReclaimOrphanResponse added in v0.2.0

type ReclaimOrphanResponse struct {
	Removed        string `json:"removed"`
	ReclaimedBytes int64  `json:"reclaimed_bytes"`
}

ReclaimOrphanResponse mirrors internal/api's reclaimOrphanResponse.

type RedirectDomainRow added in v0.2.0

type RedirectDomainRow struct {
	Domain      string                      `json:"domain"`
	Redirect    *trafficpolicy.HostRedirect `json:"redirect,omitempty"`
	Maintenance bool                        `json:"maintenance"`
	Wildcard    bool                        `json:"wildcard"`
}

RedirectDomainRow is one of the app's domains on the Redirects tab.

type RedirectEffective added in v0.2.0

type RedirectEffective struct {
	HandledBy             string `json:"handled_by"`
	Explanation           string `json:"explanation"`
	HTTPSPort             int    `json:"https_port"`
	TLSTerminatedUpstream bool   `json:"tls_terminated_upstream"`
	IngressHTTPRedirect   bool   `json:"ingress_http_redirect"`
}

RedirectEffective explains who redirects plain HTTP to HTTPS.

type RegistryCredentialResource

type RegistryCredentialResource struct {
	ID           string     `json:"id"`
	Name         string     `json:"name"`
	RegistryHost string     `json:"registry_host"`
	Username     string     `json:"username"`
	CreatedAt    string     `json:"created_at"`
	ExpiresAt    *time.Time `json:"expires_at,omitempty"`
	ExpiryStatus string     `json:"expiry_status,omitempty"`
}

RegistryCredentialResource mirrors internal/api's registryCredentialResource (internal/api/registry_credentials.go). No password field, the same write-only convention BackupTargetResource uses for its own credentials. ExpiresAt/ExpiryStatus are operator-set metadata, not something the platform infers from the credential itself; ExpiryStatus is "healthy"/"expiring_soon"/"expired", empty when no expiry was set.

type RegistryRepositoriesResource added in v0.2.0

type RegistryRepositoriesResource struct {
	Repositories []string `json:"repositories"`
}

RegistryRepositoriesResource mirrors internal/api's registryRepositoriesResponse (internal/api/registry_catalog.go): GET /api/v1/registry/repositories's wire shape.

type RegistrySettingsResource

type RegistrySettingsResource struct {
	Enabled        bool   `json:"enabled"`
	Host           string `json:"host,omitempty"`
	Username       string `json:"username,omitempty"`
	HasCredentials bool   `json:"has_credentials"`
	Status         string `json:"status"`
	Message        string `json:"message,omitempty"`
	Password       string `json:"password,omitempty"`
}

RegistrySettingsResource mirrors internal/api's registrySettingsResource (internal/api/registry_settings.go): GET/PUT/DELETE /api/v1/settings/registry's wire shape. Password is write-once: it is only ever populated in the response to a PUT call that generates a fresh credential (the registry's first enable), empty every other time.

type RegistryTagsResource added in v0.2.0

type RegistryTagsResource struct {
	Repository string   `json:"repository"`
	Tags       []string `json:"tags"`
}

RegistryTagsResource mirrors internal/api's registryTagsResponse: GET /api/v1/registry/tags's wire shape.

type RejectDeployApprovalRequest added in v0.2.0

type RejectDeployApprovalRequest struct {
	Reason string `json:"reason,omitempty"`
}

RejectDeployApprovalRequest mirrors internal/api's rejectDeployApprovalRequest (POST .../deploy-approvals/{id}/reject).

type RejoinMeshResponse added in v0.2.0

type RejoinMeshResponse struct {
	NodeID    string `json:"node_id"`
	Requested bool   `json:"requested"`
}

RejoinMeshResponse mirrors internal/api's rejoinMeshResponse (POST /api/v1/nodes/{id}/mesh/rejoin).

type ReleaseHistory added in v0.2.0

type ReleaseHistory struct {
	CurrentVersion       string               `json:"current_version"`
	CurrentSchemaVersion *int                 `json:"current_schema_version"`
	Channel              string               `json:"channel"`
	View                 string               `json:"view"`
	Reachable            bool                 `json:"github_reachable"`
	Releases             []ReleaseHistoryItem `json:"releases"`
	RetainedOnly         []ReleaseHistoryItem `json:"retained_only"`
}

ReleaseHistory is GET /api/v1/updates/releases' response.

type ReleaseHistoryItem added in v0.2.0

type ReleaseHistoryItem struct {
	Version        string `json:"version"`
	URL            string `json:"url"`
	PublishedAt    string `json:"published_at"`
	Channel        string `json:"channel"`
	Running        bool   `json:"running"`
	Retained       bool   `json:"retained"`
	AssetName      string `json:"asset_name"`
	AssetAvailable bool   `json:"asset_available"`
	AssetSize      int64  `json:"asset_size"`
	Signed         bool   `json:"signed"`
	SchemaVersion  *int   `json:"schema_version"`
	SchemaSource   string `json:"schema_source"`
	Verdict        string `json:"verdict"`
	Notes          string `json:"notes"`
}

ReleaseHistoryItem is one release in GET /api/v1/updates/releases.

type RenewCertificateResource added in v0.2.0

type RenewCertificateResource struct {
	Domain               string `json:"domain"`
	HadStoredCertificate bool   `json:"had_stored_certificate"`
	Status               string `json:"status"`
}

RenewCertificateResource mirrors internal/api's renewCertificateResponse (internal/api/domain_tls_cert.go): POST .../cert/renew's response body.

type ReplayWebhookDeliveryResult

type ReplayWebhookDeliveryResult struct {
	Status  int    `json:"status"`
	Message string `json:"message"`
}

ReplayWebhookDeliveryResult mirrors internal/api's replayWebhookDeliveryResult: the status/message a replayed delivery's re-run processing produced.

type RepoBranchesResource added in v0.2.0

type RepoBranchesResource struct {
	Branches []string `json:"branches"`
}

RepoBranchesResource mirrors internal/api's gitBranchesResponse.

type RequestPointResource added in v0.2.0

type RequestPointResource struct {
	Timestamp      time.Time `json:"timestamp"`
	Requests       float64   `json:"requests"`
	RatePerSec     float64   `json:"rate_per_sec"`
	ErrorRate4xx   float64   `json:"error_rate_4xx"`
	ErrorRate5xx   float64   `json:"error_rate_5xx"`
	UpstreamErrors float64   `json:"upstream_errors"`
	P50Ms          float64   `json:"p50_ms"`
	P95Ms          float64   `json:"p95_ms"`
	P99Ms          float64   `json:"p99_ms"`
	BytesInPerSec  float64   `json:"bytes_in_per_sec"`
	BytesOutPerSec float64   `json:"bytes_out_per_sec"`
}

RequestPointResource mirrors internal/telemetry.RequestPoint.

type RequestSummaryResource added in v0.2.0

type RequestSummaryResource struct {
	WindowSeconds  float64 `json:"window_seconds"`
	HasTraffic     bool    `json:"has_traffic"`
	Requests       float64 `json:"requests"`
	RatePerSec     float64 `json:"rate_per_sec"`
	ErrorRate4xx   float64 `json:"error_rate_4xx"`
	ErrorRate5xx   float64 `json:"error_rate_5xx"`
	P95Ms          float64 `json:"p95_ms"`
	UpstreamErrors float64 `json:"upstream_errors"`
}

RequestSummaryResource mirrors internal/telemetry.RequestSummary.

type ResolveAIChatConfirmationRequest added in v0.2.0

type ResolveAIChatConfirmationRequest struct {
	Approve bool `json:"approve"`
}

ResolveAIChatConfirmationRequest mirrors internal/api's resolveAIChatConfirmationRequest: POST /api/v1/ai/sessions/{id}/confirmations/{confirmation_id}'s request body.

type ResolverResult added in v0.2.0

type ResolverResult struct {
	Name      string   `json:"name"`
	Addresses []string `json:"addresses,omitempty"`
	Error     string   `json:"error,omitempty"`
}

ResolverResult is what one resolver answered for a domain.

type ResourceHealthResource added in v0.2.0

type ResourceHealthResource struct {
	Kind                string                 `json:"kind"`
	AppName             string                 `json:"app_name,omitempty"`
	ResourceName        string                 `json:"resource_name"`
	TargetID            string                 `json:"target_id,omitempty"`
	Schedule            string                 `json:"schedule,omitempty"`
	NextRun             string                 `json:"next_run,omitempty"`
	BackupCount         int                    `json:"backup_count"`
	TotalBytes          int64                  `json:"total_bytes"`
	LastAttempt         *BackupSummaryResource `json:"last_attempt,omitempty"`
	LastBackup          *BackupSummaryResource `json:"last_backup,omitempty"`
	LastVerifiedRestore *DrillSummaryResource  `json:"last_verified_restore,omitempty"`
	LastDrill           *DrillSummaryResource  `json:"last_drill,omitempty"`
	Encrypted           bool                   `json:"encrypted"`
	State               string                 `json:"state"`
	StateReason         string                 `json:"state_reason,omitempty"`
	ProtectionLevel     string                 `json:"protection_level,omitempty"`
	Warning             string                 `json:"warning,omitempty"`
}

ResourceHealthResource mirrors internal/api's resourceHealthResource.

type ResourceRecommendationResource

type ResourceRecommendationResource struct {
	ServiceName    string                          `json:"service_name"`
	LookbackWindow string                          `json:"lookback_window"`
	LookbackLabel  string                          `json:"lookback_label,omitempty"`
	Memory         DimensionRecommendationResource `json:"memory"`
	CPU            DimensionRecommendationResource `json:"cpu"`
	OOMDetectedAt  string                          `json:"oom_detected_at,omitempty"`
	OOMExcerpt     string                          `json:"oom_excerpt,omitempty"`
}

ResourceRecommendationResource mirrors internal/api's resourceRecommendationResource: the shared response shape for both GET /api/v1/apps/{name}/resource-recommendation (internal/api/resource_recommendation.go) and GET /api/v1/databases/{name}/resource-recommendation (internal/api/database_resource_recommendation.go), a deterministic memory/CPU right-sizing suggestion synthesized from internal/rightsizing over the resource's own historical usage samples, never from an external model, and never applied automatically. ServiceName holds the app or database name either way.

type RestoreHistoryResource

type RestoreHistoryResource struct {
	ID              string `json:"id"`
	DatabaseName    string `json:"database_name,omitempty"`
	ServiceName     string `json:"service_name,omitempty"`
	VolumeName      string `json:"volume_name,omitempty"`
	BackupHistoryID string `json:"backup_history_id"`
	Status          string `json:"status"`
	Error           string `json:"error,omitempty"`
	StartedAt       string `json:"started_at"`
	FinishedAt      string `json:"finished_at,omitempty"`
}

RestoreHistoryResource mirrors internal/api's restoreHistoryResource (internal/api/restore.go). ServiceName/VolumeName mirror BackupHistoryResource's own identical fields above.

type RevealResult added in v0.2.0

type RevealResult struct {
	Key              string `json:"key"`
	Value            string `json:"value"`
	Type             string `json:"type"`
	HideAfterSeconds int    `json:"hide_after_seconds"`
}

RevealResult is one revealed value.

type RevealedLoginCode added in v0.2.0

type RevealedLoginCode struct {
	Code      string    `json:"code"`
	ExpiresAt time.Time `json:"expires_at"`
}

RevealedLoginCode mirrors internal/api's revealLoginCodeResponse.

type ReverseProxyCheck added in v0.2.0

type ReverseProxyCheck struct {
	ResolvesToHost bool   `json:"resolves_to_host"`
	Reachable      bool   `json:"reachable"`
	Detail         string `json:"detail,omitempty"`
}

ReverseProxyCheck is the result of the reachability check.

type ReverseProxyGuide added in v0.2.0

type ReverseProxyGuide struct {
	Holders  []ReverseProxyHolder `json:"holders"`
	Detected string               `json:"detected_proxy,omitempty"`
	Plan     *ReverseProxyPlan    `json:"plan,omitempty"`
	Check    *ReverseProxyCheck   `json:"check,omitempty"`
}

ReverseProxyGuide is GET /api/v1/system/reverse-proxy.

type ReverseProxyHolder added in v0.2.0

type ReverseProxyHolder struct {
	Port           int    `json:"port"`
	Container      string `json:"container"`
	Image          string `json:"image"`
	Kind           string `json:"kind,omitempty"`
	NetworkGateway string `json:"network_gateway,omitempty"`
}

ReverseProxyHolder is a container publishing port 80 or 443.

type ReverseProxyPlan added in v0.2.0

type ReverseProxyPlan struct {
	Domain      string   `json:"domain"`
	Proxy       string   `json:"proxy"`
	UpstreamURL string   `json:"upstream_url"`
	NeedsRebind bool     `json:"needs_rebind"`
	Rebind      string   `json:"rebind,omitempty"`
	Snippet     string   `json:"snippet"`
	SnippetPath string   `json:"snippet_path,omitempty"`
	Steps       []string `json:"steps"`
}

ReverseProxyPlan is the configuration that puts the dashboard behind a proxy.

type RevokeAgentTokensResource added in v0.2.0

type RevokeAgentTokensResource struct {
	Revoked int `json:"revoked"`
}

RevokeAgentTokensResource mirrors the revoke-agent-tokens response.

type RevokedSessions added in v0.2.0

type RevokedSessions struct {
	Revoked int `json:"revoked"`
}

RevokedSessions mirrors internal/api's revokeSessionsResponse.

type RoleRequest added in v0.2.0

type RoleRequest struct {
	Name        string   `json:"name"`
	Description string   `json:"description"`
	Abilities   []string `json:"abilities"`
	Visibility  string   `json:"visibility,omitempty"`
}

RoleRequest is the body of POST /api/v1/roles and PUT /api/v1/roles/{id}.

type RoleResource

type RoleResource struct {
	Name        string   `json:"name"`
	Description string   `json:"description"`
	Abilities   []string `json:"abilities"`
	ID          string   `json:"id,omitempty"`
	Visibility  string   `json:"visibility,omitempty"`
	Builtin     bool     `json:"builtin"`
	UserCount   int      `json:"user_count"`
}

RoleResource mirrors internal/api's Role (internal/api/roles.go).

type RollbackBackup added in v0.2.0

type RollbackBackup struct {
	Name          string `json:"name"`
	CreatedAt     string `json:"created_at"`
	SchemaVersion int    `json:"schema_version"`
	Compatible    bool   `json:"compatible"`
}

RollbackBackup is a restore point in a rollback plan.

type RollbackChange added in v0.2.0

type RollbackChange struct {
	Version string `json:"version"`
	Notes   string `json:"notes"`
}

RollbackChange is one release's notes between the target and the running version.

type RollbackPlan added in v0.2.0

type RollbackPlan struct {
	CurrentVersion       string           `json:"current_version"`
	CurrentSchemaVersion int              `json:"current_schema_version"`
	Target               RollbackTarget   `json:"target"`
	Verdict              string           `json:"verdict"`
	Steps                []string         `json:"steps"`
	Warnings             []string         `json:"warnings"`
	DowntimeSeconds      int              `json:"downtime_seconds"`
	RestoreRequired      bool             `json:"restore_required"`
	Backups              []RollbackBackup `json:"backups"`
	LossSince            *string          `json:"data_loss_since"`
	Command              string           `json:"command"`
	RestoreCommand       string           `json:"restore_command"`
	FetchCommand         string           `json:"fetch_command"`
	Checks               []UpgradeCheck   `json:"checks"`
	Blocked              bool             `json:"blocked"`
	Changes              []RollbackChange `json:"changes"`
	Notes                string           `json:"notes"`
}

RollbackPlan is GET /api/v1/updates/rollback-plan's response.

type RollbackTarget added in v0.2.0

type RollbackTarget struct {
	Version       string `json:"version"`
	SchemaVersion int    `json:"schema_version"`
	SchemaSource  string `json:"schema_source"`
	Retained      bool   `json:"retained"`
}

RollbackTarget is the release a plan returns to.

type RollbackTargetResource added in v0.2.0

type RollbackTargetResource struct {
	DeployID string    `json:"deploy_id"`
	Image    string    `json:"image"`
	ImageID  string    `json:"image_id,omitempty"`
	PinRef   string    `json:"pin_ref"`
	PinnedAt time.Time `json:"pinned_at"`
	Live     bool      `json:"live"`
}

RollbackTargetResource is a pinned release image cleanup never removes.

type RollbackToRequest added in v0.2.0

type RollbackToRequest struct {
	Confirm        bool   `json:"confirm,omitempty"`
	OverrideFreeze bool   `json:"override_freeze,omitempty"`
	OverrideReason string `json:"override_reason,omitempty"`
}

RollbackToRequest is the optional body of POST .../deploys/{id}/rollback.

type RotateKeyResponse added in v0.2.0

type RotateKeyResponse struct {
	NodeID       string `json:"node_id"`
	OldPublicKey string `json:"old_public_key"`
	NewPublicKey string `json:"new_public_key"`
}

RotateKeyResponse mirrors internal/api's rotateKeyResponse (POST /api/v1/nodes/{id}/mesh/rotate-key).

type RotateMasterKeyRequest

type RotateMasterKeyRequest struct {
	NewMasterKey string `json:"newMasterKey"`
}

RotateMasterKeyRequest mirrors internal/api's rotateMasterKeyRequest: the new master key, read from a file or stdin by the CLI so it never appears as a bare command-line argument.

type RotateMasterKeyResult

type RotateMasterKeyResult struct {
	RotatedAt       time.Time           `json:"rotatedAt"`
	PersistedToFile bool                `json:"persistedToFile"`
	Warning         string              `json:"warning,omitempty"`
	Rebind          *SecretRebindResult `json:"rebind,omitempty"`
}

RotateMasterKeyResult mirrors internal/api's rotateMasterKeyResponse. Warning is non-empty exactly when the operator has a required follow-up before the control plane's next restart: either the master key is env-sourced (update APP_MASTER_KEY out of band) or the file write itself failed (update the key file by hand).

type Route53DNSResource added in v0.2.0

type Route53DNSResource struct {
	Enabled            bool   `json:"enabled"`
	Region             string `json:"region,omitempty"`
	HostedZoneID       string `json:"hosted_zone_id,omitempty"`
	HasAccessKeyID     bool   `json:"has_access_key_id"`
	HasSecretAccessKey bool   `json:"has_secret_access_key"`
}

Route53DNSResource mirrors internal/api's route53DNSResource (internal/api/route53_dns.go): GET/PUT/DELETE /api/v1/settings/route53-dns's wire shape. Neither credential half ever appears here in either direction. A second, independent ACME DNS-01 provider from CloudflareDNSResource, not a replacement.

type RunBrief added in v0.2.0

type RunBrief struct {
	ID     string `json:"id"`
	Number int    `json:"number"`
	Status string `json:"status"`
}

RunBrief is a pipeline's most recent run summary.

type SBOMLicenseCount added in v0.2.0

type SBOMLicenseCount struct {
	License string `json:"license"`
	Count   int    `json:"count"`
}

SBOMLicenseCount is how many packages carry a license.

type SBOMPackage added in v0.2.0

type SBOMPackage struct {
	Name    string `json:"name"`
	Version string `json:"version,omitempty"`
	Type    string `json:"type,omitempty"`
	License string `json:"license,omitempty"`
}

SBOMPackage is one component of an SBOM.

type SBOMSummary added in v0.2.0

type SBOMSummary struct {
	DeploymentID string             `json:"deployment_id"`
	Format       string             `json:"format"`
	PackageCount int                `json:"package_count"`
	Types        []SBOMTypeCount    `json:"types"`
	Licenses     []SBOMLicenseCount `json:"licenses"`
	Unlicensed   int                `json:"unlicensed"`
	TopPackages  []SBOMPackage      `json:"top_packages"`
	Provenance   bool               `json:"provenance"`
	Available    bool               `json:"available"`
	Bytes        int64              `json:"bytes"`
	GeneratedAt  time.Time          `json:"generated_at"`
	DownloadURL  string             `json:"download_url,omitempty"`
}

SBOMSummary is GET .../deployments/{id}/sbom's body.

type SBOMTypeCount added in v0.2.0

type SBOMTypeCount struct {
	Type  string `json:"type"`
	Count int    `json:"count"`
}

SBOMTypeCount is how many packages are of a type.

type SLOPreviewResource added in v0.2.0

type SLOPreviewResource struct {
	Config          AlertSLOConfig  `json:"config"`
	HasTraffic      bool            `json:"has_traffic"`
	BudgetRemaining float64         `json:"budget_remaining"`
	BudgetRequests  float64         `json:"budget_window_requests"`
	Windows         []SLOWindowStat `json:"windows"`
	Tiers           []SLOTierStatus `json:"tiers"`
	Firing          bool            `json:"firing"`
	Page            bool            `json:"page"`
	MaxBurn         float64         `json:"max_burn"`
}

SLOPreviewResource mirrors internal/api's sloPreviewResource: the error budget left and current burn rates for an SLO.

type SLOTierStatus added in v0.2.0

type SLOTierStatus struct {
	Name          string  `json:"name"`
	Factor        float64 `json:"factor"`
	LongSeconds   int64   `json:"long_seconds"`
	ShortSeconds  int64   `json:"short_seconds"`
	Page          bool    `json:"page"`
	LongBurn      float64 `json:"long_burn"`
	ShortBurn     float64 `json:"short_burn"`
	EffectiveBurn float64 `json:"effective_burn"`
	Firing        bool    `json:"firing"`
}

SLOTierStatus mirrors internal/api's sloTierResource.

type SLOWindowStat added in v0.2.0

type SLOWindowStat struct {
	WindowSeconds int64   `json:"window_seconds"`
	Requests      float64 `json:"requests"`
	Bad           float64 `json:"bad"`
	BurnRate      float64 `json:"burn_rate"`
}

SLOWindowStat mirrors internal/api's sloWindowResource.

type SSHNodeProvisionAuthRequest added in v0.2.0

type SSHNodeProvisionAuthRequest struct {
	Type       string `json:"type"` // "key" or "password"
	PrivateKey string `json:"private_key,omitempty"`
	Passphrase string `json:"passphrase,omitempty"`
	Password   string `json:"password,omitempty"`
}

SSHNodeProvisionAuthRequest mirrors internal/api's createSSHNodeProvisionAuthRequest: one of two credential shapes, never stored past the one provisioning call this starts.

type SSHNodeProvisionResource added in v0.2.0

type SSHNodeProvisionResource struct {
	ID            string    `json:"id"`
	Name          string    `json:"name"`
	Role          string    `json:"role"`
	Status        string    `json:"status"`
	DetectedOS    string    `json:"detected_os,omitempty"`
	DetectedArch  string    `json:"detected_arch,omitempty"`
	NodeID        string    `json:"node_id,omitempty"`
	FailureReason string    `json:"failure_reason,omitempty"`
	Log           string    `json:"log,omitempty"`
	CreatedAt     time.Time `json:"created_at"`
	UpdatedAt     time.Time `json:"updated_at"`
}

SSHNodeProvisionResource mirrors internal/api's sshNodeProvisionResource.

type SaveAppAsTemplateRequest added in v0.2.0

type SaveAppAsTemplateRequest struct {
	Name        string `json:"name"`
	Description string `json:"description,omitempty"`
}

SaveAppAsTemplateRequest mirrors internal/api's saveAppAsTemplateRequest: POST /api/v1/apps/{name}/save-as-template's body.

type SavedLogQuery added in v0.2.0

type SavedLogQuery struct {
	ID         string       `json:"id"`
	Name       string       `json:"name"`
	App        string       `json:"app,omitempty"`
	Spec       LogQuerySpec `json:"spec"`
	Visibility string       `json:"visibility"`
	Pinned     bool         `json:"pinned"`
	Owner      string       `json:"owner,omitempty"`
	Mine       bool         `json:"mine"`
	CreatedAt  time.Time    `json:"created_at"`
	UpdatedAt  time.Time    `json:"updated_at"`
}

SavedLogQuery mirrors internal/api's savedLogQueryResource.

type SavedLogQueryRequest added in v0.2.0

type SavedLogQueryRequest struct {
	Name       string       `json:"name"`
	App        string       `json:"app,omitempty"`
	Spec       LogQuerySpec `json:"spec"`
	Visibility string       `json:"visibility,omitempty"`
	Pinned     bool         `json:"pinned,omitempty"`
}

SavedLogQueryRequest creates or replaces a saved log query.

type ScheduledTaskRequest

type ScheduledTaskRequest struct {
	Command  []string `json:"command"`
	Schedule string   `json:"schedule"`
	Enabled  bool     `json:"enabled"`
	// ConcurrencyPolicy is one of "allow", "forbid", "replace", or empty
	// (server-side default "allow").
	ConcurrencyPolicy string `json:"concurrency_policy,omitempty"`

	// Scheduled job fields; zero values are omitted so an update leaves
	// the stored value alone.
	Name                   string `json:"name,omitempty"`
	Mode                   string `json:"mode,omitempty"`
	Timezone               string `json:"timezone,omitempty"`
	TimeoutSeconds         int    `json:"timeout_seconds,omitempty"`
	MaxRetries             int    `json:"max_retries,omitempty"`
	RetryBackoffSeconds    int    `json:"retry_backoff_seconds,omitempty"`
	CatchUp                string `json:"catch_up,omitempty"`
	CatchUpLookbackSeconds int    `json:"catch_up_lookback_seconds,omitempty"`
	CPULimitMillis         int    `json:"cpu_limit_millis,omitempty"`
	MemoryLimitMB          int    `json:"memory_limit_mb,omitempty"`
	WarnAfterSeconds       int    `json:"warn_after_seconds,omitempty"`
}

ScheduledTaskRequest mirrors the fields internal/api's scheduledTaskResource actually reads from a create/update request body (Command, Schedule, Enabled); ID and ServiceName always come from the URL, never the body.

type ScheduledTaskResource

type ScheduledTaskResource struct {
	ID          string   `json:"id,omitempty"`
	ServiceName string   `json:"service_name,omitempty"`
	Command     []string `json:"command"`
	Schedule    string   `json:"schedule"`
	Enabled     bool     `json:"enabled"`
	// ConcurrencyPolicy is one of "allow", "forbid", "replace": what
	// happens when this task's next due run finds a previous invocation
	// of itself still executing. Empty on a request defaults to "allow"
	// server-side.
	ConcurrencyPolicy string `json:"concurrency_policy"`

	LastRunAt     *time.Time `json:"last_run_at,omitempty"`
	LastRunStatus string     `json:"last_run_status,omitempty"`
	LastRunOutput string     `json:"last_run_output,omitempty"`
	// ConsecutiveFailures mirrors internal/api's own field: what a
	// kind=scheduled_task_failure alert rule watches.
	ConsecutiveFailures int `json:"consecutive_failures"`

	// Scheduled job fields (internal/api/scheduled_tasks.go): Name, Mode
	// (fresh or exec), Timezone, retry/timeout/catch-up policy, limits,
	// and live scheduling state.
	Name                   string     `json:"name,omitempty"`
	Mode                   string     `json:"mode,omitempty"`
	Timezone               string     `json:"timezone,omitempty"`
	TimeoutSeconds         int        `json:"timeout_seconds,omitempty"`
	MaxRetries             int        `json:"max_retries,omitempty"`
	RetryBackoffSeconds    int        `json:"retry_backoff_seconds,omitempty"`
	CatchUp                string     `json:"catch_up,omitempty"`
	CatchUpLookbackSeconds int        `json:"catch_up_lookback_seconds,omitempty"`
	CPULimitMillis         int        `json:"cpu_limit_millis,omitempty"`
	MemoryLimitMB          int        `json:"memory_limit_mb,omitempty"`
	WarnAfterSeconds       int        `json:"warn_after_seconds,omitempty"`
	Source                 string     `json:"source,omitempty"`
	ConsecutiveMissed      int        `json:"consecutive_missed"`
	RunningSince           *time.Time `json:"running_since,omitempty"`
	NextRunAt              *time.Time `json:"next_run_at,omitempty"`
	// RunID is set on the response to a run-now call.
	RunID string `json:"run_id,omitempty"`

	CreatedAt time.Time `json:"created_at,omitempty"`
	UpdatedAt time.Time `json:"updated_at,omitempty"`
}

ScheduledTaskResource mirrors internal/api's scheduledTaskResource (internal/api/scheduled_tasks.go). Command is a real argv (no shell), and LastRun* describe only the single most recent run in place: there is no separate run-history endpoint.

type Scope added in v0.2.0

type Scope struct {
	Team    string
	Project string
}

Scope is the team and project every request is narrowed to.

func CurrentScope added in v0.2.0

func CurrentScope() Scope

CurrentScope returns the scope set by SetScope.

func ReadContext added in v0.2.0

func ReadContext(prog, profile string) (Scope, error)

ReadContext returns a profile's saved team and project.

func ResolveScope added in v0.2.0

func ResolveScope(flags Scope, lookupEnv func(string) (string, bool), prog, profile string) Scope

ResolveScope picks team and project by precedence: flag, env, then the profile's saved context.

type SecretBindingStatus added in v0.2.0

type SecretBindingStatus struct {
	Total  int `json:"total"`
	Bound  int `json:"bound"`
	Legacy int `json:"legacy"`
}

SecretBindingStatus mirrors internal/api's secretBindingResponse.

type SecretKeyResource

type SecretKeyResource struct {
	Key       string `json:"key"`
	Locked    bool   `json:"locked"`
	UpdatedAt string `json:"updated_at"`
	Stale     bool   `json:"stale"`
}

SecretKeyResource mirrors internal/api's secretKeyResource (internal/api/secrets.go): a secret's key and locked state, never its value. UpdatedAt is RFC3339, and Stale reports whether it's older than the effective secret rotation warning threshold.

type SecretRebindFailure added in v0.2.0

type SecretRebindFailure struct {
	Owner  string `json:"owner"`
	Key    string `json:"key"`
	Reason string `json:"reason"`
}

SecretRebindFailure names one slot a rebind could not bind.

type SecretRebindResult added in v0.2.0

type SecretRebindResult struct {
	Scanned      int                   `json:"scanned"`
	Rebound      int                   `json:"rebound"`
	AlreadyBound int                   `json:"alreadyBound"`
	Changed      int                   `json:"changed"`
	FailedCount  int                   `json:"failedCount"`
	Failed       []SecretRebindFailure `json:"failed"`
	Remaining    int                   `json:"remaining"`
}

SecretRebindResult mirrors internal/api's secretRebindResponse.

type SecurityPolicy added in v0.2.0

type SecurityPolicy struct {
	ApprovalScope        string            `json:"approval_scope"`
	MaxTokenLifetimeDays int               `json:"max_token_lifetime_days"`
	WarnUnusedDays       int               `json:"warn_unused_days"`
	DisableUnusedDays    int               `json:"disable_unused_days"`
	Sources              map[string]string `json:"sources"`
	NewDeviceApproval    bool              `json:"new_device_approval"`
	NoticeGraceDays      int               `json:"notice_grace_days"`
}

SecurityPolicy mirrors internal/api's securityPolicyResource.

type SecurityPolicyUpdate added in v0.2.0

type SecurityPolicyUpdate struct {
	ApprovalScope        *string `json:"approval_scope,omitempty"`
	MaxTokenLifetimeDays *int    `json:"max_token_lifetime_days,omitempty"`
	WarnUnusedDays       *int    `json:"warn_unused_days,omitempty"`
	DisableUnusedDays    *int    `json:"disable_unused_days,omitempty"`
}

SecurityPolicyUpdate is the PUT body; nil fields keep their value.

type SecurityPosture added in v0.2.0

type SecurityPosture struct {
	Score       int           `json:"score"`
	Grade       string        `json:"grade"`
	GeneratedAt time.Time     `json:"generated_at"`
	Counts      PostureCounts `json:"counts"`
	Full        bool          `json:"full"`
	Items       []PostureItem `json:"items"`
	Account     []PostureItem `json:"account"`
}

SecurityPosture mirrors internal/api's postureResponse. Items is empty unless the caller is an admin (Full).

type SecuritySessions added in v0.2.0

type SecuritySessions struct {
	UserID         string          `json:"user_id"`
	Self           bool            `json:"self"`
	Sessions       []Session       `json:"sessions"`
	TrustedDevices []TrustedDevice `json:"trusted_devices"`
	Tokens         []SessionToken  `json:"tokens"`
}

SecuritySessions mirrors internal/api's securitySessionsResponse.

type SelfUpgradeAttempt added in v0.2.0

type SelfUpgradeAttempt struct {
	ID          string            `json:"id"`
	FromVersion string            `json:"from_version"`
	ToVersion   string            `json:"to_version"`
	FromSchema  int               `json:"from_schema"`
	ToSchema    int               `json:"to_schema"`
	Initiator   string            `json:"initiator"`
	Outcome     string            `json:"outcome"`
	FailedStep  string            `json:"failed_step"`
	Error       string            `json:"error"`
	BackupName  string            `json:"backup_name"`
	Acked       []string          `json:"acked"`
	Steps       []SelfUpgradeStep `json:"steps"`
	StartedAt   string            `json:"started_at"`
	FinishedAt  string            `json:"finished_at"`
}

SelfUpgradeAttempt is one recorded upgrade attempt.

type SelfUpgradeAttempts added in v0.2.0

type SelfUpgradeAttempts struct {
	Attempts []SelfUpgradeAttempt `json:"attempts"`
}

SelfUpgradeAttempts is GET /api/v1/updates/self-upgrade/attempts' response.

type SelfUpgradeBreaking added in v0.2.0

type SelfUpgradeBreaking struct {
	ID          string `json:"id"`
	Version     string `json:"version"`
	Summary     string `json:"summary"`
	RequiresAck bool   `json:"requires_ack"`
}

SelfUpgradeBreaking is one breaking change between two versions.

type SelfUpgradePlan added in v0.2.0

type SelfUpgradePlan struct {
	CurrentVersion string                `json:"current_version"`
	TargetVersion  string                `json:"target_version"`
	Breaking       []SelfUpgradeBreaking `json:"breaking"`
	NotesAvailable bool                  `json:"notes_available"`
	CanApply       bool                  `json:"can_apply"`
	CannotApplyWhy string                `json:"cannot_apply_reason"`
	Command        string                `json:"command"`
	Steps          []string              `json:"steps"`
}

SelfUpgradePlan is GET /api/v1/updates/self-upgrade/plan's response.

type SelfUpgradeStarted added in v0.2.0

type SelfUpgradeStarted struct {
	Status        string `json:"status"`
	TargetVersion string `json:"target_version"`
}

SelfUpgradeStarted is POST /api/v1/updates/self-upgrade's response.

type SelfUpgradeStep added in v0.2.0

type SelfUpgradeStep struct {
	Name       string `json:"name"`
	Status     string `json:"status"`
	Detail     string `json:"detail"`
	At         string `json:"at"`
	DurationMS int64  `json:"duration_ms"`
}

SelfUpgradeStep is one step of an attempt's timeline.

type ServerAddress added in v0.2.0

type ServerAddress struct {
	IPv4                  string                `json:"ipv4,omitempty"`
	IPv6                  string                `json:"ipv6,omitempty"`
	Source                string                `json:"source"`
	Detected              ServerAddressPair     `json:"detected"`
	Override              ServerAddressPair     `json:"override"`
	PublicHost            string                `json:"public_host,omitempty"`
	PublicHostSource      string                `json:"public_host_source,omitempty"`
	BehindNAT             bool                  `json:"behind_nat"`
	TLSTerminatedUpstream bool                  `json:"tls_terminated_upstream"`
	AppsBaseDomain        string                `json:"apps_base_domain,omitempty"`
	Domain                string                `json:"domain,omitempty"`
	Records               []DNSRecordSuggestion `json:"records,omitempty"`
}

ServerAddress mirrors internal/api's serverAddressResource.

type ServerAddressPair added in v0.2.0

type ServerAddressPair struct {
	IPv4 string `json:"ipv4,omitempty"`
	IPv6 string `json:"ipv6,omitempty"`
}

ServerAddressPair is an IPv4 and IPv6 address, either may be empty.

type ServerReadiness added in v0.2.0

type ServerReadiness struct {
	Checks   []ReadinessCheck `json:"checks"`
	Mode     string           `json:"mode"`
	Proxy    string           `json:"proxy"`
	Holders  map[int]string   `json:"holders"`
	NextStep string           `json:"next_step"`
	Blocked  bool             `json:"blocked"`
	Summary  string           `json:"summary"`
}

ServerReadiness is GET /api/v1/system/readiness' response.

type ServiceHealth

type ServiceHealth struct {
	Readiness    *ServiceProbe `json:"readiness,omitempty"`
	Liveness     *ServiceProbe `json:"liveness,omitempty"`
	ReadyTimeout int64         `json:"ready_timeout,omitempty"`
}

ServiceHealth mirrors internal/api's appResource.Health field.

type ServiceHooks

type ServiceHooks struct {
	PreDeploy  string `json:"pre_deploy,omitempty"`
	PostDeploy string `json:"post_deploy,omitempty"`
}

ServiceHooks mirrors internal/api's appResource.Hooks field (store.ServiceHooks' JSON encoding).

type ServiceProbe

type ServiceProbe struct {
	Path            string   `json:"path"`
	Scheme          string   `json:"scheme,omitempty"`
	Host            string   `json:"host,omitempty"`
	TLSSkipVerify   bool     `json:"tls_skip_verify,omitempty"`
	FollowRedirects *bool    `json:"follow_redirects,omitempty"`
	ExpectedStatus  string   `json:"expected_status,omitempty"`
	Exec            []string `json:"exec,omitempty"`
	Interval        int64    `json:"interval,omitempty"`
	Timeout         int64    `json:"timeout,omitempty"`
	Failures        int      `json:"failures,omitempty"`
}

ServiceProbe mirrors one of AppResource.Health's two probes (readiness or liveness).

type ServiceResources

type ServiceResources struct {
	MemoryBytes     int64  `json:"memory_bytes,omitempty"`
	NanoCPUs        int64  `json:"nano_cpus,omitempty"`
	SwapMemoryBytes int64  `json:"swap_memory_bytes,omitempty"`
	CPUSetCPUs      string `json:"cpuset_cpus,omitempty"`
}

ServiceResources mirrors internal/api's appResource.Resources field (internal/api/apps.go), which is itself store.DesiredService's own JSON encoding: bytes and nanoseconds, not app.yaml's human-friendly "512Mi"/"5s" strings. Redeclared here, not imported from internal/store or internal/api, so this package depends only on the documented wire contract, never on the control plane's internal Go types. ServiceProbe and ServiceHealth below share that same reasoning.

type ServiceTemplateDetail

type ServiceTemplateDetail struct {
	ID                     string `json:"id"`
	Name                   string `json:"name"`
	Slogan                 string `json:"slogan"`
	Category               string `json:"category"`
	DocumentationURL       string `json:"documentation_url"`
	Compose                string `json:"compose"`
	RecommendedMemoryBytes int64  `json:"recommended_memory_bytes,omitempty"`
	RequiresGPU            bool   `json:"requires_gpu,omitempty"`
	RequiresConfiguration  bool   `json:"requires_configuration,omitempty"`
}

ServiceTemplateDetail mirrors internal/api's serviceTemplateDetail: GET /api/v1/service-templates/{id}'s response, including the full compose.yaml body. Also what a custom template id (ListCustomTemplates below) resolves to, through the same endpoint: Category reads "Custom" and RecommendedMemoryBytes/RequiresGPU are always zero for those, see resolveTemplate's own doc comment (internal/api/service_templates.go).

type ServiceTemplateListItem

type ServiceTemplateListItem struct {
	ID                     string `json:"id"`
	Name                   string `json:"name"`
	Slogan                 string `json:"slogan"`
	Category               string `json:"category"`
	DocumentationURL       string `json:"documentation_url"`
	RecommendedMemoryBytes int64  `json:"recommended_memory_bytes,omitempty"`
	RequiresGPU            bool   `json:"requires_gpu,omitempty"`
}

ServiceTemplateListItem mirrors internal/api's serviceTemplateListItem (internal/api/service_templates.go): one catalog entry from GET /api/v1/service-templates, without the full Compose body.

type Session added in v0.2.0

type Session struct {
	ID         string    `json:"id"`
	Browser    string    `json:"browser"`
	IP         string    `json:"ip"`
	Network    string    `json:"network"`
	CreatedAt  time.Time `json:"created_at"`
	LastSeenAt time.Time `json:"last_seen_at"`
	ExpiresAt  time.Time `json:"expires_at"`
	Current    bool      `json:"current"`
}

Session mirrors internal/api's sessionResource.

type SessionInfoResource

type SessionInfoResource struct {
	Username  string `json:"username"`
	ExpiresAt string `json:"expires_at"`
}

SessionInfoResource mirrors internal/api's sessionInfoResponse (internal/api/account.go)'s wire shape. GetSession below sends this over a plain bearer-token request, which handleGetSession's own doc comment says it will never honor ("deliberately not requireAbility: a bearer token has no session of its own to report on").

type SessionLinkResource added in v0.2.0

type SessionLinkResource struct {
	Token string `json:"token"`
	URL   string `json:"url"`
}

SessionLinkResource mirrors internal/api's mintSessionLinkResponse (internal/api/session_links.go): Token is a one-time secret, URL is the same token already embedded in a ready-to-open login link.

type SessionToken added in v0.2.0

type SessionToken struct {
	ID         string     `json:"id"`
	Name       string     `json:"name"`
	Abilities  []string   `json:"abilities"`
	CreatedAt  time.Time  `json:"created_at"`
	LastUsedAt *time.Time `json:"last_used_at,omitempty"`
	ExpiresAt  *time.Time `json:"expires_at,omitempty"`
}

SessionToken is the subset of an API token the sessions view shows.

type SetAppDatabaseRequest

type SetAppDatabaseRequest struct {
	DatabaseName string `json:"database_name"`
	EnvVar       string `json:"env_var,omitempty"`
	Field        string `json:"field,omitempty"`
}

SetAppDatabaseRequest mirrors internal/api's setAppDatabaseRequest (apps_database.go). EnvVar and Field are both optional: the server defaults them ("DATABASE_URL"/"url") when left blank.

type SetAppEgressPolicyRequest added in v0.2.0

type SetAppEgressPolicyRequest struct {
	Mode  string           `json:"mode"`
	Allow []AppEgressAllow `json:"allow"`
}

SetAppEgressPolicyRequest mirrors internal/api's setEgressPolicyRequest (apps_egress.go). Mode must be "allowlist" with at least one Allow entry; the server rejects anything else.

type SetAppEnvironmentRequest

type SetAppEnvironmentRequest struct {
	EnvironmentID string `json:"environment_id"`
}

SetAppEnvironmentRequest mirrors internal/api's setAppEnvironmentRequest. An empty EnvironmentID clears the assignment.

type SetAppNodeRequest added in v0.2.0

type SetAppNodeRequest struct {
	NodeID string `json:"node_id"`
}

SetAppNodeRequest mirrors internal/api's setAppNodeRequest. An empty NodeID moves the app back to the control plane's own local node.

type SetAppProjectRequest

type SetAppProjectRequest struct {
	ProjectID string `json:"project_id"`
}

SetAppProjectRequest mirrors internal/api's setAppProjectRequest. An empty ProjectID clears the assignment.

type SetAppScheduleRequest added in v0.2.0

type SetAppScheduleRequest struct {
	Cron     string `json:"cron"`
	Branch   string `json:"branch"`
	Timezone string `json:"timezone,omitempty"`
	Enabled  *bool  `json:"enabled,omitempty"`
}

SetAppScheduleRequest mirrors internal/api's setAppScheduleRequest. Enabled defaults to true server-side when nil.

type SetAppStorageRequest added in v0.2.0

type SetAppStorageRequest struct {
	StorageTargetID string `json:"storage_target_id"`
}

SetAppStorageRequest mirrors internal/api's setAppStorageRequest: PUT /api/v1/apps/{name}/storage's request body.

type SetAppVolumesRequest added in v0.2.0

type SetAppVolumesRequest struct {
	Volumes []AppVolumeResource `json:"volumes"`
}

SetAppVolumesRequest mirrors internal/api's setAppVolumesRequest (apps_volumes_attach.go): the service's whole desired volume list, full-replace like SetAppEgressPolicyRequest.

type SetAppVolumesResponse added in v0.2.0

type SetAppVolumesResponse struct {
	Name    string              `json:"name"`
	Volumes []AppVolumeResource `json:"volumes,omitempty"`
}

SetAppVolumesResponse mirrors internal/api's setAppVolumesResponse.

type SetAutoRollbackRequest added in v0.2.0

type SetAutoRollbackRequest struct {
	Enabled bool `json:"enabled"`
}

SetAutoRollbackRequest mirrors internal/api's setAutoRollbackRequest (deploys.go): PUT /api/v1/apps/{name}/auto-rollback's body.

type SetAutoRollbackSLOBurnRequest added in v0.2.0

type SetAutoRollbackSLOBurnRequest struct {
	Mode string `json:"mode"`
}

SetAutoRollbackSLOBurnRequest mirrors internal/api's setAutoRollbackSLOBurnRequest (deploys.go): PUT /api/v1/apps/{name}/auto-rollback-slo-burn's body. Mode is one of "off", "auto", "dry_run", "pause_for_human".

type SetBackupScheduleRequest

type SetBackupScheduleRequest struct {
	TargetID   string `json:"target_id"`
	Schedule   string `json:"schedule"`
	Retain     int    `json:"retain,omitempty"`
	RetainDays int    `json:"retain_days,omitempty"`
}

SetBackupScheduleRequest mirrors internal/api's setBackupScheduleRequest.

type SetDatabaseProjectRequest

type SetDatabaseProjectRequest struct {
	ProjectID string `json:"project_id"`
}

SetDatabaseProjectRequest mirrors internal/api's setDatabaseProjectRequest. An empty ProjectID clears the assignment.

type SetDatabasePublicAccessRequest

type SetDatabasePublicAccessRequest struct {
	Port        int    `json:"port,omitempty"`
	BindAddress string `json:"bind_address,omitempty"`
}

SetDatabasePublicAccessRequest mirrors internal/api's setDatabasePublicAccessRequest. Port 0 means auto-assign the next free port. BindAddress empty means the server's own default ("private", loopback only); "public" opts into every interface.

type SetDatabaseResourcesRequest

type SetDatabaseResourcesRequest struct {
	Resources *ServiceResources `json:"resources"`
}

SetDatabaseResourcesRequest mirrors internal/api's setDatabaseResourcesRequest.

type SetDomainAuthGateRequest added in v0.2.0

type SetDomainAuthGateRequest struct {
	Enabled        bool           `json:"enabled"`
	AuthURL        string         `json:"auth_url"`
	CheckPath      string         `json:"check_path"`
	CopyHeaders    []string       `json:"copy_headers"`
	TimeoutSeconds int            `json:"timeout_seconds"`
	Provider       string         `json:"provider,omitempty"`
	Allow          []AuthGateRule `json:"allow,omitempty"`
}

SetDomainAuthGateRequest mirrors internal/api's setDomainAuthGateRequest. TimeoutSeconds 0 uses the server's APP_AUTH_GATE_TIMEOUT default.

type SetDomainBasicAuthRequest

type SetDomainBasicAuthRequest struct {
	Username string `json:"username"`
	Password string `json:"password,omitempty"`
}

SetDomainBasicAuthRequest mirrors internal/api's setDomainBasicAuthRequest. Password empty on an update means "leave the currently stored password unchanged".

type SetDomainErrorPageRequest added in v0.2.0

type SetDomainErrorPageRequest struct {
	StatusCode int    `json:"status_code"`
	Body       string `json:"body"`
}

SetDomainErrorPageRequest mirrors internal/api's setDomainErrorPageRequest: one status-code-to-body upsert at a time.

type SetDomainRedirectRequest added in v0.2.0

type SetDomainRedirectRequest struct {
	TargetURL  string `json:"target_url"`
	StatusCode int    `json:"status_code,omitempty"`
}

SetDomainRedirectRequest mirrors internal/api's setDomainRedirectRequest. StatusCode 0 defaults server-side to 301 (permanent).

type SetDomainTLSCertRequest

type SetDomainTLSCertRequest struct {
	Cert string `json:"cert"`
	Key  string `json:"key"`
}

SetDomainTLSCertRequest mirrors internal/api's setDomainTLSCertRequest: both fields are required every call, there is no "leave the current certificate unchanged" partial-update case.

type SetDomainWAFRequest added in v0.2.0

type SetDomainWAFRequest struct {
	WAFEnabled     bool   `json:"waf_enabled"`
	WAFMode        string `json:"waf_mode,omitempty"`
	RateLimitRPS   int    `json:"rate_limit_rps"`
	RateLimitBurst int    `json:"rate_limit_burst"`
}

SetDomainWAFRequest mirrors internal/api's setDomainWAFRequest. WAFMode empty defaults server-side to "detect". RateLimitRPS 0 means rate limiting is off, independent of WAFEnabled.

type SetExecAccessRequest added in v0.2.0

type SetExecAccessRequest struct {
	Enabled bool `json:"enabled"`
}

SetExecAccessRequest mirrors internal/api's setExecAccessRequest (exec.go): PUT /api/v1/apps/{name}/exec-access's body.

type SetGitDeploySettingsRequest added in v0.2.0

type SetGitDeploySettingsRequest struct {
	DeployPaths       *[]string `json:"deploy_paths,omitempty"`
	DeployPathsIgnore *[]string `json:"deploy_paths_ignore,omitempty"`
	ReportStatus      *bool     `json:"report_status,omitempty"`
}

SetGitDeploySettingsRequest mirrors internal/api's setGitDeploySettingsRequest; a nil field keeps its current value.

type SetGitSourceBuildRequest added in v0.2.0

type SetGitSourceBuildRequest struct {
	BuildType     string `json:"build_type"`
	BuildPath     string `json:"build_path"`
	BaseDirectory string `json:"base_directory"`
}

SetGitSourceBuildRequest mirrors internal/api's setGitSourceBuildRequest.

type SetGitSourceRequest

type SetGitSourceRequest struct {
	RepoURL   string `json:"repo_url"`
	Branch    string `json:"branch,omitempty"`
	BuildType string `json:"build_type,omitempty"`
	BuildPath string `json:"build_path,omitempty"`
	// BaseDirectory is the build context, relative to the repository root.
	BaseDirectory string `json:"base_directory,omitempty"`
	Token         string `json:"token,omitempty"`
	TriggerMode   string `json:"trigger_mode,omitempty"`
}

SetGitSourceRequest mirrors internal/api's setGitSourceRequest (internal/api/git_sources.go), minus the multi-service Services/ AdditionalServices fields (see GitSourceResource's own doc comment).

type SetLogDrainRequest

type SetLogDrainRequest struct {
	Type    string `json:"type"`
	Target  string `json:"target"`
	Enabled bool   `json:"enabled"`
}

SetLogDrainRequest mirrors internal/api's setLogDrainRequest.

type SetNodeProviderCredentialRequest added in v0.2.0

type SetNodeProviderCredentialRequest struct {
	Provider              string `json:"provider"`
	Token                 string `json:"token"`
	SecretAccessKey       string `json:"secret_access_key,omitempty"`
	SessionToken          string `json:"session_token,omitempty"`
	Region                string `json:"region,omitempty"`
	RoleARN               string `json:"role_arn,omitempty"`
	UseAmbientCredentials bool   `json:"use_ambient_credentials,omitempty"`
}

SetNodeProviderCredentialRequest is POST /api/v1/node-providers' body. The fields after Token mirror internal/api's own request struct and are aws-only: for hetzner/digitalocean, Token alone is the provider's bearer API token.

type SetNodeWorkloadsRequest

type SetNodeWorkloadsRequest struct {
	AcceptsAppWorkloads   bool `json:"accepts_app_workloads"`
	AcceptsBuildWorkloads bool `json:"accepts_build_workloads"`
}

SetNodeWorkloadsRequest mirrors internal/api's setNodeWorkloadsRequest: a full replace of both fields, not a partial patch.

type SetPreviewPolicyRequest added in v0.2.0

type SetPreviewPolicyRequest struct {
	OnLimit           *string `json:"on_limit,omitempty"`
	AllowForkPreviews *bool   `json:"allow_fork_previews,omitempty"`
	TTLHours          *int    `json:"ttl_hours,omitempty"`

	MaxPreviews      *int     `json:"max_previews,omitempty"`
	MemoryLimit      *string  `json:"memory_limit,omitempty"`
	CPULimit         *float64 `json:"cpu_limit,omitempty"`
	IdleSleepMinutes *int     `json:"idle_sleep_minutes,omitempty"`
	DatabaseStrategy *string  `json:"database_strategy,omitempty"`
	SeedDatabase     *string  `json:"seed_database,omitempty"`
	AllowForkSecrets *bool    `json:"allow_fork_secrets,omitempty"`
	GateBasicAuth    *bool    `json:"gate_basic_auth,omitempty"`
	GateUsername     *string  `json:"gate_username,omitempty"`
	GatePassword     *string  `json:"gate_password,omitempty"`
	AllowIndexing    *bool    `json:"allow_indexing,omitempty"`
}

SetPreviewPolicyRequest is PUT .../preview-policy's body; nil fields are left unchanged.

type SetPreviewSettingsRequest

type SetPreviewSettingsRequest struct {
	Enabled        *bool `json:"enabled,omitempty"`
	PostPRComments *bool `json:"post_pr_comments,omitempty"`
}

SetPreviewSettingsRequest mirrors internal/api's setPreviewSettingsRequest (preview_environments_handlers.go). Both fields are optional pointers: nil means "leave the currently stored value unchanged," so SetPreviewEnabled and SetPreviewPostPRComments (client.go) can each touch just their own toggle without resetting the other back to false.

type SetProjectOrganizationRequest

type SetProjectOrganizationRequest struct {
	OrgID string `json:"org_id"`
}

SetProjectOrganizationRequest mirrors internal/api's setProjectOrganizationRequest. An empty OrgID clears the assignment.

type SetSecretLockRequest

type SetSecretLockRequest struct {
	Locked bool `json:"locked"`
}

SetSecretLockRequest mirrors internal/api's setSecretLockRequest (internal/api/secrets.go).

type SetSecretRequest

type SetSecretRequest struct {
	Value           string `json:"value"`
	OverwriteLocked bool   `json:"overwrite_locked"`
}

SetSecretRequest mirrors internal/api's setSecretRequest (internal/api/secrets.go).

type SetSharedEnvSecretRequest added in v0.2.0

type SetSharedEnvSecretRequest struct {
	Value string `json:"value"`
}

SetSharedEnvSecretRequest mirrors internal/api's setSharedEnvSecretRequest (internal/api/shared_env_secrets.go).

type SetVolumeBackupScheduleRequest

type SetVolumeBackupScheduleRequest struct {
	TargetID   string `json:"target_id"`
	Schedule   string `json:"schedule"`
	Retain     int    `json:"retain,omitempty"`
	RetainDays int    `json:"retain_days,omitempty"`
	SqlitePath string `json:"sqlite_path,omitempty"`
}

SetVolumeBackupScheduleRequest mirrors internal/api's setVolumeBackupScheduleRequest.

type SetupGuideProgress added in v0.2.0

type SetupGuideProgress struct {
	Done  int `json:"done"`
	Total int `json:"total"`
}

SetupGuideProgress counts done items of a multi-item setup step.

type SetupGuideResource added in v0.2.0

type SetupGuideResource struct {
	Steps         []SetupGuideStep `json:"steps"`
	ReadyPercent  int              `json:"ready_percent"`
	Done          int              `json:"done"`
	Total         int              `json:"total"`
	NextStep      string           `json:"next_step,omitempty"`
	Complete      bool             `json:"complete"`
	Hidden        bool             `json:"hidden"`
	ServerAddress string           `json:"server_address,omitempty"`
}

SetupGuideResource is GET /api/v1/setup/guide.

type SetupGuideStep added in v0.2.0

type SetupGuideStep struct {
	ID              string              `json:"id"`
	Title           string              `json:"title"`
	State           string              `json:"state"`
	Optional        bool                `json:"optional"`
	EstimateMinutes int                 `json:"estimate_minutes"`
	Href            string              `json:"href"`
	BlockedBy       []string            `json:"blocked_by,omitempty"`
	Reason          string              `json:"reason,omitempty"`
	Progress        *SetupGuideProgress `json:"progress,omitempty"`
	Manual          bool                `json:"manual,omitempty"`
}

SetupGuideStep is one entry of the Get started checklist.

type SetupStatusResource added in v0.2.0

type SetupStatusResource struct {
	NeedsSetup bool `json:"needs_setup"`
}

SetupStatusResource mirrors GET /api/v1/auth/setup-status.

type SharedEnvVarResource added in v0.2.0

type SharedEnvVarResource struct {
	Key       string `json:"key"`
	Value     string `json:"value"`
	Secret    bool   `json:"secret"`
	UpdatedAt string `json:"updated_at,omitempty"`
	Stale     bool   `json:"stale,omitempty"`
}

SharedEnvVarResource mirrors internal/api's sharedEnvVarResource (internal/api/shared_env_secrets.go): one shared env var at the project/organization/environment tier. Value is always "" for a secret-marked entry, matching SecretKeyResource's own "never a value" rule above. UpdatedAt/Stale are only populated when Secret is true, see sharedEnvVarResource's own doc comment.

type SignInApproval added in v0.2.0

type SignInApproval struct {
	ID          string    `json:"id"`
	RequesterIP string    `json:"requester_ip"`
	UserAgent   string    `json:"user_agent"`
	CreatedAt   time.Time `json:"created_at"`
	ExpiresAt   time.Time `json:"expires_at"`
}

SignInApproval mirrors internal/api's signInApprovalItem. It never carries the number the waiting browser shows: the approver has to type it.

type SignInCode added in v0.2.0

type SignInCode struct {
	ID          string    `json:"id"`
	RequesterIP string    `json:"requester_ip"`
	UserAgent   string    `json:"user_agent"`
	CreatedAt   time.Time `json:"created_at"`
	ExpiresAt   time.Time `json:"expires_at"`
	Revealable  bool      `json:"revealable"`
}

SignInCode mirrors internal/api's signInCodeItem: a waiting code request, without the code itself.

type SignInRequests added in v0.2.0

type SignInRequests struct {
	Codes     []SignInCode     `json:"codes"`
	Approvals []SignInApproval `json:"approvals"`
}

SignInRequests mirrors internal/api's signInRequestsResponse.

type SilenceMatchers added in v0.2.0

type SilenceMatchers struct {
	RuleIDs    []string          `json:"rule_ids,omitempty"`
	Kinds      []string          `json:"kinds,omitempty"`
	Apps       []string          `json:"apps,omitempty"`
	Nodes      []string          `json:"nodes,omitempty"`
	Labels     map[string]string `json:"labels,omitempty"`
	Severities []string          `json:"severities,omitempty"`
}

SilenceMatchers mirrors alerting.SilenceMatcher.

type SilenceResource added in v0.2.0

type SilenceResource struct {
	ID        string          `json:"id"`
	Matchers  SilenceMatchers `json:"matchers"`
	StartsAt  time.Time       `json:"starts_at"`
	EndsAt    time.Time       `json:"ends_at"`
	CreatedBy string          `json:"created_by"`
	Reason    string          `json:"reason,omitempty"`
	CreatedAt time.Time       `json:"created_at"`
	ExpiredAt *time.Time      `json:"expired_at,omitempty"`
	Status    string          `json:"status"`
}

SilenceResource mirrors internal/api's silenceResource.

type SlowQueryEntryResource added in v0.2.0

type SlowQueryEntryResource struct {
	Timestamp    time.Time `json:"timestamp"`
	DurationMs   float64   `json:"duration_ms"`
	Query        string    `json:"query"`
	RowsExamined int64     `json:"rows_examined,omitempty"`
}

SlowQueryEntryResource mirrors internal/api's slowQueryEntryResource (internal/api/database_slow_queries.go).

type StandaloneDomain added in v0.2.0

type StandaloneDomain struct {
	Domain             string `json:"domain"`
	Kind               string `json:"kind"`
	Scope              string `json:"scope"`
	Target             string `json:"target"`
	TargetKind         string `json:"target_kind"`
	TargetURL          string `json:"target_url"`
	UpstreamTLS        bool   `json:"upstream_tls"`
	TLSSkipVerify      bool   `json:"tls_skip_verify"`
	TLSServerName      string `json:"tls_server_name,omitempty"`
	HostHeader         string `json:"host_header"`
	WebSocket          bool   `json:"websocket"`
	DialTimeoutSeconds int    `json:"dial_timeout_seconds"`
	ReadTimeoutSeconds int    `json:"read_timeout_seconds"`
	StripPrefix        string `json:"strip_prefix,omitempty"`
	Description        string `json:"description,omitempty"`
	CreatedBy          string `json:"created_by,omitempty"`
	CreatedAt          string `json:"created_at,omitempty"`
	UpdatedAt          string `json:"updated_at,omitempty"`
}

StandaloneDomain mirrors internal/api's standaloneDomainResource.

type StandaloneDomainRequest added in v0.2.0

type StandaloneDomainRequest struct {
	Domain             string  `json:"domain,omitempty"`
	Target             *string `json:"target,omitempty"`
	UpstreamTLS        *bool   `json:"upstream_tls,omitempty"`
	TLSSkipVerify      *bool   `json:"tls_skip_verify,omitempty"`
	TLSServerName      *string `json:"tls_server_name,omitempty"`
	HostHeader         *string `json:"host_header,omitempty"`
	WebSocket          *bool   `json:"websocket,omitempty"`
	DialTimeoutSeconds *int    `json:"dial_timeout_seconds,omitempty"`
	ReadTimeoutSeconds *int    `json:"read_timeout_seconds,omitempty"`
	StripPrefix        *string `json:"strip_prefix,omitempty"`
	Description        *string `json:"description,omitempty"`
	Confirm            bool    `json:"confirm,omitempty"`
}

StandaloneDomainRequest is POST and PUT's body; nil fields keep the stored value on PUT.

type StaticSiteResource added in v0.2.0

type StaticSiteResource struct {
	Name    string   `json:"name"`
	Domains []string `json:"domains"`
}

StaticSiteResource mirrors internal/api's staticSiteResource (internal/api/static_sites.go): one entry of GET /api/v1/static-sites.

type StatusComponent added in v0.2.0

type StatusComponent struct {
	ID          string `json:"id,omitempty"`
	Kind        string `json:"kind"`
	Target      string `json:"target"`
	DisplayName string `json:"display_name"`
	Position    int    `json:"position"`
}

StatusComponent mirrors internal/api's statusComponentResource.

type StatusIncident added in v0.2.0

type StatusIncident struct {
	ID           string         `json:"id,omitempty"`
	Kind         string         `json:"kind"`
	Title        string         `json:"title"`
	Status       string         `json:"status"`
	Impact       string         `json:"impact"`
	ComponentIDs []string       `json:"component_ids"`
	StartsAt     *time.Time     `json:"starts_at,omitempty"`
	EndsAt       *time.Time     `json:"ends_at,omitempty"`
	ResolvedAt   *time.Time     `json:"resolved_at,omitempty"`
	Body         string         `json:"body,omitempty"`
	Updates      []StatusUpdate `json:"updates,omitempty"`
}

StatusIncident mirrors internal/api's statusIncidentResource.

type StatusPageComponentView added in v0.2.0

type StatusPageComponentView struct {
	Name     string   `json:"name"`
	Status   string   `json:"status"`
	Uptime90 *float64 `json:"uptime_90d"`
}

StatusPageComponentView is one component in the preview endpoint's view.

type StatusPageSettings added in v0.2.0

type StatusPageSettings struct {
	Enabled      bool   `json:"enabled"`
	Title        string `json:"title"`
	Description  string `json:"description"`
	CustomDomain string `json:"custom_domain"`
	PublicPath   string `json:"public_path,omitempty"`
}

StatusPageSettings mirrors internal/api's statusSettingsResource.

type StatusPageView added in v0.2.0

type StatusPageView struct {
	Title      string                    `json:"title"`
	Status     string                    `json:"status"`
	StatusText string                    `json:"status_text"`
	Components []StatusPageComponentView `json:"components"`
}

StatusPageView is the public payload as the preview endpoint returns it.

type StatusUpdate added in v0.2.0

type StatusUpdate struct {
	Status    string    `json:"status"`
	Body      string    `json:"body"`
	CreatedAt time.Time `json:"created_at,omitempty"`
}

StatusUpdate is one incident timeline entry.

type StepUpProof added in v0.2.0

type StepUpProof struct {
	Password     string `json:"password,omitempty"`
	Code         string `json:"code,omitempty"`
	RecoveryCode string `json:"recovery_code,omitempty"`
}

StepUpProof is the account owner's password, plus the authenticator or recovery code when the account has two-factor authentication.

type StorageDestination added in v0.2.0

type StorageDestination struct {
	ID              string `json:"id"`
	Name            string `json:"name"`
	Preset          string `json:"preset"`
	Provider        string `json:"provider"`
	Endpoint        string `json:"endpoint,omitempty"`
	Region          string `json:"region,omitempty"`
	Bucket          string `json:"bucket"`
	PathStyle       bool   `json:"path_style"`
	AccountID       string `json:"account_id,omitempty"`
	CreatedAt       string `json:"created_at"`
	ArchivePolicies int    `json:"archive_policies"`
}

StorageDestination is a connected S3-compatible bucket. It never carries credentials.

type StorageDestinationRequest added in v0.2.0

type StorageDestinationRequest struct {
	Name            string `json:"name"`
	Preset          string `json:"preset"`
	Endpoint        string `json:"endpoint,omitempty"`
	Region          string `json:"region,omitempty"`
	Bucket          string `json:"bucket"`
	AccountID       string `json:"account_id,omitempty"`
	PathStyle       *bool  `json:"path_style,omitempty"`
	AccessKeyID     string `json:"access_key_id,omitempty"`
	SecretAccessKey string `json:"secret_access_key,omitempty"`
	Verify          bool   `json:"verify,omitempty"`
}

StorageDestinationRequest creates or updates a destination.

type StorageOrphanResource added in v0.2.0

type StorageOrphanResource struct {
	ID         string `json:"id"`
	Name       string `json:"name"`
	SizeBytes  *int64 `json:"size_bytes,omitempty"`
	CreatedAt  string `json:"created_at,omitempty"`
	AgeDays    *int   `json:"age_days,omitempty"`
	BelongedTo struct {
		Kind    string `json:"kind"`
		AppName string `json:"app_name,omitempty"`
		Name    string `json:"name,omitempty"`
		Role    string `json:"role"`
	} `json:"belonged_to"`
	BackupCount int `json:"backup_count"`
	LastBackup  *struct {
		ID        string `json:"id"`
		At        string `json:"at"`
		SizeBytes int64  `json:"size_bytes"`
	} `json:"last_backup,omitempty"`
}

StorageOrphanResource mirrors internal/api's storageOrphanResource.

type StorageOrphansResponse added in v0.2.0

type StorageOrphansResponse struct {
	Orphans        []StorageOrphanResource `json:"orphans"`
	TotalBytes     int64                   `json:"total_bytes"`
	ThresholdBytes int64                   `json:"threshold_bytes"`
}

StorageOrphansResponse mirrors internal/api's storageOrphansResponse.

type StorageProbeResult added in v0.2.0

type StorageProbeResult struct {
	OK      bool               `json:"ok"`
	Reason  string             `json:"reason,omitempty"`
	Message string             `json:"message,omitempty"`
	Steps   []StorageProbeStep `json:"steps"`
}

StorageProbeResult is the outcome of a put/get/delete probe.

type StorageProbeStep added in v0.2.0

type StorageProbeStep struct {
	Name  string `json:"name"`
	OK    bool   `json:"ok"`
	Error string `json:"error,omitempty"`
}

StorageProbeStep is one step of a connection probe.

type StorageProvider added in v0.2.0

type StorageProvider struct {
	ID               string `json:"id"`
	Label            string `json:"label"`
	EndpointTemplate string `json:"endpoint_template,omitempty"`
	DefaultRegion    string `json:"default_region,omitempty"`
	PathStyle        bool   `json:"path_style"`
	NeedsAccountID   bool   `json:"needs_account_id"`
	NeedsRegion      bool   `json:"needs_region"`
	NeedsEndpoint    bool   `json:"needs_endpoint"`
}

StorageProvider is one provider preset from GET /api/v1/storage/providers.

type SupplyChainSettings added in v0.2.0

type SupplyChainSettings struct {
	App             string     `json:"app"`
	ScanEnabled     bool       `json:"scan_enabled"`
	ScanGate        string     `json:"scan_gate"`
	ServerEnabled   bool       `json:"server_enabled"`
	BuildAttest     bool       `json:"build_attest"`
	Scanner         string     `json:"scanner"`
	ScannerImage    string     `json:"scanner_image"`
	OverrideArmed   bool       `json:"override_armed"`
	OverrideReason  string     `json:"override_reason,omitempty"`
	OverrideExpires *time.Time `json:"override_expires_at,omitempty"`
}

SupplyChainSettings is GET /api/v1/apps/{name}/supply-chain's body.

type SupplyChainSettingsRequest added in v0.2.0

type SupplyChainSettingsRequest struct {
	ScanEnabled *bool   `json:"scan_enabled,omitempty"`
	ScanGate    *string `json:"scan_gate,omitempty"`
}

SupplyChainSettingsRequest is PUT .../supply-chain's body; nil fields stay unchanged.

type SweepPreviewEnvironmentsResult

type SweepPreviewEnvironmentsResult struct {
	Swept int `json:"swept"`
}

SweepPreviewEnvironmentsResult mirrors internal/api's sweepPreviewEnvironmentsResponse (preview_environments_sweep.go).

type SystemDoctorResource

type SystemDoctorResource struct {
	OK     bool                  `json:"ok"`
	Checks []DoctorCheckResource `json:"checks"`
}

SystemDoctorResource mirrors internal/api's systemDoctorResponse (internal/api/doctor.go): the "levelrail-cli doctor" preflight bundle, a superset of SystemStatusResource above. OK is false only when at least one check's Status is "fail"; "warn" doesn't affect it.

type SystemPruneResult added in v0.2.0

type SystemPruneResult struct {
	ContainersRemoved        []string `json:"containers_removed"`
	ContainersReclaimedBytes uint64   `json:"containers_reclaimed_bytes"`
	ImagesRemoved            []string `json:"images_removed"`
	ImagesReclaimedBytes     uint64   `json:"images_reclaimed_bytes"`
	VolumesRemoved           []string `json:"volumes_removed"`
	VolumesReclaimedBytes    uint64   `json:"volumes_reclaimed_bytes"`
	BuildCacheReclaimedBytes uint64   `json:"build_cache_reclaimed_bytes"`
	Errors                   []string `json:"errors,omitempty"`
}

SystemPruneResult mirrors internal/api's systemPruneResponse (internal/api/system_prune.go): everything POST /system/prune removed and how much space came back, per resource kind, plus any per-stage error that didn't stop the rest.

type SystemRestart added in v0.2.0

type SystemRestart struct {
	BootID    string `json:"boot_id"`
	Supported bool   `json:"supported"`
	Pending   bool   `json:"pending"`
	Reason    string `json:"reason,omitempty"`
	Hint      string `json:"hint,omitempty"`
}

SystemRestart is the /api/v1/system/restart resource.

type SystemStatusResource

type SystemStatusResource struct {
	SecretsConfigured   bool   `json:"secrets_configured"`
	TelemetryConfigured bool   `json:"telemetry_configured"`
	AlertsConfigured    bool   `json:"alerts_configured"`
	DataDirTotalBytes   int64  `json:"data_dir_total_bytes,omitempty"`
	DataDirFreeBytes    int64  `json:"data_dir_free_bytes,omitempty"`
	DockerConnected     bool   `json:"docker_connected"`
	DockerError         string `json:"docker_error,omitempty"`
}

SystemStatusResource mirrors internal/api's systemStatusResponse (internal/api/status.go): DockerConnected/DockerError are this control plane's own local Docker daemon reachability, not a per-node signal (see docker_connected's own doc comment on internal/api/status.go for why: multi-node Docker reachability forwarding isn't wired yet).

type TagAppResource added in v0.2.0

type TagAppResource struct {
	Name string `json:"name"`
}

TagAppResource mirrors internal/api's tagAppResource: GET /api/v1/tags/{id}/apps' wire shape.

type TagResource added in v0.2.0

type TagResource struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	CreatedAt string `json:"created_at,omitempty"`
}

TagResource mirrors internal/api's tagResource (internal/api/tags.go).

type TargetProtectionResource added in v0.2.0

type TargetProtectionResource struct {
	TargetID   string `json:"target_id"`
	Level      string `json:"level"`
	ObjectLock bool   `json:"object_lock"`
	LockMode   string `json:"lock_mode,omitempty"`
	Versioning string `json:"versioning,omitempty"`
	CanDelete  bool   `json:"can_delete"`
	Warning    string `json:"warning,omitempty"`
	ProbeError string `json:"probe_error,omitempty"`
	CheckedAt  string `json:"checked_at"`
}

TargetProtectionResource mirrors internal/api's targetProtectionResource.

type TeamEventResource added in v0.2.0

type TeamEventResource struct {
	ID        string `json:"id"`
	ActorName string `json:"actor_name"`
	Action    string `json:"action"`
	Subject   string `json:"subject"`
	Detail    string `json:"detail"`
	CreatedAt string `json:"created_at"`
}

TeamEventResource mirrors internal/api's teamEventResource.

type TeamInviteResource added in v0.2.0

type TeamInviteResource struct {
	ID        string `json:"id"`
	TeamID    string `json:"team_id"`
	Email     string `json:"email"`
	Role      string `json:"role"`
	CreatedAt string `json:"created_at"`
	ExpiresAt string `json:"expires_at"`
	Status    string `json:"status"`
	Token     string `json:"token,omitempty"`
	Link      string `json:"link,omitempty"`
}

TeamInviteResource mirrors internal/api's teamInviteResource.

type TeamMemberResource added in v0.2.0

type TeamMemberResource struct {
	UserID      string `json:"user_id"`
	Email       string `json:"email"`
	DisplayName string `json:"display_name"`
	Role        string `json:"role"`
	CreatedAt   string `json:"created_at"`
}

TeamMemberResource mirrors internal/api's teamMemberResource.

type TeamResource added in v0.2.0

type TeamResource struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Default     bool   `json:"default"`
	Role        string `json:"role"`
	MemberCount int    `json:"member_count"`
	CreatedAt   string `json:"created_at"`
}

TeamResource mirrors internal/api's teamResource.

type TeamRoleResource added in v0.2.0

type TeamRoleResource struct {
	Name      string   `json:"name"`
	Abilities []string `json:"abilities"`
}

TeamRoleResource mirrors internal/api's teamRoleResource.

type TemplateInstallRequest added in v0.2.0

type TemplateInstallRequest struct {
	Name    string            `json:"name,omitempty"`
	Env     map[string]string `json:"env,omitempty"`
	Domains map[string]string `json:"domains,omitempty"`
}

TemplateInstallRequest is POST /api/v1/service-templates/{id}/install's body.

type TestNotificationChannelRequest

type TestNotificationChannelRequest struct {
	Kind      string `json:"kind"`
	NotifyURL string `json:"notify_url"`
}

TestNotificationChannelRequest mirrors internal/api's testNotificationChannelRequest.

type TimelineItem added in v0.2.0

type TimelineItem struct {
	ID     string       `json:"id"`
	At     string       `json:"at"`
	Kind   string       `json:"kind"`
	Status string       `json:"status"`
	Actor  string       `json:"actor"`
	Title  string       `json:"title"`
	Detail string       `json:"detail,omitempty"`
	Ref    *TimelineRef `json:"ref,omitempty"`
}

TimelineItem mirrors internal/api's timelineItem.

type TimelineRef added in v0.2.0

type TimelineRef struct {
	Type string `json:"type"`
	ID   string `json:"id"`
}

TimelineRef points at the record behind a timeline item.

type TimelineResponse added in v0.2.0

type TimelineResponse struct {
	Items      []TimelineItem `json:"items"`
	NextCursor string         `json:"next_cursor,omitempty"`
}

TimelineResponse mirrors internal/api's timelineResponse.

type TrafficCertCounts added in v0.2.0

type TrafficCertCounts struct {
	WindowDays     int `json:"window_days"`
	Expiring       int `json:"expiring"`
	Expired        int `json:"expired"`
	RenewalFailing int `json:"renewal_failing"`
}

TrafficCertCounts mirrors internal/api's trafficCertCounts.

type TrafficDomainCounts added in v0.2.0

type TrafficDomainCounts struct {
	Total          int `json:"total"`
	Live           int `json:"live"`
	Waiting        int `json:"waiting"`
	Propagating    int `json:"propagating"`
	NeedsAttention int `json:"needs_attention"`
	NotSetUp       int `json:"not_set_up"`
	Paused         int `json:"paused"`
	Unknown        int `json:"unknown"`
}

TrafficDomainCounts mirrors internal/api's trafficDomainCounts.

type TrafficSummary added in v0.2.0

type TrafficSummary struct {
	GeneratedAt         time.Time           `json:"generated_at"`
	Domains             TrafficDomainCounts `json:"domains"`
	Certificates        TrafficCertCounts   `json:"certificates"`
	DomainsNotResolving int                 `json:"domains_not_resolving"`
	ZonesNotDelegated   *int                `json:"zones_not_delegated,omitempty"`
	RoutesWithErrors    *int                `json:"routes_with_errors,omitempty"`
	Attention           int                 `json:"attention"`
	Unavailable         []string            `json:"unavailable,omitempty"`
}

TrafficSummary is GET /api/v1/traffic/summary's body.

type TriggerBackupRequest

type TriggerBackupRequest struct {
	TargetID string `json:"target_id"`
}

TriggerBackupRequest mirrors internal/api's triggerBackupRequest.

type TriggerBaseBackupRequest added in v0.2.0

type TriggerBaseBackupRequest struct {
	TargetID string `json:"target_id"`
}

TriggerBaseBackupRequest mirrors internal/api's triggerBaseBackupRequest.

type TriggerCloneRestoreRequest

type TriggerCloneRestoreRequest struct {
	BackupID  string            `json:"backup_id"`
	NewName   string            `json:"new_name"`
	Version   string            `json:"version,omitempty"`
	ProjectID string            `json:"project_id,omitempty"`
	Resources *ServiceResources `json:"resources,omitempty"`
}

TriggerCloneRestoreRequest mirrors internal/api's cloneRestoreRequest.

type TriggerPITRRestoreRequest added in v0.2.0

type TriggerPITRRestoreRequest struct {
	BaseBackupID string `json:"base_backup_id"`
	TargetTime   string `json:"target_time"`
}

TriggerPITRRestoreRequest mirrors internal/api's triggerPITRRestoreRequest.

type TriggerRestoreRequest

type TriggerRestoreRequest struct {
	BackupID string `json:"backup_id"`
}

TriggerRestoreRequest mirrors internal/api's triggerRestoreRequest.

type TriggerVolumeCloneRestoreRequest

type TriggerVolumeCloneRestoreRequest struct {
	BackupID      string `json:"backup_id"`
	NewVolumeName string `json:"new_volume_name,omitempty"`
}

TriggerVolumeCloneRestoreRequest mirrors internal/api's volumeCloneRestoreRequest.

type TrustedDevice added in v0.2.0

type TrustedDevice struct {
	ID         string    `json:"id"`
	Label      string    `json:"label"`
	IP         string    `json:"ip"`
	CreatedAt  time.Time `json:"created_at"`
	LastUsedAt time.Time `json:"last_used_at"`
	ExpiresAt  time.Time `json:"expires_at"`
	Current    bool      `json:"current"`
}

TrustedDevice mirrors internal/api's trustedDeviceResource.

type UndoResult added in v0.2.0

type UndoResult struct {
	AutomationRun
	Reverted []string `json:"reverted"`
	Skipped  []string `json:"skipped,omitempty"`
}

UndoResult is the response of an undo.

type UnmanagedContainerUse added in v0.2.0

type UnmanagedContainerUse struct {
	Name        string  `json:"name"`
	MemoryBytes float64 `json:"memory_bytes"`
}

UnmanagedContainerUse is one running container the platform does not manage.

type UpdateAIAssistantSettingsRequest added in v0.2.0

type UpdateAIAssistantSettingsRequest struct {
	Provider string `json:"provider"`
	Model    string `json:"model"`
	APIKey   string `json:"api_key"`
}

UpdateAIAssistantSettingsRequest mirrors internal/api's updateAIAssistantSettingsRequest: PUT /api/v1/settings/ai-assistant's request body. Provider must be "anthropic" server-side; all three fields are required.

type UpdateAIControlRequest added in v0.2.0

type UpdateAIControlRequest struct {
	Mode            string   `json:"mode"`
	AllowedEnvKinds []string `json:"allowed_env_kinds"`
}

UpdateAIControlRequest is the PUT /api/v1/settings/ai-control body.

type UpdateAlertRuleRequest added in v0.2.0

type UpdateAlertRuleRequest = CreateAlertRuleRequest

UpdateAlertRuleRequest is the same shape as CreateAlertRuleRequest: handleUpdateAlertRule reuses ruleResource.toRule for both, the same "one request type for create and update" shape ScheduledTaskRequest and FeatureFlagRequest already use for their own resources.

type UpdateBackupTargetRequest

type UpdateBackupTargetRequest struct {
	Name            string `json:"name"`
	Provider        string `json:"provider"`
	Endpoint        string `json:"endpoint,omitempty"`
	Region          string `json:"region,omitempty"`
	Bucket          string `json:"bucket"`
	AccessKeyID     string `json:"access_key_id,omitempty"`
	SecretAccessKey string `json:"secret_access_key,omitempty"`
}

UpdateBackupTargetRequest mirrors internal/api's updateBackupTargetRequest. Blank AccessKeyID/SecretAccessKey keep the target's existing stored credentials; set together, they rotate them.

type UpdateCloudflareDNSRequest

type UpdateCloudflareDNSRequest struct {
	Enabled bool   `json:"enabled"`
	Token   string `json:"token,omitempty"`
}

UpdateCloudflareDNSRequest mirrors internal/api's updateCloudflareDNSRequest. Token empty on an update means "leave the currently stored token unchanged".

type UpdateCloudflareTunnelRequest

type UpdateCloudflareTunnelRequest struct {
	Enabled bool   `json:"enabled"`
	Token   string `json:"token,omitempty"`
}

UpdateCloudflareTunnelRequest mirrors internal/api's updateCloudflareTunnelRequest. Token empty on an update means "leave the currently stored token unchanged".

type UpdateDNSRecordRequest added in v0.2.0

type UpdateDNSRecordRequest struct {
	Original DNSRecordResource `json:"original"`
	Record   DNSRecordResource `json:"record"`
}

UpdateDNSRecordRequest mirrors internal/api's updateDNSRecordRequest: PUT .../dns-records's body. Original must exactly match an existing record (name, type, and value all identical); Record is what it becomes.

type UpdateDockerGuardRequest added in v0.2.0

type UpdateDockerGuardRequest struct {
	Mode string `json:"mode"`
}

UpdateDockerGuardRequest is the PUT /api/v1/system/docker-guard body.

type UpdateEnvironmentRequest

type UpdateEnvironmentRequest struct {
	Protected bool `json:"protected"`
}

UpdateEnvironmentRequest mirrors internal/api's updateEnvironmentRequest (PATCH /api/v1/environments/{id}).

type UpdateExportDestinationRequest added in v0.2.0

type UpdateExportDestinationRequest struct {
	Name     *string            `json:"name,omitempty"`
	Endpoint *string            `json:"endpoint,omitempty"`
	Enabled  *bool              `json:"enabled,omitempty"`
	Apps     *[]string          `json:"apps,omitempty"`
	MinLevel *string            `json:"min_level,omitempty"`
	Options  *ExportOptions     `json:"options,omitempty"`
	Headers  *map[string]string `json:"headers,omitempty"`
	HMACKey  *string            `json:"hmac_key,omitempty"`
}

UpdateExportDestinationRequest is a partial update; nil fields are kept.

type UpdateMeshSettingsRequest added in v0.2.0

type UpdateMeshSettingsRequest struct {
	Enabled bool `json:"enabled"`
	Force   bool `json:"force,omitempty"`
}

UpdateMeshSettingsRequest is the PUT /api/v1/mesh/settings body.

type UpdateNetworkShareRequest added in v0.2.0

type UpdateNetworkShareRequest struct {
	Name         string `json:"name"`
	Protocol     string `json:"protocol"`
	Host         string `json:"host"`
	RemotePath   string `json:"remote_path"`
	MountOptions string `json:"mount_options,omitempty"`
	Username     string `json:"username,omitempty"`
	Password     string `json:"password,omitempty"`
}

UpdateNetworkShareRequest mirrors internal/api's updateNetworkShareRequest. A blank Password keeps the share's existing stored password; a non-blank one rotates it.

type UpdateNotificationChannelRequest added in v0.2.0

type UpdateNotificationChannelRequest = CreateNotificationChannelRequest

UpdateNotificationChannelRequest is the same shape as CreateNotificationChannelRequest: handleUpdateNotificationChannel reuses createNotificationChannelRequest.toChannel for both, the same "one request type for create and update" shape ScheduledTaskRequest and FeatureFlagRequest already use for their own resources.

type UpdateOAuthProviderSettingsRequest added in v0.2.0

type UpdateOAuthProviderSettingsRequest struct {
	Enabled            bool   `json:"enabled"`
	ClientID           string `json:"client_id"`
	ClientSecret       string `json:"client_secret,omitempty"`
	AllowedEmailDomain string `json:"allowed_email_domain"`
	IssuerURL          string `json:"issuer_url"`
	DisplayName        string `json:"display_name"`
}

UpdateOAuthProviderSettingsRequest mirrors internal/api's updateOAuthProviderSettingsRequest: PUT /api/v1/settings/oauth/{provider}'s request body. An empty ClientSecret leaves the currently stored secret unchanged.

type UpdatePreflight added in v0.2.0

type UpdatePreflight struct {
	CurrentVersion  string         `json:"current_version"`
	LatestVersion   *string        `json:"latest_version"`
	UpdateAvailable bool           `json:"update_available"`
	ReleaseURL      *string        `json:"release_url"`
	ReleaseNotes    string         `json:"release_notes"`
	Checks          []UpgradeCheck `json:"checks"`
	Blocked         bool           `json:"blocked"`
	Waiting         bool           `json:"waiting"`
	UpgradeCommand  string         `json:"upgrade_command"`
	RollbackCommand string         `json:"rollback_command"`
	CosignCommand   string         `json:"cosign_command"`
	ReleaseKind     string         `json:"release_kind,omitempty"`
	Channel         string         `json:"channel,omitempty"`
	Edge            *EdgeGuidance  `json:"edge,omitempty"`
}

UpdatePreflight is GET /api/v1/updates/preflight's response.

type UpdateRegistryCredentialRequest

type UpdateRegistryCredentialRequest struct {
	Name         string     `json:"name"`
	RegistryHost string     `json:"registry_host"`
	Username     string     `json:"username"`
	Password     string     `json:"password,omitempty"`
	ExpiresAt    *time.Time `json:"expires_at,omitempty"`
}

UpdateRegistryCredentialRequest mirrors internal/api's updateRegistryCredentialRequest. A blank Password keeps the credential's existing stored password; a non-blank one rotates it.

type UpdateRegistrySettingsRequest

type UpdateRegistrySettingsRequest struct {
	Enabled bool   `json:"enabled"`
	Host    string `json:"host,omitempty"`
}

UpdateRegistrySettingsRequest mirrors internal/api's updateRegistrySettingsRequest.

type UpdateRoute53DNSRequest added in v0.2.0

type UpdateRoute53DNSRequest struct {
	Enabled         bool   `json:"enabled"`
	Region          string `json:"region,omitempty"`
	HostedZoneID    string `json:"hosted_zone_id,omitempty"`
	AccessKeyID     string `json:"access_key_id,omitempty"`
	SecretAccessKey string `json:"secret_access_key,omitempty"`
}

UpdateRoute53DNSRequest mirrors internal/api's updateRoute53DNSRequest. AccessKeyID/SecretAccessKey empty on an update means "leave the currently stored credential unchanged"; the two are set together or not at all.

type UpdateSettingsResource added in v0.2.0

type UpdateSettingsResource struct {
	Channel           string `json:"channel"`
	AutoUpdateEnabled bool   `json:"auto_update_enabled"`
}

UpdateSettingsResource mirrors internal/api's updateSettingsResource (GET/PUT /api/v1/updates/settings): which release channel to compare against and whether to check for it in the background.

type UpdateUserAbilitiesRequest

type UpdateUserAbilitiesRequest struct {
	Abilities []string `json:"abilities,omitempty"`
	Role      string   `json:"role,omitempty"`
}

UpdateUserAbilitiesRequest mirrors internal/api's updateUserAbilitiesRequest, same Role/Abilities precedence as CreateUserRequest.

type UpdateVaultSettingsRequest added in v0.2.0

type UpdateVaultSettingsRequest struct {
	Enabled    bool   `json:"enabled"`
	Address    string `json:"address"`
	AuthMethod string `json:"auth_method"`
	Namespace  string `json:"namespace,omitempty"`
	RoleID     string `json:"role_id,omitempty"`
	MountPath  string `json:"mount_path,omitempty"`
	Credential string `json:"credential,omitempty"`
}

UpdateVaultSettingsRequest mirrors internal/api's updateVaultSettingsRequest. Credential empty on an update means "leave the currently stored credential unchanged".

type UpdatesResource

type UpdatesResource struct {
	CurrentVersion  string  `json:"current_version"`
	LatestVersion   *string `json:"latest_version"`
	UpdateAvailable bool    `json:"update_available"`
	ReleaseURL      *string `json:"release_url"`
	PublishedAt     *string `json:"published_at"`
	ReleaseKind     string  `json:"release_kind,omitempty"`
	Channel         string  `json:"channel,omitempty"`
	Image           *string `json:"image,omitempty"`
}

UpdatesResource mirrors internal/api's updateStatusResource (internal/api/updates.go): the running version compared against GitHub's latest published release. LatestVersion/ReleaseURL/PublishedAt are all nil when no release has ever been published.

type UpgradeBackupNowResult added in v0.2.0

type UpgradeBackupNowResult struct {
	Backup struct {
		Name      string `json:"name"`
		SizeBytes int64  `json:"size_bytes"`
		CreatedAt string `json:"created_at"`
	} `json:"backup"`
	Preflight UpdatePreflight `json:"preflight"`
}

UpgradeBackupNowResult is POST /api/v1/updates/backup-now's response.

type UpgradeCheck added in v0.2.0

type UpgradeCheck struct {
	Code      string      `json:"code"`
	Name      string      `json:"name"`
	Status    string      `json:"status"`
	Message   string      `json:"message"`
	Kind      string      `json:"kind"`
	Retryable bool        `json:"retryable"`
	Protects  string      `json:"protects"`
	Hint      string      `json:"hint"`
	Fix       *UpgradeFix `json:"fix"`
}

UpgradeCheck is one preflight result from GET /api/v1/updates/preflight.

type UpgradeFix added in v0.2.0

type UpgradeFix struct {
	Action  string `json:"action"`
	Command string `json:"command"`
}

UpgradeFix is the action that can clear a preflight check.

type UpgradeHistory added in v0.2.0

type UpgradeHistory struct {
	CurrentVersion string               `json:"current_version"`
	Unacknowledged int                  `json:"unacknowledged"`
	Entries        []UpgradeHistoryItem `json:"entries"`
	AgentChanges   []AgentVersionChange `json:"agent_changes"`
}

UpgradeHistory is GET /api/v1/updates/history's response.

type UpgradeHistoryItem added in v0.2.0

type UpgradeHistoryItem struct {
	ID                string  `json:"id"`
	Kind              string  `json:"kind"`
	FromVersion       string  `json:"from_version"`
	ToVersion         string  `json:"to_version"`
	Channel           string  `json:"channel"`
	SchemaBefore      *int    `json:"schema_before"`
	SchemaAfter       *int    `json:"schema_after"`
	SchemaMoved       bool    `json:"schema_moved"`
	OccurredAt        string  `json:"occurred_at"`
	Initiator         string  `json:"initiator"`
	Method            string  `json:"method"`
	BackupName        string  `json:"backup_name"`
	Health            string  `json:"health"`
	Notes             string  `json:"notes"`
	NotesState        string  `json:"notes_state"`
	ReleaseURL        string  `json:"release_url"`
	CompareURL        string  `json:"compare_url"`
	Acknowledged      bool    `json:"acknowledged"`
	AckedBy           string  `json:"acked_by"`
	AckedAt           *string `json:"acked_at"`
	RollbackAvailable bool    `json:"rollback_available"`
}

UpgradeHistoryItem is one recorded control plane version transition.

type UpgradePolicy added in v0.2.0

type UpgradePolicy struct {
	Mode                  string         `json:"mode"`
	Effective             string         `json:"effective"`
	WindowCron            string         `json:"window_cron"`
	WindowDurationMinutes int            `json:"window_duration_minutes"`
	Timezone              string         `json:"timezone"`
	MinReleaseAgeDays     int            `json:"min_release_age_days"`
	NotifyChannelIDs      []string       `json:"notify_channel_ids"`
	Paused                bool           `json:"paused"`
	UpdatedBy             string         `json:"updated_by"`
	UpdatedAt             string         `json:"updated_at"`
	Decision              string         `json:"decision"`
	DecisionTag           string         `json:"decision_tag"`
	DecisionAt            string         `json:"decision_at"`
	ServerTimezone        string         `json:"server_timezone"`
	NextWindow            *UpgradeWindow `json:"next_window"`
}

UpgradePolicy is the automatic upgrade policy.

type UpgradePolicyRequest added in v0.2.0

type UpgradePolicyRequest struct {
	Mode                  string   `json:"mode"`
	WindowCron            string   `json:"window_cron"`
	WindowDurationMinutes int      `json:"window_duration_minutes"`
	Timezone              string   `json:"timezone"`
	MinReleaseAgeDays     int      `json:"min_release_age_days"`
	NotifyChannelIDs      []string `json:"notify_channel_ids"`
	Paused                bool     `json:"paused"`
}

UpgradePolicyRequest is PUT /api/v1/updates/auto's body.

type UpgradeSchedule added in v0.2.0

type UpgradeSchedule struct {
	ID            string   `json:"id"`
	TargetVersion string   `json:"target_version"`
	Source        string   `json:"source"`
	Mode          string   `json:"mode"`
	State         string   `json:"state"`
	RunAt         string   `json:"run_at"`
	RetryUntil    string   `json:"retry_until"`
	Timezone      string   `json:"timezone"`
	Acked         []string `json:"acked"`
	MajorAcked    bool     `json:"major_acked"`
	CreatedBy     string   `json:"created_by"`
	CreatedAt     string   `json:"created_at"`
	CheckCount    int      `json:"check_count"`
	LastCheckAt   string   `json:"last_check_at"`
	LastReason    string   `json:"last_reason"`
	FiredAt       string   `json:"fired_at"`
	FinishedAt    string   `json:"finished_at"`
}

UpgradeSchedule is one scheduled control plane upgrade.

type UpgradeScheduleRequest added in v0.2.0

type UpgradeScheduleRequest struct {
	Target           string   `json:"target,omitempty"`
	At               string   `json:"at,omitempty"`
	AtLocal          string   `json:"at_local,omitempty"`
	Timezone         string   `json:"timezone,omitempty"`
	Window           bool     `json:"window,omitempty"`
	Ack              []string `json:"ack,omitempty"`
	AcknowledgeMajor bool     `json:"acknowledge_major,omitempty"`
	Replace          bool     `json:"replace,omitempty"`
}

UpgradeScheduleRequest is POST /api/v1/updates/schedule's body.

type UpgradeScheduleStatus added in v0.2.0

type UpgradeScheduleStatus struct {
	Available      bool              `json:"available"`
	ServerTimezone string            `json:"server_timezone"`
	Now            string            `json:"now"`
	Active         *UpgradeSchedule  `json:"active"`
	Recent         []UpgradeSchedule `json:"recent"`
	NextWindow     *UpgradeWindow    `json:"next_window"`
}

UpgradeScheduleStatus is GET /api/v1/updates/schedule's response.

type UpgradeWindow added in v0.2.0

type UpgradeWindow struct {
	Start  string `json:"start"`
	End    string `json:"end"`
	Source string `json:"source"`
	Active bool   `json:"active"`
}

UpgradeWindow is one opening of a maintenance window.

type UsageBudgets added in v0.2.0

type UsageBudgets struct {
	Budgets  []usagecost.BudgetStatus `json:"budgets"`
	Currency string                   `json:"currency"`
}

UsageBudgets is GET /api/v1/usage/budgets.

type UsageNodeInfo added in v0.2.0

type UsageNodeInfo struct {
	NodeID         string  `json:"node_id"`
	Name           string  `json:"name"`
	MonthlyPrice   float64 `json:"monthly_price"`
	VCPUs          float64 `json:"vcpus"`
	MemoryGiB      float64 `json:"memory_gib"`
	DetectedVCPUs  float64 `json:"detected_vcpus"`
	DetectedMemGiB float64 `json:"detected_memory_gib"`
	Priced         bool    `json:"priced"`
}

UsageNodeInfo is one node's bill and capacity in UsageSettings.

type UsageReport added in v0.2.0

type UsageReport struct {
	usagecost.Report
	Currency            string            `json:"currency"`
	Mode                string            `json:"mode"`
	Basis               string            `json:"basis"`
	Labels              map[string]string `json:"labels"`
	UnpricedNodes       []string          `json:"unpriced_nodes"`
	IncludesUnallocated bool              `json:"includes_unallocated"`
	Configured          bool              `json:"configured"`
	TelemetryAvailable  bool              `json:"telemetry_available"`
	GeneratedAt         string            `json:"generated_at"`
}

UsageReport is GET /api/v1/usage/report.

type UsageReportQuery added in v0.2.0

type UsageReportQuery struct {
	Period string
	From   string
	To     string
}

UsageReportQuery selects the period of a report.

type UsageSettings added in v0.2.0

type UsageSettings struct {
	Settings usagecost.Settings `json:"settings"`
	Nodes    []UsageNodeInfo    `json:"nodes"`
	Note     string             `json:"note"`
}

UsageSettings is GET/PUT /api/v1/usage/settings.

type UsageSettingsUpdate added in v0.2.0

type UsageSettingsUpdate struct {
	Settings     *usagecost.Settings    `json:"settings,omitempty"`
	Nodes        *[]usagecost.NodePrice `json:"nodes,omitempty"`
	RepriceMonth bool                   `json:"reprice_month,omitempty"`
}

UsageSettingsUpdate is the PUT body; nil fields are left unchanged.

type UseGitHubRepoAsSourceResponse added in v0.2.0

type UseGitHubRepoAsSourceResponse struct {
	GitSourceResource
	WebhookRegistered bool   `json:"webhook_registered"`
	WebhookError      string `json:"webhook_error,omitempty"`
}

UseGitHubRepoAsSourceResponse mirrors internal/api's useGitHubRepoAsSourceResponse: GitSourceResource plus whether the push webhook was actually auto-registered.

type UseRepoAsSourceRequest added in v0.2.0

type UseRepoAsSourceRequest struct {
	AppName     string `json:"app_name"`
	Branch      string `json:"branch,omitempty"`
	BuildType   string `json:"build_type,omitempty"`
	BuildPath   string `json:"build_path,omitempty"`
	TriggerMode string `json:"trigger_mode,omitempty"`
}

UseRepoAsSourceRequest mirrors internal/api's useRepoAsSourceRequest: the request body every provider's own use-as-source route shares (github-app, gitlab-app, bitbucket-app).

type UserResource

type UserResource struct {
	ID          string     `json:"id"`
	Email       string     `json:"email"`
	DisplayName string     `json:"display_name"`
	HasPassword bool       `json:"has_password"`
	Providers   []string   `json:"providers"`
	Abilities   []string   `json:"abilities"`
	Role        string     `json:"role,omitempty"`
	RoleID      string     `json:"role_id,omitempty"`
	IsFirstUser bool       `json:"is_first_user"`
	CreatedAt   time.Time  `json:"created_at"`
	LastLoginAt *time.Time `json:"last_login_at,omitempty"`
}

UserResource mirrors internal/api's userResource (internal/api/users.go).

type VaultSettingsResource added in v0.2.0

type VaultSettingsResource struct {
	Enabled       bool   `json:"enabled"`
	Address       string `json:"address"`
	AuthMethod    string `json:"auth_method"`
	Namespace     string `json:"namespace,omitempty"`
	RoleID        string `json:"role_id,omitempty"`
	MountPath     string `json:"mount_path"`
	HasCredential bool   `json:"has_credential"`
}

VaultSettingsResource mirrors internal/api's vaultSettingsResource (internal/api/vault_settings.go): GET/PUT/DELETE /api/v1/settings/vault's wire shape. The credential (a Vault token or AppRole secret ID, depending on AuthMethod) never appears here in either direction.

type VolumeBackupPolicyResource added in v0.2.0

type VolumeBackupPolicyResource struct {
	ServiceName   string `json:"service_name"`
	VolumeName    string `json:"volume_name"`
	RetainDaily   int    `json:"retain_daily"`
	RetainWeekly  int    `json:"retain_weekly"`
	RetainMonthly int    `json:"retain_monthly"`
	PreHook       string `json:"pre_hook"`
	PostHook      string `json:"post_hook"`
	Quiesce       string `json:"quiesce"`
}

VolumeBackupPolicyResource mirrors internal/api's volumeBackupPolicyResource.

type VolumeBackupScheduleResource

type VolumeBackupScheduleResource struct {
	ServiceName string `json:"service_name"`
	VolumeName  string `json:"volume_name"`
	TargetID    string `json:"target_id,omitempty"`
	Schedule    string `json:"schedule,omitempty"`
	Retain      int    `json:"retain,omitempty"`
	RetainDays  int    `json:"retain_days,omitempty"`
	SqlitePath  string `json:"sqlite_path,omitempty"`
}

VolumeBackupScheduleResource mirrors internal/api's volumeBackupScheduleResource (internal/api/app_volume_backups.go).

type VolumeCloneRestoreResource

type VolumeCloneRestoreResource struct {
	ID                string `json:"id"`
	SourceServiceName string `json:"source_service_name"`
	SourceVolumeName  string `json:"source_volume_name"`
	NewVolumeName     string `json:"new_volume_name"`
	BackupHistoryID   string `json:"backup_history_id"`
	Status            string `json:"status"`
	Error             string `json:"error,omitempty"`
	StartedAt         string `json:"started_at"`
	FinishedAt        string `json:"finished_at,omitempty"`
}

VolumeCloneRestoreResource mirrors internal/api's volumeCloneRestoreResource (internal/api/app_volume_clone_restore.go): one "restore as new volume" attempt.

type VolumeGuide added in v0.2.0

type VolumeGuide struct {
	App           string `json:"app"`
	Kind          string `json:"kind"`
	Source        string `json:"source"`
	Target        string `json:"target"`
	ContainerPath string `json:"container_path"`
	Command       string `json:"command"`
}

VolumeGuide is a command to run on the target node to copy one volume.

type VolumeGuideResponse added in v0.2.0

type VolumeGuideResponse struct {
	Source  string        `json:"source"`
	Guides  []VolumeGuide `json:"guides"`
	Warning string        `json:"warning"`
}

VolumeGuideResponse is the volume copy guide.

type VolumeRestoreToRequest added in v0.2.0

type VolumeRestoreToRequest struct {
	BackupID      string `json:"backup_id"`
	NewVolumeName string `json:"new_volume_name,omitempty"`
	TargetApp     string `json:"target_app,omitempty"`
	NodeID        string `json:"node_id,omitempty"`
}

VolumeRestoreToRequest is POST .../volumes/{volume}/restore-to's body.

type VolumeRestoreToResponse added in v0.2.0

type VolumeRestoreToResponse struct {
	ID            string `json:"id"`
	NewVolumeName string `json:"new_volume_name"`
	NodeID        string `json:"node_id"`
}

VolumeRestoreToResponse is the 202 body of restore-to.

type VulnCounts added in v0.2.0

type VulnCounts struct {
	Critical int `json:"critical"`
	High     int `json:"high"`
	Medium   int `json:"medium"`
	Low      int `json:"low"`
	Unknown  int `json:"unknown"`
}

VulnCounts is the number of findings per severity.

type VulnGate added in v0.2.0

type VulnGate struct {
	Action string `json:"action"`
	Reason string `json:"reason,omitempty"`
}

VulnGate is the gate decision of a VulnReport.

type VulnReport added in v0.2.0

type VulnReport struct {
	DeploymentID string    `json:"deployment_id"`
	Scan         VulnScan  `json:"scan"`
	Gate         *VulnGate `json:"gate,omitempty"`
}

VulnReport is GET .../deployments/{id}/vulnerabilities' body.

type VulnScan added in v0.2.0

type VulnScan struct {
	Status    string          `json:"status"`
	Scanner   string          `json:"scanner,omitempty"`
	ScannedAt *time.Time      `json:"scanned_at,omitempty"`
	Error     string          `json:"error,omitempty"`
	Counts    *VulnCounts     `json:"counts,omitempty"`
	Fixable   int             `json:"fixable"`
	Top       []Vulnerability `json:"top"`
}

VulnScan is the scan half of a VulnReport.

type Vulnerability added in v0.2.0

type Vulnerability struct {
	ID           string `json:"id"`
	Package      string `json:"package"`
	Version      string `json:"version,omitempty"`
	FixedVersion string `json:"fixed_version,omitempty"`
	Severity     string `json:"severity"`
	Title        string `json:"title,omitempty"`
}

Vulnerability is one scanner finding.

type WALShipResource added in v0.2.0

type WALShipResource struct {
	LastAttemptAt string `json:"last_attempt_at,omitempty"`
	LastSuccessAt string `json:"last_success_at,omitempty"`
	LastError     string `json:"last_error,omitempty"`
	Shipped       int    `json:"shipped"`
	TargetID      string `json:"target_id,omitempty"`
}

WALShipResource mirrors internal/api's walShipResource.

type WaitOptions added in v0.2.0

type WaitOptions struct {
	// Interval is the poll period.
	Interval time.Duration
	// Window caps how long this call blocks; zero means until ctx ends.
	Window time.Duration
}

WaitOptions bounds one WaitForDeploy call.

type WaitResult added in v0.2.0

type WaitResult struct {
	Deploy DeployAttemptResource
	// Done is false when the window elapsed before the deploy finished.
	Done bool
}

WaitResult is the last state WaitForDeploy observed.

type WebhookDeliveryResource

type WebhookDeliveryResource struct {
	ID               string    `json:"id"`
	ServiceName      string    `json:"service_name"`
	Provider         string    `json:"provider"`
	EventType        string    `json:"event_type"`
	SignatureValid   bool      `json:"signature_valid"`
	Matched          bool      `json:"matched"`
	StatusCode       int       `json:"status_code"`
	Payload          string    `json:"payload"`
	PayloadTruncated bool      `json:"payload_truncated"`
	Error            string    `json:"error,omitempty"`
	Note             string    `json:"note,omitempty"`
	ReceivedAt       time.Time `json:"received_at"`
}

WebhookDeliveryResource mirrors internal/api's webhookDeliveryResource (internal/api/webhook_deliveries.go): one recorded inbound git-provider webhook request.

type WhoamiResource added in v0.2.0

type WhoamiResource struct {
	Kind      string   `json:"kind"`
	Name      string   `json:"name"`
	Abilities []string `json:"abilities"`
	ExpiresAt string   `json:"expires_at"`
}

WhoamiResource mirrors internal/api's whoamiResponse (internal/api/whoami.go).

Source Files

Jump to

Keyboard shortcuts

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