Documentation
¶
Index ¶
- type ActivityEvent
- type BootstrapTokenValidateRequest
- type BootstrapTokenValidateResponse
- type CreateKeyRequest
- type CreateKeyResponse
- type DetailedHealthResponse
- type DiskInfo
- type DockerInfo
- type DockerStorageInfo
- type GVisorInfo
- type HealthResponse
- type KeyInfo
- type KeyRecoverRequest
- type KeyRecoverResponse
- type QuotaUpdateRequest
- type QuotaUpdateResponse
- type ReactivateResponse
- type RegisterRequest
- type RegisterResponse
- type Server
- type ServerConfig
- type TenantResponse
- type TenantUsageBucket
- type TenantUsageResponse
- type UpdateTenantRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActivityEvent ¶
type ActivityEvent struct {
ID string `json:"id"`
ResourceType string `json:"resource_type"`
ResourceID string `json:"resource_id"`
ResourceName string `json:"resource_name,omitempty"`
Action string `json:"action"`
Status string `json:"status,omitempty"`
Message string `json:"message"`
CreatedAt int64 `json:"created_at"`
ServiceID string `json:"service_id,omitempty"`
}
type BootstrapTokenValidateRequest ¶
type BootstrapTokenValidateRequest struct {
Token string `json:"token"`
}
BootstrapTokenValidateRequest is the body for POST /v1/system/bootstrap-token/validate.
type BootstrapTokenValidateResponse ¶
type BootstrapTokenValidateResponse struct {
Valid bool `json:"valid"`
}
BootstrapTokenValidateResponse indicates whether the provided token is valid.
type CreateKeyRequest ¶
type CreateKeyResponse ¶
type DetailedHealthResponse ¶
type DetailedHealthResponse struct {
Status string `json:"status"`
Docker DockerInfo `json:"docker"`
GVisor GVisorInfo `json:"gvisor"`
Disk DiskInfo `json:"disk"`
DockerDisk DiskInfo `json:"docker_disk"`
DockerStorage *DockerStorageInfo `json:"docker_storage,omitempty"`
TraefikNetworks *int `json:"traefik_networks,omitempty"`
}
type DockerInfo ¶
type DockerStorageInfo ¶
type DockerStorageInfo struct {
ImagesSizeBytes int64 `json:"images_size_bytes"`
ContainersSizeBytes int64 `json:"containers_size_bytes"`
VolumesSizeBytes int64 `json:"volumes_size_bytes"`
BuildCacheSizeBytes int64 `json:"build_cache_size_bytes"`
TotalSizeGB float64 `json:"total_size_gb"`
}
DockerStorageInfo holds Docker object storage sizes from the Docker system df API.
type GVisorInfo ¶
type HealthResponse ¶
type HealthResponse struct {
Status string `json:"status"`
}
type KeyRecoverRequest ¶
type KeyRecoverRequest struct {
Email string `json:"email"`
BootstrapToken string `json:"bootstrap_token"`
}
KeyRecoverRequest is the body accepted by POST /v1/auth/recover. Authentication is via the admin token (bootstrap token if none configured), not an API key, so this endpoint can be called even when the tenant has no valid keys remaining.
type KeyRecoverResponse ¶
type KeyRecoverResponse struct {
ID string `json:"id"`
Key string `json:"key"`
Name string `json:"name"`
CreatedAt int64 `json:"created_at"`
Warning string `json:"warning,omitempty"`
RevokedKeyID string `json:"revoked_key_id,omitempty"`
}
KeyRecoverResponse mirrors CreateKeyResponse so callers can treat both responses the same way. The raw key is shown exactly once. When a key slot was auto-revoked to make room, Warning and RevokedKeyID are populated so the caller knows what happened.
type QuotaUpdateRequest ¶
type QuotaUpdateRequest struct {
MaxServices *int `json:"max_services,omitempty"`
MaxDatabases *int `json:"max_databases,omitempty"`
MaxBuildsConcurrent *int `json:"max_builds_concurrent,omitempty"`
MaxEnvVarsPerService *int `json:"max_env_vars_per_service,omitempty"`
}
QuotaUpdateRequest is the request body for PATCH /v1/tenants/{tenantID}/quotas. All fields are optional pointers — only non-nil fields are updated.
type QuotaUpdateResponse ¶
type QuotaUpdateResponse struct {
TenantID string `json:"tenant_id"`
MaxServices int `json:"max_services"`
MaxDatabases int `json:"max_databases"`
MaxBuildsConcurrent int `json:"max_builds_concurrent"`
MaxEnvVarsPerService int `json:"max_env_vars_per_service"`
MaxMemoryMB int `json:"max_memory_mb"`
MaxCPUCores float64 `json:"max_cpu_cores"`
MaxDiskGB int `json:"max_disk_gb"`
APIRateLimit int `json:"api_rate_limit"`
}
QuotaUpdateResponse is the response body for PATCH /v1/tenants/{tenantID}/quotas.
type ReactivateResponse ¶
type ReactivateResponse struct {
TenantID string `json:"tenant_id"`
APIKey string `json:"api_key"`
Status string `json:"status"`
}
ReactivateResponse is the response body for POST /v1/tenants/{tenantID}/reactivate. It returns the new API key so the operator can hand it to the tenant.
type RegisterRequest ¶
type RegisterResponse ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(cfg ServerConfig) *Server
type ServerConfig ¶
type ServerConfig struct {
Store *db.Store
MasterKey []byte
DevMode bool
BootstrapTokens []string
AdminTokens []string // operator-only endpoints (recover/reactivate/quota); empty = fall back to BootstrapTokens
OpenRegistration bool
Docker docker.Client
BuildManager *builds.Manager
DeploymentStore *deployments.Store
DatabaseManager databaseManager
KanbanManager kanbanManager
MeteringStore *metering.Store
EnvironmentManager *environments.Manager
BaseDomain string
TraefikConfigDir string
DataDir string // data dir for health disk checks (default /var/lib/ah)
ExternalTLSTerminated bool
}
type TenantResponse ¶
type TenantUsageBucket ¶
type TenantUsageResponse ¶
type TenantUsageResponse struct {
Services TenantUsageBucket `json:"services"`
Databases TenantUsageBucket `json:"databases"`
APIKeys TenantUsageBucket `json:"api_keys"`
MemoryMB int `json:"memory_mb"`
CPUCores float64 `json:"cpu_cores"`
DiskGB int `json:"disk_gb"`
RateLimit int `json:"rate_limit"`
}
type UpdateTenantRequest ¶
type UpdateTenantRequest struct {
Name *string `json:"name,omitempty"`
}