schema

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2025 License: MIT Imports: 27 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsV1HostSpecs

func AsV1HostSpecs(hosts []HostSpec) []v1.HostSpec

func AsV1InitContainers

func AsV1InitContainers(initContainers []*InitContainer) []v1.InitContainerSpec

func AsV1PortSpecs

func AsV1PortSpecs(ports []PortSpec) []v1.PortSpec

func AsV1VariableMounts

func AsV1VariableMounts(mounts []*VariableMount) []v1.VariableMountSpec

func AsV1Volumes

func AsV1Volumes(volumes []ServiceVolume) []v1.VolumeSpec

Types

type Bootstrap

type Bootstrap struct {
	ent.Schema
}

Bootstrap holds the schema definition for the Bootstrap entity.

func (Bootstrap) Annotations

func (Bootstrap) Annotations() []schema.Annotation

Annotations of the Bootstrap

func (Bootstrap) Edges

func (Bootstrap) Edges() []ent.Edge

Edges of the Bootstrap.

func (Bootstrap) Fields

func (Bootstrap) Fields() []ent.Field

Fields of the Bootstrap.

type BuildkitSettings

type BuildkitSettings struct {
	MaxParallelism int `json:"max_parallelism"`
	Replicas       int `json:"replicas"`
}

Sub categories

type Capabilities

type Capabilities struct {
	Add  []Capability `json:"add,omitempty" protobuf:"bytes,1,rep,name=add,casttype=Capability"`
	Drop []Capability `json:"drop,omitempty" protobuf:"bytes,2,rep,name=drop,casttype=Capability"`
}

Adds and removes POSIX capabilities from running containers.

type Capability

type Capability string

* Kubernetes Security context

type DatabaseConfig

type DatabaseConfig struct {
	Version             string `json:"version,omitempty" required:"false" description:"Version of the database"`
	StorageSize         string `json:"storage,omitempty" required:"false" description:"Storage size for the database"`
	DefaultDatabaseName string `json:"defaultDatabaseName,omitempty" required:"false" description:"Default database name"`
	InitDB              string `json:"initdb,omitempty" required:"false" description:"SQL commands to run to initialize the database"`
	WalLevel            string `json:"walLevel,omitempty" required:"false" description:"PostgreSQL WAL level"`
}

func (*DatabaseConfig) AsV1DatabaseConfig

func (self *DatabaseConfig) AsV1DatabaseConfig() *v1.DatabaseConfigSpec

type Deployment

type Deployment struct {
	ent.Schema
}

Deployment holds the schema definition for the Deployment entity.

func (Deployment) Annotations

func (Deployment) Annotations() []schema.Annotation

Annotations of the Deployment

func (Deployment) Edges

func (Deployment) Edges() []ent.Edge

Edges of the Deployment.

func (Deployment) Fields

func (Deployment) Fields() []ent.Field

Fields of the Deployment.

func (Deployment) Indexes added in v0.0.15

func (Deployment) Indexes() []ent.Index

Indexes of the Deployment.

func (Deployment) Mixin

func (Deployment) Mixin() []ent.Mixin

Mixin of the Deployment.

type DeploymentSource

type DeploymentSource string

Source enum

const (
	DeploymentSourceManual DeploymentSource = "manual"
	DeploymentSourceGit    DeploymentSource = "git"
)

func (DeploymentSource) Schema

func (u DeploymentSource) Schema(r huma.Registry) *huma.Schema

Register enum in OpenAPI specification https://github.com/danielgtaylor/huma/issues/621

func (DeploymentSource) Values

func (DeploymentSource) Values() (kinds []string)

Values provides list valid values for Enum.

type DeploymentStatus

type DeploymentStatus string

Status enum

const (
	DeploymentStatusBuildPending   DeploymentStatus = "build-pending"
	DeploymentStatusBuildQueued    DeploymentStatus = "build-queued"
	DeploymentStatusBuildRunning   DeploymentStatus = "build-running"
	DeploymentStatusBuildSucceeded DeploymentStatus = "build-succeeded"
	DeploymentStatusBuildCancelled DeploymentStatus = "build-cancelled"
	DeploymentStatusBuildFailed    DeploymentStatus = "build-failed"
	// * POD/Instance related
	DeploymentStatusActive      DeploymentStatus = "active"       // Running and healthy
	DeploymentStatusLaunching   DeploymentStatus = "launching"    // Waiting for resources or other conditions
	DeploymentStatusLaunchError DeploymentStatus = "launch-error" // Failed to launch due to an error
	DeploymentStatusCrashing    DeploymentStatus = "crashing"     // Pod is crashing or failing in a loop
	DeploymentStatusRemoved     DeploymentStatus = "removed"      // Deployment has been replaced by a newer one
)

