Documentation
¶
Index ¶
- Constants
- Variables
- type APIError
- type AlertEpisode
- type AlertHistory
- type App
- type AppBucketBinding
- type AppConfig
- type AppStatus
- type AppVersion
- type AppWebhook
- type AuditEntry
- type BackupConfig
- type BackupDestination
- type BackupDestinationRun
- type BackupProblem
- type BillingBinding
- type BillingBudget
- type BillingBudgetAlert
- type BindBucketRequest
- type Bucket
- type BucketCORSRule
- type BucketCORSRuleRequest
- type BucketCredentials
- type BucketKey
- type BucketLifecycleRule
- type BucketSessionCredentials
- type BucketStatus
- type BudgetView
- type Client
- func (c *Client) AddBucketDomain(ctx context.Context, bucketID, domain string) (*Domain, error)
- func (c *Client) AddDomain(ctx context.Context, appID, domain, mode string) (*Domain, error)
- func (c *Client) AlertHistory(ctx context.Context, window, name string) (*AlertHistory, error)
- func (c *Client) ApplyRetention(ctx context.Context, projectID string) (*RetentionPreview, error)
- func (c *Client) BindAppBucket(ctx context.Context, appID, bucketID string, readOnly bool) (*AppBucketBinding, error)
- func (c *Client) ClearBucketCORSRules(ctx context.Context, id string) error
- func (c *Client) ClearBucketLifecycleRules(ctx context.Context, id string) error
- func (c *Client) ClusterInfo(ctx context.Context) (*ClusterInfo, error)
- func (c *Client) CreateApp(ctx context.Context, projectID string, req CreateAppRequest) (*App, error)
- func (c *Client) CreateBackup(ctx context.Context, dbID string) (*DatabaseBackup, error)
- func (c *Client) CreateBucket(ctx context.Context, projectID string, req CreateBucketRequest) (*Bucket, error)
- func (c *Client) CreateBucketKey(ctx context.Context, bucketID string, req CreateBucketKeyRequest) (*BucketKey, error)
- func (c *Client) CreateDatabase(ctx context.Context, projectID string, req CreateDatabaseRequest) (*Database, error)
- func (c *Client) CreateJob(ctx context.Context, projectID string, req CreateJobRequest) (*Job, error)
- func (c *Client) CreateOrg(ctx context.Context, name, displayName, shortID string) (*Organization, error)
- func (c *Client) CreateOrgSecret(ctx context.Context, orgID, name string, data map[string]string, ...) (*OrgSecret, error)
- func (c *Client) CreateProject(ctx context.Context, req CreateProjectRequest) (*Project, error)
- func (c *Client) CreateProjectInOrg(ctx context.Context, orgID string, req CreateProjectRequest) (*Project, error)
- func (c *Client) CreateRunner(ctx context.Context, projectID string, req CreateRunnerRequest) (*Runner, error)
- func (c *Client) CreateServiceAccount(ctx context.Context, projectID string, req CreateServiceAccountRequest) (*ServiceAccount, error)
- func (c *Client) CreateServiceAccountKey(ctx context.Context, saID string) (*ServiceAccountKey, error)
- func (c *Client) CreateTrustBinding(ctx context.Context, projectID string, req CreateTrustBindingRequest) (*TrustBinding, error)
- func (c *Client) DeleteApp(ctx context.Context, id string) error
- func (c *Client) DeleteBackup(ctx context.Context, dbID, name string) error
- func (c *Client) DeleteBackupDestination(ctx context.Context, dbID string) error
- func (c *Client) DeleteBucket(ctx context.Context, id string) error
- func (c *Client) DeleteBucketKey(ctx context.Context, bucketID, accessKeyID string) error
- func (c *Client) DeleteBucketLifecycleRule(ctx context.Context, id, prefix string) error
- func (c *Client) DeleteBucketObject(ctx context.Context, bucketID, key string) error
- func (c *Client) DeleteBudget(ctx context.Context, orgID string) error
- func (c *Client) DeleteDatabase(ctx context.Context, id string) error
- func (c *Client) DeleteJob(ctx context.Context, id string) error
- func (c *Client) DeleteOrgSecret(ctx context.Context, orgID, name string) error
- func (c *Client) DeleteProject(ctx context.Context, id string) (*Project, error)
- func (c *Client) DeleteRegistryTag(ctx context.Context, projectID, repo, tag string) error
- func (c *Client) DeleteRetentionPolicy(ctx context.Context, projectID, repo string) error
- func (c *Client) DeleteRunner(ctx context.Context, id string) error
- func (c *Client) DeleteServiceAccount(ctx context.Context, id string) error
- func (c *Client) DeleteServiceAccountKey(ctx context.Context, saID, keyID string) error
- func (c *Client) DeleteTrustBinding(ctx context.Context, projectID, bindingID string) error
- func (c *Client) DeployApp(ctx context.Context, id string, req DeployRequest) (*App, error)
- func (c *Client) DialTunnel(ctx context.Context, databaseID string) (*websocket.Conn, error)
- func (c *Client) DisconnectGitHub(ctx context.Context, projectID string) error
- func (c *Client) FKECredentials(ctx context.Context, projectID string) (*ClusterCredentials, error)
- func (c *Client) FKEToken(ctx context.Context, projectID string) (*ClusterToken, error)
- func (c *Client) GetApp(ctx context.Context, id string) (*App, error)
- func (c *Client) GetAppLogs(ctx context.Context, id string, req LogsRequest) (io.ReadCloser, error)
- func (c *Client) GetAppVersion(ctx context.Context, id string) (*AppVersion, error)
- func (c *Client) GetBackupConfig(ctx context.Context, dbID string) (*BackupConfig, error)
- func (c *Client) GetBackupDestination(ctx context.Context, dbID string) (*BackupDestination, error)
- func (c *Client) GetBillingEstimate(ctx context.Context, orgID, query string) (*RatedPeriod, error)
- func (c *Client) GetBucket(ctx context.Context, id string) (*Bucket, error)
- func (c *Client) GetBucketCredentials(ctx context.Context, id string) (*BucketCredentials, error)
- func (c *Client) GetBudget(ctx context.Context, orgID string) (*BudgetView, error)
- func (c *Client) GetDatabase(ctx context.Context, id string) (*Database, error)
- func (c *Client) GetDatabaseConnection(ctx context.Context, id string) (*DatabaseConnection, error)
- func (c *Client) GetDeployment(ctx context.Context, appID, deploymentID string) (*Deployment, error)
- func (c *Client) GetGitHubConnection(ctx context.Context, projectID string) (*GitHubConnection, error)
- func (c *Client) GetInvoice(ctx context.Context, orgID, invoiceID string) (*Invoice, error)
- func (c *Client) GetJob(ctx context.Context, id string) (*Job, error)
- func (c *Client) GetJobLogs(ctx context.Context, id, runName string) (string, error)
- func (c *Client) GetMe(ctx context.Context) (*MeResponse, error)
- func (c *Client) GetOrg(ctx context.Context, id string) (*Organization, error)
- func (c *Client) GetOrgSecret(ctx context.Context, orgID, name string, reveal bool) (*OrgSecret, error)
- func (c *Client) GetProject(ctx context.Context, id string) (*Project, error)
- func (c *Client) GetRunner(ctx context.Context, id string) (*Runner, error)
- func (c *Client) GetTraffic(ctx context.Context, appID string) ([]TrafficTarget, error)
- func (c *Client) GetWebhook(ctx context.Context, appID string) (*AppWebhook, error)
- func (c *Client) GrantBillingBinding(ctx context.Context, orgID, member, memberType, role string) (*BillingBinding, error)
- func (c *Client) InviteOrgMember(ctx context.Context, orgID, email, role string) (*OrgMember, error)
- func (c *Client) ListAppBuckets(ctx context.Context, appID string) ([]*AppBucketBinding, error)
- func (c *Client) ListApps(ctx context.Context, projectID string) ([]*App, error)
- func (c *Client) ListAudit(ctx context.Context, query string) ([]*AuditEntry, error)
- func (c *Client) ListBackups(ctx context.Context, dbID string) ([]DatabaseBackup, error)
- func (c *Client) ListBillingBindings(ctx context.Context, orgID string) ([]*BillingBinding, error)
- func (c *Client) ListBucketCORSRules(ctx context.Context, id string) ([]*BucketCORSRule, error)
- func (c *Client) ListBucketDomains(ctx context.Context, bucketID string) ([]*Domain, error)
- func (c *Client) ListBucketKeys(ctx context.Context, bucketID string) ([]*BucketKey, error)
- func (c *Client) ListBucketLifecycleRules(ctx context.Context, id string) ([]*BucketLifecycleRule, error)
- func (c *Client) ListBucketObjects(ctx context.Context, bucketID, prefix string) (*ObjectListing, error)
- func (c *Client) ListBuckets(ctx context.Context, projectID string) ([]*Bucket, error)
- func (c *Client) ListConfig(ctx context.Context, appID string) ([]*AppConfig, error)
- func (c *Client) ListDatabases(ctx context.Context, projectID string) ([]*Database, error)
- func (c *Client) ListDeployments(ctx context.Context, appID string) ([]*Deployment, error)
- func (c *Client) ListDomains(ctx context.Context, appID string) ([]*Domain, error)
- func (c *Client) ListIAMBindings(ctx context.Context, projectID string) ([]*IAMBinding, error)
- func (c *Client) ListInvoices(ctx context.Context, orgID string) ([]*Invoice, error)
- func (c *Client) ListJobRuns(ctx context.Context, id string) ([]*JobRun, error)
- func (c *Client) ListJobs(ctx context.Context, projectID string) ([]*Job, error)
- func (c *Client) ListOrgMembers(ctx context.Context, orgID string) ([]*OrgMember, error)
- func (c *Client) ListOrgSecrets(ctx context.Context, orgID string) ([]*OrgSecret, error)
- func (c *Client) ListOrgUsage(ctx context.Context, orgID, query string) ([]*UsageEntry, error)
- func (c *Client) ListOrgs(ctx context.Context) ([]*Organization, error)
- func (c *Client) ListPrices(ctx context.Context) ([]*Price, error)
- func (c *Client) ListProjectUsage(ctx context.Context, projectID, query string) ([]*UsageEntry, error)
- func (c *Client) ListProjects(ctx context.Context) ([]*Project, error)
- func (c *Client) ListProjectsInOrg(ctx context.Context, orgID string) ([]*Project, error)
- func (c *Client) ListRegistryRepositories(ctx context.Context, projectID string) ([]RegistryRepository, error)
- func (c *Client) ListRegistryTags(ctx context.Context, projectID, repo string) (*RegistryTagList, error)
- func (c *Client) ListRegistryVisibility(ctx context.Context, projectID string) ([]*RegistryRepoVisibility, error)
- func (c *Client) ListRetentionPolicies(ctx context.Context, projectID string) ([]*RegistryRetentionPolicy, error)
- func (c *Client) ListRevisions(ctx context.Context, appID string) ([]Revision, error)
- func (c *Client) ListRunners(ctx context.Context, projectID string) ([]*Runner, error)
- func (c *Client) ListServiceAccountKeys(ctx context.Context, saID string) ([]*ServiceAccountKey, error)
- func (c *Client) ListServiceAccounts(ctx context.Context, projectID string) ([]*ServiceAccount, error)
- func (c *Client) ListTrustBindings(ctx context.Context, projectID string) ([]*TrustBinding, error)
- func (c *Client) MintBucketSessionCredentials(ctx context.Context, id string) (*BucketSessionCredentials, error)
- func (c *Client) MoveProject(ctx context.Context, id string, force bool) (*MoveProjectResult, error)
- func (c *Client) PresignBucketObject(ctx context.Context, bucketID string, req PresignObjectRequest) (*PresignResponse, error)
- func (c *Client) PreviewRetention(ctx context.Context, projectID string) (*RetentionPreview, error)
- func (c *Client) ProjectStatus(ctx context.Context, projectID, ifNoneMatch string) (*ProjectStatus, string, error)
- func (c *Client) ProvisionUser(ctx context.Context, orgID, email, name, role string) (*RegisterResponse, error)
- func (c *Client) PublishWebsiteVersion(ctx context.Context, id string, version int) (*Bucket, error)
- func (c *Client) ReconcileApp(ctx context.Context, id string) (*App, error)
- func (c *Client) RemoveBucketDomain(ctx context.Context, bucketID, domain string) error
- func (c *Client) RemoveDomain(ctx context.Context, appID string, domain string) error
- func (c *Client) RemoveIAMBinding(ctx context.Context, projectID, bindingID string) error
- func (c *Client) RemoveOrgMember(ctx context.Context, orgID, userID string) error
- func (c *Client) RemoveWebhook(ctx context.Context, appID string) error
- func (c *Client) RestoreBackupDestination(ctx context.Context, dbID, object string) (*BackupDestinationRun, error)
- func (c *Client) RestoreDatabase(ctx context.Context, dbID string, req RestoreRequest) (*Database, error)
- func (c *Client) RevokeBillingBinding(ctx context.Context, orgID, member, memberType string) error
- func (c *Client) RollbackApp(ctx context.Context, id string, req RollbackRequest) (*App, error)
- func (c *Client) RunBackupDestination(ctx context.Context, dbID string) (*BackupDestinationRun, error)
- func (c *Client) RunJob(ctx context.Context, id string) (*JobRun, error)
- func (c *Client) ScaleApp(ctx context.Context, id string, req ScaleRequest) (*App, error)
- func (c *Client) SetAppDatabase(ctx context.Context, id, databaseRef string) (*App, error)
- func (c *Client) SetAppKubeServiceAccount(ctx context.Context, id, serviceAccount string) (*App, error)
- func (c *Client) SetAppSecurityContext(ctx context.Context, id string, sc *SecurityContext) (*App, error)
- func (c *Client) SetBackupDestination(ctx context.Context, dbID string, req SetBackupDestinationRequest) (*BackupDestination, error)
- func (c *Client) SetBucketCORSRules(ctx context.Context, id string, req SetBucketCORSRequest) ([]*BucketCORSRule, error)
- func (c *Client) SetBucketLifecycleRule(ctx context.Context, id string, req SetBucketLifecycleRuleRequest) (*BucketLifecycleRule, error)
- func (c *Client) SetBucketQuota(ctx context.Context, id string, maxSize, maxObjects int64) (*Bucket, error)
- func (c *Client) SetBucketURLSlug(ctx context.Context, id, slug string) (*Bucket, error)
- func (c *Client) SetBucketWebsite(ctx context.Context, id string, req SetBucketWebsiteRequest) (*Bucket, error)
- func (c *Client) SetBudget(ctx context.Context, orgID string, req SetBudgetRequest) (*BillingBudget, error)
- func (c *Client) SetConfig(ctx context.Context, appID, key, value string, isSecret bool) (*AppConfig, error)
- func (c *Client) SetDomainRoutes(ctx context.Context, appID, domain string, routes []DomainRoute) (*Domain, error)
- func (c *Client) SetIAMBinding(ctx context.Context, projectID string, req SetIAMBindingRequest) (*IAMBinding, error)
- func (c *Client) SetRegistryVisibility(ctx context.Context, projectID string, req SetRegistryVisibilityRequest) (*RegistryRepoVisibility, error)
- func (c *Client) SetRetentionPolicy(ctx context.Context, projectID string, req SetRetentionPolicyRequest) (*RegistryRetentionPolicy, error)
- func (c *Client) SetTraffic(ctx context.Context, appID string, targets []TrafficTarget) ([]TrafficTarget, error)
- func (c *Client) SetupWebhook(ctx context.Context, appID string, req SetupWebhookRequest) (*AppWebhook, error)
- func (c *Client) StartGitHubConnect(ctx context.Context, projectID, account string) (*GitHubConnectStart, error)
- func (c *Client) SwitchMode(ctx context.Context, id, mode string) (*App, error)
- func (c *Client) UnbindAppBucket(ctx context.Context, appID, bucketID string) error
- func (c *Client) UnsetConfig(ctx context.Context, appID, key string) error
- func (c *Client) UpdateAppCommand(ctx context.Context, id string, command, args, releaseCommand *[]string) (*App, error)
- func (c *Client) UpdateAppDisplayName(ctx context.Context, id, displayName string) (*App, error)
- func (c *Client) UpdateAppProbes(ctx context.Context, id string, probes *ProbeOverrides) (*App, error)
- func (c *Client) UpdateAppRoutes(ctx context.Context, id string, routes []Route) (*App, error)
- func (c *Client) UpdateAppStorage(ctx context.Context, id, storage string) (*App, error)
- func (c *Client) UpdateAppURLSlug(ctx context.Context, id, slug string) (*App, error)
- func (c *Client) UpdateBackupConfig(ctx context.Context, dbID string, req UpdateBackupConfigRequest) error
- func (c *Client) UpdateBucketKeyPermissions(ctx context.Context, bucketID, accessKeyID string, ...) (*BucketKey, error)
- func (c *Client) UpdateDatabase(ctx context.Context, id string, req UpdateDatabaseRequest) (*Database, error)
- func (c *Client) UpdateJob(ctx context.Context, id string, req UpdateJobRequest) (*Job, error)
- func (c *Client) UpdateOrgDisplayName(ctx context.Context, id, displayName string) (*Organization, error)
- func (c *Client) UpdateOrgFKE(ctx context.Context, id string, enabled bool) (*Organization, error)
- func (c *Client) UpdateOrgMemberRole(ctx context.Context, orgID, userID, role string) error
- func (c *Client) UpdateOrgSecret(ctx context.Context, orgID, name string, data map[string]string, ...) (*OrgSecret, error)
- func (c *Client) UpdateProjectDisplayName(ctx context.Context, id, displayName string) (*Project, error)
- func (c *Client) UpdateProjectEgress(ctx context.Context, id, egress string) (*Project, error)
- func (c *Client) UpdateProjectQuota(ctx context.Context, id string, maxCPU, maxMemory *string, maxPods *int, ...) (*Project, error)
- func (c *Client) UpdateRunner(ctx context.Context, id string, req UpdateRunnerRequest) (*Runner, error)
- func (c *Client) UpdateRunnerBuilder(ctx context.Context, id string, builder *RunnerBuilder) (*Runner, error)
- func (c *Client) UpdateServiceAccountDisplayName(ctx context.Context, id, displayName string) (*ServiceAccount, error)
- func (c *Client) VerifyBucketDomain(ctx context.Context, bucketID, domain string) (*DomainVerification, error)
- func (c *Client) VerifyDomain(ctx context.Context, appID string, domain string) (*DomainVerification, error)
- func (c *Client) WaitProjectDeleted(ctx context.Context, id string, interval time.Duration) error
- type ClusterCredentials
- type ClusterInfo
- type ClusterToken
- type ConfigCount
- type CreateAppRequest
- type CreateBucketKeyRequest
- type CreateBucketRequest
- type CreateDatabaseRequest
- type CreateJobRequest
- type CreateProjectRequest
- type CreateRunnerRequest
- type CreateServiceAccountRequest
- type CreateTrustBindingRequest
- type Database
- type DatabaseBackup
- type DatabaseConnection
- type DatabaseStatus
- type DeployRequest
- type Deployment
- type Domain
- type DomainRequest
- type DomainRoute
- type DomainStatus
- type DomainVerification
- type GitHubConnectStart
- type GitHubConnection
- type GrantBillingBindingRequest
- type IAMBinding
- type InviteOrgMemberRequest
- type Invoice
- type InvoiceLineItem
- type Job
- type JobRun
- type JobRunStatus
- type JobStatus
- type LogsRequest
- type MeResponse
- type MoveProjectResult
- type ObjectInfo
- type ObjectListing
- type OrgMember
- type OrgSecret
- type Organization
- type PodPhases
- type PresignObjectRequest
- type PresignResponse
- type Price
- type ProbeOverrides
- type ProbeSpec
- type Project
- type ProjectStatus
- type ProvisionUserRequest
- type PublishBucketWebsiteRequest
- type RatedLine
- type RatedPeriod
- type RegisterResponse
- type RegistryImage
- type RegistryImageList
- type RegistryRepoVisibility
- type RegistryRepository
- type RegistryRetentionPolicy
- type RegistryTagList
- type RegistryVulnerabilities
- type RestoreRequest
- type RetentionPreview
- type RetentionPreviewItem
- type Revision
- type RollbackRequest
- type RolloutStatus
- type Route
- type Runner
- type RunnerBuilder
- type RunnerStatus
- type ScaleRequest
- type SecurityContext
- type ServiceAccount
- type ServiceAccountKey
- type SetBackupDestinationRequest
- type SetBucketCORSRequest
- type SetBucketLifecycleRuleRequest
- type SetBucketQuotaRequest
- type SetBucketURLSlugRequest
- type SetBucketWebsiteRequest
- type SetBudgetRequest
- type SetConfigRequest
- type SetDomainRoutesRequest
- type SetIAMBindingRequest
- type SetKubeServiceAccountRequest
- type SetOrgFKERequest
- type SetQuotaRequest
- type SetRegistryVisibilityRequest
- type SetRetentionPolicyRequest
- type SetSecurityContextRequest
- type SetTrafficRequest
- type SetupWebhookRequest
- type StatusProblem
- type StatusProject
- type SwitchModeRequest
- type TrafficResponse
- type TrafficTarget
- type TrustBinding
- type UncheckedStatus
- type UpdateAppRequest
- type UpdateBackupConfigRequest
- type UpdateBucketKeyPermissionsRequest
- type UpdateCommandRequest
- type UpdateDatabaseRequest
- type UpdateJobRequest
- type UpdateOrgMemberRoleRequest
- type UpdateOrgRequest
- type UpdateProbesRequest
- type UpdateProjectRequest
- type UpdateRoutesRequest
- type UpdateRunnerBuilderRequest
- type UpdateRunnerRequest
- type UpdateServiceAccountRequest
- type UpdateStorageRequest
- type UsageEntry
- type User
- type VolumeMount
Constants ¶
const ( BillingViewer = "billing.viewer" BillingAdmin = "billing.admin" )
Billing roles (#114).
const ( DomainModeVerified = "verified" DomainModeEdge = "edge" DomainModeOnDemand = "on_demand" DomainModeWildcard = "wildcard" )
Domain attachment modes (ADR-044).
const ( JobTargetContainer = "container" JobTargetHTTP = "http" )
Job target types.
const ClientVersionHeader = "X-Fpcloud-Client-Version"
ClientVersionHeader carries the caller's client-library version on every request. A deployment states the oldest client it serves and refuses anything below it with 426, so a stale binary is diagnosed by name instead of failing somewhere downstream as a request the API cannot parse.
Variables ¶
var ErrClientTooOld = errors.New("client too old")
ErrClientTooOld is a sentinel matched via errors.Is against an *APIError with a 426 status: this client is older than the deployment serves, and no request it makes will be answered until it is upgraded. Every other reading of the same failure — a bad flag, a malformed body, a missing resource — is wrong, which is the whole reason the deployment states a minimum rather than letting the request fail on its own terms.
var ErrNotFound = errors.New("not found")
ErrNotFound is a sentinel matched via errors.Is against an *APIError with a 404 status. It lets callers branch on "the API doesn't know this route/resource" — e.g. the CLI falling back to embedded cluster constants against an older API that lacks the FKE credentials endpoint.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
APIError represents an error response from the API. It supports both the new nested format {"error":{"code":"...","message":"..."}} and the legacy flat format {"error":"message"}.
func (*APIError) Is ¶
Is reports whether target is one of this package's sentinels and this error carries the matching status, so errors.Is works on responses from do().
func (*APIError) UnmarshalJSON ¶
UnmarshalJSON implements custom JSON unmarshaling to handle both the new nested error format and the legacy flat format.
type AlertEpisode ¶ added in v0.141.0
type AlertEpisode struct {
Alert string `json:"alert"`
Severity string `json:"severity,omitempty"`
// Namespace and Target locate what fired. Empty means the rule carried no
// such label — an alert about the node or the cluster is scoped to neither.
Namespace string `json:"namespace,omitempty"`
Target string `json:"target,omitempty"`
Labels map[string]string `json:"labels,omitempty"`
StartedAt time.Time `json:"started_at"`
EndedAt time.Time `json:"ended_at"`
// Firing means the episode was still open when observation stopped, so
// EndedAt is the end of the window and not where the alert cleared.
Firing bool `json:"firing"`
}
AlertEpisode is one continuous stretch of one alert firing, as the control plane derives it from Prometheus's ALERTS series.
Nothing stores this: Alertmanager keeps no history and Slack keeps only what was delivered, so an episode is reconstructed per request from the samples Prometheus wrote on each rule evaluation.
type AlertHistory ¶ added in v0.141.0
type AlertHistory struct {
From time.Time `json:"from"`
To time.Time `json:"to"`
StepSeconds int `json:"step_seconds"`
Episodes []AlertEpisode `json:"episodes"`
}
AlertHistory is what fired over one window.
From/To describe the observation rather than the request: a window longer than Prometheus retention comes back as the part that still exists, which is what keeps an empty answer from reading as "this never fired".
type App ¶
type App struct {
ID string `json:"id"`
ProjectID string `json:"project_id"`
Name string `json:"name"`
DisplayName string `json:"display_name"`
URLSlug string `json:"url_slug"` // optional vanity host override (ADR-040); empty = derived host
DatabaseID string `json:"database_id,omitempty"` // database DATABASE_URL points at (#544); empty = the project's sole database, or none when it has several
Image string `json:"image"`
Release string `json:"release,omitempty"` // user-named release currently live (#471)
Command []string `json:"command,omitempty"` // container entrypoint override (empty = image ENTRYPOINT)
Args []string `json:"args,omitempty"` // container arguments (empty = image CMD)
ReleaseCommand []string `json:"release_command,omitempty"` // run once per deploy, before the new version goes live
Status string `json:"status"`
URL string `json:"url"`
Domains []string `json:"domains"`
Replicas int `json:"replicas"`
MinScale int32 `json:"min_scale"`
MaxScale int32 `json:"max_scale"`
CPULimit string `json:"cpu_limit"`
MemoryLimit string `json:"memory_limit"`
Ingress string `json:"ingress"`
Routes []Route `json:"routes,omitempty"` // per-path visibility carve-outs (#501)
Mode string `json:"mode"`
Type string `json:"type"` // "web" (HTTP service) or "worker" (no port, Service or hostname)
Port int `json:"port"` // the API decides it — 8080 on a web app, 0 on a worker
Storage string `json:"storage"`
KubeServiceAccount string `json:"kube_service_account,omitempty"`
StoragePath string `json:"storage_path"`
ServiceAccountID string `json:"service_account_id,omitempty"`
HealthCheckPath string `json:"health_check_path"`
HealthCheckTimeout int `json:"health_check_timeout"`
HealthCheckInterval int `json:"health_check_interval"`
HealthCheckRetries int `json:"health_check_retries"`
Probes *ProbeOverrides `json:"probes,omitempty"` // per-probe path/timing overrides (#453); nil = every probe uses the HealthCheck* shorthand
VolumeMounts []VolumeMount `json:"volume_mounts"` // ConfigMap/Secret/emptyDir mounts (empty = none)
SecurityContext *SecurityContext `json:"security_context,omitempty"` // pod/container hardening (nil = image default)
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
App represents a deployed application.
type AppBucketBinding ¶
type AppBucketBinding struct {
AppID string `json:"app_id"`
BucketID string `json:"bucket_id"`
BucketName string `json:"bucket_name,omitempty"`
Endpoint string `json:"endpoint,omitempty"`
Region string `json:"region,omitempty"`
ReadOnly bool `json:"read_only"`
AccessKeyID string `json:"access_key_id,omitempty"`
SecretName string `json:"secret_name,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
AppBucketBinding is an explicit app ⇄ bucket binding (#264). Binding injects the bucket's S3_*/AWS_* credentials into the app's pod via a k8s Secret + envFrom. The secret access key is never returned.
type AppConfig ¶
type AppConfig struct {
ID string `json:"id"`
AppID string `json:"app_id"`
Key string `json:"key"`
Value string `json:"value"`
IsSecret bool `json:"is_secret"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
AppConfig represents an environment variable or secret for an application.
type AppStatus ¶
type AppStatus struct {
ID string `json:"id"`
Name string `json:"name"`
Mode string `json:"mode"`
Image string `json:"image,omitempty"`
Release string `json:"release,omitempty"`
URL string `json:"url,omitempty"`
Status string `json:"status"`
Desired int32 `json:"desired"`
Ready int32 `json:"ready"`
// RunningImage and RunningRelease are what the cluster's workload declares,
// which differs from Image/Release above exactly while a deploy is in flight.
RunningImage string `json:"running_image,omitempty"`
RunningRelease string `json:"running_release,omitempty"`
// Rollout is present only while the app is mid-deploy — its presence is the
// answer to "is this changing right now".
Rollout *RolloutStatus `json:"rollout,omitempty"`
// Pods is the app's population by state: running, coming up, going away.
Pods *PodPhases `json:"pods,omitempty"`
// Config is how much configuration the app carries — counts, never values.
Config *ConfigCount `json:"config,omitempty"`
Problems []StatusProblem `json:"problems,omitempty"`
}
AppStatus is one app: what it should be running, what it is running, and what is wrong with it.
type AppVersion ¶
type AppVersion struct {
AppID string `json:"app_id"`
AppName string `json:"app_name"`
Release string `json:"release,omitempty"`
Image string `json:"image"`
ResolvedImage string `json:"resolved_image,omitempty"`
DeploymentID string `json:"deployment_id,omitempty"`
Status string `json:"status"`
Trigger string `json:"trigger,omitempty"`
CommitSHA string `json:"commit_sha,omitempty"`
ReleaseCommand []string `json:"release_command,omitempty"`
DeployedAt *string `json:"deployed_at,omitempty"`
DeployedBy string `json:"deployed_by,omitempty"`
}
AppVersion is what an app is currently running (#471).
type AppWebhook ¶
type AppWebhook struct {
ID string `json:"id"`
AppID string `json:"app_id"`
Provider string `json:"provider"`
Repo string `json:"repo"`
Branch string `json:"branch"`
ImagePattern string `json:"image_pattern"`
Enabled bool `json:"enabled"`
WebhookURL string `json:"webhook_url"`
WebhookSecret string `json:"webhook_secret,omitempty"`
LastDeployAt *string `json:"last_deploy_at,omitempty"`
LastDeploySHA string `json:"last_deploy_sha,omitempty"`
}
AppWebhook represents a webhook configuration (returned from setup).
type AuditEntry ¶
type AuditEntry struct {
ID string `json:"id"`
Timestamp time.Time `json:"ts"`
ActorType string `json:"actor_type"`
Actor string `json:"actor"`
Action string `json:"action"`
ResourceType string `json:"resource_type"`
ResourceID string `json:"resource_id"`
Details map[string]any `json:"details,omitempty"`
}
AuditEntry is one record from the audit log.
type BackupConfig ¶
type BackupConfig struct {
Enabled bool `json:"enabled"`
Schedule string `json:"schedule"`
Retention string `json:"retention"`
FirstRecoverabilityPoint string `json:"first_recoverability_point,omitempty"`
// RecoverableTo is the newest point a restore can reach — the ceiling of the
// window whose floor is FirstRecoverabilityPoint. It is the read time while
// WAL is reaching the archive, and the moment archiving broke while it is
// not. Reporting only the floor made a window with a 32h hole in it read as
// continuous (#896).
RecoverableTo string `json:"recoverable_to,omitempty"`
// Archiving reports whether WAL is currently reaching the archive, which is
// what decides whether RecoverableTo is still advancing or frozen.
Archiving bool `json:"archiving"`
// Healthy is the verdict, stated rather than inferred. It used to be derived
// client-side from len(Problems)==0, which meant an old server, a dropped
// key and a working database were the same bytes to a monitor (#896).
Healthy bool `json:"healthy"`
// Problems are the reasons this database's backups are not producing restore
// points, derived from live cluster state on every read. Always serialised —
// `[]` when there are none — so absence never has to be read as health.
Problems []BackupProblem `json:"problems"`
}
BackupConfig represents the backup configuration for a database, plus what the cluster has actually done with it (Problems).
type BackupDestination ¶
type BackupDestination struct {
Provider string `json:"provider"` // "aws" | "gcp" | "s3"
Bucket string `json:"bucket"`
Region string `json:"region,omitempty"`
Prefix string `json:"prefix,omitempty"`
FlatLayout bool `json:"flat_layout,omitempty"` // skip the <project>/<database> nesting under prefix
RoleARN string `json:"role_arn,omitempty"`
WIFProvider string `json:"wif_provider,omitempty"`
ServiceAccount string `json:"service_account,omitempty"`
Audience string `json:"audience,omitempty"`
Endpoint string `json:"endpoint,omitempty"` // s3
AccessKeyID string `json:"access_key_id,omitempty"` // s3
SecretAccessKey string `json:"secret_access_key,omitempty"` // s3 (write-only)
Schedule string `json:"schedule,omitempty"`
Enabled bool `json:"enabled"`
LastRunAt string `json:"last_run_at,omitempty"`
LastRunStatus string `json:"last_run_status,omitempty"`
}
BackupDestination is an opt-in, per-database external backup target (issue #130, #394): the customer's own bucket the database backs up directly to. Two auth models — keyless via OIDC federation (provider "aws" RoleARN, "gcp" WIFProvider + ServiceAccount), or a static S3 key (provider "s3": Endpoint + AccessKeyID + SecretAccessKey) for any S3-compatible store (Cloudflare R2, Backblaze B2, Hetzner Object Storage, Garage). SecretAccessKey is write-only — set it, but it is never returned; omit on update to keep the stored one.
type BackupDestinationRun ¶
type BackupDestinationRun struct {
JobName string `json:"job_name"`
Status string `json:"status"`
Subject string `json:"subject"`
}
BackupDestinationRun identifies an on-demand external backup that was started. The backup runs as an async k8s Job; Status reflects the launch, not completion.
type BackupProblem ¶
type BackupProblem struct {
Object string `json:"object"`
Reason string `json:"reason"`
Detail string `json:"detail"`
Since string `json:"since,omitempty"`
}
BackupProblem is one reason a database's backups are not producing restore points: a backup wedged mid-run ("backup-stuck"), a newest attempt that failed ("backup-failing"), a schedule the operator stopped firing ("schedule-overdue"), or one whose cluster is gone ("schedule-orphaned").
type BillingBinding ¶
type BillingBinding struct {
ID string `json:"id"`
OrgID string `json:"org_id"`
MemberType string `json:"member_type"`
Member string `json:"member"`
Role string `json:"role"` // billing.viewer, billing.admin
CreatedAt time.Time `json:"created_at"`
}
BillingBinding grants a billing role on an org (#114). A SEPARATE axis from the resource roles — an org owner without one of these cannot see the bill.
type BillingBudget ¶
type BillingBudget struct {
OrgID string `json:"org_id"`
Amount string `json:"amount"`
Currency string `json:"currency"`
Thresholds []int `json:"thresholds"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
BillingBudget is what an org means to spend in a period, with the percentages of it at which it wants to be told (#109). An alerting threshold, never a cap: nothing is refused when it is crossed. Amount is a decimal string like every other money value here.
type BillingBudgetAlert ¶
type BillingBudgetAlert struct {
OrgID string `json:"org_id"`
PeriodStart time.Time `json:"period_start"`
ThresholdPercent int `json:"threshold_percent"`
Amount string `json:"amount"`
BudgetAmount string `json:"budget_amount"`
Currency string `json:"currency"`
CreatedAt time.Time `json:"created_at"`
}
BillingBudgetAlert is one recorded threshold crossing. Amount is the estimate at the moment it crossed, which exists nowhere else afterwards — the estimate keeps moving.
type BindBucketRequest ¶
type BindBucketRequest struct {
BucketID string `json:"bucket_id"`
ReadOnly bool `json:"read_only,omitempty"`
}
BindBucketRequest is the request body for binding a bucket to an app.
type Bucket ¶
type Bucket struct {
ID string `json:"id"`
ProjectID string `json:"project_id"`
Name string `json:"name"`
GarageBucketID string `json:"garage_bucket_id,omitempty"`
AccessKeyID string `json:"access_key_id,omitempty"`
SecretAccessKey string `json:"secret_access_key,omitempty"`
GlobalAlias string `json:"global_alias,omitempty"`
Region string `json:"region,omitempty"`
Endpoint string `json:"endpoint,omitempty"`
QuotaMaxSize int64 `json:"quota_max_size,omitempty"`
QuotaMaxObjects int64 `json:"quota_max_objects,omitempty"`
Status string `json:"status"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
// Static-website serving on Garage's s3_web plane (#342). When enabled the
// bucket is served anonymously over HTTP (public read) at WebsiteURL.
WebsiteEnabled bool `json:"website_enabled"`
WebsiteIndexDocument string `json:"website_index_document,omitempty"`
WebsiteErrorDocument string `json:"website_error_document,omitempty"`
URLSlug string `json:"url_slug"`
WebsiteURL string `json:"website_url,omitempty"`
WebsiteVersion int `json:"website_version"`
}
Bucket is a managed S3 object-storage bucket on the Garage store (ADR-039). SecretAccessKey is only populated on creation.
type BucketCORSRule ¶ added in v0.135.0
type BucketCORSRule struct {
ID string `json:"id"`
BucketID string `json:"bucket_id"`
Position int `json:"position"`
AllowedOrigins []string `json:"allowed_origins"`
AllowedMethods []string `json:"allowed_methods"`
AllowedHeaders []string `json:"allowed_headers"`
ExposeHeaders []string `json:"expose_headers"`
MaxAgeSeconds int `json:"max_age_seconds"`
CreatedAt time.Time `json:"created_at"`
}
BucketCORSRule is one cross-origin rule on a bucket (#887) — the S3 CORSRule shape, which is also what R2 and the Terraform providers for both expose.
It governs what a browser may do against the bucket directly, and only that: a request made from a server is not cross-origin and never sends a preflight. A presigned url is no substitute — the preflight carries no signature, so the browser is refused before authorization is consulted.
The set is ordered and the order matters: the store answers with the first rule whose origin matches.
type BucketCORSRuleRequest ¶ added in v0.135.0
type BucketCORSRuleRequest struct {
AllowedOrigins []string `json:"allowed_origins"`
AllowedMethods []string `json:"allowed_methods"`
AllowedHeaders []string `json:"allowed_headers,omitempty"`
ExposeHeaders []string `json:"expose_headers,omitempty"`
MaxAgeSeconds int `json:"max_age_seconds,omitempty"`
}
BucketCORSRuleRequest is one rule in that configuration.
type BucketCredentials ¶
type BucketCredentials struct {
Bucket string `json:"bucket"`
Endpoint string `json:"endpoint"`
Region string `json:"region"`
AccessKeyID string `json:"access_key_id"`
SecretAccessKey string `json:"secret_access_key,omitempty"`
Note string `json:"note,omitempty"`
}
BucketCredentials are the S3 connection details for a bucket. SecretAccessKey is only present when a fresh key was minted.
type BucketKey ¶
type BucketKey struct {
ID string `json:"id"`
BucketID string `json:"bucket_id"`
AccessKeyID string `json:"access_key_id"`
Name string `json:"name,omitempty"`
CanRead bool `json:"can_read"`
CanWrite bool `json:"can_write"`
CanOwner bool `json:"can_owner"`
SecretAccessKey string `json:"secret_access_key,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
BucketKey is a scoped S3 access key for a bucket. SecretAccessKey is only populated when the key is created.
type BucketLifecycleRule ¶
type BucketLifecycleRule struct {
ID string `json:"id"`
BucketID string `json:"bucket_id"`
Prefix string `json:"prefix"`
ExpireDays int `json:"expire_days"`
AbortIncompleteUploadDays int `json:"abort_incomplete_upload_days"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
BucketLifecycleRule expires objects on a bucket by age (#498). It is keyed by the prefix it applies to (empty = the whole bucket), so one bucket can expire derived artefacts under one prefix while everything else is kept forever. ExpireDays deletes objects older than N days; AbortIncompleteUploadDays reclaims the parts of multipart uploads that were never completed. 0 = not set.
type BucketSessionCredentials ¶ added in v0.130.0
type BucketSessionCredentials struct {
Bucket string `json:"bucket"`
Endpoint string `json:"endpoint"`
Region string `json:"region"`
AccessKeyID string `json:"access_key_id"`
SecretAccessKey string `json:"secret_access_key"`
CanRead bool `json:"can_read"`
CanWrite bool `json:"can_write"`
ExpiresAt time.Time `json:"expires_at"`
}
BucketSessionCredentials is an expiring S3 credential minted for the caller's own data-plane traffic (ADR-074). It carries the caller's own permissions on the bucket — CanWrite is false for a caller that may only read — and stops working at ExpiresAt without anything having to revoke it.
type BucketStatus ¶
type BucketStatus struct {
ID string `json:"id"`
Name string `json:"name"`
Status string `json:"status"`
WebsiteEnabled bool `json:"website_enabled"`
WebsiteURL string `json:"website_url,omitempty"`
}
BucketStatus is one managed bucket, and whether it serves a website.
type BudgetView ¶
type BudgetView struct {
Budget *BillingBudget `json:"budget"`
Alerts []*BillingBudgetAlert `json:"alerts"`
}
BudgetView is a budget together with the crossings recorded against it. Budget is null when the org has set none, which is an ordinary state.
type Client ¶
type Client struct {
BaseURL string
APIKey string
HTTPClient *http.Client
// Version is what this caller reports as its client-library version. It
// defaults to the version of this module recorded in the caller's build
// info, which is right for anything importing pkg/client as a dependency.
// The CLI ships as this module's own main package, where build info carries
// no tag, and sets its ldflags-injected version instead.
Version string
}
Client is the Fogpipe API client.
func (*Client) AddBucketDomain ¶
RemoveDomain removes a custom domain from an app. AddBucketDomain claims a custom domain for a website bucket (#342).
func (*Client) AddDomain ¶
AddDomain adds a custom domain to an app. mode selects the attachment behavior (ADR-044); an empty mode defaults to "verified".
func (*Client) AlertHistory ¶ added in v0.141.0
AlertHistory returns the alerts that fired over a window — what fired, when, and for how long.
Operator-only: it lives under /operator, gated on administrate over the platform-operator org — reachable, unlike /admin, because a diagnostic is asked from wherever the person is and often with no cluster credential at all (ADR-084). window takes the Prometheus/Grafana forms (30m, 24h, 7d, 2w) and empty means the server's default; name filters by alertname as a case-insensitive substring.
The record itself is Prometheus's ALERTS series, which has no ingress — the control plane reading it is what keeps alert history off cluster-admin and off any credential the platform does not issue (fogpipe/cloud-workspace#101).
func (*Client) ApplyRetention ¶
ApplyRetention enforces the project's retention policies now, deleting the selected tags and returning them.
func (*Client) BindAppBucket ¶
func (c *Client) BindAppBucket(ctx context.Context, appID, bucketID string, readOnly bool) (*AppBucketBinding, error)
BindAppBucket binds a bucket to an app, injecting its S3_*/AWS_* credentials into the app's pod (#264). readOnly requests a read-only scoped key.
func (*Client) ClearBucketCORSRules ¶ added in v0.135.0
ClearBucketCORSRules removes every rule; no browser origin reaches the bucket afterwards.
func (*Client) ClearBucketLifecycleRules ¶
ClearBucketLifecycleRules removes every expiry rule on a bucket; nothing on it expires afterwards.
func (*Client) ClusterInfo ¶
func (c *Client) ClusterInfo(ctx context.Context) (*ClusterInfo, error)
ClusterInfo fetches the project-independent cluster connection facts (apiserver URL + CA) for assembling a cluster-admin kubeconfig — the staff FKE path, which is not project-scoped.
func (*Client) CreateApp ¶
func (c *Client) CreateApp(ctx context.Context, projectID string, req CreateAppRequest) (*App, error)
CreateApp creates a new app in a project.
func (*Client) CreateBackup ¶
CreateBackup triggers a manual backup for a database.
func (*Client) CreateBucket ¶
func (c *Client) CreateBucket(ctx context.Context, projectID string, req CreateBucketRequest) (*Bucket, error)
CreateBucket provisions a managed object-storage bucket in a project (ADR-039). The response carries the one-time secret access key.
func (*Client) CreateBucketKey ¶
func (c *Client) CreateBucketKey(ctx context.Context, bucketID string, req CreateBucketKeyRequest) (*BucketKey, error)
CreateBucketKey mints a scoped S3 access key for a bucket. The response carries the one-time secret access key.
func (*Client) CreateDatabase ¶
func (c *Client) CreateDatabase(ctx context.Context, projectID string, req CreateDatabaseRequest) (*Database, error)
CreateDatabase creates a new database in a project.
func (*Client) CreateJob ¶
func (c *Client) CreateJob(ctx context.Context, projectID string, req CreateJobRequest) (*Job, error)
CreateJob registers a scheduled job in a project.
func (*Client) CreateOrg ¶
func (c *Client) CreateOrg(ctx context.Context, name, displayName, shortID string) (*Organization, error)
CreateOrg creates a new organization (the caller becomes its owner). shortID optionally sets an explicit org id (the platform-org override); empty = an opaque random id is assigned server-side.
Any authenticated caller may create one (#785): an account exists only because its owner was invited or already held a binding, so admission is the gate.
func (*Client) CreateOrgSecret ¶
func (c *Client) CreateOrgSecret(ctx context.Context, orgID, name string, data map[string]string, targets []string) (*OrgSecret, error)
CreateOrgSecret creates a new bundle with the given key/value data, mirrored into the given target project ids.
func (*Client) CreateProject ¶
CreateProject creates a new project.
func (*Client) CreateProjectInOrg ¶
func (c *Client) CreateProjectInOrg(ctx context.Context, orgID string, req CreateProjectRequest) (*Project, error)
CreateProjectInOrg creates a new project under a specific organization.
func (*Client) CreateRunner ¶
func (c *Client) CreateRunner(ctx context.Context, projectID string, req CreateRunnerRequest) (*Runner, error)
CreateRunner declares a runner pool in a project.
func (*Client) CreateServiceAccount ¶
func (c *Client) CreateServiceAccount(ctx context.Context, projectID string, req CreateServiceAccountRequest) (*ServiceAccount, error)
func (*Client) CreateServiceAccountKey ¶
func (c *Client) CreateServiceAccountKey(ctx context.Context, saID string) (*ServiceAccountKey, error)
CreateServiceAccountKey creates a new key for a service account.
func (*Client) CreateTrustBinding ¶
func (c *Client) CreateTrustBinding(ctx context.Context, projectID string, req CreateTrustBindingRequest) (*TrustBinding, error)
CreateServiceAccount creates a new service account in a project. CreateTrustBinding creates a per-project OIDC federation trust binding: a repo (matched by subject_pattern) on an issuer may assume the given service account.
func (*Client) DeleteBackup ¶
DeleteBackup removes a single managed backup (its Backup CR + object-store artifact). The API refuses to delete the backup anchoring the recovery window.
func (*Client) DeleteBackupDestination ¶
DeleteBackupDestination removes a database's external backup destination.
func (*Client) DeleteBucket ¶
DeleteBucket deletes a bucket by ID. A non-empty bucket returns a 409 APIError.
func (*Client) DeleteBucketKey ¶
DeleteBucketKey revokes a scoped access key.
func (*Client) DeleteBucketLifecycleRule ¶
DeleteBucketLifecycleRule removes the rule for one prefix (the empty prefix is the whole-bucket rule). Dropping every rule is ClearBucketLifecycleRules.
func (*Client) DeleteBucketObject ¶
DeleteBucketObject deletes a single object from a bucket (#268).
func (*Client) DeleteBudget ¶
DeleteBudget removes an org's budget, stopping further alerts. Crossings already recorded are kept. Requires billing.admin.
func (*Client) DeleteDatabase ¶
DeleteDatabase deletes a database by ID.
func (*Client) DeleteOrgSecret ¶
DeleteOrgSecret removes a bundle.
func (*Client) DeleteProject ¶
DeleteProject accepts a project's deletion and returns it in `deleting`.
The teardown continues server-side after this returns: emptying a project's backup storage is bounded by how much of it there is, not by any timeout this client could set. The project is already gone from every list; use WaitProjectDeleted to observe the teardown finishing.
func (*Client) DeleteRegistryTag ¶
DeleteRegistryTag deletes one tag from a repository (project-relative name).
func (*Client) DeleteRetentionPolicy ¶
DeleteRetentionPolicy removes a retention policy (empty repo = project default).
func (*Client) DeleteRunner ¶
DeleteRunner removes a runner pool and deregisters it from GitHub.
func (*Client) DeleteServiceAccount ¶
DeleteServiceAccount deletes a service account by ID.
func (*Client) DeleteServiceAccountKey ¶
DeleteServiceAccountKey deletes a service account key.
func (*Client) DeleteTrustBinding ¶
DeleteTrustBinding deletes an OIDC federation trust binding in a project.
func (*Client) DialTunnel ¶
DialTunnel opens the server-side db-connect tunnel (ADR-045): a WebSocket carrying raw Postgres wire-protocol bytes, relayed by the API to the database's CNPG -rw Service. No k8s/FKE credentials involved — this rides the same Authorization header as every other API call. Call once per local TCP connection to relay (so e.g. `pg_dump -j N` gets N independent tunnels).
func (*Client) DisconnectGitHub ¶
DisconnectGitHub drops a project's GitHub connection.
func (*Client) FKECredentials ¶
FKECredentials fetches the cluster connection facts for a kubeconfig context scoped to the project (GET /projects/{id}/fke/credentials). Returns an error matching client.ErrNotFound when the API predates the endpoint (404), letting the CLI fall back to embedded constants.
func (*Client) FKEToken ¶
FKEToken mints a short-lived, namespace-scoped Kubernetes token bound to the project's ServiceAccount (POST /projects/{id}/fke/token). kubectl's exec plugin calls this transparently.
func (*Client) GetAppLogs ¶
func (c *Client) GetAppLogs(ctx context.Context, id string, req LogsRequest) (io.ReadCloser, error)
GetAppLogs retrieves logs for an app. If req.Follow is true, the returned ReadCloser streams logs until closed.
func (*Client) GetAppVersion ¶
GetAppVersion reports what an app is currently running.
func (*Client) GetBackupConfig ¶
GetBackupConfig retrieves the backup configuration for a database.
func (*Client) GetBackupDestination ¶
GetBackupDestination retrieves a database's external (BYOB) backup destination.
func (*Client) GetBillingEstimate ¶
GetBillingEstimate returns the cost of the period in progress (#111).
Computed, never persisted: the usage is still accruing and the number changes every hour. query takes from/to (RFC3339); empty means the current UTC calendar month — the same period the close task invoices, so an estimate and the bill that replaces it cover the same hours.
Gated on the BILLING axis (#114), not the resource roles: a caller who can read the org's usage may still be refused here.
func (*Client) GetBucketCredentials ¶
GetBucketCredentials returns a bucket's S3 connection details. The secret is only present when a fresh key was minted.
func (*Client) GetBudget ¶
GetBudget returns an org's budget and the threshold crossings recorded against it. Requires a billing role; a nil Budget means none is set.
func (*Client) GetDatabase ¶
GetDatabase retrieves a database by ID.
func (*Client) GetDatabaseConnection ¶
GetDatabaseConnection retrieves a database's live connection info (incl. the real CNPG password) for the `db connect` tunnel path.
func (*Client) GetDeployment ¶
func (c *Client) GetDeployment(ctx context.Context, appID, deploymentID string) (*Deployment, error)
GetDeployment retrieves a single deployment by ID.
func (*Client) GetGitHubConnection ¶
func (c *Client) GetGitHubConnection(ctx context.Context, projectID string) (*GitHubConnection, error)
GetGitHubConnection returns the GitHub account a project is connected to.
func (*Client) GetInvoice ¶
GetInvoice returns one invoice with its line items.
func (*Client) GetJobLogs ¶
GetJobLogs returns the output of one run, defaulting to the most recent when runName is empty.
func (*Client) GetMe ¶
func (c *Client) GetMe(ctx context.Context) (*MeResponse, error)
GetMe retrieves the current user's info.
func (*Client) GetOrgSecret ¶
func (c *Client) GetOrgSecret(ctx context.Context, orgID, name string, reveal bool) (*OrgSecret, error)
GetOrgSecret retrieves a single bundle. When reveal is true, the decrypted values are returned in Data (requires org write permission).
func (*Client) GetProject ¶
GetProject retrieves a project by ID.
func (*Client) GetTraffic ¶
GetTraffic retrieves the current traffic split for an app.
func (*Client) GetWebhook ¶
GetWebhook retrieves the webhook configuration for an app.
func (*Client) GrantBillingBinding ¶
func (c *Client) GrantBillingBinding(ctx context.Context, orgID, member, memberType, role string) (*BillingBinding, error)
GrantBillingBinding grants a billing role to a member. Requires billing.admin.
func (*Client) InviteOrgMember ¶
func (c *Client) InviteOrgMember(ctx context.Context, orgID, email, role string) (*OrgMember, error)
InviteOrgMember invites a user to an organization by email.
func (*Client) ListAppBuckets ¶
ListAppBuckets lists an app's bucket bindings (never the secret).
func (*Client) ListAudit ¶
ListAudit returns audit log entries, optionally filtered by query params (resource_type, resource_id, actor, limit, offset).
func (*Client) ListBackups ¶
ListBackups lists all backups for a database.
func (*Client) ListBillingBindings ¶
ListBillingBindings returns an org's billing role grants.
func (*Client) ListBucketCORSRules ¶ added in v0.135.0
ListBucketCORSRules lists a bucket's cross-origin rules (#887). The platform's own console rule is not among them — it is applied to every bucket and is not the tenant's to see or remove.
func (*Client) ListBucketDomains ¶
ListBucketDomains lists a website bucket's custom domains.
func (*Client) ListBucketKeys ¶
ListBucketKeys lists a bucket's scoped keys (never the secret).
func (*Client) ListBucketLifecycleRules ¶
func (c *Client) ListBucketLifecycleRules(ctx context.Context, id string) ([]*BucketLifecycleRule, error)
ListBucketLifecycleRules lists a bucket's object-expiry rules (#498).
func (*Client) ListBucketObjects ¶
func (c *Client) ListBucketObjects(ctx context.Context, bucketID, prefix string) (*ObjectListing, error)
ListBucketObjects lists a bucket's objects under prefix, grouping folders at "/" (in-browser object browser, #268). An empty prefix lists the root.
func (*Client) ListBuckets ¶
ListBuckets lists all buckets in a project.
func (*Client) ListConfig ¶
ListConfig lists all config values for an app.
func (*Client) ListDatabases ¶
ListDatabases lists all databases in a project.
func (*Client) ListDeployments ¶
ListDeployments lists deployment history for an app.
func (*Client) ListDomains ¶
ListDomains lists all custom domains for an app.
func (*Client) ListIAMBindings ¶
ListIAMBindings lists all IAM bindings for a project.
func (*Client) ListInvoices ¶
ListInvoices returns an org's invoices, newest period first.
func (*Client) ListJobRuns ¶
ListJobRuns returns a job's run history, newest first.
func (*Client) ListOrgMembers ¶
ListOrgMembers lists all members of an organization.
func (*Client) ListOrgSecrets ¶
ListOrgSecrets lists an org's Fogpipe Secrets Manager bundles (key names only).
func (*Client) ListOrgUsage ¶
ListOrgUsage returns an org-wide usage rollup across its projects, optionally filtered by query params (from, to, group_by, app_id).
func (*Client) ListPrices ¶
ListPrices returns the platform's current price list.
Unauthenticated — a rate is a published fact, not tenant data. Callable before you have an account, which is the point: the only other way to see what a resource costs is to have already been billed for it.
func (*Client) ListProjectUsage ¶
func (c *Client) ListProjectUsage(ctx context.Context, projectID, query string) ([]*UsageEntry, error)
ListProjectUsage returns a project's metered usage, optionally filtered by query params (from, to, group_by, app_id). Quantities only — no cost.
func (*Client) ListProjects ¶
ListProjects lists all projects the caller can access across every org (IAM-driven).
func (*Client) ListProjectsInOrg ¶
ListProjectsInOrg lists the projects the caller can access within a single org (org id or name). Scoped, unlike ListProjects.
func (*Client) ListRegistryRepositories ¶
func (c *Client) ListRegistryRepositories(ctx context.Context, projectID string) ([]RegistryRepository, error)
ListRegistryRepositories lists a project's registry repositories.
func (*Client) ListRegistryTags ¶
func (c *Client) ListRegistryTags(ctx context.Context, projectID, repo string) (*RegistryTagList, error)
ListRegistryTags lists the tags of one repository (project-relative name).
func (*Client) ListRegistryVisibility ¶
func (c *Client) ListRegistryVisibility(ctx context.Context, projectID string) ([]*RegistryRepoVisibility, error)
ListRegistryVisibility lists a project's per-repo visibility records. A repo with no record is private (the default).
func (*Client) ListRetentionPolicies ¶
func (c *Client) ListRetentionPolicies(ctx context.Context, projectID string) ([]*RegistryRetentionPolicy, error)
ListRetentionPolicies lists a project's registry retention policies.
func (*Client) ListRevisions ¶
ListRevisions lists all revisions for an app.
func (*Client) ListRunners ¶
ListRunners lists a project's runner pools.
func (*Client) ListServiceAccountKeys ¶
func (c *Client) ListServiceAccountKeys(ctx context.Context, saID string) ([]*ServiceAccountKey, error)
ListServiceAccountKeys lists all keys for a service account.
func (*Client) ListServiceAccounts ¶
func (c *Client) ListServiceAccounts(ctx context.Context, projectID string) ([]*ServiceAccount, error)
ListServiceAccounts lists all service accounts in a project.
func (*Client) ListTrustBindings ¶
ListTrustBindings lists the OIDC federation trust bindings in a project.
func (*Client) MintBucketSessionCredentials ¶ added in v0.130.0
func (c *Client) MintBucketSessionCredentials(ctx context.Context, id string) (*BucketSessionCredentials, error)
MintBucketSessionCredentials mints an expiring S3 credential for this caller's own data-plane traffic, carrying whatever the caller may already do to the bucket's objects. This — not CreateBucketKey — is how a client reaches the S3 plane: a scoped key is a durable credential handed to someone else, and creating one is bucket administration (ADR-074).
func (*Client) MoveProject ¶
func (c *Client) MoveProject(ctx context.Context, id string, force bool) (*MoveProjectResult, error)
MoveProject re-homes a project into its canonical org-prefixed namespace (<org short id>-<name>). force proceeds past the stateful-resource guard; database/PVC data is not migrated and must be handled separately.
func (*Client) PresignBucketObject ¶
func (c *Client) PresignBucketObject(ctx context.Context, bucketID string, req PresignObjectRequest) (*PresignResponse, error)
PresignBucketObject mints a presigned S3 URL for a GET (download) or PUT (upload) so the browser transfers bytes straight to the object store (#268).
func (*Client) PreviewRetention ¶
PreviewRetention dry-runs the project's retention policies, returning the tags they would delete right now.
func (*Client) ProjectStatus ¶
func (c *Client) ProjectStatus(ctx context.Context, projectID, ifNoneMatch string) (*ProjectStatus, string, error)
ProjectStatus fetches the whole-project status document (GET /projects/{id}/status) and the ETag identifying the state it describes.
Conditional when ifNoneMatch is a previous response's ETag: an unchanged project answers 304 and returns (nil, ifNoneMatch, nil), so a client watching a project pays for a document only when there is a new one. A nil status with a nil error therefore means "what you already have is still current" and is never an empty project.
func (*Client) ProvisionUser ¶
func (c *Client) ProvisionUser(ctx context.Context, orgID, email, name, role string) (*RegisterResponse, error)
ProvisionUser creates a new user in an existing organization and mints an API key. Admin-only; replaces self-service registration in the internal model.
func (*Client) PublishWebsiteVersion ¶
func (c *Client) PublishWebsiteVersion(ctx context.Context, id string, version int) (*Bucket, error)
PublishWebsiteVersion atomically flips a website bucket to serve an already-uploaded version v<version>/ (#439). The same call with a retained prior version is a rollback. Upload the build to the version prefix first.
func (*Client) ReconcileApp ¶
ReconcileApp re-applies an app's runtime from control-plane state, repairing drifted cluster objects. Unlike DeployApp it changes no image, writes no deployment record, and does not run the release command.
func (*Client) RemoveBucketDomain ¶
RemoveBucketDomain removes a custom domain from a website bucket.
func (*Client) RemoveDomain ¶
func (*Client) RemoveIAMBinding ¶
RemoveIAMBinding removes an IAM binding from a project.
func (*Client) RemoveOrgMember ¶
RemoveOrgMember removes a member from an organization.
func (*Client) RemoveWebhook ¶
RemoveWebhook removes the webhook configuration for an app.
func (*Client) RestoreBackupDestination ¶
func (c *Client) RestoreBackupDestination(ctx context.Context, dbID, object string) (*BackupDestinationRun, error)
RestoreBackupDestination restores a database from a dump in the customer bucket (pg_restore). object names the dump; empty restores the latest.
func (*Client) RestoreDatabase ¶
func (c *Client) RestoreDatabase(ctx context.Context, dbID string, req RestoreRequest) (*Database, error)
RestoreDatabase restores a database from a backup.
func (*Client) RevokeBillingBinding ¶
RevokeBillingBinding removes a member's billing role. The server refuses to remove an org's last billing admin.
func (*Client) RollbackApp ¶
RollbackApp returns an app to a previous release. A rollback that would cross a release command fails with a 409 APIError (code MIGRATION_CONFIRMATION_REQUIRED) until req.ConfirmMigrations is set.
func (*Client) RunBackupDestination ¶
func (c *Client) RunBackupDestination(ctx context.Context, dbID string) (*BackupDestinationRun, error)
RunBackupDestination starts an on-demand external backup (pg_dump → the customer bucket). The backup runs asynchronously as a k8s Job.
func (*Client) SetAppDatabase ¶
SetAppDatabase binds the app's unprefixed DATABASE_URL to one of its project's databases by name or id (#544). An empty ref clears the binding: DATABASE_URL then falls back to the project's sole database, or is omitted entirely when the project has several.
func (*Client) SetAppKubeServiceAccount ¶
func (c *Client) SetAppKubeServiceAccount(ctx context.Context, id, serviceAccount string) (*App, error)
SetAppKubeServiceAccount names the Kubernetes ServiceAccount an app's pods run as, mounting its token so the workload can call the apiserver; "" restores the hardened default. The ServiceAccount must already exist in the app's namespace. Operator-only — 403 for anyone else.
func (*Client) SetAppSecurityContext ¶
func (c *Client) SetAppSecurityContext(ctx context.Context, id string, sc *SecurityContext) (*App, error)
SetAppSecurityContext replaces an app's security context, or clears it when sc is nil so the app returns to the platform default. Clearing is how a non-root opt-out is revoked once the image no longer needs it.
func (*Client) SetBackupDestination ¶
func (c *Client) SetBackupDestination(ctx context.Context, dbID string, req SetBackupDestinationRequest) (*BackupDestination, error)
SetBackupDestination configures (or replaces) a database's external backup destination — the customer's own bucket, keyless.
func (*Client) SetBucketCORSRules ¶ added in v0.135.0
func (c *Client) SetBucketCORSRules(ctx context.Context, id string, req SetBucketCORSRequest) ([]*BucketCORSRule, error)
SetBucketCORSRules replaces a bucket's whole CORS configuration and returns what was written.
func (*Client) SetBucketLifecycleRule ¶
func (c *Client) SetBucketLifecycleRule(ctx context.Context, id string, req SetBucketLifecycleRuleRequest) (*BucketLifecycleRule, error)
SetBucketLifecycleRule upserts the expiry rule for one prefix, leaving every other prefix's rule alone.
func (*Client) SetBucketQuota ¶
func (c *Client) SetBucketQuota(ctx context.Context, id string, maxSize, maxObjects int64) (*Bucket, error)
SetBucketQuota updates a bucket's quotas (bytes / object count; 0 = unlimited).
func (*Client) SetBucketURLSlug ¶
SetBucketURLSlug sets (or clears, with "") a bucket website's vanity host label; the site moves to <slug>.web.<platform domain>.
func (*Client) SetBucketWebsite ¶
func (c *Client) SetBucketWebsite(ctx context.Context, id string, req SetBucketWebsiteRequest) (*Bucket, error)
SetBucketWebsite toggles static-website serving on a bucket (#342). Enabling serves the bucket anonymously over HTTP at the returned WebsiteURL.
func (*Client) SetBudget ¶
func (c *Client) SetBudget(ctx context.Context, orgID string, req SetBudgetRequest) (*BillingBudget, error)
SetBudget creates or replaces an org's budget. Requires billing.admin.
func (*Client) SetConfig ¶
func (c *Client) SetConfig(ctx context.Context, appID, key, value string, isSecret bool) (*AppConfig, error)
SetConfig sets a config value for an app.
func (*Client) SetDomainRoutes ¶
func (c *Client) SetDomainRoutes(ctx context.Context, appID, domain string, routes []DomainRoute) (*Domain, error)
SetDomainRoutes replaces a domain's path->app route table (#581, ADR-060), fanning one hostname out to several apps by path prefix. Replace-in-full: an empty list clears the fan-out.
func (*Client) SetIAMBinding ¶
func (c *Client) SetIAMBinding(ctx context.Context, projectID string, req SetIAMBindingRequest) (*IAMBinding, error)
SetIAMBinding creates an IAM binding on a project.
func (*Client) SetRegistryVisibility ¶
func (c *Client) SetRegistryVisibility(ctx context.Context, projectID string, req SetRegistryVisibilityRequest) (*RegistryRepoVisibility, error)
SetRegistryVisibility sets one repository's public/private visibility.
func (*Client) SetRetentionPolicy ¶
func (c *Client) SetRetentionPolicy(ctx context.Context, projectID string, req SetRetentionPolicyRequest) (*RegistryRetentionPolicy, error)
SetRetentionPolicy upserts a retention policy (empty Repo = project default).
func (*Client) SetTraffic ¶
func (c *Client) SetTraffic(ctx context.Context, appID string, targets []TrafficTarget) ([]TrafficTarget, error)
SetTraffic sets the traffic split for an app.
func (*Client) SetupWebhook ¶
func (c *Client) SetupWebhook(ctx context.Context, appID string, req SetupWebhookRequest) (*AppWebhook, error)
SetupWebhook configures a GitHub webhook for auto-deploy on an app.
func (*Client) StartGitHubConnect ¶
func (c *Client) StartGitHubConnect(ctx context.Context, projectID, account string) (*GitHubConnectStart, error)
StartGitHubConnect returns the URL to open in a browser to install the Fogpipe GitHub App and bind the account to a project. Ownership is proved there, by GitHub, not here. account is optional and only disambiguates when the caller administers several accounts with the app installed; it selects within what GitHub confirms and can never widen it.
func (*Client) SwitchMode ¶
SwitchMode migrates an app between hosting modes ("always-on"/"serverless").
func (*Client) UnbindAppBucket ¶
UnbindAppBucket removes an app ⇄ bucket binding, dropping the injected creds.
func (*Client) UnsetConfig ¶
UnsetConfig removes a config value from an app.
func (*Client) UpdateAppCommand ¶
func (c *Client) UpdateAppCommand(ctx context.Context, id string, command, args, releaseCommand *[]string) (*App, error)
UpdateAppCommand changes an app's container entrypoint override (command), arguments (args), and/or release command. Each is optional: a nil pointer leaves the value untouched, a non-nil pointer (including an empty slice) replaces it — an empty slice clears the override back to the image defaults (or drops the release phase).
func (*Client) UpdateAppDisplayName ¶
UpdateAppDisplayName changes an app's mutable, cosmetic display name (ADR-036). The frozen name — which names the k8s resources and the URL — is untouched, so this is a plain label change with no downtime or redeploy.
func (*Client) UpdateAppProbes ¶
func (c *Client) UpdateAppProbes(ctx context.Context, id string, probes *ProbeOverrides) (*App, error)
UpdateAppProbes replaces an app's per-probe liveness/readiness/startup overrides (#453). nil clears them, reverting every probe to the shared HealthCheck* shorthand.
func (*Client) UpdateAppRoutes ¶
UpdateAppRoutes replaces an app's per-route visibility carve-outs (#501). The list is replace-in-full: an empty one clears every carve-out and puts all paths back under the app-wide ingress.
func (*Client) UpdateAppStorage ¶
UpdateAppStorage grows an app's persistent volume (grow-only, always-on mode).
func (*Client) UpdateAppURLSlug ¶
UpdateAppURLSlug sets or clears an app's optional vanity host override (ADR-040). An empty slug clears it, reverting the host to the derived label; a non-empty slug makes the app reachable at <slug>.app.<platform_domain>. Always-on mode only.
func (*Client) UpdateBackupConfig ¶
func (c *Client) UpdateBackupConfig(ctx context.Context, dbID string, req UpdateBackupConfigRequest) error
UpdateBackupConfig updates the backup configuration for a database.
func (*Client) UpdateBucketKeyPermissions ¶
func (c *Client) UpdateBucketKeyPermissions(ctx context.Context, bucketID, accessKeyID string, req UpdateBucketKeyPermissionsRequest) (*BucketKey, error)
UpdateBucketKeyPermissions changes a scoped key's read/write/owner grants.
func (*Client) UpdateDatabase ¶
func (c *Client) UpdateDatabase(ctx context.Context, id string, req UpdateDatabaseRequest) (*Database, error)
UpdateDatabase reconciles a database's spec (cpu/memory/storage/instances/version/pooler).
func (*Client) UpdateOrgDisplayName ¶
func (c *Client) UpdateOrgDisplayName(ctx context.Context, id, displayName string) (*Organization, error)
UpdateOrgDisplayName changes an organization's mutable, cosmetic display name. The frozen name and short_id are untouched. Gated on org-admin server-side.
func (*Client) UpdateOrgFKE ¶
UpdateOrgFKE toggles an organization's FKE entitlement (kubectl/kubeconfig access). Operator-only: it lives under /admin, which is gated on administrate over the platform-operator org (#710).
func (*Client) UpdateOrgMemberRole ¶
UpdateOrgMemberRole updates a member's role in an organization.
func (*Client) UpdateOrgSecret ¶
func (c *Client) UpdateOrgSecret(ctx context.Context, orgID, name string, data map[string]string, targets []string) (*OrgSecret, error)
UpdateOrgSecret replaces an existing bundle's data and target projects (full-desired-state replace).
func (*Client) UpdateProjectDisplayName ¶
func (c *Client) UpdateProjectDisplayName(ctx context.Context, id, displayName string) (*Project, error)
UpdateProjectDisplayName changes a project's mutable, cosmetic display name (ADR-036). The frozen name — which anchors the k8s namespace and registry path — is untouched, so this is a plain label change with no cluster impact.
func (*Client) UpdateProjectEgress ¶
UpdateProjectEgress sets a project's egress mode (restricted, https, all).
func (*Client) UpdateProjectQuota ¶
func (c *Client) UpdateProjectQuota(ctx context.Context, id string, maxCPU, maxMemory *string, maxPods *int, maxStorage *string) (*Project, error)
UpdateProjectQuota sets a project's operator-only resource caps; only the non-nil caps are changed.
func (*Client) UpdateRunner ¶
func (c *Client) UpdateRunner(ctx context.Context, id string, req UpdateRunnerRequest) (*Runner, error)
UpdateRunner patches a runner pool.
func (*Client) UpdateRunnerBuilder ¶ added in v0.122.0
func (c *Client) UpdateRunnerBuilder(ctx context.Context, id string, builder *RunnerBuilder) (*Runner, error)
UpdateRunnerBuilder replaces a pool's image builder, or removes it when builder is nil. Separate from UpdateRunner for the same reason UpdateAppProbes is separate from UpdateApp: a patch cannot express removal.
func (*Client) UpdateServiceAccountDisplayName ¶
func (c *Client) UpdateServiceAccountDisplayName(ctx context.Context, id, displayName string) (*ServiceAccount, error)
UpdateServiceAccountDisplayName changes a service account's mutable, cosmetic display name. The frozen name and email are untouched.
func (*Client) VerifyBucketDomain ¶
func (c *Client) VerifyBucketDomain(ctx context.Context, bucketID, domain string) (*DomainVerification, error)
VerifyBucketDomain re-checks a website bucket domain's ownership/pointing/cert.
func (*Client) VerifyDomain ¶
func (c *Client) VerifyDomain(ctx context.Context, appID string, domain string) (*DomainVerification, error)
VerifyDomain re-checks TXT ownership + DNS pointing for a custom domain and returns the full verification breakdown plus the records still needed.
func (*Client) WaitProjectDeleted ¶ added in v0.134.0
WaitProjectDeleted blocks until the project's teardown has finished — until reading it stops answering — polling every interval.
A caller that needs "deleted" to mean deleted (Terraform, a script that recreates the same name) waits here rather than treating the accepted delete as complete. It returns ctx.Err() if the caller's deadline passes first; the teardown is unaffected and continues.
Both 404 and 403 mean gone: a project's IAM bindings are the project's, so the last step of the teardown takes away the permission to read it at the same moment as the row. After an accepted delete there is nothing else a refusal can mean.
type ClusterCredentials ¶
type ClusterCredentials struct {
Server string `json:"server"`
CertificateAuthorityData string `json:"certificate_authority_data"`
Context string `json:"context"`
Namespace string `json:"namespace"`
}
ClusterCredentials is the cluster connection facts for assembling a kubeconfig context (GET /projects/{id}/fke/credentials). Server + CertificateAuthorityData are cluster-global; Context/Namespace are per-project. The bearer token is minted separately by the exec plugin (FKEToken).
type ClusterInfo ¶
type ClusterInfo struct {
Server string `json:"server"`
CertificateAuthorityData string `json:"certificate_authority_data"`
}
ClusterInfo is the project-independent cluster connection facts (GET /cluster-info): the apiserver URL and CA bundle, both public information (they appear in every kubeconfig). Used by the staff cluster-admin path, which is not project-scoped, so the CLI binary carries no baked-in cluster endpoint/CA.
type ClusterToken ¶
type ClusterToken struct {
Token string `json:"token"`
ExpirationTimestamp string `json:"expiration_timestamp"`
}
ClusterToken is a short-lived, namespace-scoped Kubernetes token bound to the project's ServiceAccount (POST /projects/{id}/fke/token).
type ConfigCount ¶ added in v0.119.0
ConfigCount is how many config values an app holds, and how many are secret.
type CreateAppRequest ¶
type CreateAppRequest struct {
Name string `json:"name"`
DisplayName string `json:"display_name,omitempty"` // mutable cosmetic label; defaults to Name
URLSlug string `json:"url_slug,omitempty"` // optional vanity host override (ADR-040)
Image string `json:"image"`
Command []string `json:"command,omitempty"`
Args []string `json:"args,omitempty"`
ReleaseCommand []string `json:"release_command,omitempty"` // run once per deploy, before the new version goes live
VolumeMounts []VolumeMount `json:"volume_mounts,omitempty"`
SecurityContext *SecurityContext `json:"security_context,omitempty"`
Port int `json:"port,omitempty"`
Replicas int `json:"replicas,omitempty"`
Ingress string `json:"ingress,omitempty"`
Routes []Route `json:"routes,omitempty"` // per-path visibility carve-outs (#501)
Mode string `json:"mode,omitempty"` // "always-on" (default) or "serverless"
// Type is the process type: "web" (default) serves HTTP behind a Service;
// "worker" is a long-lived process with no port, Service or hostname. Frozen
// at create — no update path changes it.
Type string `json:"type,omitempty"`
Storage string `json:"storage,omitempty"` // persistent volume size (e.g. "50Gi")
StoragePath string `json:"storage_path,omitempty"` // mount path (defaults to /data)
// EnvVars seeds the app's config store with plain (non-secret) values —
// shorthand for a SetConfig per key. Use SetConfig to change them afterwards;
// there is no second env layer on the app itself.
EnvVars map[string]string `json:"env_vars,omitempty"`
ServiceAccount string `json:"service_account,omitempty"` // SA email or ID
HealthCheckPath string `json:"health_check_path,omitempty"`
HealthCheckTimeout int `json:"health_check_timeout,omitempty"`
HealthCheckInterval int `json:"health_check_interval,omitempty"`
HealthCheckRetries int `json:"health_check_retries,omitempty"`
Probes *ProbeOverrides `json:"probes,omitempty"` // per-probe path/timing overrides (#453); nil = every probe uses the HealthCheck* shorthand
}
CreateAppRequest is the request body for creating an app.
type CreateBucketKeyRequest ¶
type CreateBucketKeyRequest struct {
Name string `json:"name,omitempty"`
Read bool `json:"read"`
Write bool `json:"write"`
Owner bool `json:"owner"`
}
CreateBucketKeyRequest is the request body for minting a scoped access key.
type CreateBucketRequest ¶
type CreateBucketRequest struct {
Name string `json:"name"`
QuotaMaxSize int64 `json:"quota_max_size,omitempty"`
QuotaMaxObjects int64 `json:"quota_max_objects,omitempty"`
}
CreateBucketRequest is the request body for creating a bucket.
type CreateDatabaseRequest ¶
type CreateDatabaseRequest struct {
Name string `json:"name"`
DisplayName string `json:"display_name,omitempty"`
Engine string `json:"engine"`
Version string `json:"version,omitempty"`
CPU string `json:"cpu,omitempty"`
Memory string `json:"memory,omitempty"`
Storage string `json:"storage,omitempty"`
Pooler bool `json:"pooler,omitempty"`
// Extensions names curated extensions to install at create.
Extensions []string `json:"extensions,omitempty"`
}
CreateDatabaseRequest is the request body for creating a database.
type CreateJobRequest ¶
type CreateJobRequest struct {
Name string `json:"name"`
DisplayName string `json:"display_name,omitempty"`
App string `json:"app,omitempty"`
Schedule string `json:"schedule"`
Timezone string `json:"timezone,omitempty"`
Concurrency string `json:"concurrency,omitempty"`
MaxRetries *int `json:"max_retries,omitempty"`
Timeout *int `json:"timeout_seconds,omitempty"`
KeepRuns *int `json:"keep_runs,omitempty"`
RetainSucceeded *int `json:"retain_succeeded_seconds,omitempty"`
RetainFailed *int `json:"retain_failed_seconds,omitempty"`
Suspended bool `json:"suspended,omitempty"`
Image string `json:"image,omitempty"`
Command []string `json:"command,omitempty"`
Args []string `json:"args,omitempty"`
HTTPURL string `json:"http_url,omitempty"`
HTTPMethod string `json:"http_method,omitempty"`
HTTPHeaders map[string]string `json:"http_headers,omitempty"`
HTTPBody string `json:"http_body,omitempty"`
}
CreateJobRequest is the request body for creating a scheduled job.
type CreateProjectRequest ¶
type CreateProjectRequest struct {
Name string `json:"name"`
DisplayName string `json:"display_name,omitempty"`
Egress string `json:"egress,omitempty"`
}
CreateProjectRequest is the request body for creating a project.
type CreateRunnerRequest ¶
type CreateRunnerRequest struct {
Name string `json:"name"`
DisplayName string `json:"display_name,omitempty"`
GitHubAccount string `json:"github_account,omitempty"`
RunnerGroup string `json:"runner_group,omitempty"`
MinRunners *int `json:"min_runners,omitempty"`
MaxRunners *int `json:"max_runners,omitempty"`
Image string `json:"image,omitempty"`
CPU string `json:"cpu,omitempty"`
Memory string `json:"memory,omitempty"`
// Builder asks for an image builder alongside each job. Omit it for a pool
// that builds nothing; an empty value takes the platform's defaults.
Builder *RunnerBuilder `json:"builder,omitempty"`
// Credential defaults to "platform" — the Fogpipe GitHub App, installed in
// one click, with nothing else to supply.
Credential string `json:"credential,omitempty"`
GitHubAppID string `json:"github_app_id,omitempty"`
GitHubAppInstallationID string `json:"github_app_installation_id,omitempty"`
GitHubAppPrivateKey string `json:"github_app_private_key,omitempty"`
GitHubToken string `json:"github_token,omitempty"`
}
CreateRunnerRequest is the request body for declaring a runner pool.
It names no GitHub account with the default "platform" credential: the account is the one the project connected and proved it controls (#790). GitHubAccount applies only to a tenant-supplied credential, which carries no account of its own.
type CreateServiceAccountRequest ¶
type CreateServiceAccountRequest struct {
Name string `json:"name"`
DisplayName string `json:"display_name,omitempty"`
}
CreateServiceAccountRequest is the request body for creating a service account.
type CreateTrustBindingRequest ¶
type CreateTrustBindingRequest struct {
Issuer string `json:"issuer"`
Audience string `json:"audience"`
SubjectPattern string `json:"subject_pattern"`
ServiceAccount string `json:"service_account"`
TokenTTLSeconds int `json:"token_ttl_seconds,omitempty"`
}
CreateTrustBindingRequest is the request body for creating a trust binding.
type Database ¶
type Database struct {
ID string `json:"id"`
ProjectID string `json:"project_id"`
Name string `json:"name"`
DisplayName string `json:"display_name"`
Engine string `json:"engine"`
Version string `json:"version"`
Plan string `json:"plan"`
Status string `json:"status"`
// Host/Port/Username are the database's address on the cluster network, as
// recorded at provisioning. Password is returned ONLY on create — CNPG owns
// the app role and rotates it out of band, so the live credential comes from
// the injected DATABASE_URL or `fpcloud db connect`, never from this record.
Host string `json:"host"`
Port int32 `json:"port"`
Username string `json:"username"`
Password string `json:"password,omitempty"`
Pooler bool `json:"pooler"`
// CPU/Memory/Storage/Instances are the spec the database is running under —
// the same four UpdateDatabaseRequest changes. They are read from the live
// cluster rather than from a stored copy, so they report what is actually
// running; all four are empty/zero when the cluster cannot be reached.
CPU string `json:"cpu,omitempty"`
Memory string `json:"memory,omitempty"`
Storage string `json:"storage,omitempty"`
Instances int64 `json:"instances,omitempty"`
// Extensions names the curated Postgres extensions installed in the
// database. Untrusted extensions are installed by the platform, because
// CREATE EXTENSION on one is superuser-only and a managed database hands
// out no superuser.
Extensions []string `json:"extensions"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
Database represents a managed database instance.
type DatabaseBackup ¶
type DatabaseBackup struct {
Name string `json:"name"`
Type string `json:"type"`
Status string `json:"status"`
Method string `json:"method,omitempty"`
StartedAt string `json:"started_at,omitempty"`
StoppedAt string `json:"stopped_at,omitempty"`
}
DatabaseBackup represents a backup of a managed database.
type DatabaseConnection ¶
type DatabaseConnection struct {
ProjectID string `json:"project_id"`
Namespace string `json:"namespace"`
Cluster string `json:"cluster"`
Host string `json:"host"`
Port int32 `json:"port"`
Database string `json:"database"`
Username string `json:"username"`
Password string `json:"password"`
URL string `json:"url"`
}
DatabaseConnection is a database's live connection info (GET /databases/{id}/connection): the real CNPG credentials plus the cluster-internal host, reachable through a port-forward tunnel (`fpcloud db connect`).
type DatabaseStatus ¶
type DatabaseStatus struct {
ID string `json:"id"`
Name string `json:"name"`
Engine string `json:"engine"`
Version string `json:"version"`
Status string `json:"status"`
Pooler bool `json:"pooler"`
Problems []StatusProblem `json:"problems,omitempty"`
}
DatabaseStatus is one managed database and the state of its restore points.
type DeployRequest ¶
type DeployRequest struct {
Image string `json:"image"`
// Release names the version this deploy publishes (#471). Optional.
Release string `json:"release,omitempty"`
NoTraffic bool `json:"no_traffic,omitempty"`
}
DeployRequest is the request body for deploying a new app revision.
type Deployment ¶
type Deployment struct {
ID string `json:"id"`
AppID string `json:"app_id"`
Image string `json:"image"`
// Release is the user-named release this deploy published (#471);
// ResolvedImage the digest-pinned reference it actually ran.
Release string `json:"release,omitempty"`
ResolvedImage string `json:"resolved_image,omitempty"`
ReleaseCommand []string `json:"release_command,omitempty"`
Status string `json:"status"`
Trigger string `json:"trigger"`
CommitSHA string `json:"commit_sha,omitempty"`
Message string `json:"message,omitempty"`
ReleaseLogs string `json:"release_logs,omitempty"` // output of the release-command Job for this deploy
StartedAt string `json:"started_at"`
FinishedAt *string `json:"finished_at,omitempty"`
DurationMs *int `json:"duration_ms,omitempty"`
CreatedBy string `json:"created_by,omitempty"`
CreatedAt string `json:"created_at"`
}
Deployment represents a single deployment event for an application.
type Domain ¶
type Domain struct {
ID string `json:"id"`
AppID string `json:"app_id,omitempty"`
BucketID string `json:"bucket_id,omitempty"`
Domain string `json:"domain"`
Mode string `json:"mode"`
Status string `json:"status"`
TLSStatus string `json:"tls_status"`
VerificationToken string `json:"verification_token,omitempty"`
VerifiedAt *time.Time `json:"verified_at,omitempty"`
// Routes fan the host out to other apps by path prefix (#581, ADR-060);
// AppID above is the catch-all "/" backend.
Routes []DomainRoute `json:"routes,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
Domain represents a custom domain attached to an application.
type DomainRequest ¶
type DomainRequest struct {
Domain string `json:"domain"`
// Mode selects the attachment behavior (ADR-044); empty defaults to "verified".
Mode string `json:"mode,omitempty"`
}
DomainRequest is the request body for adding or removing a domain.
type DomainRoute ¶
type DomainRoute struct {
Path string `json:"path"` // path prefix, e.g. "/api/"
AppID string `json:"app_id"` // backend app; always-on, same project as the domain
AppName string `json:"app_name,omitempty"` // joined for display; ignored on write
}
DomainRoute sends one path prefix of a hostname to a backend app (#581, ADR-060) — the cross-app counterpart to Route, which selects a path's visibility within one app. The request path reaches the backend unmodified.
type DomainStatus ¶
type DomainStatus struct {
Domain string `json:"domain"`
// Source is "custom" for a hostname someone attached, "platform" for the one
// the app was given.
Source string `json:"source"`
Mode string `json:"mode,omitempty"`
Status string `json:"status"`
TLSStatus string `json:"tls_status,omitempty"`
Owner string `json:"owner,omitempty"`
OwnerKind string `json:"owner_kind,omitempty"`
Problems []StatusProblem `json:"problems,omitempty"`
}
DomainStatus is one hostname the project serves — the app's own platform host included, not only custom ones.
type DomainVerification ¶
type DomainVerification struct {
Domain *Domain `json:"domain"`
TXTVerified bool `json:"txt_verified"`
DNSPointing bool `json:"dns_pointing"`
CertReady bool `json:"cert_ready"`
CertReason string `json:"cert_reason,omitempty"`
CertExpiry string `json:"cert_expiry,omitempty"`
TXTRecordName string `json:"txt_record_name"`
TXTRecordValue string `json:"txt_record_value"`
PointingType string `json:"pointing_type"`
PointingName string `json:"pointing_name"`
PointingValue string `json:"pointing_value"`
// AcmeCNAMEName/AcmeCNAMEValue are the one-time ACME DNS-01 delegation CNAME
// a wildcard-mode domain must add (ADR-044); empty for every other mode.
AcmeCNAMEName string `json:"acme_cname_name,omitempty"`
AcmeCNAMEValue string `json:"acme_cname_value,omitempty"`
}
DomainVerification is the ownership/pointing/cert breakdown for a custom domain plus the exact DNS records the tenant still needs to configure.
type GitHubConnectStart ¶
type GitHubConnectStart struct {
URL string `json:"url"`
}
GitHubConnectStart is where to send someone to install the Fogpipe GitHub App and authorize the connection. The URL is single-use in effect: it carries a signed, short-lived state naming the project.
type GitHubConnection ¶
type GitHubConnection struct {
ID string `json:"id"`
ProjectID string `json:"project_id"`
InstallationID string `json:"installation_id"`
AccountLogin string `json:"account_login"`
AccountType string `json:"account_type"`
ConnectedBy string `json:"connected_by,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
GitHubConnection is the GitHub account a project has proved it controls (#790). Runner pools take their scope from it, so there is no organization to name when creating one.
type GrantBillingBindingRequest ¶
type GrantBillingBindingRequest struct {
Member string `json:"member"`
MemberType string `json:"member_type,omitempty"`
Role string `json:"role"`
}
GrantBillingBindingRequest grants a billing role to a member.
type IAMBinding ¶
type IAMBinding struct {
ID string `json:"id"`
ResourceType string `json:"resource_type"`
ResourceID string `json:"resource_id"`
Role string `json:"role"`
MemberType string `json:"member_type"`
Member string `json:"member"`
CreatedAt string `json:"created_at"`
}
IAMBinding represents an IAM role binding.
type InviteOrgMemberRequest ¶
InviteOrgMemberRequest is the request body for inviting a member to an organization.
type Invoice ¶
type Invoice struct {
ID string `json:"id"`
BillingAccountID string `json:"billing_account_id"`
OrgID string `json:"org_id"`
PeriodStart time.Time `json:"period_start"`
PeriodEnd time.Time `json:"period_end"`
Status string `json:"status"` // draft, finalized, void
Currency string `json:"currency"`
// One amount, summed from the lines. No subtotal or tax: VAT is #115 and
// arrives with the code that computes it.
Total string `json:"total"`
FinalizedAt *time.Time `json:"finalized_at,omitempty"`
CreatedAt time.Time `json:"created_at"`
// Lines is populated only when fetching a single invoice.
Lines []*InvoiceLineItem `json:"lines,omitempty"`
}
Invoice is what an org owed for one closed period (#111). Amounts are decimal strings; a finalized invoice is immutable.
type InvoiceLineItem ¶
type InvoiceLineItem struct {
ResourceType string `json:"resource_type"`
ProjectID string `json:"project_id,omitempty"`
ProjectName string `json:"project_name,omitempty"`
Unit string `json:"unit"`
Quantity string `json:"quantity"`
UnitPrice string `json:"unit_price"`
Amount string `json:"amount"`
}
InvoiceLineItem is one (resource type, project, rate) component of an invoice.
UnitPrice is the rate this was BILLED at, stored on the line rather than looked up — an invoice that referenced the current price would be rewritten by the next reprice and a dispute would have no evidence left.
type Job ¶
type Job struct {
ID string `json:"id"`
ProjectID string `json:"project_id"`
AppID string `json:"app_id,omitempty"`
AppName string `json:"app_name,omitempty"`
Name string `json:"name"`
DisplayName string `json:"display_name"`
Schedule string `json:"schedule"`
Timezone string `json:"timezone"`
Concurrency string `json:"concurrency"`
MaxRetries int `json:"max_retries"`
Timeout int `json:"timeout_seconds"`
KeepRuns int `json:"keep_runs"`
// RetainSucceeded and RetainFailed age out run history per outcome, on top
// of KeepRuns; 0 means that outcome has no age bound.
RetainSucceeded int `json:"retain_succeeded_seconds"`
RetainFailed int `json:"retain_failed_seconds"`
Suspended bool `json:"suspended"`
Target string `json:"target"`
Image string `json:"image,omitempty"`
Command []string `json:"command,omitempty"`
Args []string `json:"args,omitempty"`
HTTPURL string `json:"http_url,omitempty"`
HTTPMethod string `json:"http_method,omitempty"`
HTTPHeaders map[string]string `json:"http_headers,omitempty"`
HTTPBody string `json:"http_body,omitempty"`
LastRun *JobRun `json:"last_run,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
Job is a scheduled task within a project (#166): the recipe plus when to run it. Either it runs a container image or it sends an HTTP request; referencing an app makes it inherit that app's image, config and identity.
type JobRun ¶
type JobRun struct {
ID string `json:"id"`
JobID string `json:"job_id"`
RunName string `json:"run_name"`
Trigger string `json:"trigger"`
Status string `json:"status"`
ExitCode *int `json:"exit_code,omitempty"`
Logs string `json:"logs,omitempty"`
StartedAt *time.Time `json:"started_at,omitempty"`
FinishedAt *time.Time `json:"finished_at,omitempty"`
DurationMs *int `json:"duration_ms,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
JobRun is one execution of a job — a record, not a declarable resource.
type JobRunStatus ¶
type JobRunStatus struct {
Status string `json:"status"`
Trigger string `json:"trigger,omitempty"`
ExitCode *int `json:"exit_code,omitempty"`
StartedAt *time.Time `json:"started_at,omitempty"`
FinishedAt *time.Time `json:"finished_at,omitempty"`
DurationMs *int `json:"duration_ms,omitempty"`
}
JobRunStatus is the outcome of one run, trimmed to what a status line shows.
type JobStatus ¶
type JobStatus struct {
ID string `json:"id"`
Name string `json:"name"`
Schedule string `json:"schedule"`
Timezone string `json:"timezone,omitempty"`
Target string `json:"target"`
Suspended bool `json:"suspended"`
LastRun *JobRunStatus `json:"last_run,omitempty"`
}
JobStatus is one scheduled job and its most recent run.
type LogsRequest ¶ added in v0.140.0
LogsRequest selects what GetAppLogs returns. Tail is the number of most recent lines; zero leaves the choice to the server, which also bounds it.
type MeResponse ¶
type MeResponse struct {
User *User `json:"user"`
Organization *Organization `json:"organization"`
}
MeResponse is the response from the /auth/me endpoint.
type MoveProjectResult ¶
type MoveProjectResult struct {
Project *Project `json:"project"`
Warnings []string `json:"warnings,omitempty"`
}
MoveProjectResult is the response from re-homing a project to its org-prefixed namespace: the updated project plus any per-app redeploy warnings.
type ObjectInfo ¶
type ObjectInfo struct {
Key string `json:"key"`
Size int64 `json:"size"`
LastModified time.Time `json:"last_modified"`
}
ObjectInfo is a single stored object in the in-browser object browser (#268).
type ObjectListing ¶
type ObjectListing struct {
Prefixes []string `json:"prefixes"`
Objects []ObjectInfo `json:"objects"`
}
ObjectListing is one page of a bucket's objects under a prefix; Prefixes are the "folder" common-prefixes when a delimiter is used (#268).
type OrgMember ¶
type OrgMember struct {
ID string `json:"id"`
OrganizationID string `json:"organization_id"`
UserID string `json:"user_id"`
Role string `json:"role"`
InvitedBy string `json:"invited_by,omitempty"`
InvitedEmail string `json:"invited_email,omitempty"`
Status string `json:"status"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
UserEmail string `json:"user_email,omitempty"`
UserName string `json:"user_name,omitempty"`
}
OrgMember represents a member of an organization.
type OrgSecret ¶
type OrgSecret struct {
ID string `json:"id"`
OrgID string `json:"org_id"`
Name string `json:"name"`
Keys []string `json:"keys"`
Data map[string]string `json:"data,omitempty"`
Targets []string `json:"targets"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
OrgSecret is a Fogpipe Secrets Manager bundle (ADR-028): an org-scoped named set of key/value entries. Data is populated only on an explicit reveal.
type Organization ¶
type Organization struct {
ID string `json:"id"`
Name string `json:"name"`
ShortID string `json:"short_id"`
DisplayName string `json:"display_name"`
FKEEnabled bool `json:"fke_enabled"` // operator-granted entitlement gating FKE/kubectl access
CreatedAt time.Time `json:"created_at"`
}
Organization represents a platform organization.
type PodPhases ¶
type PodPhases struct {
Running int32 `json:"running"`
Starting int32 `json:"starting"`
Terminating int32 `json:"terminating"`
// RunningSeconds is the age of the oldest running pod — how long this
// version has actually been serving.
RunningSeconds int64 `json:"running_seconds,omitempty"`
StartingSeconds int64 `json:"starting_seconds,omitempty"`
TerminatingSeconds int64 `json:"terminating_seconds,omitempty"`
}
PodPhases is how many of an app's pods are running, starting and terminating, and how long each has been in that state.
type PresignObjectRequest ¶
type PresignObjectRequest struct {
Key string `json:"key"`
Method string `json:"method"` // GET (download) or PUT (upload)
Expires int `json:"expires,omitempty"` // seconds; clamped server-side
}
PresignObjectRequest is the request body for minting a presigned object URL.
type PresignResponse ¶
type PresignResponse struct {
URL string `json:"url"`
Method string `json:"method"`
Headers map[string]string `json:"headers,omitempty"`
Expires int `json:"expires"`
}
PresignResponse is a presigned S3 URL the browser uses to GET/PUT an object directly against the object store — bytes never transit the API (#268).
type Price ¶
type Price struct {
ResourceType string `json:"resource_type"`
Currency string `json:"currency"`
UnitPrice string `json:"unit_price"`
EffectiveFrom time.Time `json:"effective_from"`
}
Price is what one unit of a metered resource costs.
The unit lives on the usage, not here — it is a property of how a resource is metered rather than of what it costs. UnitPrice is a decimal string: rates carry more precision than a cent (EUR 0.00005 per gib-hour is real) and JSON numbers are floats.
type ProbeOverrides ¶
type ProbeOverrides struct {
Liveness *ProbeSpec `json:"liveness,omitempty"`
Readiness *ProbeSpec `json:"readiness,omitempty"`
Startup *ProbeSpec `json:"startup,omitempty"`
}
ProbeOverrides lets liveness, readiness, and startup diverge from the shared HealthCheck* shorthand (#453) — e.g. a liveness probe on a cheap, dependency-free path while readiness also checks a downstream. A nil field means "use HealthCheckPath/Interval/Timeout/Retries".
type ProbeSpec ¶
type ProbeSpec struct {
Path string `json:"path,omitempty"`
InitialDelaySeconds int `json:"initial_delay_seconds,omitempty"`
PeriodSeconds int `json:"period_seconds,omitempty"`
TimeoutSeconds int `json:"timeout_seconds,omitempty"`
FailureThreshold int `json:"failure_threshold,omitempty"`
SuccessThreshold int `json:"success_threshold,omitempty"`
}
ProbeSpec is one probe's HTTP path and timing, each field independently optional (zero/empty = fall back to the shared HealthCheck* default). SuccessThreshold is only meaningful on Readiness — Kubernetes requires 1 for Liveness and Startup.
type Project ¶
type Project struct {
ID string `json:"id"`
OrganizationID string `json:"organization_id"`
Name string `json:"name"`
DisplayName string `json:"display_name"`
Status string `json:"status"` // active, suspended, deleting
Namespace string `json:"namespace"`
Egress string `json:"egress"`
MaxCPU string `json:"max_cpu"`
MaxMemory string `json:"max_memory"`
MaxPods int `json:"max_pods"`
MaxStorage string `json:"max_storage"`
IsPlatform bool `json:"is_platform,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
Project represents a Fogpipe project.
type ProjectStatus ¶
type ProjectStatus struct {
Project StatusProject `json:"project"`
Apps []AppStatus `json:"apps"`
Databases []DatabaseStatus `json:"databases"`
Jobs []JobStatus `json:"jobs"`
Domains []DomainStatus `json:"domains"`
Buckets []BucketStatus `json:"buckets"`
Runners []RunnerStatus `json:"runners"`
// Unchecked names the checks that could not be run. A report carrying these
// is incomplete, not clean — never render it as healthy.
Unchecked []UncheckedStatus `json:"unchecked,omitempty"`
ObservedAt time.Time `json:"observed_at"`
}
ProjectStatus is the whole project in one document (GET /projects/{id}/status) — every resource kind with its derived status and the problems attached to the resource they belong to.
type ProvisionUserRequest ¶
type ProvisionUserRequest struct {
Email string `json:"email"`
Name string `json:"name"`
Role string `json:"role,omitempty"`
}
ProvisionUserRequest is the request body for admin-provisioning a user into an existing organization (POST /api/v1/orgs/{orgID}/users).
type PublishBucketWebsiteRequest ¶
type PublishBucketWebsiteRequest struct {
Version int `json:"version"`
}
PublishBucketWebsiteRequest is the request body for atomically flipping a website bucket to an already-uploaded version (#439).
type RatedLine ¶
type RatedLine struct {
ResourceType string `json:"resource_type"`
Unit string `json:"unit"`
Quantity string `json:"quantity"`
// Empty when Priced is false.
UnitPrice string `json:"unit_price,omitempty"`
Amount string `json:"amount,omitempty"`
Currency string `json:"currency"`
// Priced is false when the resource is metered but has no price in effect.
// Reported rather than billed at zero — metering keeps adding resource types
// and each arrives before anyone has priced it.
Priced bool `json:"priced"`
}
RatedLine is one priced component of a period's usage (#112).
One line per (resource type, RATE) — a period spanning a price change yields two lines for the same resource, each at the rate that actually applied. Grouping these by resource type alone double-counts or silently picks one rate.
Quantity, UnitPrice and Amount are decimal strings for the same reason UsageEntry.Quantity is: the arithmetic happens in Postgres NUMERIC and a float64 round-trip loses exactness money cannot afford. Parse only to format.
type RatedPeriod ¶
type RatedPeriod struct {
Lines []*RatedLine `json:"lines"`
Total string `json:"total"`
Currency string `json:"currency"`
UnpricedTypes []string `json:"unpriced_types,omitempty"`
}
RatedPeriod is what a scope's usage came to over a period.
Total covers the priced lines only, and UnpricedTypes names what it left out. A non-empty UnpricedTypes means Total is an understatement and a surface showing it has to say so.
type RegisterResponse ¶
type RegisterResponse struct {
User *User `json:"user"`
Organization *Organization `json:"organization"`
APIKey string `json:"api_key"`
}
RegisterResponse is the response from provisioning a user account.
type RegistryImage ¶
type RegistryImage struct {
Tag string `json:"tag"`
Digest string `json:"digest,omitempty"`
Size int64 `json:"size,omitempty"`
FirstSeenAt *time.Time `json:"first_seen_at,omitempty"`
Vulnerabilities *RegistryVulnerabilities `json:"vulnerabilities,omitempty"`
}
RegistryImage is one tagged image with metadata from the zot search extension. Size/Digest are zero when the search extension is unavailable.
FirstSeenAt is when the registry was first seen holding this manifest, which fpcloud records itself. It is not the image's build date: the only timestamp an OCI image carries is the one its builder wrote, and reproducible builds pin that to a fixed epoch. Nil means no record yet, not old.
type RegistryImageList ¶
type RegistryImageList struct {
Repository string `json:"repository"`
Images []RegistryImage `json:"images"`
}
RegistryImageList is the enriched set of images for one repository.
type RegistryRepoVisibility ¶
type RegistryRepoVisibility struct {
ProjectID string `json:"project_id"`
Repo string `json:"repo"`
Public bool `json:"public"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
RegistryRepoVisibility is a per-repository public/private setting (ADR-013 S4). A repo with Public = true is anonymously pullable; absence of a record means private. Repo is the project-relative name.
type RegistryRepository ¶
type RegistryRepository struct {
Name string `json:"name"`
}
RegistryRepository is one image repository visible to a project, with the <org_short_id>/<project>/ prefix stripped for display.
type RegistryRetentionPolicy ¶
type RegistryRetentionPolicy struct {
ID string `json:"id"`
ProjectID string `json:"project_id"`
Repo string `json:"repo"`
KeepLast int `json:"keep_last"`
MaxAgeDays int `json:"max_age_days"`
Enabled bool `json:"enabled"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
RegistryRetentionPolicy is an auto-delete rule for a project's registry repos. An empty Repo is the project-wide default. KeepLast keeps the newest N tags; MaxAgeDays deletes tags older than N days (newest KeepLast always protected).
type RegistryTagList ¶
RegistryTagList is the set of image tags for one repository.
type RegistryVulnerabilities ¶
type RegistryVulnerabilities struct {
MaxSeverity string `json:"max_severity"`
Total int `json:"total"`
Critical int `json:"critical"`
High int `json:"high"`
Medium int `json:"medium"`
Low int `json:"low"`
Unknown int `json:"unknown"`
}
RegistryVulnerabilities is a CVE severity roll-up for one image, from zot's search-extension Trivy scanner. Nil/absent when CVE scanning is not enabled.
type RestoreRequest ¶
type RestoreRequest struct {
PointInTime string `json:"point_in_time,omitempty"`
TargetName string `json:"target_name"`
}
RestoreRequest is the request body for restoring a database from backup.
type RetentionPreview ¶
type RetentionPreview struct {
Items []RetentionPreviewItem `json:"items"`
}
RetentionPreview is the dry-run (or applied) set of retention deletions.
type RetentionPreviewItem ¶
type RetentionPreviewItem struct {
Repo string `json:"repo"`
Tag string `json:"tag"`
Digest string `json:"digest,omitempty"`
Reason string `json:"reason"`
FirstSeenAt *time.Time `json:"first_seen_at,omitempty"`
}
RetentionPreviewItem is one tag a retention policy would delete.
type Revision ¶
type Revision struct {
Name string `json:"name"`
Ready bool `json:"ready"`
Image string `json:"image"`
CreatedAt string `json:"created_at"`
}
Revision represents a Knative revision for an application.
type RollbackRequest ¶
type RollbackRequest struct {
// Release is the release to return to; empty or "prev" means the one before
// the current version.
Release string `json:"release,omitempty"`
// ConfirmMigrations proceeds past the warning that the rollback crosses
// release commands, which are not reversed.
ConfirmMigrations bool `json:"confirm_migrations,omitempty"`
}
RollbackRequest is the request body for rolling back an app to a previous release (#471).
type RolloutStatus ¶
type RolloutStatus struct {
Desired int32 `json:"desired"`
Updated int32 `json:"updated"`
Total int32 `json:"total"`
Available int32 `json:"available"`
Reason string `json:"reason"`
}
RolloutStatus is an app mid-deploy: how many replicas are on the new template, how many exist in total (old ones included), and what it is waiting for.
type Route ¶
type Route struct {
Path string `json:"path"` // path prefix, e.g. "/internal/"
Visibility string `json:"visibility"` // "internal" or "public"
}
Route carves a path prefix out of an app's app-wide ingress visibility (#501). A route marked internal is withheld from the external ingress while staying reachable on the app's in-cluster address — where a scheduled job's self-call or an admin endpoint wants to live. Always-on mode, ingress=all only.
type Runner ¶
type Runner struct {
ID string `json:"id"`
ProjectID string `json:"project_id"`
Name string `json:"name"`
DisplayName string `json:"display_name"`
GitHubConfigURL string `json:"github_config_url"`
RunnerGroup string `json:"runner_group"`
MinRunners int `json:"min_runners"`
MaxRunners int `json:"max_runners"`
Image string `json:"image,omitempty"`
CPU string `json:"cpu,omitempty"`
Memory string `json:"memory,omitempty"`
// Builder is the image builder that runs alongside each job, or nil for a
// pool that builds nothing (ADR-071). CPU and Memory bound the builder, not
// the runner — a read always fills them in, so the pod's cost is the sum of
// two numbers you can see.
Builder *RunnerBuilder `json:"builder,omitempty"`
// Credential is which source the pool authenticates with: platform (the
// Fogpipe GitHub App), app (your own), or token.
Credential string `json:"credential"`
// The private key and the token are write-only and never come back.
GitHubAppID string `json:"github_app_id,omitempty"`
GitHubAppInstallationID string `json:"github_app_installation_id,omitempty"`
// Labels is what a workflow puts in `runs-on`.
Labels []string `json:"labels,omitempty"`
Status string `json:"status,omitempty"`
CurrentRunners int `json:"current_runners,omitempty"`
Message string `json:"message,omitempty"`
// Problems are failures on the pool's own pods — a runner killed for
// exceeding its memory above all. They do not make the pool unhealthy: the
// controller replaces the pod, so Status stays `running` while the job that
// was on it is the thing that died.
Problems []StatusProblem `json:"problems,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
Runner is a managed GitHub Actions runner pool: a declaration the platform turns into ephemeral pods, one per job, in the project's namespace.
type RunnerBuilder ¶ added in v0.122.0
type RunnerBuilder struct {
CPU string `json:"cpu,omitempty"`
Memory string `json:"memory,omitempty"`
}
RunnerBuilder is the rootless image builder a pool runs alongside each job (ADR-064), and what it costs (ADR-071).
The runner and the builder are two processes with unrelated appetites — the runner's memory follows the workflow's steps, the builder's follows the Dockerfile — so the builder carries its own sizing rather than inheriting the pool's. An unset field takes the platform's default for a builder, which is not the pool's own size.
type RunnerStatus ¶
type RunnerStatus struct {
ID string `json:"id"`
Name string `json:"name"`
Status string `json:"status"`
CurrentRunners int `json:"current_runners"`
MinRunners int `json:"min_runners"`
MaxRunners int `json:"max_runners"`
Message string `json:"message,omitempty"`
}
RunnerStatus is one CI runner pool and how many runners are alive in it.
type ScaleRequest ¶
type ScaleRequest struct {
MinScale *int32 `json:"min_scale,omitempty"`
MaxScale *int32 `json:"max_scale,omitempty"`
Replicas *int32 `json:"replicas,omitempty"`
CPULimit string `json:"cpu_limit,omitempty"`
MemoryLimit string `json:"memory_limit,omitempty"`
}
ScaleRequest is the request body for scaling an app.
type SecurityContext ¶
type SecurityContext struct {
RunAsUser *int64 `json:"run_as_user,omitempty"`
RunAsGroup *int64 `json:"run_as_group,omitempty"`
FSGroup *int64 `json:"fs_group,omitempty"`
RunAsNonRoot bool `json:"run_as_non_root,omitempty"`
ReadOnlyRootFilesystem bool `json:"read_only_root_filesystem,omitempty"`
}
SecurityContext hardens an app's pod/container (nil = image default).
type ServiceAccount ¶
type ServiceAccount struct {
ID string `json:"id"`
ProjectID string `json:"project_id"`
Name string `json:"name"`
DisplayName string `json:"display_name"`
Email string `json:"email"`
Status string `json:"status"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
ServiceAccount represents a service account.
type ServiceAccountKey ¶
type ServiceAccountKey struct {
ID string `json:"id"`
ServiceAccountID string `json:"service_account_id"`
APIKey string `json:"api_key,omitempty"`
Prefix string `json:"prefix"`
CreatedAt string `json:"created_at"`
ExpiresAt *string `json:"expires_at,omitempty"`
}
ServiceAccountKey represents a service account key.
type SetBackupDestinationRequest ¶ added in v0.132.0
type SetBackupDestinationRequest struct {
Provider string `json:"provider"` // "aws" | "gcp" | "s3"
Bucket string `json:"bucket"`
Region string `json:"region,omitempty"`
Prefix string `json:"prefix,omitempty"`
FlatLayout bool `json:"flat_layout,omitempty"` // skip the <project>/<database> nesting under prefix
RoleARN string `json:"role_arn,omitempty"`
WIFProvider string `json:"wif_provider,omitempty"`
ServiceAccount string `json:"service_account,omitempty"`
Audience string `json:"audience,omitempty"`
Endpoint string `json:"endpoint,omitempty"` // s3
AccessKeyID string `json:"access_key_id,omitempty"` // s3
SecretAccessKey string `json:"secret_access_key,omitempty"` // s3 (write-only)
Schedule string `json:"schedule,omitempty"`
}
SetBackupDestinationRequest is what configures a database's external backup target. It is a separate type from BackupDestination on purpose: that one is the server's answer and carries fields the server owns (`enabled`, the last run), which a write neither sets nor is allowed to send.
type SetBucketCORSRequest ¶ added in v0.135.0
type SetBucketCORSRequest struct {
Rules []BucketCORSRuleRequest `json:"rules"`
}
SetBucketCORSRequest replaces a bucket's whole CORS configuration. Whole-set rather than per-rule because a rule has no key to address it by, and the object store's own PutBucketCors replaces the entire document too. An empty list means "allow no cross-origin access".
type SetBucketLifecycleRuleRequest ¶
type SetBucketLifecycleRuleRequest struct {
Prefix string `json:"prefix"`
ExpireDays int `json:"expire_days,omitempty"`
AbortIncompleteUploadDays int `json:"abort_incomplete_upload_days,omitempty"`
}
SetBucketLifecycleRuleRequest upserts the expiry rule for one prefix; other prefixes' rules are untouched.
type SetBucketQuotaRequest ¶
type SetBucketQuotaRequest struct {
QuotaMaxSize int64 `json:"quota_max_size"`
QuotaMaxObjects int64 `json:"quota_max_objects"`
}
SetBucketQuotaRequest is the request body for updating a bucket's quotas.
type SetBucketURLSlugRequest ¶
type SetBucketURLSlugRequest struct {
URLSlug string `json:"url_slug"`
}
SetBucketURLSlugRequest is the request body for setting (or clearing, with "") a bucket website's vanity host label.
type SetBucketWebsiteRequest ¶
type SetBucketWebsiteRequest struct {
Enabled bool `json:"enabled"`
IndexDocument string `json:"index_document,omitempty"`
ErrorDocument string `json:"error_document,omitempty"`
}
SetBucketWebsiteRequest is the request body for toggling static-website serving on a bucket (#342). Enabling makes the bucket world-readable over HTTP; the index/error documents are optional (index defaults to index.html).
type SetBudgetRequest ¶
type SetBudgetRequest struct {
Amount string `json:"amount"`
Currency string `json:"currency,omitempty"`
Thresholds []int `json:"thresholds,omitempty"`
}
SetBudgetRequest sets an org's budget. Empty Thresholds means the defaults (50/90/100).
type SetConfigRequest ¶
type SetConfigRequest struct {
Key string `json:"key"`
Value string `json:"value"`
IsSecret bool `json:"is_secret"`
}
SetConfigRequest is the request body for setting a config value.
type SetDomainRoutesRequest ¶
type SetDomainRoutesRequest struct {
Routes []DomainRoute `json:"routes"`
}
SetDomainRoutesRequest replaces a domain's path->app route table (#581). Replace-in-full: an empty list clears the fan-out.
type SetIAMBindingRequest ¶
type SetIAMBindingRequest struct {
Role string `json:"role"`
MemberType string `json:"member_type"`
Member string `json:"member"`
}
SetIAMBindingRequest is the request body for setting an IAM binding.
type SetKubeServiceAccountRequest ¶
type SetKubeServiceAccountRequest struct {
KubeServiceAccount string `json:"kube_service_account"`
}
SetKubeServiceAccountRequest is the request body for naming the Kubernetes ServiceAccount an app's pods run as. Empty clears it back to the hardened default (default ServiceAccount, no token mounted).
type SetOrgFKERequest ¶
type SetOrgFKERequest struct {
Enabled *bool `json:"enabled"`
}
SetOrgFKERequest toggles the FKE entitlement. Operator-only: it targets PUT /admin/orgs/{id}/fke, not the tenant PATCH (#710). Pointer so an omitted field is refused rather than read as "disable".
type SetQuotaRequest ¶
type SetQuotaRequest struct {
MaxCPU *string `json:"max_cpu,omitempty"`
MaxMemory *string `json:"max_memory,omitempty"`
MaxPods *int `json:"max_pods,omitempty"`
MaxStorage *string `json:"max_storage,omitempty"`
}
SetQuotaRequest carries the ADR-035 resource caps. Operator-only: it targets PUT /admin/projects/{id}/quota, not the tenant PATCH (#710).
type SetRegistryVisibilityRequest ¶
SetRegistryVisibilityRequest upserts a repository's visibility for (project, repo).
type SetRetentionPolicyRequest ¶
type SetRetentionPolicyRequest struct {
Repo string `json:"repo"`
KeepLast int `json:"keep_last"`
MaxAgeDays int `json:"max_age_days"`
Enabled bool `json:"enabled"`
}
SetRetentionPolicyRequest upserts a retention policy for (project, repo).
type SetSecurityContextRequest ¶
type SetSecurityContextRequest struct {
SecurityContext *SecurityContext `json:"security_context"`
}
UpdateCommandRequest is the request body for changing an app's container entrypoint override and arguments. Each field is optional: a nil pointer leaves the value untouched, a non-nil pointer (including an empty array) replaces it — an empty array clears the override back to the image defaults. SetSecurityContextRequest replaces an app's security context. A nil SecurityContext clears it back to the platform default.
type SetTrafficRequest ¶
type SetTrafficRequest struct {
Targets []TrafficTarget `json:"targets"`
}
SetTrafficRequest is the request body for setting traffic split.
type SetupWebhookRequest ¶
type SetupWebhookRequest struct {
Repo string `json:"repo"`
Branch string `json:"branch"`
ImagePattern string `json:"image_pattern"`
}
SetupWebhookRequest is the request body for setting up a webhook.
type StatusProblem ¶
type StatusProblem struct {
Reason string `json:"reason"`
Detail string `json:"detail,omitempty"`
Count int32 `json:"count,omitempty"`
Since string `json:"since,omitempty"`
}
StatusProblem is one thing wrong with one resource, in the same shape whatever kind it belongs to.
type StatusProject ¶
type StatusProject struct {
ID string `json:"id"`
OrganizationID string `json:"organization_id"`
Name string `json:"name"`
DisplayName string `json:"display_name"`
Namespace string `json:"namespace"`
Status string `json:"status"`
Egress string `json:"egress"`
MaxCPU string `json:"max_cpu,omitempty"`
MaxMemory string `json:"max_memory,omitempty"`
MaxPods int `json:"max_pods,omitempty"`
MaxStorage string `json:"max_storage,omitempty"`
}
StatusProject is the project itself and the caps its namespace is held to.
type SwitchModeRequest ¶
type SwitchModeRequest struct {
Mode string `json:"mode"`
}
SwitchModeRequest is the request body for switching an app's hosting mode.
type TrafficResponse ¶
type TrafficResponse struct {
Targets []TrafficTarget `json:"targets"`
}
TrafficResponse is the response for traffic operations.
type TrafficTarget ¶
type TrafficTarget struct {
Revision string `json:"revision"`
Percent int64 `json:"percent"`
URL string `json:"url,omitempty"`
}
TrafficTarget represents a traffic routing target.
type TrustBinding ¶
type TrustBinding struct {
ID string `json:"id"`
Issuer string `json:"issuer"`
Audience string `json:"audience"`
SubjectPattern string `json:"subject_pattern"`
ServiceAccountID string `json:"service_account_id"`
TokenTTLSeconds int `json:"token_ttl_seconds"`
CreatedAt time.Time `json:"created_at"`
}
TrustBinding is a per-project OIDC federation trust binding: a repo (matched by SubjectPattern) on Issuer, carrying Audience, may assume ServiceAccountID.
type UncheckedStatus ¶
UncheckedStatus is a check that did not run, and why.
type UpdateAppRequest ¶
type UpdateAppRequest struct {
DisplayName string `json:"display_name,omitempty"`
URLSlug *string `json:"url_slug,omitempty"`
// Database binds the unprefixed DATABASE_URL to one of the project's
// databases (#544); a pointer to "" clears it back to the default.
Database *string `json:"database,omitempty"`
}
UpdateAppRequest is the request body for PATCH /api/v1/apps/{appID}. Both fields are optional: display_name changes the app's cosmetic label (the frozen name is not renamable in place); url_slug sets or clears the optional vanity host override (ADR-040) — a non-nil pointer to "" clears it back to the derived host.
type UpdateBackupConfigRequest ¶ added in v0.132.0
type UpdateBackupConfigRequest struct {
Enabled bool `json:"enabled"`
Schedule string `json:"schedule,omitempty"`
Retention string `json:"retention,omitempty"`
}
UpdateBackupConfigRequest is what turns managed backups on or off and sets their schedule and retention. Separate from BackupConfig for the same reason: the read carries derived state (the recoverability point, the problems) that is the server's to report and nobody's to send.
type UpdateBucketKeyPermissionsRequest ¶
type UpdateBucketKeyPermissionsRequest struct {
Read bool `json:"read"`
Write bool `json:"write"`
Owner bool `json:"owner"`
}
UpdateBucketKeyPermissionsRequest is the request body for changing a key's grants.
type UpdateCommandRequest ¶
type UpdateDatabaseRequest ¶
type UpdateDatabaseRequest struct {
DisplayName string `json:"display_name,omitempty"`
CPU string `json:"cpu,omitempty"`
Memory string `json:"memory,omitempty"`
Storage string `json:"storage,omitempty"`
Version string `json:"version,omitempty"`
Instances *int64 `json:"instances,omitempty"`
Pooler *bool `json:"pooler,omitempty"`
// Extensions replaces the installed set; nil leaves it unchanged, an empty
// list uninstalls what the platform installed.
Extensions *[]string `json:"extensions,omitempty"`
}
UpdateDatabaseRequest is the request body for reconciling a database's spec. Empty strings and nil pointers mean "leave unchanged".
type UpdateJobRequest ¶
type UpdateJobRequest struct {
DisplayName *string `json:"display_name,omitempty"`
Schedule *string `json:"schedule,omitempty"`
Timezone *string `json:"timezone,omitempty"`
Concurrency *string `json:"concurrency,omitempty"`
MaxRetries *int `json:"max_retries,omitempty"`
Timeout *int `json:"timeout_seconds,omitempty"`
KeepRuns *int `json:"keep_runs,omitempty"`
RetainSucceeded *int `json:"retain_succeeded_seconds,omitempty"`
RetainFailed *int `json:"retain_failed_seconds,omitempty"`
Suspended *bool `json:"suspended,omitempty"`
Image *string `json:"image,omitempty"`
Command *[]string `json:"command,omitempty"`
Args *[]string `json:"args,omitempty"`
HTTPURL *string `json:"http_url,omitempty"`
HTTPMethod *string `json:"http_method,omitempty"`
HTTPHeaders *map[string]string `json:"http_headers,omitempty"`
HTTPBody *string `json:"http_body,omitempty"`
}
UpdateJobRequest patches a job; a nil field is left unchanged. Identity (project, name, app) is immutable.
type UpdateOrgMemberRoleRequest ¶
type UpdateOrgMemberRoleRequest struct {
Role string `json:"role"`
}
UpdateOrgMemberRoleRequest is the request body for updating a member's role.
type UpdateOrgRequest ¶
type UpdateOrgRequest struct {
DisplayName string `json:"display_name,omitempty"`
}
UpdateOrgRequest is the request body for updating an organization. FKEEnabled is a pointer so an omitted field is distinguishable from an explicit false; DisplayName changes the mutable cosmetic label.
type UpdateProbesRequest ¶
type UpdateProbesRequest struct {
Probes *ProbeOverrides `json:"probes"`
}
UpdateProbesRequest replaces an app's per-probe liveness/readiness/startup overrides (#453). nil clears them, reverting every probe to the shared HealthCheck* shorthand.
type UpdateProjectRequest ¶
type UpdateProjectRequest struct {
DisplayName string `json:"display_name,omitempty"`
Egress string `json:"egress,omitempty"`
}
UpdateProjectRequest is the request body for updating a project.
type UpdateRoutesRequest ¶
type UpdateRoutesRequest struct {
Routes []Route `json:"routes"`
}
UpdateRoutesRequest replaces an app's per-route visibility carve-outs (#501). Replace-in-full: an empty list clears every carve-out.
type UpdateRunnerBuilderRequest ¶ added in v0.122.0
type UpdateRunnerBuilderRequest struct {
Builder *RunnerBuilder `json:"builder"`
}
UpdateRunnerBuilderRequest replaces a pool's builder. nil removes it, so the pod goes back to a single container.
Its own request rather than a field on UpdateRunnerRequest, matching UpdateProbesRequest: a patch leaves an omitted field unchanged, which leaves no way to say "remove".
type UpdateRunnerRequest ¶
type UpdateRunnerRequest struct {
DisplayName *string `json:"display_name,omitempty"`
GitHubAccount *string `json:"github_account,omitempty"`
RunnerGroup *string `json:"runner_group,omitempty"`
MinRunners *int `json:"min_runners,omitempty"`
MaxRunners *int `json:"max_runners,omitempty"`
Image *string `json:"image,omitempty"`
CPU *string `json:"cpu,omitempty"`
Memory *string `json:"memory,omitempty"`
Credential *string `json:"credential,omitempty"`
GitHubAppID *string `json:"github_app_id,omitempty"`
GitHubAppInstallationID *string `json:"github_app_installation_id,omitempty"`
GitHubAppPrivateKey *string `json:"github_app_private_key,omitempty"`
GitHubToken *string `json:"github_token,omitempty"`
}
UpdateRunnerRequest patches a runner pool; a nil field is left unchanged. Identity (project, name) is immutable.
type UpdateServiceAccountRequest ¶
type UpdateServiceAccountRequest struct {
DisplayName string `json:"display_name,omitempty"`
}
UpdateServiceAccountRequest is the request body for updating a service account's mutable cosmetic display name.
type UpdateStorageRequest ¶
type UpdateStorageRequest struct {
Storage string `json:"storage"`
}
UpdateStorageRequest is the request body for growing an app's persistent storage.
type UsageEntry ¶
type UsageEntry struct {
ProjectID string `json:"project_id,omitempty"`
ProjectName string `json:"project_name,omitempty"`
// AppID names either an app or a database; ResourceType distinguishes them
// (compute.*/volume.* = app, database.* = database). Empty means the usage
// belongs to the project rather than to any one workload.
AppID string `json:"app_id,omitempty"`
AppName string `json:"app_name,omitempty"`
Day *time.Time `json:"day,omitempty"` // set only when grouped by day
// ResourceType is an opaque token (compute.cpu, database.storage, …). New
// ones appear as metering grows — never enumerate them.
ResourceType string `json:"resource_type"`
Unit string `json:"unit"`
// Quantity is a decimal string, not a number: the underlying column is
// NUMERIC because a float sum over a month of hourly rows drifts. Parse it
// only to format it.
Quantity string `json:"quantity"`
}
UsageEntry is one aggregated slice of metered usage — a quantity of one resource type over a period, along whichever axis was requested (#675).
Identity is a name snapshot rather than a join: usage outlives the resource that produced it, so a deleted app still reports what it consumed.
type User ¶
type User struct {
ID string `json:"id"`
Email string `json:"email"`
Name string `json:"name"`
OrganizationID string `json:"organization_id"`
Status string `json:"status"`
CreatedAt time.Time `json:"created_at"`
}
User represents a registered platform user.
type VolumeMount ¶
type VolumeMount struct {
Source string `json:"source"` // "configmap", "secret", or "emptydir"
Name string `json:"name"` // ConfigMap/Secret name (ignored for emptydir)
MountPath string `json:"mount_path"` // container path to mount at
SubPath string `json:"sub_path,omitempty"` // mount a single key instead of the whole dir
}
VolumeMount mounts a ConfigMap/Secret as read-only files, or an emptyDir as writable scratch, at a container path.