types

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 18, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CaddyServer

type CaddyServer struct {
	Name                 string `validate:"required"`
	Image                string `validate:"required"`
	CPU                  int    `validate:"gte=1"`
	Memory               string `validate:"required"`
	MinInstances         int    `validate:"gte=0"`
	MaxInstances         int    `validate:"gte=1"`
	Concurrency          int    `validate:"gte=1"`
	Port                 int    `validate:"gte=1,lte=65535"`
	Ingress              string
	UseHTTP2             bool
	AllowUnauthenticated bool
	VPCConnector         string
	VPCEgress            string
	CloudSQLInstances    []string
	Labels               map[string]string
	Env                  map[string]EnvVar
	Traffic              TrafficConfig
}

func (*CaddyServer) Clone

func (s *CaddyServer) Clone() *CaddyServer

type CloudRunService

type CloudRunService struct {
	Name                 string `validate:"required"`
	Image                string `validate:"required"`
	CPU                  int    `validate:"gte=1"`
	Memory               string `validate:"required"`
	MinInstances         int    `validate:"gte=0"`
	MaxInstances         int    `validate:"gte=1"`
	Concurrency          int    `validate:"gte=1"`
	Port                 int    `validate:"gte=1,lte=65535"`
	Ingress              string
	UseHTTP2             bool
	AllowUnauthenticated bool
	VPCConnector         string
	VPCEgress            string
	CloudSQLInstances    []string
	Labels               map[string]string
	Env                  map[string]EnvVar
	Traffic              TrafficConfig
}

func (*CloudRunService) Clone

func (s *CloudRunService) Clone() *CloudRunService

type CloudSQLInstance

type CloudSQLInstance struct {
	Name             string `validate:"required"`
	DatabaseVersion  string `validate:"required"`
	Tier             string `validate:"required"`
	AvailabilityType string `validate:"required,oneof=REGIONAL ZONAL"`
	StorageSizeGB    int    `validate:"gte=10"`
}

func (*CloudSQLInstance) Clone

func (r *CloudSQLInstance) Clone() *CloudSQLInstance

type DeploymentResource

type DeploymentResource struct {
	Kind                     ResourceKind      `json:"kind"`
	Name                     string            `json:"name"`
	DatabaseVersion          string            `json:"databaseVersion,omitempty"`
	Tier                     string            `json:"tier,omitempty"`
	AvailabilityType         string            `json:"availabilityType,omitempty"`
	StorageSizeGB            int               `json:"storageSizeGb,omitempty"`
	MemorySizeGB             int               `json:"memorySizeGb,omitempty"`
	RedisVersion             string            `json:"redisVersion,omitempty"`
	MessageRetentionDuration string            `json:"messageRetentionDuration,omitempty"`
	Labels                   map[string]string `json:"labels,omitempty"`
	Location                 string            `json:"location,omitempty"`
	RetentionDays            int               `json:"retentionDays,omitempty"`
	Description              string            `json:"description,omitempty"`
	Destination              string            `json:"destination,omitempty"`
	Filter                   string            `json:"filter,omitempty"`
	UniqueWriterIdentity     bool              `json:"uniqueWriterIdentity,omitempty"`
}

type DeploymentService

type DeploymentService struct {
	Kind                 ServiceKind       `json:"kind"`
	Name                 string            `json:"name"`
	Image                string            `json:"image"`
	CPU                  int               `json:"cpu"`
	Memory               string            `json:"memory"`
	MinInstances         int               `json:"minInstances"`
	MaxInstances         int               `json:"maxInstances"`
	Concurrency          int               `json:"concurrency"`
	Port                 int               `json:"port"`
	Ingress              string            `json:"ingress,omitempty"`
	UseHTTP2             bool              `json:"useHttp2,omitempty"`
	AllowUnauthenticated bool              `json:"allowUnauthenticated,omitempty"`
	VPCConnector         string            `json:"vpcConnector,omitempty"`
	VPCEgress            string            `json:"vpcEgress,omitempty"`
	CloudSQLInstances    []string          `json:"cloudSqlInstances,omitempty"`
	Labels               map[string]string `json:"labels,omitempty"`
	Env                  map[string]EnvVar `json:"env,omitempty"`
	Traffic              TrafficConfig     `json:"traffic"`
}