func (DeploymentStatus) Schema

func (u DeploymentStatus) Schema(r huma.Registry) *huma.Schema

Register enum in OpenAPI specification https://github.com/danielgtaylor/huma/issues/621

func (DeploymentStatus) Values

func (DeploymentStatus) Values() (kinds []string)

Values provides list valid values for Enum.

type Environment

type Environment struct {
	ent.Schema
}

Environment holds the schema definition for the Environment entity.

func (Environment) Annotations

func (Environment) Annotations() []schema.Annotation

Annotations of the Environment

func (Environment) Edges

func (Environment) Edges() []ent.Edge

Edges of the Environment.

func (Environment) Fields

func (Environment) Fields() []ent.Field

Fields of the Environment.

func (Environment) Mixin

func (Environment) Mixin() []ent.Mixin

Mixin of the Environment.

type GenerateResponse

type GenerateResponse struct {
	GeneratedValue string            `json:"generated_value"`
	PlainValue     string            `json:"plain_value"`
	JWTValues      map[string]string `json:"jwt_values"`
}

type GeneratorType

type GeneratorType string

Types of generators

const (
	GeneratorTypeEmail          GeneratorType = "email"
	GeneratorTypePassword       GeneratorType = "password"
	GeneratorTypePasswordBcrypt GeneratorType = "bcrypt"
	GeneratorTypeInput          GeneratorType = "input"
	GeneratorTypeJWT            GeneratorType = "jwt"
	GeneratorTypeStringReplace  GeneratorType = "string_replace"
)

func (GeneratorType) Schema

func (u GeneratorType) Schema(r huma.Registry) *huma.Schema

Register enum in OpenAPI specification https://github.com/danielgtaylor/huma/issues/621

type GitCommitter

type GitCommitter struct {
	Name      string `json:"name"`
	AvatarURL string `json:"avatar_url"`
}

Type to keep track of git committer

type GithubApp

type GithubApp struct {
	ent.Schema
}

GithubApp holds the schema definition for the GithubApp entity.

func (GithubApp) Annotations

func (GithubApp) Annotations() []schema.Annotation

Annotations of the GithubApp

func (GithubApp) Edges

func (GithubApp) Edges() []ent.Edge

Edges of the GithubApp.

func (GithubApp) Fields

func (GithubApp) Fields() []ent.Field

Fields of the GithubApp.

func (GithubApp) Mixin

func (GithubApp) Mixin() []ent.Mixin

Mixin of the GithubApp.

type GithubInstallation

type GithubInstallation struct {
	ent.Schema
}

GithubInstallation holds the schema definition for the GithubInstallation entity.

func (GithubInstallation) Annotations

func (GithubInstallation) Annotations() []schema.Annotation

Annotations of the GithubInstallation

func (GithubInstallation) Edges

func (GithubInstallation) Edges() []ent.Edge

Edges of the GithubInstallation.

func (GithubInstallation) Fields

func (GithubInstallation) Fields() []ent.Field

Fields of the GithubInstallation.

func (GithubInstallation) Indexes

func (GithubInstallation) Indexes() []ent.Index

Indexes of the GithubInstallation.

func (GithubInstallation) Mixin

func (GithubInstallation) Mixin() []ent.Mixin

Mixin of the GithubInstallation.

type GithubInstallationPermissions

type GithubInstallationPermissions struct {
	Contents string `json:"contents,omitempty"`
	Metadata string `json:"metadata,omitempty"`
}

type Group

type Group struct {
	ent.Schema
}

Group holds the schema definition for the Group entity.

func (Group) Annotations

func (Group) Annotations() []schema.Annotation

Annotations of the Group

func (Group) Edges

func (Group) Edges() []ent.Edge

Edges of the Group.

func (Group) Fields

func (Group) Fields() []ent.Field

Fields of the Group.

func (Group) Mixin

func (Group) Mixin() []ent.Mixin

Mixin of the Group.

type HealthCheck

type HealthCheck struct {
	Type                      HealthCheckType `json:"type" required:"true"`
	Path                      string          `json:"path,omitempty" required:"false" doc:"Path for http health checks"`
	Port                      *int32          `json:"port,omitempty" required:"false" doc:"Port for http health checks"`
	Command                   string          `json:"command,omitempty" required:"false" doc:"Command for exec health checks"`
	PeriodSeconds             int32           `json:"period_seconds" required:"true" default:"10" doc:"Period in seconds for health checks"`
	TimeoutSeconds            int32           `json:"timeout_seconds" required:"true" default:"5" doc:"Timeout in seconds for health checks"`
	StartupFailureThreshold   int32           `` /* 130-byte string literal not displayed */
	LivenessFailureThreshold  int32           `` /* 131-byte string literal not displayed */
	ReadinessFailureThreshold int32           `` /* 132-byte string literal not displayed */
}

