Documentation
¶
Index ¶
- Constants
- func ArtifactRegistryConfigReadConfig(config *api.Config) (api.Config, error)
- func DockerRemoteImagePushReadConfig(config *api.Config) (api.Config, error)
- func GcpBucketReadConfig(config *api.Config) (api.Config, error)
- func GcpPubSubTopicsReadConfig(config *api.Config) (api.Config, error)
- func PostgresqlGcpCloudsqlReadConfig(config *api.Config) (api.Config, error)
- func ReadAuthServiceAccountConfig(config *api.Config) (api.Config, error)
- func ReadGkeAutopilotResourceConfig(config *api.Config) (api.Config, error)
- func ReadGkeAutopilotTemplateConfig(config *api.Config) (api.Config, error)
- func ReadSecretsProviderConfig(config *api.Config) (api.Config, error)
- func ReadStateStorageConfig(config *api.Config) (api.Config, error)
- func ReadTemplateConfig(config *api.Config) (api.Config, error)
- func RedisReadConfig(config *api.Config) (api.Config, error)
- func ToCloudRunConfig(tpl any, composeCfg compose.Config, stackCfg *api.StackConfigCompose) (any, error)
- func ToGkeAutopilotConfig(tpl any, composeCfg compose.Config, stackCfg *api.StackConfigCompose) (any, error)
- func ToStaticSiteConfig(tpl any, stackDir, stackName string, stackCfg *api.StackConfigStatic) (any, error)
- type AlertsConfig
- type ArtifactRegistryConfig
- type CloudRunInput
- type Credentials
- type CredentialsParsed
- type DiscordCfg
- type DockerConfig
- type GcpBucket
- type GkeAutopilotInput
- type GkeAutopilotResource
- type GkeAutopilotTemplate
- type MaxErrorConfig
- type PlainLabels
- type PostgresGcpCloudsqlConfig
- type ProvisionRuntimeConfig
- type PubSubConfig
- type PubSubSubscription
- type PubSubTopic
- type RedisConfig
- type RegistryBasicAuth
- type RemoteImagePush
- type SecretsProviderConfig
- type ServiceAccountConfig
- type StateStorageConfig
- type StaticSiteInput
- type SubscriptionDeadLetterPolicyArgs
- type TelegramCfg
- type TemplateConfig
- type Timeouts
Constants ¶
View Source
const ( ResourceTypeArtifactRegistry = "gcp-artifact-registry" ResourceTypeRemoteDockerImagePush = "gcp-docker-image-push" )
View Source
const ( AuthTypeGCPServiceAccount = "gcp-service-account" SecretsTypeGCPSecretsManager = "gcp-secrets-manager" StateStorageTypeGcpBucket = "gcp-bucket" SecretsProviderTypeGcpKms = "gcp-kms" )
View Source
const ( ResourceTypeGkeAutopilot = "gcp-gke-autopilot-cluster" TemplateTypeGkeAutopilot = "gcp-gke-autopilot" )
View Source
const ProviderType = "gcp"
View Source
const ResourceTypeBucket = "gcp-bucket"
View Source
const ResourceTypePostgresGcpCloudsql = "gcp-cloudsql-postgres"
View Source
const ResourceTypePubSub = "gcp-pubsub"
View Source
const ResourceTypeRedis = "gcp-redis"
View Source
const (
TemplateTypeGcpCloudrun = "cloudrun"
)
View Source
const TemplateTypeStaticWebsite = "gcp-static-website"
Variables ¶
This section is empty.
Functions ¶
func ToCloudRunConfig ¶
func ToGkeAutopilotConfig ¶
func ToStaticSiteConfig ¶
Types ¶
type AlertsConfig ¶
type AlertsConfig struct {
MaxErrors MaxErrorConfig
Discord DiscordCfg
Telegram TelegramCfg
}
type ArtifactRegistryConfig ¶
type ArtifactRegistryConfig struct {
Credentials `json:",inline" yaml:",inline"`
Location string `json:"location" yaml:"location"`
Public *bool `json:"public,omitempty" yaml:"public,omitempty"`
Docker *DockerConfig `json:"docker,omitempty" yaml:"docker,omitempty"`
Domain *string `json:"domain" yaml:"domain"`
BasicAuth *RegistryBasicAuth `json:"basicAuth,omitempty" yaml:"basicAuth,omitempty"`
}
type CloudRunInput ¶
type CloudRunInput struct {
TemplateConfig `json:"templateConfig" yaml:"templateConfig"`
Deployment k8s.DeploymentConfig `json:"deployment" yaml:"deployment"`
}
func (*CloudRunInput) OverriddenBaseZone ¶
func (i *CloudRunInput) OverriddenBaseZone() string
func (*CloudRunInput) Uses ¶
func (i *CloudRunInput) Uses() []string
type Credentials ¶
type Credentials struct {
api.Credentials `json:",inline" yaml:",inline"`
ServiceAccountConfig `json:",inline" yaml:",inline"`
}
func (*Credentials) CredentialsParsed ¶
func (r *Credentials) CredentialsParsed() (*CredentialsParsed, error)
func (*Credentials) CredentialsValue ¶
func (r *Credentials) CredentialsValue() string
func (*Credentials) ProjectIdValue ¶
func (r *Credentials) ProjectIdValue() string
func (*Credentials) ProviderType ¶
func (r *Credentials) ProviderType() string
type CredentialsParsed ¶
type DiscordCfg ¶
type DiscordCfg struct {
WebhookId string
}
type DockerConfig ¶
type DockerConfig struct {
ImmutableTags *bool `json:"immutableTags" yaml:"immutableTags"`
}
type GcpBucket ¶
type GcpBucket struct {
Credentials `json:",inline" yaml:",inline"`
Name string `json:"name,omitempty" yaml:"name"`
Location string `json:"location" yaml:"location"`
}
type GkeAutopilotInput ¶
type GkeAutopilotInput struct {
GkeAutopilotTemplate `json:"templateConfig" yaml:"templateConfig"`
Deployment k8s.DeploymentConfig `json:"deployment" yaml:"deployment"`
}
func (*GkeAutopilotInput) DependsOnResources ¶
func (i *GkeAutopilotInput) DependsOnResources() []api.StackConfigDependencyResource
func (*GkeAutopilotInput) OverriddenBaseZone ¶
func (i *GkeAutopilotInput) OverriddenBaseZone() string
func (*GkeAutopilotInput) Uses ¶
func (i *GkeAutopilotInput) Uses() []string
type GkeAutopilotResource ¶
type GkeAutopilotResource struct {
Credentials `json:",inline" yaml:",inline"`
GkeMinVersion string `json:"gkeMinVersion" yaml:"gkeMinVersion"`
Location string `json:"location" yaml:"location"`
Zone string `json:"zone" yaml:"zone"`
Timeouts *Timeouts `json:"timeouts,omitempty" yaml:"timeouts,omitempty"`
Caddy *k8s.CaddyConfig `json:"caddy,omitempty" yaml:"caddy,omitempty"`
}
type GkeAutopilotTemplate ¶
type GkeAutopilotTemplate struct {
Credentials `json:",inline" yaml:",inline"`
GkeClusterResource string `json:"gkeClusterResource" yaml:"gkeClusterResource"`
ArtifactRegistryResource string `json:"artifactRegistryResource" yaml:"artifactRegistryResource"`
}
type MaxErrorConfig ¶
type PlainLabels ¶
type PostgresGcpCloudsqlConfig ¶
type PostgresGcpCloudsqlConfig struct {
Credentials `json:",inline" yaml:",inline"`
Version string `json:"version" yaml:"version"`
Project string `json:"project" yaml:"project"`
Tier *string `json:"tier" yaml:"tier"`
Region *string `json:"region" yaml:"region"`
MaxConnections *int `json:"maxConnections" yaml:"maxConnections"`
DeletionProtection *bool `json:"deletionProtection" yaml:"deletionProtection"`
QueryInsightsEnabled *bool `json:"queryInsightsEnabled" yaml:"queryInsightsEnabled"`
QueryStringLength *int `json:"queryStringLength" yaml:"queryStringLength"`
UsersProvisionRuntime *ProvisionRuntimeConfig `json:"usersProvisionRuntime" yaml:"usersProvisionRuntime"`
}
type ProvisionRuntimeConfig ¶
type ProvisionRuntimeConfig struct {
Type string `json:"type" yaml:"type"` // type of provisioning runtime
ResourceName string `json:"resourceName" yaml:"resourceName"` // allows to run init db users jobs on kube jobs (must reference resource name where we can obtain kubeconfig from, e.g. gke-autopilot-cluster)
}
type PubSubConfig ¶
type PubSubConfig struct {
Credentials `json:",inline" yaml:",inline"`
Topics []PubSubTopic `json:"topics" yaml:"topics"`
Subscriptions []PubSubSubscription `json:"subscriptions" yaml:"subscriptions"`
Labels PlainLabels `json:"labels" yaml:"labels"`
}
type PubSubSubscription ¶
type PubSubSubscription struct {
Name string `json:"name" yaml:"name"`
Topic string `json:"topic" yaml:"topic"`
Labels PlainLabels `json:"labels" yaml:"labels"`
DeadLetterPolicy *SubscriptionDeadLetterPolicyArgs `json:"deadLetterPolicy" yaml:"deadLetterPolicy"`
ExactlyOnceDelivery bool `json:"exactlyOnceDelivery" yaml:"exactlyOnceDelivery"`
AckDeadlineSec int `json:"ackDeadlineSec" yaml:"ackDeadlineSec"`
MessageRetentionDuration string `json:"messageRetentionDuration" yaml:"messageRetentionDuration"`
}
type PubSubTopic ¶
type PubSubTopic struct {
Name string `json:"name" yaml:"name"`
Labels PlainLabels `json:"labels" yaml:"labels"`
MessageRetentionDuration string `json:"messageRetentionDuration" yaml:"messageRetentionDuration"`
}
type RedisConfig ¶
type RedisConfig struct {
Credentials `json:",inline" yaml:",inline"`
Version string `json:"version" yaml:"version"`
Project string `json:"project" yaml:"project"`
MemorySizeGb int `json:"memorySizeGb" yaml:"memorySizeGb"`
RedisConfig map[string]string `json:"redisConfig" yaml:"redisConfig"`
Region *string `json:"region" yaml:"region"`
}
type RegistryBasicAuth ¶
type RemoteImagePush ¶
type RemoteImagePush struct {
Credentials `json:",inline" yaml:",inline"`
RemoteImage string `json:"remoteImage" yaml:"remoteImage"`
Name string `json:"name" yaml:"name"`
Tag string `json:"tag" yaml:"tag"`
ArtifactRegistryResource string `json:"artifactRegistryResource" yaml:"artifactRegistryResource"`
RegistryCredentials *string `json:"registryCredentials" yaml:"registryCredentials"` // TODO: support other registries' creds
Platform api.ImagePlatform `json:"platform" yaml:"platform"`
}
func (*RemoteImagePush) DependsOnResources ¶
func (i *RemoteImagePush) DependsOnResources() []api.ParentResourceDependency
type SecretsProviderConfig ¶
type SecretsProviderConfig struct {
Credentials `json:",inline" yaml:",inline"`
// format:
// "gcpkms://projects/%s/locations/%s/keyRings/%s/cryptoKeys/%s"
KeyName string `json:"keyName" yaml:"keyName"`
// only applicable when provision=true
KeyLocation string `json:"keyLocation" yaml:"keyLocation"`
// only applicable when provision=true
KeyRotationPeriod string `json:"keyRotationPeriod" yaml:"keyRotationPeriod"`
// whether to provision key
Provision bool `json:"provision" yaml:"provision"`
}
func (*SecretsProviderConfig) IsProvisionEnabled ¶
func (r *SecretsProviderConfig) IsProvisionEnabled() bool
func (*SecretsProviderConfig) KeyUrl ¶
func (r *SecretsProviderConfig) KeyUrl() string
type ServiceAccountConfig ¶
type ServiceAccountConfig struct {
ProjectId string `json:"projectId" yaml:"projectId"`
}
type StateStorageConfig ¶
type StateStorageConfig struct {
Credentials `json:",inline" yaml:",inline"`
BucketName string `json:"bucketName" yaml:"bucketName"`
Location *string `json:"location" yaml:"location"`
Provision bool `json:"provision" yaml:"provision"`
}
func (*StateStorageConfig) IsProvisionEnabled ¶
func (sa *StateStorageConfig) IsProvisionEnabled() bool
func (*StateStorageConfig) StorageUrl ¶
func (sa *StateStorageConfig) StorageUrl() string
type StaticSiteInput ¶
type StaticSiteInput struct {
TemplateConfig `json:"templateConfig" yaml:"templateConfig"`
*api.StackConfigStatic `json:",inline" yaml:",inline"`
StackDir string `json:"stackDir" yaml:"stackDir"`
StackName string `json:"stackName" yaml:"stackName"`
Location string `json:"location" yaml:"location"`
BaseDnsZone string `json:"baseDnsZone" yaml:"baseDnsZone"`
}
func (*StaticSiteInput) OverriddenBaseZone ¶
func (i *StaticSiteInput) OverriddenBaseZone() string
type TelegramCfg ¶
type TelegramCfg struct {
DefaultChatId string
}
type TemplateConfig ¶
type TemplateConfig struct {
Credentials `json:",inline" yaml:",inline"`
}
Click to show internal directories.
Click to hide internal directories.