type EnvVar

type EnvVar struct {
	Value  string
	Secret string
}

type EnvironmentConfig

type EnvironmentConfig struct {
	Name             string `validate:"required"`
	Extends          string
	CloudRunServices map[string]*CloudRunService
	GRPCServers      map[string]*GRPCServer
	CaddyServers     map[string]*CaddyServer
	CloudSQL         map[string]*CloudSQLInstance
	Redis            map[string]*RedisInstance
	PubSubTopics     map[string]*PubSubTopic
	LoggingBuckets   map[string]*LoggingBucket
	LoggingSinks     map[string]*LoggingSink
	NATS             *NATSConfig
}

func (*EnvironmentConfig) Clone

type GRPCServer

type GRPCServer struct {
	Name                 string `validate:"required"`
	Image                string `validate:"required"`
	CPU                  int    `validate:"gte=1"`
	Memory               string `validate:"required"`
	MinInstances         int    `validate:"gte=0"`
	MaxInstances         int    `validate:"gte=1"`
	Concurrency          int    `validate:"gte=1"`
	Port                 int    `validate:"gte=1,lte=65535"`
	Ingress              string
	UseHTTP2             bool
	AllowUnauthenticated bool
	VPCConnector         string
	VPCEgress            string
	CloudSQLInstances    []string
	Labels               map[string]string
	Env                  map[string]EnvVar
	Traffic              TrafficConfig
}

func (*GRPCServer) Clone

func (s *GRPCServer) Clone() *GRPCServer

type LoggingBucket

type LoggingBucket struct {
	Name          string `validate:"required"`
	Location      string `validate:"required"`
	RetentionDays int    `validate:"gte=1"`
	Description   string
}

func (*LoggingBucket) Clone

func (r *LoggingBucket) Clone() *LoggingBucket

type LoggingSink

type LoggingSink struct {
	Name                 string `validate:"required"`
	Destination          string `validate:"required"`
	Filter               string
	Description          string
	UniqueWriterIdentity bool
}

func (*LoggingSink) Clone

func (r *LoggingSink) Clone() *LoggingSink

type NATSClusterConfig

type NATSClusterConfig struct {
	Name         string `validate:"required"`
	Replicas     int    `validate:"gte=1"`
	JetStream    bool
	StorageClass string
	Size         string
}

type NATSConfig

type NATSConfig struct {
	Cluster *NATSClusterConfig
}

func (*NATSConfig) Clone

func (n *NATSConfig) Clone() *NATSConfig

type ProjectConfig

type ProjectConfig struct {
	ProjectID    string                        `validate:"required"`
	Region       string                        `validate:"required"`
	Environments map[string]*EnvironmentConfig `validate:"required"`
}

func (*ProjectConfig) Clone

func (p *ProjectConfig) Clone() *ProjectConfig

type PubSubTopic

type PubSubTopic struct {
	Name                     string `validate:"required"`
	MessageRetentionDuration string `validate:"required"`
	Labels                   map[string]string
}

func (*PubSubTopic) Clone

func (r *PubSubTopic) Clone() *PubSubTopic

type RedisInstance

type RedisInstance struct {
	Name         string `validate:"required"`
	Tier         string `validate:"required,oneof=BASIC STANDARD_HA"`
	MemorySizeGB int    `validate:"gte=1"`
	RedisVersion string `validate:"required"`
}

func (*RedisInstance) Clone

func (r *RedisInstance) Clone() *RedisInstance

type ResourceKind

type ResourceKind string
const (
	ResourceKindCloudSQL      ResourceKind = "cloud-sql"
	ResourceKindRedis         ResourceKind = "redis"
	ResourceKindPubSubTopic   ResourceKind = "pubsub-topic"
	ResourceKindLoggingBucket ResourceKind = "logging-bucket"
	ResourceKindLoggingSink   ResourceKind = "logging-sink"
)

type ServiceKind

type ServiceKind string
const (
	ServiceKindCloudRun ServiceKind = "cloud-run"
	ServiceKindGRPC     ServiceKind = "grpc-server"
	ServiceKindCaddy    ServiceKind = "caddy-server"
)

type TrafficConfig

type TrafficConfig struct {
	LatestPercent int
}

Jump to

Keyboard shortcuts

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