func (*HealthCheck) AsV1HealthCheck

func (self *HealthCheck) AsV1HealthCheck() *v1.HealthCheckSpec

type HealthCheckType

type HealthCheckType string

* Health check compatible with unbind-operator

const (
	HealthCheckTypeHTTP HealthCheckType = "http"
	HealthCheckTypeExec HealthCheckType = "exec"
	HealthCheckTypeNone HealthCheckType = "none"
)

func (HealthCheckType) Schema

func (u HealthCheckType) Schema(r huma.Registry) *huma.Schema

Register enum in OpenAPI specification https://github.com/danielgtaylor/huma/issues/621

type HostSpec

type HostSpec struct {
	Host string `json:"host"`
	Path string `json:"path"`
	Port *int32 `json:"port,omitempty" required:"false"`
}

* Custom kubernetes-like types

type InitContainer

type InitContainer struct {
	Image   string `json:"image" required:"true" doc:"Image of the init container"`
	Command string `json:"command" required:"true" doc:"Command to run in the init container"`
}

* Init containers

type JWTKey

type JWTKey struct {
	ent.Schema
}

JWTKey holds the schema definition for the JWTKey entity.

func (JWTKey) Annotations

func (JWTKey) Annotations() []schema.Annotation

Annotations of the Oauth2Code.

func (JWTKey) Fields

func (JWTKey) Fields() []ent.Field

Fields of the JWTKey.

type JWTParams

type JWTParams struct {
	Issuer           string
	SecretOutputKey  string
	AnonOutputKey    string
	ServiceOutputKey string
}

JWTParams represents the parameters for JWT generation

type Oauth2Code

type Oauth2Code struct {
	ent.Schema
}

Oauth2Code holds the schema definition for the authorization Oauth2Code entity.

func (Oauth2Code) Annotations

func (Oauth2Code) Annotations() []schema.Annotation

Annotations of the Oauth2Code.

func (Oauth2Code) Edges

func (Oauth2Code) Edges() []ent.Edge

Edges of the Oauth2Code.

func (Oauth2Code) Fields

func (Oauth2Code) Fields() []ent.Field

Fields of the Oauth2Code.

func (Oauth2Code) Mixin

func (Oauth2Code) Mixin() []ent.Mixin

Mixin of the Oauth2Code.

type Oauth2Token

type Oauth2Token struct {
	ent.Schema
}

Oauth2Token holds the schema definition for the Oauth2Token entity.

func (Oauth2Token) Annotations

func (Oauth2Token) Annotations() []schema.Annotation

Annotations of the Oauth2Token

func (Oauth2Token) Edges

func (Oauth2Token) Edges() []ent.Edge

Edges of the Oauth2Token.

func (Oauth2Token) Fields

func (Oauth2Token) Fields() []ent.Field

Fields of the Oauth2Token.

func (Oauth2Token) Mixin

func (Oauth2Token) Mixin() []ent.Mixin

Mixin of the Oauth2Token.

type PVCMetadata

type PVCMetadata struct {
	ent.Schema
}

PVCMetadata holds the schema definition for the PVCMetadata entity.

func (PVCMetadata) Annotations

func (PVCMetadata) Annotations() []schema.Annotation

Annotations of the PVCMetadata

func (PVCMetadata) Edges

func (PVCMetadata) Edges() []ent.Edge

Edges of the PVCMetadata.

func (PVCMetadata) Fields

func (PVCMetadata) Fields() []ent.Field

Fields of the PVCMetadata.

func (PVCMetadata) Mixin

func (PVCMetadata) Mixin() []ent.Mixin

Mixin of the PVCMetadata.

type Permission

type Permission struct {
	ent.Schema
}

Permission holds the schema definition for the Permission entity.

func (Permission) Annotations

func (Permission) Annotations() []schema.Annotation

Annotations of the Permission

func (Permission) Edges

func (Permission) Edges() []ent.Edge

Edges of the Permission.

func (Permission) Fields

func (Permission) Fields() []ent.Field

Fields of the Permission.

func (Permission) Mixin

func (Permission) Mixin() []ent.Mixin

Mixin of the Permission.

type PermittedAction

