Documentation
¶
Index ¶
- Variables
- func SortVariableResponse(vars []*VariableResponseItem)
- type AvailableVariableReference
- type BaseVariablesInput
- type BaseVariablesJSONInput
- type CertManagerConditionType
- type CreateDeploymentInput
- type CreatePVCInput
- type CreateRegistryInput
- type CreateServiceGroupInput
- type CreateServiceInput
- type DNSStatus
- type DeletePVCInput
- type DeleteRegistryInput
- type DeleteServiceGroupInput
- type DeploymentInputRequirements
- type DeploymentResponse
- type EndpointDiscovery
- type EnvironmentResponse
- type EventRecord
- type EventType
- type GetDeploymentBaseInput
- type GetDeploymentByIDInput
- type GetDeploymentsInput
- type GetPVCInput
- type GetRegistryInput
- type GetServiceGroupInput
- type IngressEndpoint
- type InstanceHealthInput
- type InstanceStatusInput
- type InstanceType
- type ListPVCInput
- type ListServiceGroupsInput
- type LogQueryInput
- type LogStreamInput
- type LogType
- type MetricDetail
- type MetricType
- type MetricsMapEntry
- type MetricsQueryInput
- type MetricsResult
- type MetricsType
- type MetricsVolumeQueryInput
- type NodeMetricType
- type NodeMetricsMapEntry
- type NodeMetricsQueryInput
- type NodeMetricsResult
- type PVCInfo
- type PVCStats
- type PaginationParams
- type PaginationResponseMetadata
- type PersistentVolumeClaimPhase
- type ProjectResponse
- type PvcScope
- type RedeployExistingDeploymentInput
- type RegistryResponse
- type ResolveVariableReferenceInput
- type S3BackendCreateInput
- type S3Bucket
- type S3Response
- type SecretData
- type ServiceConfigResponse
- type ServiceEndpoint
- type ServiceGroupResponse
- type ServiceResponse
- type SetDefaultRegistryInput
- type SortByField
- type SortInput
- type SortOrder
- type TeamResponse
- type TemplateDeployInput
- type TemplateInputValue
- type TemplateShortResponse
- type TemplateWithDefinitionResponse
- type TlsDetails
- type TlsStatus
- type UpdatePVCInput
- type UpdateProjectInput
- type UpdateServiceGroupInput
- type UpdateServiceInput
- type VariableDeleteInput
- type VariableReferenceInputItem
- type VariableReferenceResponse
- type VariableResponse
- type VariableResponseItem
- type VariableUpdateBehavior
- type VolumeMetricsResult
- type WebhookCreateInput
- type WebhookGetInput
- type WebhookListInput
- type WebhookResponse
- type WebhookUpdateInput
Constants ¶
This section is empty.
Variables ¶
var LogTypeValues = []LogType{ LogTypeTeam, LogTypeProject, LogTypeEnvironment, LogTypeService, LogTypeDeployment, LogTypeBuild, }
var MetricsTypeValues = []MetricsType{ MetricsTypeTeam, MetricsTypeProject, MetricsTypeEnvironment, MetricsTypeService, }
var SortByFieldValues = []SortByField{ SortByCreatedAt, SortByUpdatedAt, }
var SortOrderValues = []SortOrder{ SortOrderAsc, SortOrderDesc, }
Functions ¶
func SortVariableResponse ¶
func SortVariableResponse(vars []*VariableResponseItem)
Sort by type then name
Types ¶
type AvailableVariableReference ¶
type AvailableVariableReference struct {
Type schema.VariableReferenceType `json:"type"`
SourceKubernetesName string `json:"source_kubernetes_name"`
SourceName string `json:"source_name"`
SourceIcon string `json:"source_icon"`
SourceType schema.VariableReferenceSourceType `json:"source_type"`
SourceID uuid.UUID `json:"source_id"`
Keys []string `json:"keys"`
}
func TransformAvailableVariableResponse ¶
func TransformAvailableVariableResponse(secretData []SecretData, endpoints *EndpointDiscovery, kubernetesNameMap map[uuid.UUID]string, nameMap map[uuid.UUID]string, iconMap map[uuid.UUID]string) []AvailableVariableReference
type BaseVariablesInput ¶
type BaseVariablesInput struct {
Type schema.VariableReferenceSourceType `query:"type" required:"true" doc:"The type of variable"`
TeamID uuid.UUID `query:"team_id" required:"true"`
ProjectID uuid.UUID `query:"project_id" doc:"If present, fetch project variables"`
EnvironmentID uuid.UUID `query:"environment_id" doc:"If present, fetch environment variables - requires project_id"`
ServiceID uuid.UUID `query:"service_id" doc:"If present, fetch service variables - requires project_id and environment_id"`
}
Base inputs
type BaseVariablesJSONInput ¶
type BaseVariablesJSONInput struct {
Type schema.VariableReferenceSourceType `json:"type" required:"true" doc:"The type of variable"`
TeamID uuid.UUID `json:"team_id" required:"true"`
ProjectID uuid.UUID `json:"project_id" required:"false" doc:"If present without environment_id, mutate team variables"`
EnvironmentID uuid.UUID `` /* 126-byte string literal not displayed */
ServiceID uuid.UUID `json:"service_id" required:"false" doc:"If present, mutate service variables - requires project_id and environment_id"`
}
type CertManagerConditionType ¶
type CertManagerConditionType string
const ( CertificateRequestConditionReady CertManagerConditionType = "Ready" CertificateRequestConditionInvalidRequest CertManagerConditionType = "InvalidRequest" CertificateRequestConditionApproved CertManagerConditionType = "Approved" CertificateRequestConditionDenied CertManagerConditionType = "Denied" )
func (CertManagerConditionType) Schema ¶
func (u CertManagerConditionType) Schema(r huma.Registry) *huma.Schema
Register enum in OpenAPI specification https://github.com/danielgtaylor/huma/issues/621
type CreateDeploymentInput ¶
type CreateDeploymentInput struct {
TeamID uuid.UUID `format:"uuid" required:"true" json:"team_id"`
ProjectID uuid.UUID `format:"uuid" required:"true" json:"project_id"`
ServiceID uuid.UUID `format:"uuid" required:"true" json:"service_id"`
EnvironmentID uuid.UUID `format:"uuid" required:"true" json:"environment_id"`
GitSha *string `json:"git_sha" required:"false" doc:"The git sha of the deployment"`
}
func (*CreateDeploymentInput) GetEnvironmentID ¶
func (self *CreateDeploymentInput) GetEnvironmentID() uuid.UUID
func (*CreateDeploymentInput) GetProjectID ¶
func (self *CreateDeploymentInput) GetProjectID() uuid.UUID
func (*CreateDeploymentInput) GetServiceID ¶
func (self *CreateDeploymentInput) GetServiceID() uuid.UUID
func (*CreateDeploymentInput) GetTeamID ¶
func (self *CreateDeploymentInput) GetTeamID() uuid.UUID
type CreatePVCInput ¶
type CreatePVCInput struct {
Type PvcScope `json:"type" required:"true"`
Name string `json:"name" required:"true" minLength:"1"`
Description *string `json:"description,omitempty" required:"false"`
TeamID uuid.UUID `json:"team_id" required:"true" format:"uuid"`
ProjectID uuid.UUID `json:"project_id" required:"false" format:"uuid"`
EnvironmentID uuid.UUID `json:"environment_id" required:"false" format:"uuid"`
CapacityGB float64 `json:"capacity_gb" required:"true"`
}
* Create
type CreateRegistryInput ¶
type CreateServiceGroupInput ¶
type CreateServiceGroupInput struct {
Name string `json:"name" required:"true" doc:"The name of the service group" minLength:"1"`
Icon *string `json:"icon,omitempty" required:"false" doc:"The icon of the service group"`
Description *string `json:"description,omitempty" required:"false" doc:"The description of the service group"`
TeamID uuid.UUID `json:"team_id" required:"true" format:"uuid"`
ProjectID uuid.UUID `json:"project_id" required:"true" format:"uuid"`
EnvironmentID uuid.UUID `json:"environment_id" required:"true" format:"uuid"`
}
type CreateServiceInput ¶
type CreateServiceInput struct {
TeamID uuid.UUID `format:"uuid" required:"true" json:"team_id"`
ProjectID uuid.UUID `format:"uuid" required:"true" json:"project_id"`
EnvironmentID uuid.UUID `format:"uuid" required:"true" json:"environment_id"`
Name string `required:"true" json:"name"`
Description string `json:"description,omitempty"`
// GitHub integration
GitHubInstallationID *int64 `json:"github_installation_id,omitempty"`
RepositoryOwner *string `json:"repository_owner,omitempty"`
RepositoryName *string `json:"repository_name,omitempty"`
// Configuration
Type schema.ServiceType `required:"true" doc:"Type of service, e.g. 'github', 'docker-image'" json:"type"`
Builder schema.ServiceBuilder `required:"true" doc:"Builder of the service - docker, nixpacks, railpack" json:"builder"`
Hosts []schema.HostSpec `json:"hosts,omitempty"`
Ports []schema.PortSpec `json:"ports,omitempty"`
Replicas *int32 `minimum:"0" maximum:"10" json:"replicas,omitempty"`
AutoDeploy *bool `json:"auto_deploy,omitempty"`
RailpackBuilderInstallCommand *string `json:"railpack_builder_install_command,omitempty"`
RailpackBuilderBuildCommand *string `json:"railpack_builder_build_command,omitempty"`
RunCommand *string `json:"run_command,omitempty"`
IsPublic *bool `json:"is_public,omitempty"`
Image *string `json:"image,omitempty"`
DockerBuilderDockerfilePath *string `json:"docker_builder_dockerfile_path,omitempty" required:"false" doc:"Optional path to Dockerfile, if using docker builder"`
DockerBuilderBuildContext *string `` /* 129-byte string literal not displayed */
// Databases (special case)
DatabaseType *string `json:"database_type,omitempty"`
DatabaseConfig *schema.DatabaseConfig `json:"database_config,omitempty"`
S3BackupSourceID *uuid.UUID `json:"s3_backup_source_id,omitempty" format:"uuid"`
S3BackupBucket *string `json:"s3_backup_bucket,omitempty"`
BackupSchedule *string `json:"backup_schedule,omitempty" required:"false" doc:"Cron expression for the backup schedule, e.g. '0 0 * * *'"`
BackupRetentionCount *int `json:"backup_retention,omitempty" required:"false" doc:"Number of base backups to retain, e.g. 3"`
// PVC
Volumes []schema.ServiceVolume `json:"volumes,omitempty" required:"false" doc:"Volumes to mount in the service"`
// Health check
HealthCheck *schema.HealthCheck `json:"health_check,omitempty" doc:"Health check configuration for the service"`
// Variable mounts
VariableMounts []*schema.VariableMount `json:"variable_mounts,omitempty" doc:"Mount variables as volumes"`
// Init containers
InitContainers []*schema.InitContainer `json:"init_containers,omitempty" doc:"Init containers to run before the main container"`
// Resources
Resources *schema.Resources `json:"resources,omitempty" doc:"Resource limits and requests for the service containers"`
}
CreateServiceInput defines the input for creating a new service
type DeletePVCInput ¶
type DeletePVCInput struct {
ID string `json:"id" required:"true"`
Type PvcScope `json:"type" required:"true"`
TeamID uuid.UUID `json:"team_id" required:"true" format:"uuid"`
ProjectID uuid.UUID `json:"project_id" required:"false" format:"uuid"`
EnvironmentID uuid.UUID `json:"environment_id" required:"false" format:"uuid"`
}
* Delete
type DeleteRegistryInput ¶
type DeleteServiceGroupInput ¶
type DeleteServiceGroupInput struct {
ID uuid.UUID `json:"id" required:"true" doc:"The ID of the service group" format:"uuid"`
TeamID uuid.UUID `json:"team_id" required:"true" doc:"The ID of the team" format:"uuid"`
ProjectID uuid.UUID `json:"project_id" required:"true" doc:"The ID of the project" format:"uuid"`
EnvironmentID uuid.UUID `json:"environment_id" required:"true" doc:"The ID of the environment" format:"uuid"`
DeleteServices bool `json:"delete_services" required:"false" doc:"Whether to delete the services in the service group"`
}
type DeploymentResponse ¶
type DeploymentResponse struct {
ID uuid.UUID `json:"id"`
ServiceID uuid.UUID `json:"service_id"`
Status schema.DeploymentStatus `json:"status"`
CrashingReasons []string `json:"crashing_reasons" nullable:"false"`
InstanceEvents []EventRecord `json:"instance_events" nullable:"false"`
InstanceRestarts int32 `json:"instance_restarts"`
JobName string `json:"job_name"`
Error string `json:"error,omitempty"`
Attempts int `json:"attempts"`
CommitSHA *string `json:"commit_sha,omitempty" required:"false"`
CommitMessage *string `json:"commit_message,omitempty" required:"false"`
CommitAuthor *schema.GitCommitter `json:"commit_author,omitempty" required:"false"`
Image *string `json:"image,omitempty" required:"false"`
CreatedAt time.Time `json:"created_at"`
QueuedAt *time.Time `json:"queued_at,omitempty"`
StartedAt *time.Time `json:"started_at,omitempty"`
CompletedAt *time.Time `json:"completed_at,omitempty"`
UpdatedAt time.Time `json:"updated_at"`
}
func TransformDeploymentEntities ¶
func TransformDeploymentEntities(entities []*ent.Deployment) []*DeploymentResponse
Transforms a slice of ent.Deployment entities into a slice of DeploymentResponse
func TransformDeploymentEntity ¶
func TransformDeploymentEntity(entity *ent.Deployment) *DeploymentResponse
TransformDeploymentEntity transforms an ent.Deployment entity into a DeploymentResponse
type EndpointDiscovery ¶
type EndpointDiscovery struct {
Internal []ServiceEndpoint `json:"internal" nullable:"false"`
External []IngressEndpoint `json:"external" nullable:"false"`
}
type EnvironmentResponse ¶
type EnvironmentResponse struct {
ID uuid.UUID `json:"id"`
KubernetesName string `json:"kubernetes_name"`
Name string `json:"name"`
Description string `json:"description"`
Active bool `json:"active"`
ServiceCount int `json:"service_count,omitempty"`
ServiceIcons []string `json:"service_icons,omitempty" nullable:"false"`
CreatedAt time.Time `json:"created_at"`
}
func TransformEnvironmentEntitities ¶
func TransformEnvironmentEntitities(entities []*ent.Environment) []*EnvironmentResponse
Transforms a slice of ent.Environment entities into a slice of EnvironmentResponse
func TransformEnvironmentEntity ¶
func TransformEnvironmentEntity(entity *ent.Environment) *EnvironmentResponse
TransformEnvironmentEntity transforms an ent.Environment entity into an EnvironmentResponse
type EventRecord ¶
type EventRecord struct {
Type EventType `json:"type"`
Timestamp string `json:"timestamp"`
Message string `json:"message,omitempty"`
Count int32 `json:"count,omitempty"`
FirstSeen string `json:"first_seen,omitempty"`
LastSeen string `json:"last_seen,omitempty"`
Reason string `json:"reason,omitempty"`
}
models.EventRecord represents a single event with its details
type EventType ¶
type EventType string
EventType represents different types of pod/container events
const ( EventTypeOOMKilled EventType = "OOMKilled" EventTypeCrashLoopBackOff EventType = "CrashLoopBackOff" EventTypeContainerCreated EventType = "ContainerCreated" EventTypeContainerStarted EventType = "ContainerStarted" EventTypeContainerStopped EventType = "ContainerStopped" EventTypeImagePullBackOff EventType = "ImagePullBackOff" EventTypeNodeNotReady EventType = "NodeNotReady" EventTypeSchedulingFailed EventType = "SchedulingFailed" EventTypeUnknown EventType = "Unknown" )
type GetDeploymentBaseInput ¶
type GetDeploymentBaseInput struct {
TeamID uuid.UUID `query:"team_id" required:"true" doc:"The ID of the team"`
ProjectID uuid.UUID `query:"project_id" required:"true" doc:"The ID of the project"`
EnvironmentID uuid.UUID `query:"environment_id" required:"true" doc:"The ID of the environment"`
ServiceID uuid.UUID `query:"service_id" required:"true" doc:"The ID of the service"`
}
func (*GetDeploymentBaseInput) GetEnvironmentID ¶
func (self *GetDeploymentBaseInput) GetEnvironmentID() uuid.UUID
func (*GetDeploymentBaseInput) GetProjectID ¶
func (self *GetDeploymentBaseInput) GetProjectID() uuid.UUID
func (*GetDeploymentBaseInput) GetServiceID ¶
func (self *GetDeploymentBaseInput) GetServiceID() uuid.UUID
func (*GetDeploymentBaseInput) GetTeamID ¶
func (self *GetDeploymentBaseInput) GetTeamID() uuid.UUID
type GetDeploymentByIDInput ¶
type GetDeploymentByIDInput struct {
GetDeploymentBaseInput
DeploymentID uuid.UUID `query:"deployment_id" required:"true" doc:"The ID of the deployment"`
}
type GetDeploymentsInput ¶
type GetDeploymentsInput struct {
PaginationParams
GetDeploymentBaseInput
Statuses []schema.DeploymentStatus `query:"statuses" required:"false" doc:"Filter by status"`
}
type GetPVCInput ¶
type GetPVCInput struct {
Type PvcScope `query:"type" required:"true"`
TeamID uuid.UUID `query:"team_id" required:"true" format:"uuid"`
ProjectID uuid.UUID `query:"project_id" required:"false" format:"uuid"`
EnvironmentID uuid.UUID `query:"environment_id" required:"false" format:"uuid"`
ID string `query:"id" required:"true"`
}
* Get
type GetRegistryInput ¶
type GetServiceGroupInput ¶
type GetServiceGroupInput struct {
ID uuid.UUID `json:"id" query:"id" required:"true" doc:"The ID of the service group" format:"uuid"`
TeamID uuid.UUID `json:"team_id" query:"team_id" required:"true" doc:"The ID of the team" format:"uuid"`
ProjectID uuid.UUID `json:"project_id" query:"project_id" required:"true" doc:"The ID of the project" format:"uuid"`
EnvironmentID uuid.UUID `json:"environment_id" query:"environment_id" required:"true" doc:"The ID of the environment" format:"uuid"`
}
type IngressEndpoint ¶
type IngressEndpoint struct {
KubernetesName string `json:"kubernetes_name"`
IsIngress bool `json:"is_ingress"`
Host string `json:"host"`
Path string `json:"path"`
Port schema.PortSpec `json:"port"`
DNSStatus DNSStatus `json:"dns_status"`
IsCloudflare bool `json:"is_cloudflare"`
TlsStatus TlsStatus `json:"tls_status"`
TlsIssuerMessages []TlsDetails `json:"tls_issuer_messages,omitempty"`
TeamID uuid.UUID `json:"team_id"`
ProjectID uuid.UUID `json:"project_id"`
EnvironmentID uuid.UUID `json:"environment_id"`
ServiceID uuid.UUID `json:"service_id"`
}
IngressEndpoint represents external DNS information for a Kubernetes ingress
type InstanceHealthInput ¶
type InstanceHealthInput struct {
TeamID uuid.UUID `query:"team_id" required:"true" format:"uuid"`
ProjectID uuid.UUID `query:"project_id" required:"true" format:"uuid"`
EnvironmentID uuid.UUID `query:"environment_id" required:"true" format:"uuid"`
ServiceID uuid.UUID `query:"service_id" required:"true" format:"uuid"`
}
InstanceHealthInput defines the query parameters for getting instance health for a service
type InstanceStatusInput ¶
type InstanceStatusInput struct {
Type InstanceType `query:"type" required:"true"`
TeamID uuid.UUID `query:"team_id" required:"true" format:"uuid"`
ProjectID uuid.UUID `query:"project_id" required:"false" format:"uuid"`
EnvironmentID uuid.UUID `query:"environment_id" required:"false" format:"uuid"`
ServiceID uuid.UUID `query:"service_id" required:"false" format:"uuid"`
}
InstanceStatusInput defines the query parameters for getting instance statuses
type InstanceType ¶
type InstanceType string
const ( InstanceTypeTeam InstanceType = "team" InstanceTypeProject InstanceType = "project" InstanceTypeEnvironment InstanceType = "environment" InstanceTypeService InstanceType = "service" )
func (InstanceType) Schema ¶
func (u InstanceType) Schema(r huma.Registry) *huma.Schema
Register enum in OpenAPI specification https://github.com/danielgtaylor/huma/issues/621
type ListPVCInput ¶
type ListPVCInput struct {
Type PvcScope `query:"type" required:"true"`
TeamID uuid.UUID `query:"team_id" required:"true" format:"uuid"`
ProjectID uuid.UUID `query:"project_id" required:"false" format:"uuid"`
EnvironmentID uuid.UUID `query:"environment_id" required:"false" format:"uuid"`
}
* List
type ListServiceGroupsInput ¶
type ListServiceGroupsInput struct {
TeamID uuid.UUID `json:"team_id" query:"team_id" required:"true" doc:"The ID of the team" format:"uuid"`
ProjectID uuid.UUID `json:"project_id" query:"project_id" required:"true" doc:"The ID of the project" format:"uuid"`
EnvironmentID uuid.UUID `json:"environment_id" query:"environment_id" required:"true" doc:"The ID of the environment" format:"uuid"`
}
type LogQueryInput ¶
type LogQueryInput struct {
Type LogType `query:"type" required:"true"`
TeamID uuid.UUID `query:"team_id" required:"true"`
ProjectID uuid.UUID `query:"project_id" required:"false"`
EnvironmentID uuid.UUID `query:"environment_id" required:"false"`
ServiceID uuid.UUID `query:"service_id" required:"false"`
DeploymentID uuid.UUID `query:"deployment_id" required:"false"`
Filters string `query:"filters" doc:"Optional logql filter string"`
Start time.Time `query:"start" doc:"Start time for the query"`
End time.Time `query:"end" doc:"End time for the query"`
Since string `query:"since" doc:"Duration to look back (e.g., '1h', '30m')"`
Limit int `query:"limit" doc:"Number of log lines to get"`
Direction loki.LokiDirection `query:"direction" doc:"Direction of the logs (forward or backward)"`
}
LogQueryInput defines the query parameters for log fetching
type LogStreamInput ¶
type LogStreamInput struct {
Type LogType `query:"type" required:"true"`
TeamID uuid.UUID `query:"team_id" required:"true"`
ProjectID uuid.UUID `query:"project_id" required:"false"`
EnvironmentID uuid.UUID `query:"environment_id" required:"false"`
ServiceID uuid.UUID `query:"service_id" required:"false"`
DeploymentID uuid.UUID `query:"deployment_id" required:"false"`
Start time.Time `query:"start"`
Since string `query:"since" default:"10m" doc:"Duration to look back (e.g., '1h', '30m')"`
Limit int64 `query:"limit" default:"100" doc:"Number of lines to get from the end"`
Timestamps bool `query:"timestamps" default:"true" doc:"Include timestamps in logs"`
Filters string `query:"filters" doc:"Optional logql filter string"`
}
LogStreamInput defines the query parameters for log streaming
type MetricDetail ¶
type MetricDetail struct {
Timestamp time.Time `json:"timestamp"`
// Aggregated value for the metric
Value float64 `json:"value" doc:"Aggregated value for the timestamp"`
// Map of IDs to their respective values
Breakdown map[string]*float64 `json:"breakdown" doc:"Map of IDs to their respective values"`
}
MetricDetail represents a single metric with aggregate value and breakdown by service
type MetricType ¶
type MetricType int
const ( MetricTypeCPU MetricType = iota MetricTypeRAM MetricTypeDisk MetricTypeNetwork )
type MetricsMapEntry ¶
type MetricsMapEntry struct {
CPU []MetricDetail `json:"cpu" nullable:"false"`
RAM []MetricDetail `json:"ram" nullable:"false"`
Disk []MetricDetail `json:"disk" nullable:"false"`
Network []MetricDetail `json:"network" nullable:"false"`
}
MetricsMapEntry contains arrays of metric details for each resource type
type MetricsQueryInput ¶
type MetricsQueryInput struct {
Type MetricsType `query:"type" required:"true"`
TeamID uuid.UUID `query:"team_id" required:"true"`
ProjectID uuid.UUID `query:"project_id" required:"false"`
EnvironmentID uuid.UUID `query:"environment_id" required:"false"`
ServiceID uuid.UUID `query:"service_id" required:"false"`
Start time.Time `query:"start" required:"false" doc:"Start time for the query, defaults to 1 week ago"`
End time.Time `query:"end" required:"false" doc:"End time for the query, defaults to now"`
}
MetricsQueryInput defines the query parameters for prometheus
type MetricsResult ¶
type MetricsResult struct {
Step time.Duration `json:"step"`
BrokenDownBy MetricsType `json:"broken_down_by" doc:"The type of metric that is broken down, e.g. team, project"`
Metrics MetricsMapEntry `json:"metrics" nullable:"false"`
}
MetricsResult is the top-level structure containing the sampling interval and metrics
func TransformMetricsEntity ¶
func TransformMetricsEntity(metrics map[string]*prometheus.ResourceMetrics, step time.Duration, sumBy prometheus.MetricsFilterSumBy) *MetricsResult
type MetricsType ¶
type MetricsType string
const ( MetricsTypeTeam MetricsType = "team" MetricsTypeProject MetricsType = "project" MetricsTypeEnvironment MetricsType = "environment" MetricsTypeService MetricsType = "service" )
func (MetricsType) Schema ¶
func (u MetricsType) Schema(r huma.Registry) *huma.Schema
Register enum in OpenAPI specification https://github.com/danielgtaylor/huma/issues/621
type MetricsVolumeQueryInput ¶
type MetricsVolumeQueryInput struct {
TeamID uuid.UUID `query:"team_id" required:"true"`
PVCID string `query:"pvc_id" required:"true"`
Start time.Time `query:"start" required:"false" doc:"Start time for the query, defaults to 1 week ago"`
End time.Time `query:"end" required:"false" doc:"End time for the query, defaults to now"`
}
MetricsVolumeQueryInput defines the query parameters for prometheus PVC queries
type NodeMetricType ¶
type NodeMetricType int
const ( NodeMetricTypeCPU NodeMetricType = iota NodeMetricTypeRAM NodeMetricTypeDisk NodeMetricTypeNetwork NodeMetricTypeFileSystem NodeMetricTypeLoad )
type NodeMetricsMapEntry ¶
type NodeMetricsMapEntry struct {
CPU []MetricDetail `json:"cpu" nullable:"false"`
RAM []MetricDetail `json:"ram" nullable:"false"`
Disk []MetricDetail `json:"disk" nullable:"false"`
Network []MetricDetail `json:"network" nullable:"false"`
FileSystem []MetricDetail `json:"filesystem" nullable:"false"`
Load []MetricDetail `json:"load" nullable:"false"`
}
NodeMetricsMapEntry contains arrays of metric details for each node resource type
type NodeMetricsQueryInput ¶
type NodeMetricsQueryInput struct {
NodeName string `query:"node_name" required:"false"`
Zone string `query:"zone" required:"false"`
Region string `query:"region" required:"false"`
ClusterName string `query:"cluster_name" required:"false"`
Start time.Time `query:"start" required:"false" doc:"Start time for the query, defaults to 24 hours ago"`
End time.Time `query:"end" required:"false" doc:"End time for the query, defaults to now"`
}
NodeMetricsQueryInput defines the query parameters for node prometheus metrics
type NodeMetricsResult ¶
type NodeMetricsResult struct {
Step time.Duration `json:"step"`
Metrics NodeMetricsMapEntry `json:"metrics" nullable:"false"`
}
NodeMetricsResult is the top-level structure containing the sampling interval and metrics
func TransformNodeMetricsEntity ¶
func TransformNodeMetricsEntity(metrics map[string]*prometheus.NodeMetrics, step time.Duration) *NodeMetricsResult
type PVCInfo ¶
type PVCInfo struct {
ID string `json:"id"`
Name string `json:"name"`
Description *string `json:"description,omitempty"`
Type PvcScope `json:"type"`
MountPath *string `json:"mount_path,omitempty"`
UsedGB *float64 `json:"used_gb,omitempty"` // e.g., "10"
CapacityGB float64 `json:"capacity_gb"` // e.g., "10"
TeamID uuid.UUID `json:"team_id"`
ProjectID *uuid.UUID `json:"project_id,omitempty"`
EnvironmentID *uuid.UUID `json:"environment_id,omitempty"`
MountedOnServiceID *uuid.UUID `json:"mounted_on_service_id,omitempty"`
Status PersistentVolumeClaimPhase `json:"status"` // e.g., "Bound", "Pending"
IsDatabase bool `json:"is_database"`
IsAvailable bool `json:"is_available"`
IsPendingResize bool `json:"is_pending_resize"`
CanDelete bool `json:"can_delete"`
CreatedAt time.Time `json:"created_at"`
}
PVCInfo holds prettier information about a PVC.
type PVCStats ¶
type PVCStats struct {
UsedGB *float64 `json:"used_gb,omitempty"`
CapacityGB float64 `json:"capacity_gb,omitempty"`
}
PVCStats holds current volume statistics
type PaginationParams ¶
type PersistentVolumeClaimPhase ¶
type PersistentVolumeClaimPhase string
Enum for PVC status
const ( ClaimPending PersistentVolumeClaimPhase = "Pending" ClaimBound PersistentVolumeClaimPhase = "Bound" ClaimLost PersistentVolumeClaimPhase = "Lost" )
func (PersistentVolumeClaimPhase) Schema ¶
func (u PersistentVolumeClaimPhase) Schema(r huma.Registry) *huma.Schema
Register enum in OpenAPI specification https://github.com/danielgtaylor/huma/issues/621
type ProjectResponse ¶
type ProjectResponse struct {
ID uuid.UUID `json:"id"`
KubernetesName string `json:"kubernetes_name"`
Name string `json:"name"`
Description *string `json:"description"`
Status string `json:"status"`
TeamID uuid.UUID `json:"team_id"`
CreatedAt time.Time `json:"created_at"`
DefaultEnvironmentID *uuid.UUID `json:"default_environment_id,omitempty"`
ServiceCount int `json:"service_count,omitempty"`
ServiceIcons []string `json:"service_icons,omitempty" nullable:"false"`
Environments []*EnvironmentResponse `json:"environments" nullable:"false"`
EnvironmentCount int `json:"environment_count"`
}
func TransformProjectEntitities ¶
func TransformProjectEntitities(entities []*ent.Project) []*ProjectResponse
TransformProjectEntitities transforms a slice of ent.Project entities into a slice of ProjectResponse
func TransformProjectEntity ¶
func TransformProjectEntity(entity *ent.Project) *ProjectResponse
TransformProjectEntity transforms an ent.Project entity into a ProjectResponse
func (*ProjectResponse) AttachServiceSummary ¶
type RedeployExistingDeploymentInput ¶
type RedeployExistingDeploymentInput struct {
TeamID uuid.UUID `format:"uuid" required:"true" json:"team_id"`
ProjectID uuid.UUID `format:"uuid" required:"true" json:"project_id"`
ServiceID uuid.UUID `format:"uuid" required:"true" json:"service_id"`
EnvironmentID uuid.UUID `format:"uuid" required:"true" json:"environment_id"`
DeploymentID uuid.UUID `format:"uuid" required:"true" json:"deployment_id"`
DisableBuildCache bool `json:"disable_build_cache" required:"false" doc:"Disable build cache for this redeployment"`
SmartRedeploy bool `json:"smart_redeploy" required:"false" doc:"Try to intelligently redeploy without rebuilding if possible"`
}
Re-deploying specific deployment ID
func (*RedeployExistingDeploymentInput) GetEnvironmentID ¶
func (self *RedeployExistingDeploymentInput) GetEnvironmentID() uuid.UUID
func (*RedeployExistingDeploymentInput) GetProjectID ¶
func (self *RedeployExistingDeploymentInput) GetProjectID() uuid.UUID
func (*RedeployExistingDeploymentInput) GetServiceID ¶
func (self *RedeployExistingDeploymentInput) GetServiceID() uuid.UUID
func (*RedeployExistingDeploymentInput) GetTeamID ¶
func (self *RedeployExistingDeploymentInput) GetTeamID() uuid.UUID
type RegistryResponse ¶
type RegistryResponse struct {
ID uuid.UUID `json:"id"`
Host string `json:"Host"`
Username string `json:"username"`
}
func TransformRegistryEntity ¶
func TransformRegistryEntity(entity *ent.Registry, username string) *RegistryResponse
type ResolveVariableReferenceInput ¶
type ResolveVariableReferenceInput struct {
TeamID uuid.UUID `query:"team_id"`
Type schema.VariableReferenceType `query:"type"`
Name string `query:"name"`
SourceType schema.VariableReferenceSourceType `query:"source_type"`
SourceID uuid.UUID `query:"source_id"`
Key string `query:"key"`
}
type S3BackendCreateInput ¶
type S3BackendCreateInput struct {
TeamID uuid.UUID `json:"team_id" format:"uuid" required:"true"`
Name string `json:"name" required:"true"`
Endpoint string `json:"endpoint" required:"true"`
Region string `json:"region" required:"true"`
AccessKeyID string `json:"access_key_id" required:"true"`
SecretKey string `json:"secret_key" required:"true"`
}
type S3Bucket ¶
type S3Bucket struct {
BucketRegion string `json:"bucket_region"`
CreationDate time.Time `json:"created_at"`
Name string `json:"name"`
}
A copy of types.Bucket from AWS SDK v2, but with json tags and no null
func TransformBucketEntities ¶
func TransformBucketEntity ¶
type S3Response ¶
type S3Response struct {
ID uuid.UUID `json:"id"`
Name string `json:"name"`
Endpoint string `json:"endpoint"`
Region string `json:"region"`
AccessKey string `json:"access_key"`
SecretKey string `json:"secret_key"`
Buckets []*S3Bucket `json:"buckets" nullable:"false"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
*ent.S3 transformed into a S3Response
func TransformS3Entities ¶
func TransformS3Entities(entities []*ent.S3, accessKeyMap map[uuid.UUID]string, secretKeyMap map[uuid.UUID]string, bucketsMap map[uuid.UUID][]*S3Bucket) []*S3Response
Transforms a slice of ent.S3 entities into a slice of S3Response
func TransformS3Entity ¶
func TransformS3Entity(entity *ent.S3, accessKey string, secretKey string, buckets []*S3Bucket) *S3Response
TransformS3Entity transforms an ent.S3 entity into a S3Response
type SecretData ¶
type SecretData struct {
ID uuid.UUID
Type schema.VariableReferenceSourceType
SecretName string
Keys []string
}
SecretData represents a Kubernetes secret with its metadata
type ServiceConfigResponse ¶
type ServiceConfigResponse struct {
GitBranch *string `json:"git_branch,omitempty"`
GitTag *string `json:"git_tag,omitempty"`
Builder schema.ServiceBuilder `json:"builder"`
Icon string `json:"icon"`
Host []schema.HostSpec `json:"hosts,omitempty" nullable:"false"`
Port []schema.PortSpec `json:"ports,omitempty" nullable:"false"`
Replicas int32 `json:"replicas"`
AutoDeploy bool `json:"auto_deploy"`
RailpackBuilderInstallCommand *string `json:"railpack_builder_install_command,omitempty"`
RailpackBuilderBuildCommand *string `json:"railpack_builder_build_command,omitempty"`
RunCommand *string `json:"run_command,omitempty"`
IsPublic bool `json:"is_public"`
Image string `json:"image,omitempty"`
// Dockerfile build overrides
DockerBuilderDockerfilePath *string `json:"docker_builder_dockerfile_path,omitempty"`
DockerBuilderBuildContext *string `json:"docker_builder_build_context,omitempty"`
// For backups
S3BackupSourceID *uuid.UUID `json:"s3_backup_source_id,omitempty"`
S3BackupBucket *string `json:"s3_backup_bucket,omitempty"`
BackupSchedule string `json:"backup_schedule"`
BackupRetentionCount int `json:"backup_retention_count"`
// Volume
Volumes []*PVCInfo `json:"volumes" nullable:"false"`
// Security context
SecurityContext *schema.SecurityContext `json:"security_context,omitempty"`
// Health check
HealthCheck *schema.HealthCheck `json:"health_check,omitempty"`
// Variable Volume Mounts
VariableMounts []*schema.VariableMount `json:"variable_mounts" nullable:"false"`
// Protected variables
ProtectedVariables []string `json:"protected_variables" nullable:"false"`
// Init containers
InitContainers []*schema.InitContainer `json:"init_containers" nullable:"false"`
// Resources
Resources *schema.Resources `json:"resources,omitempty"`
}
ServiceConfigResponse defines the configuration response for a service
func TransformServiceConfigEntities ¶
func TransformServiceConfigEntities(entities []*ent.ServiceConfig) []*ServiceConfigResponse
TransformServiceConfigEntities transforms a slice of ent.ServiceConfig entities into a slice of ServiceConfigResponse
func TransformServiceConfigEntity ¶
func TransformServiceConfigEntity(entity *ent.ServiceConfig) *ServiceConfigResponse
TransformServiceConfigEntity transforms an ent.ServiceConfig entity into a ServiceConfigResponse
type ServiceEndpoint ¶
type ServiceEndpoint struct {
KubernetesName string `json:"kubernetes_name"`
DNS string `json:"dns"`
Ports []schema.PortSpec `json:"ports" nullable:"false"`
TeamID uuid.UUID `json:"team_id"`
ProjectID uuid.UUID `json:"project_id"`
EnvironmentID uuid.UUID `json:"environment_id"`
ServiceID uuid.UUID `json:"service_id"`
}
ServiceEndpoint represents internal DNS information for a Kubernetes service
type ServiceGroupResponse ¶
type ServiceGroupResponse struct {
ID uuid.UUID `json:"id"`
Name string `json:"name"`
Icon *string `json:"icon,omitempty"`
Description *string `json:"description,omitempty"`
EnvironmentID uuid.UUID `json:"environment_id"`
CreatedAt time.Time `json:"created_at"`
}
func TransformServiceGroupEntities ¶
func TransformServiceGroupEntities(entities []*ent.ServiceGroup) []*ServiceGroupResponse
TransformServiceGroupEntities transforms a slice of ent.ServiceGroup entities into a slice of ServiceGroupResponse
func TransformServiceGroupEntity ¶
func TransformServiceGroupEntity(entity *ent.ServiceGroup) *ServiceGroupResponse
TransformServiceGroupEntity transforms an ent.ServiceGroup entity into a ServiceGroupResponse
type ServiceResponse ¶
type ServiceResponse struct {
ID uuid.UUID `json:"id"`
Type schema.ServiceType `json:"type"`
KubernetesName string `json:"kubernetes_name"`
Name string `json:"name"`
Description string `json:"description"`
EnvironmentID uuid.UUID `json:"environment_id"`
GitHubInstallationID *int64 `json:"github_installation_id,omitempty"`
GitRepository *string `json:"git_repository,omitempty"`
GitRepositoryOwner *string `json:"git_repository_owner,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
CurrentDeployment *DeploymentResponse `json:"current_deployment,omitempty"`
LastDeployment *DeploymentResponse `json:"last_deployment,omitempty"`
LastSuccessfulDeployment *DeploymentResponse `json:"last_successful_deployment,omitempty"`
Config *ServiceConfigResponse `json:"config"`
DatabaseVersion *string `json:"database_version,omitempty"`
DatabaseType *string `json:"database_type,omitempty"`
Template *TemplateShortResponse `json:"template,omitempty"`
TemplateInstanceID *uuid.UUID `json:"template_instance_id,omitempty"`
ServiceGroup *ServiceGroupResponse `json:"service_group,omitempty"`
DetectedPorts []schema.PortSpec `json:"detected_ports" nullable:"false"`
}
ServiceResponse defines the response structure for service operations
func TransformServiceEntities ¶
func TransformServiceEntities(entities []*ent.Service) []*ServiceResponse
TransformServiceEntities transforms a slice of ent.Service entities into a slice of ServiceResponse
func TransformServiceEntity ¶
func TransformServiceEntity(entity *ent.Service) *ServiceResponse
TransformServiceEntity transforms an ent.Service entity into a ServiceResponse
type SetDefaultRegistryInput ¶
We only allow them to update the default registry for now
type SortByField ¶
type SortByField string
const ( SortByCreatedAt SortByField = "created_at" SortByUpdatedAt SortByField = "updated_at" )
func (SortByField) Schema ¶
func (u SortByField) Schema(r huma.Registry) *huma.Schema
Register enum in OpenAPI specification https://github.com/danielgtaylor/huma/issues/621
type SortInput ¶
type SortInput struct {
SortByField SortByField `query:"sort_by" default:"created_at" required:"false"`
SortOrder SortOrder `query:"sort_order" default:"desc" required:"false"`
}
type SortOrder ¶
type SortOrder string
func (SortOrder) Schema ¶
Register enum in OpenAPI specification https://github.com/danielgtaylor/huma/issues/621
type TeamResponse ¶
type TeamResponse struct {
ID uuid.UUID `json:"id"`
KubernetesName string `json:"kubernetes_name"`
Name string `json:"name"`
Description *string `json:"description"`
CreatedAt time.Time `json:"created_at"`
}
func TransformTeamEntities ¶
func TransformTeamEntities(entities []*ent.Team) []*TeamResponse
TransformTeamEntities transforms a slice of ent.Team entities into a slice of TeamResponse
func TransformTeamEntity ¶
func TransformTeamEntity(entity *ent.Team) *TeamResponse
TransformTeamEntity transforms an ent.Team entity into a TeamResponse
type TemplateDeployInput ¶
type TemplateDeployInput struct {
GroupName string `json:"group_name" required:"true" minLength:"1"`
GroupDescription *string `json:"group_description,omitempty" required:"false"`
TemplateID uuid.UUID `json:"template_id" format:"uuid" required:"true"`
TeamID uuid.UUID `json:"team_id" format:"uuid" required:"true"`
ProjectID uuid.UUID `json:"project_id" format:"uuid" required:"true"`
EnvironmentID uuid.UUID `json:"environment_id" format:"uuid" required:"true"`
Inputs []TemplateInputValue `json:"inputs,omitempty" required:"false"`
}
type TemplateInputValue ¶
For template inputs specifically
type TemplateShortResponse ¶
type TemplateShortResponse struct {
ID uuid.UUID `json:"id"`
DisplayRank uint `json:"display_rank"`
Name string `json:"name"`
Icon string `json:"icon"`
Keywords []string `json:"keywords" nullable:"false"`
Description string `json:"description"`
Version int `json:"version"`
Immutable bool `json:"immutable"`
CreatedAt time.Time `json:"created_at"`
}
func TransformTemplateShortEntities ¶
func TransformTemplateShortEntities(entities []*ent.Template) []*TemplateShortResponse
TransformTemplateShortEntities transforms a slice of ent.Template entities into a slice of TemplateResponse
func TransformTemplateShortEntity ¶
func TransformTemplateShortEntity(entity *ent.Template) *TemplateShortResponse
TransformTemplateShortEntity transforms an ent.Template entity into a TemplateResponse
type TemplateWithDefinitionResponse ¶
type TemplateWithDefinitionResponse struct {
ID uuid.UUID `json:"id"`
DisplayRank uint `json:"display_rank"`
Name string `json:"name"`
Icon string `json:"icon"`
Keywords []string `json:"keywords" nullable:"false"`
Description string `json:"description"`
Version int `json:"version"`
Immutable bool `json:"immutable"`
Definition schema.TemplateDefinition `json:"definition"`
CreatedAt time.Time `json:"created_at"`
}
TemplateWithDefinitionResponse is the response model for a template with its definition
func TransformTemplateEntities ¶
func TransformTemplateEntities(entities []*ent.Template) []*TemplateWithDefinitionResponse
TransformTemplateEntities transforms a slice of ent.Template entities into a slice of TemplateWithDefinitionResponse
func TransformTemplateEntity ¶
func TransformTemplateEntity(entity *ent.Template) *TemplateWithDefinitionResponse
TransformTemplateEntity transforms an ent.Template entity into a TemplateWithDefinitionResponse
type TlsDetails ¶
type TlsDetails struct {
Condition CertManagerConditionType `json:"condition"`
Reason string `json:"reason"`
Message string `json:"message"`
}
TLS Details
type UpdatePVCInput ¶
type UpdatePVCInput struct {
Name *string `json:"name" required:"false" minLength:"1"`
Description *string `json:"description,omitempty" required:"false"`
Type PvcScope `json:"type" required:"true"`
TeamID uuid.UUID `json:"team_id" required:"true" format:"uuid"`
ProjectID uuid.UUID `json:"project_id" required:"false" format:"uuid"`
EnvironmentID uuid.UUID `json:"environment_id" required:"false" format:"uuid"`
ID string `json:"id" required:"true"`
CapacityGB *float64 `json:"capacity_gb" required:"false" doc:"Size of the PVC in GB (e.g., '10')"`
}
* Update
type UpdateProjectInput ¶
type UpdateProjectInput struct {
TeamID uuid.UUID `json:"team_id" format:"uuid" required:"true"`
ProjectID uuid.UUID `json:"project_id" format:"uuid" required:"true"`
Name string `json:"name" required:"false"`
Description *string `json:"description" required:"false"`
DefaultEnvironmentID *uuid.UUID `json:"default_environment_id" format:"uuid" required:"false"`
}
type UpdateServiceGroupInput ¶
type UpdateServiceGroupInput struct {
ID uuid.UUID `json:"id" required:"true" format:"uuid"`
Name *string `json:"name" required:"false" doc:"The name of the service group" minLength:"1"`
Icon *string `json:"icon,omitempty" required:"false" doc:"The icon of the service group"`
Description *string `json:"description,omitempty" required:"false" doc:"The description of the service group"`
TeamID uuid.UUID `json:"team_id" required:"true" format:"uuid"`
ProjectID uuid.UUID `json:"project_id" required:"true" format:"uuid"`
EnvironmentID uuid.UUID `json:"environment_id" required:"true" format:"uuid"`
AddServiceIDs []uuid.UUID `json:"add_service_ids" required:"false" doc:"The IDs of the services to add to the service group" format:"uuid"`
RemoveServiceIDs []uuid.UUID `json:"remove_service_ids" required:"false" doc:"The IDs of the services to remove from the service group" format:"uuid"`
}
type UpdateServiceInput ¶
type UpdateServiceInput struct {
TeamID uuid.UUID `format:"uuid" required:"true" json:"team_id"`
ProjectID uuid.UUID `format:"uuid" required:"true" json:"project_id"`
EnvironmentID uuid.UUID `format:"uuid" required:"true" json:"environment_id"`
ServiceID uuid.UUID `format:"uuid" required:"true" json:"service_id"`
Name *string `required:"false" json:"name"`
Description *string `required:"false" json:"description"`
// Configuration
GitBranch *string `json:"git_branch,omitempty" required:"false"`
GitTag *string `json:"git_tag,omitempty" required:"false" doc:"Tag to build from, supports glob patterns"`
Builder *schema.ServiceBuilder `json:"builder,omitempty" required:"false"`
OverwriteHosts []schema.HostSpec `json:"overwrite_hosts,omitempty" required:"false"`
AddHosts []schema.HostSpec `json:"add_hosts,omitempty" required:"false" doc:"Additional hosts to add, will not remove existing hosts"`
RemoveHosts []schema.HostSpec `json:"remove_hosts,omitempty" required:"false" doc:"Hosts to remove"`
AddPorts []schema.PortSpec `json:"add_ports,omitempty" required:"false" doc:"Additional ports to add, will not remove existing ports"`
RemovePorts []schema.PortSpec `json:"remove_ports,omitempty" required:"false" doc:"Ports to remove"`
OverwritePorts []schema.PortSpec `json:"overwrite_ports,omitempty" required:"false"`
Replicas *int32 `json:"replicas,omitempty" required:"false"`
AutoDeploy *bool `json:"auto_deploy,omitempty" required:"false"`
RailpackBuilderInstallCommand *string `json:"railpack_builder_install_command,omitempty"`
RailpackBuilderBuildCommand *string `json:"railpack_builder_build_command,omitempty"`
RunCommand *string `json:"run_command,omitempty" required:"false"`
IsPublic *bool `json:"is_public,omitempty" required:"false"`
Image *string `json:"image,omitempty" required:"false"`
DockerBuilderDockerfilePath *string `` /* 162-byte string literal not displayed */
DockerBuilderBuildContext *string `` /* 168-byte string literal not displayed */
// Databases
DatabaseConfig *schema.DatabaseConfig `json:"database_config,omitempty"`
S3BackupSourceID *uuid.UUID `json:"s3_backup_source_id,omitempty" format:"uuid"`
S3BackupBucket *string `json:"s3_backup_bucket,omitempty"`
BackupSchedule *string `json:"backup_schedule,omitempty" required:"false" doc:"Cron expression for the backup schedule, e.g. '0 0 * * *'"`
BackupRetentionCount *int `json:"backup_retention,omitempty" required:"false" doc:"Number of base backups to retain, e.g. 3"`
// Volumes
OverwriteVolumes []schema.ServiceVolume `json:"overwrite_volumes,omitempty" required:"false" doc:"Volumes to attach to the service"`
AddVolumes []schema.ServiceVolume `json:"add_volumes,omitempty" required:"false" doc:"Additional volumes to add, will not remove existing volumes"`
RemoveVolumes []schema.ServiceVolume `json:"remove_volumes,omitempty" required:"false" doc:"Volumes to remove from the service"`
// Health check
HealthCheck *schema.HealthCheck `json:"health_check,omitempty" required:"false"`
// Variable mounts
OverwriteVariableMounts []*schema.VariableMount `json:"overwrite_variable_mounts,omitempty" doc:"Mount variables as volumes"`
AddVariableMounts []*schema.VariableMount `json:"add_variable_mounts,omitempty" doc:"Additional variable mounts to add, will not remove existing mounts"`
RemoveVariableMounts []*schema.VariableMount `json:"remove_variable_mounts,omitempty" doc:"Variable mounts to remove"`
// Protected variables
ProtectedVariables *[]string `json:"protected_variables,omitempty" doc:"List of protected variables"`
// Init containers
InitContainers []*schema.InitContainer `json:"init_containers,omitempty" doc:"List of init containers"`
// Resources
Resources *schema.Resources `json:"resources,omitempty" doc:"Resource limits and requests for the service containers"`
}
UpdateServiceConfigInput defines the input for updating a service configuration
type VariableDeleteInput ¶
type VariableDeleteInput struct {
Name string `json:"name" required:"true"`
}
type VariableReferenceInputItem ¶
type VariableReferenceInputItem struct {
Name string `json:"name" doc:"The name of the target variable" required:"true"`
Value string `` /* 133-byte string literal not displayed */
Sources []schema.VariableReferenceSource `json:"sources" doc:"The sources to reference in the template interpolation" nullable:"false"`
}
type VariableReferenceResponse ¶
type VariableReferenceResponse struct {
ID uuid.UUID `json:"id" doc:"The ID of the variable reference" required:"true"`
TargetServiceID uuid.UUID `json:"target_service_id" required:"true"`
Name string `json:"name" required:"true"`
Error *string `json:"error" required:"false"`
Sources []schema.VariableReferenceSource `json:"sources" required:"true" nullable:"false"`
Value string `json:"value" required:"true"`
CreatedAt time.Time `json:"created_at" required:"true"`
}
The actual response object
func TransformVariableReferenceResponseEntities ¶
func TransformVariableReferenceResponseEntities(entities []*ent.VariableReference) []*VariableReferenceResponse
func TransformVariableReferenceResponseEntity ¶
func TransformVariableReferenceResponseEntity(entity *ent.VariableReference) *VariableReferenceResponse
type VariableResponse ¶
type VariableResponse struct {
VariableReferences []*VariableReferenceResponse `json:"variable_references" nullable:"false"`
Variables []*VariableResponseItem `json:"variables" nullable:"false"`
}
type VariableResponseItem ¶
type VariableResponseItem struct {
Type schema.VariableReferenceSourceType `json:"type"`
Name string `json:"name"`
Value string `json:"value"`
}
type VariableUpdateBehavior ¶
type VariableUpdateBehavior string
const ( VariableUpdateBehaviorUpsert VariableUpdateBehavior = "upsert" VariableUpdateBehaviorOverwrite VariableUpdateBehavior = "overwrite" )
func (VariableUpdateBehavior) Schema ¶
func (u VariableUpdateBehavior) Schema(r huma.Registry) *huma.Schema
Register enum in OpenAPI specification https://github.com/danielgtaylor/huma/issues/621
type VolumeMetricsResult ¶
type VolumeMetricsResult struct {
Step time.Duration `json:"step"`
PVCName string `json:"pvc_name"`
Stats PVCStats `json:"stats"`
History []MetricDetail `json:"history" nullable:"false"`
}
VolumeMetricsResult is the structure for volume-specific metrics
func TransformVolumeStatsEntity ¶
func TransformVolumeStatsEntity(volumeStats *prometheus.VolumeStatsWithHistory, step time.Duration) *VolumeMetricsResult
Transform VolumeStatsWithHistory into VolumeMetricsResult
type WebhookCreateInput ¶
type WebhookCreateInput struct {
Type schema.WebhookType `json:"type" required:"true"`
TeamID uuid.UUID `json:"team_id" format:"uuid" required:"true"`
ProjectID *uuid.UUID `json:"project_id,omitempty" format:"uuid" required:"false" doc:"required if type is project"`
URL string `json:"url" format:"uri" required:"true"`
Events []schema.WebhookEvent `json:"events" required:"true" nullable:"false"`
}
type WebhookGetInput ¶
type WebhookListInput ¶
type WebhookResponse ¶
type WebhookResponse struct {
ID uuid.UUID `json:"id"`
URL string `json:"url"`
Type schema.WebhookType `json:"type"`
Events []schema.WebhookEvent `json:"events" nullable:"false"`
TeamID uuid.UUID `json:"team_id"`
ProjectID *uuid.UUID `json:"project_id,omitempty" required:"false"`
CreatedAt time.Time `json:"created_at"`
}
func TransformWebhookEntities ¶
func TransformWebhookEntities(entities []*ent.Webhook) []*WebhookResponse
Transforms a slice of ent.Webhook entities into a slice of WebhookResponse
func TransformWebhookEntity ¶
func TransformWebhookEntity(entity *ent.Webhook) *WebhookResponse
TransformWebhookEntity transforms an ent.Webhook entity into a WebhookResponse
type WebhookUpdateInput ¶
type WebhookUpdateInput struct {
ID uuid.UUID `json:"id" format:"uuid" required:"true"`
TeamID uuid.UUID `json:"team_id" format:"uuid" required:"true"`
ProjectID *uuid.UUID `json:"project_id,omitempty" format:"uuid" required:"false" doc:"required if type is project"`
URL *string `json:"url" format:"uri" required:"false"`
Events *[]schema.WebhookEvent `json:"events" required:"false"`
}
Source Files
¶
- deployment_input.go
- deployment_response.go
- endpoints.go
- environment_response.go
- instance_input.go
- instance_response.go
- logs_input.go
- metrics_input.go
- metrics_output.go
- node_metrics.go
- pagination.go
- project_input.go
- project_response.go
- pvc_input.go
- pvc_response.go
- registry_input.go
- registry_response.go
- s3_input.go
- s3_response.go
- service_config_response.go
- service_input.go
- service_response.go
- servicegroup_input.go
- servicegroup_response.go
- sort_input.go
- team_response.go
- template_deploy_input.go
- template_response.go
- variable_input.go
- variable_reference_input.go
- variable_reference_response.go
- variable_response.go
- webhook_input.go
- webhook_response.go