type PermittedAction string

* Enums * PermittedAction enum

const (
	// Admin can perform any action (create, read, update, delete)
	ActionAdmin PermittedAction = "admin"
	// Editor can perform read and update actions
	ActionEditor PermittedAction = "edit"
	// Viewer can only perform read actions
	ActionViewer PermittedAction = "view"
)

func (PermittedAction) Schema

func (u PermittedAction) Schema(r huma.Registry) *huma.Schema

Register enum in OpenAPI specification https://github.com/danielgtaylor/huma/issues/621

func (PermittedAction) Values

func (s PermittedAction) Values() (kinds []string)

Values provides list valid values for Enum.

type PortSpec

type PortSpec struct {
	// Will create a node port (public) service
	IsNodePort bool   `json:"is_nodeport" required:"false"`
	NodePort   *int32 `json:"node_port,omitempty" required:"false"`
	// Port is the container port to expose
	Port     int32     `json:"port" min:"1" max:"65535"`
	Protocol *Protocol `json:"protocol,omitempty" required:"false"`
}

func (*PortSpec) AsV1PortSpec

func (self *PortSpec) AsV1PortSpec() v1.PortSpec

type Project

type Project struct {
	ent.Schema
}

Project holds the schema definition for the Project entity.

func (Project) Annotations

func (Project) Annotations() []schema.Annotation

Annotations of the Project

func (Project) Edges

func (Project) Edges() []ent.Edge

Edges of the Project.

func (Project) Fields

func (Project) Fields() []ent.Field

Fields of the Project.

func (Project) Mixin

func (Project) Mixin() []ent.Mixin

Mixin of the Project.

type Protocol

type Protocol string
const (
	ProtocolTCP  Protocol = "TCP"
	ProtocolUDP  Protocol = "UDP"
	ProtocolSCTP Protocol = "SCTP"
)

func (Protocol) Schema

func (u Protocol) Schema(r huma.Registry) *huma.Schema

Register enum in OpenAPI specification https://github.com/danielgtaylor/huma/issues/621

func (Protocol) Values

func (s Protocol) Values() (kinds []string)

Values provides list valid values for Enum.

type Registry

type Registry struct {
	ent.Schema
}

Registry holds the schema definition for the Registry entity.

func (Registry) Annotations

func (Registry) Annotations() []schema.Annotation

Annotations of the Registry

func (Registry) Edges

func (Registry) Edges() []ent.Edge

Edges of the Registry.

func (Registry) Fields

func (Registry) Fields() []ent.Field

Fields of the Registry.

func (Registry) Mixin

func (Registry) Mixin() []ent.Mixin

Mixin of the Registry.

type ResourceSelector

type ResourceSelector struct {
	Superuser bool      `json:"superuser" doc:"Access to every resource of this type"`
	ID        uuid.UUID `json:"id" doc:"Specific resource ID"`
}

* Types

type ResourceType

type ResourceType string

* ResourceType enum

const (
	ResourceTypeSystem      ResourceType = "system" // Internal resources separate from kubernetes
	ResourceTypeTeam        ResourceType = "team"
	ResourceTypeProject     ResourceType = "project"
	ResourceTypeEnvironment ResourceType = "environment"
	ResourceTypeService     ResourceType = "service"
)

func (ResourceType) Schema

func (u ResourceType) Schema(r huma.Registry) *huma.Schema

Register enum in OpenAPI specification https://github.com/danielgtaylor/huma/issues/621

func (ResourceType) Values

func (s ResourceType) Values() (kinds []string)

Values provides list valid values for Enum.

type Resources

type Resources struct {
	// CPU requests and limits
	CPURequestsMillicores int64 `json:"cpu_requests_millicores,omitempty"`
	CPULimitsMillicores   int64 `json:"cpu_limits_millicores,omitempty"`
	// Memory requests and limits
	MemoryRequestsMegabytes int64 `json:"memory_requests_megabytes,omitempty"`
	MemoryLimitsMegabytes   int64 `json:"memory_limits_megabytes,omitempty"`
}

* Resources Resources defines the resource requirements/limits for a container

func (*Resources) AsV1ResourceSpec

func (self *Resources) AsV1ResourceSpec() *v1.ResourceSpec

type S3

type S3 struct {
	ent.Schema
}

S3 holds the schema definition for the S3 entity.

func (S3) Annotations

func (S3) Annotations() []schema.Annotation

Annotations of the S3

func (S3) Edges

func (S3) Edges() []ent.Edge

Edges of the S3.

func (S3) Fields

func (S3) Fields() []ent.Field

Fields of the S3.

func (S3) Mixin

func (S3) Mixin() []ent.Mixin

Mixin of the S3.

type SecurityContext

type SecurityContext struct {
	Capabilities *Capabilities `json:"capabilities,omitempty" protobuf:"bytes,1,opt,name=capabilities"`
	Privileged   *bool         `json:"privileged,omitempty" protobuf:"varint,2,opt,name=privileged"`
}

func (*SecurityContext) AsV1SecurityContext

func (self *SecurityContext) AsV1SecurityContext() *corev1.SecurityContext

type Service

type Service struct {
	ent.Schema
}

Service holds the schema definition for the Service entity.

func (Service) Annotations

func (Service) Annotations() []schema.Annotation

Annotations of the Service

func (Service) Edges

func (Service) Edges() []ent.Edge

Edges of the Service.

func (Service) Fields

func (Service) Fields() []ent.Field

Fields of the Service.

func (Service) Indexes added in v0.0.15

func (Service) Indexes() []ent.Index

Indexes of the Service.

func (Service) Mixin

func (Service) Mixin() []ent.Mixin

Mixin of the Service.

type ServiceBuilder

type ServiceBuilder string

Builder enum

const (
	ServiceBuilderRailpack ServiceBuilder = "railpack"
	ServiceBuilderDocker   ServiceBuilder = "docker"
	ServiceBuilderDatabase ServiceBuilder = "database"
)

func (ServiceBuilder) Schema

func (u ServiceBuilder) Schema(r huma.Registry) *huma.Schema

Register enum in OpenAPI specification https://github.com/danielgtaylor/huma/issues/621

func (ServiceBuilder) Values

func (s ServiceBuilder) Values() (kinds []string)

Values provides list valid values for Enum.

type ServiceConfig

type ServiceConfig struct {
	ent.Schema
}

ServiceConfig holds environment-specific configuration for a service

func (ServiceConfig) Annotations

func (ServiceConfig) Annotations() []schema.Annotation

Annotations of the ServiceConfig

func (ServiceConfig) Edges

func (ServiceConfig) Edges() []ent.Edge

Edges of the ServiceConfig.

func (ServiceConfig) Fields

func (ServiceConfig) Fields() []ent.Field

Fields of the ServiceConfig.

func (ServiceConfig) Mixin

func (ServiceConfig) Mixin() []ent.Mixin

Mixin of the ServiceConfig.

type ServiceGroup

type ServiceGroup struct {
	ent.Schema
}

ServiceGroup holds the schema definition for the ServiceGroup entity.

func (ServiceGroup) Annotations

func (ServiceGroup) Annotations() []schema.Annotation

Annotations of the ServiceGroup

func (ServiceGroup) Edges

func (ServiceGroup) Edges() []ent.Edge

Edges of the ServiceGroup.

func (ServiceGroup) Fields

func (ServiceGroup) Fields() []ent.Field

Fields of the ServiceGroup.

func (ServiceGroup) Mixin

func (ServiceGroup) Mixin() []ent.Mixin

Mixin of the ServiceGroup.

type ServiceType

type ServiceType string

Type enum

const (
	ServiceTypeGithub      ServiceType = "github"
	ServiceTypeDockerimage ServiceType = "docker-image"
	ServiceTypeDatabase    ServiceType = "database"
)

func (ServiceType) Schema

func (u ServiceType) Schema(r huma.Registry) *huma.Schema

Register enum in OpenAPI specification https://github.com/danielgtaylor/huma/issues/621

func (ServiceType) Values

func (s ServiceType) Values() (kinds []string)

Values provides list valid values for Enum.

type ServiceVolume

type ServiceVolume struct {
	ID        string `json:"id" required:"true" doc:"ID of the volume, pvc name in kubernetes"`
	MountPath string `json:"mount_path" required:"true" doc:"Path to mount the volume (e.g. /mnt/data)"`
}

* For volumes

type SystemSetting

type SystemSetting struct {
	ent.Schema
}

SystemSetting holds the schema definition for the SystemSetting entity.

func (SystemSetting) Annotations

func (SystemSetting) Annotations() []schema.Annotation

Annotations of the SystemSetting

func (SystemSetting) Edges

func (SystemSetting) Edges() []ent.Edge

Edges of the SystemSetting.

func (SystemSetting) Fields

func (SystemSetting) Fields() []ent.Field

Fields of the SystemSetting.

func (SystemSetting) Mixin

func (SystemSetting) Mixin() []ent.Mixin

Mixin of the SystemSetting.

type Team

type Team struct {
	ent.Schema
}

Team holds the schema definition for the Team entity.

func (Team) Annotations

func (Team) Annotations() []schema.Annotation

Annotations of the Team

func (Team) Edges

func (Team) Edges() []ent.Edge

Edges of the Team.

func (Team) Fields

func (Team) Fields() []ent.Field

Fields of the Team.

func (Team) Mixin

func (Team) Mixin() []ent.Mixin

Mixin of the Team.

type Template

type Template struct {
	ent.Schema
}

Template holds the schema definition for the Template entity.

func (Template) Annotations

func (Template) Annotations() []schema.Annotation

Annotations of the Template

func (Template) Edges

func (Template) Edges() []ent.Edge

Edges of the Template.

func (Template) Fields

func (Template) Fields() []ent.Field

Fields of the Template.

func (Template) Indexes

func (Template) Indexes() []ent.Index

Indexes of the Template.

func (Template) Mixin

func (Template) Mixin() []ent.Mixin

Mixin of the Template.

type TemplateDefinition

type TemplateDefinition struct {
	Name        string            `json:"name"`
	DisplayRank uint              `json:"display_rank"`   // Rank for ordering results, lower ranks higher
	Icon        string            `json:"icon,omitempty"` // Icon name
	Description string            `json:"description"`
	Keywords    []string          `json:"keywords,omitempty"`
	Version     int               `json:"version"`
	Services    []TemplateService `json:"services" nullable:"false"`
	Inputs      []TemplateInput   `json:"inputs" nullable:"false"`
}

TemplateDefinition represents a complete template configuration

type TemplateInput

type TemplateInput struct {
	ID           string            `json:"id"`
	Name         string            `json:"name"`
	Type         TemplateInputType `json:"type"`
	Volume       *TemplateVolume   `json:"volume,omitempty"`
	PortProtocol *Protocol         `json:"port_protocol,omitempty"` // Protocol for the port
	Description  string            `json:"description"`
	Default      *string           `json:"default,omitempty"`
	Required     bool              `json:"required"`
	Hidden       bool              `json:"hidden"`
	TargetPort   *int              `json:"target_port,omitempty"`
}

TemplateInput represents a user input field in the template

type TemplateInputType

type TemplateInputType string

TemplateInputType represents the type of user input

const (
	InputTypeVariable          TemplateInputType = "variable"
	InputTypeHost              TemplateInputType = "host"
	InputTypeVolumeSize        TemplateInputType = "volume-size"
	InputTypeDatabaseSize      TemplateInputType = "database-size"
	InputTypeGeneratedNodePort TemplateInputType = "generated-node-port"
	InputTypeGeneratedPassword TemplateInputType = "generated-password"
	InputTypeGeneratedNodeIP   TemplateInputType = "generated-node-ip" // For node IPs, e.g. for wg-easy
)

func (TemplateInputType) Schema

func (u TemplateInputType) Schema(r huma.Registry) *huma.Schema

Register the enum in OpenAPI specification https://github.com/danielgtaylor/huma/issues/621

type TemplateService

type TemplateService struct {
	ID                 string                      `json:"id"`
	DependsOn          []string                    `json:"depends_on" nullable:"false"` // IDs of services that must be started before this one
	Name               string                      `json:"name"`
	Icon               string                      `json:"icon"`
	Type               ServiceType                 `json:"type"`
	Builder            ServiceBuilder              `json:"builder"`
	DatabaseType       *string                     `json:"database_type,omitempty"`
	DatabaseConfig     *DatabaseConfig             `json:"database_config,omitempty"` // Database configuration
	Image              *string                     `json:"image,omitempty"`
	Ports              []PortSpec                  `json:"ports" nullable:"false"` // Ports to expose
	InputIDs           []string                    `json:"input_ids,omitempty"`    // IDs of inputs that are hostnames
	RunCommand         *string                     `json:"run_command,omitempty"`
	Volumes            []TemplateVolume            `json:"volumes" nullable:"false"`             // Volumes to mount
	Variables          []TemplateVariable          `json:"variables" nullable:"false"`           // Variables this service needs
	VariableReferences []TemplateVariableReference `json:"variable_references" nullable:"false"` // Variables this service needs
	InitContainers     []*InitContainer            `json:"init_containers,omitempty"`            // Init containers to run before the service
	SecurityContext    *SecurityContext            `json:"security_context,omitempty"`           // Security context for the service
	HealthCheck        *HealthCheck                `json:"health_check,omitempty"`               // Health check configuration
	VariablesMounts    []*VariableMount            `json:"variables_mounts" nullable:"false"`    // Variables mounts
	ProtectedVariables []string                    `json:"protected_variables" nullable:"false"` // List of protected variables (can be edited, not deleted)
	InitDBReplacers    map[string]string           `json:"init_db_replacers,omitempty"`          // Replacers for the init DB, will replace key with value in InitDB string
	Resources          *Resources                  `json:"resources,omitempty"`                  // Resources for the service
}

TemplateService represents a service within a template

type TemplateVariable

type TemplateVariable struct {
	Name  string `json:"name"`
	Value string `json:"value"`
	// If set, the value will be generated using the generator
	Generator *ValueGenerator `json:"generator,omitempty"`
}

TemplateVariable represents a configurable variable in a template

type TemplateVariableReference

type TemplateVariableReference struct {
	SourceID                  string   `json:"source_id"`
	TargetName                string   `json:"target_name"`                 // Name of the variable
	SourceName                string   `json:"source_name"`                 // Name of the variable
	AdditionalTemplateSources []string `json:"additional_template_sources"` // Additional template sources to resolve the variable
	TemplateString            string   `json:"template_string"`             // Template string to resolve the variable, in format "abc${VARIABLE_KEY}def"
	IsHost                    bool     `json:"is_host"`                     // If true, variable will be <kubernetesName>.<serviceName>, sort of customized by type (e.g. mysql adds moco- prefix)
	ResolveAsNormalVariable   bool     `json:"resolve_as_normal_variable"`  // If true, the variable will be resolved as a normal variable not a reference
}

TenokateVariableReference represents a reference to a variable in a template

type TemplateVolume

type TemplateVolume struct {
	Name       string `json:"name"`
	CapacityGB string `json:"capacity_gb"`
	MountPath  string `json:"mountPath"`
}

TemplateVolume represents a volume configuration in the template

type User

type User struct {
	ent.Schema
}

User holds the schema definition for the User entity.

func (User) Annotations

func (User) Annotations() []schema.Annotation

Annotations of the User

func (User) Edges

func (User) Edges() []ent.Edge

Edges of the User.

func (User) Fields

func (User) Fields() []ent.Field

Fields of the User.

func (User) Mixin

func (User) Mixin() []ent.Mixin

Mixin of the User.

type ValueGenerator

type ValueGenerator struct {
	Type       GeneratorType  `json:"type"`
	InputID    string         `json:"input_id,omitempty"`    // For input
	BaseDomain string         `json:"base_domain,omitempty"` // For email
	AddPrefix  string         `json:"add_prefix,omitempty"`  // Add a prefix to the generated value
	HashType   *ValueHashType `json:"hash_type,omitempty"`   // Hash the generated value
	JWTParams  *JWTParams     `json:"jwt_params,omitempty"`  // JWT parameters
}

ValueGenerator represents how to generate a value

func (*ValueGenerator) Generate

func (self *ValueGenerator) Generate(inputs map[string]string) (*GenerateResponse, error)

type ValueHashType

type ValueHashType string
const (
	ValueHashTypeSHA256 ValueHashType = "sha256"
	ValueHashTypeSHA512 ValueHashType = "sha512"
)

func (ValueHashType) Schema

func (u ValueHashType) Schema(r huma.Registry) *huma.Schema

Register enum in OpenAPI specification https://github.com/danielgtaylor/huma/issues/621

type VariableMount

type VariableMount struct {
	Name string `json:"name" required:"true" doc:"Name of the variable to mount"`
	Path string `json:"path" required:"true" doc:"Path to mount the variable (e.g. /etc/secret)"`
}

* For mounting variables as volumes

type VariableReference

type VariableReference struct {
	ent.Schema
}

VariableReference holds the schema definition for the VariableReference entity.

func (VariableReference) Annotations

func (VariableReference) Annotations() []schema.Annotation

Annotations of the VariableReference

func (VariableReference) Edges

func (VariableReference) Edges() []ent.Edge

Edges of the VariableReference.

func (VariableReference) Fields

func (VariableReference) Fields() []ent.Field

Fields of the VariableReference.

func (VariableReference) Indexes

func (VariableReference) Indexes() []ent.Index

Indexes of the VariableReference.

func (VariableReference) Mixin

func (VariableReference) Mixin() []ent.Mixin

Mixin of the VariableReference.

type VariableReferenceSource

type VariableReferenceSource struct {
	Type                 VariableReferenceType       `json:"type"`
	SourceName           string                      `json:"source_name"`
	SourceIcon           string                      `json:"source_icon"`
	SourceType           VariableReferenceSourceType `json:"source_type"`
	SourceID             uuid.UUID                   `json:"source_id"`
	SourceKubernetesName string                      `json:"source_kubernetes_name"`
	Key                  string                      `json:"key"`
}

type VariableReferenceSourceType

type VariableReferenceSourceType string

Source of the VariableReference

const (
	VariableReferenceSourceTypeTeam        VariableReferenceSourceType = "team"
	VariableReferenceSourceTypeProject     VariableReferenceSourceType = "project"
	VariableReferenceSourceTypeEnvironment VariableReferenceSourceType = "environment"
	VariableReferenceSourceTypeService     VariableReferenceSourceType = "service"
)

func (VariableReferenceSourceType) KubernetesLabel

func (s VariableReferenceSourceType) KubernetesLabel() string

func (VariableReferenceSourceType) Schema

Register enum in OpenAPI specification https://github.com/danielgtaylor/huma/issues/621

func (VariableReferenceSourceType) Values

func (s VariableReferenceSourceType) Values() (kinds []string)

Values provides list valid values for Enum.

type VariableReferenceType

type VariableReferenceType string

Enums

const (
	VariableReferenceTypeVariable VariableReferenceType = "variable"
	// Kubernetes ingresses
	VariableReferenceTypeExternalEndpoint VariableReferenceType = "external_endpoint"
	// Kubedns
	VariableReferenceTypeInternalEndpoint VariableReferenceType = "internal_endpoint"
)

func (VariableReferenceType) Schema

Register enum in OpenAPI specification https://github.com/danielgtaylor/huma/issues/621

func (VariableReferenceType) Values

func (s VariableReferenceType) Values() (kinds []string)

Values provides list valid values for Enum.

type Webhook

type Webhook struct {
	ent.Schema
}

Webhook holds the schema definition for the Webhook entity.

func (Webhook) Annotations

func (Webhook) Annotations() []schema.Annotation

Annotations of the Webhook

func (Webhook) Edges

func (Webhook) Edges() []ent.Edge

Edges of the Webhook.

func (Webhook) Fields

func (Webhook) Fields() []ent.Field

Fields of the Webhook.

func (Webhook) Mixin

func (Webhook) Mixin() []ent.Mixin

Mixin of the Webhook.

type WebhookEvent

type WebhookEvent string

Webhook events

const (
	WebhookEventProjectCreated      WebhookEvent = "project.created"
	WebhookEventProjectUpdated      WebhookEvent = "project.updated"
	WebhookEventProjectDeleted      WebhookEvent = "project.deleted"
	WebhookEventServiceCreated      WebhookEvent = "service.created"
	WebhookEventServiceUpdated      WebhookEvent = "service.updated"
	WebhookEventServiceDeleted      WebhookEvent = "service.deleted"
	WebhookEventDeploymentQueued    WebhookEvent = "deployment.queued"
	WebhookEventDeploymentBuilding  WebhookEvent = "deployment.building"
	WebhookEventDeploymentSucceeded WebhookEvent = "deployment.succeeded"
	WebhookEventDeploymentFailed    WebhookEvent = "deployment.failed"
	WebhookEventDeploymentCancelled WebhookEvent = "deployment.cancelled"
)

func (WebhookEvent) Schema

func (u WebhookEvent) Schema(r huma.Registry) *huma.Schema

Schema registers the WebhookEvent schema in the OpenAPI specification

func (WebhookEvent) Values

func (s WebhookEvent) Values() (kinds []string)

Values provides list valid values for Enum.

type WebhookTarget

type WebhookTarget string

Enums

const (
	WebhookTargetDiscord  WebhookTarget = "discord"
	WebhookTargetSlack    WebhookTarget = "slack"
	WebhookTargetTelegram WebhookTarget = "telegram"
	WebhookTargetOther    WebhookTarget = "other"
)

func (WebhookTarget) Schema

func (u WebhookTarget) Schema(r huma.Registry) *huma.Schema

Register enum in OpenAPI specification https://github.com/danielgtaylor/huma/issues/621

func (WebhookTarget) Values

func (s WebhookTarget) Values() (kinds []string)

Values provides list valid values for Enum.

type WebhookType

type WebhookType string

Type of webhook

const (
	WebhookTypeTeam    WebhookType = "team"
	WebhookTypeProject WebhookType = "project"
)

func (WebhookType) Schema

func (u WebhookType) Schema(r huma.Registry) *huma.Schema

Register enum in OpenAPI specification https://github.com/danielgtaylor/huma/issues/621

func (WebhookType) Values

func (s WebhookType) Values() (kinds []string)

Values provides list valid values for Enum.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL