deploy

package
v0.1.113 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIName          = "api"
	CommonName       = "common"
	LoadBalancerName = "loadbalancer"

	AppTypeStatic   = "static"
	AppTypeService  = "service"
	AppTypeFunction = "function"

	DepTypePostgreSQL = "postgresql"
	DepTypeMySQL      = "mysql"
	DepTypeStorage    = "storage"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CacheInvalidate added in v0.1.5

type CacheInvalidate struct {
	registry.ResourceBase

	URLMapName   fields.StringInputField
	ProjectID    fields.StringInputField
	StaticApps   []*StaticApp   `state:"-"`
	ServiceApps  []*ServiceApp  `state:"-"`
	FunctionApps []*FunctionApp `state:"-"`
	// contains filtered or unexported fields
}

func (*CacheInvalidate) CalculateDiff added in v0.1.5

func (o *CacheInvalidate) CalculateDiff(context.Context, interface{}) (registry.DiffType, error)

func (*CacheInvalidate) FieldDependencies added in v0.1.5

func (o *CacheInvalidate) FieldDependencies() []interface{}

func (*CacheInvalidate) GetName added in v0.1.5

func (o *CacheInvalidate) GetName() string

func (*CacheInvalidate) Process added in v0.1.5

func (o *CacheInvalidate) Process(ctx context.Context, meta interface{}) error

func (*CacheInvalidate) SkipState added in v0.1.5

func (o *CacheInvalidate) SkipState() bool

type CloudRunSettings added in v0.1.46

type CloudRunSettings struct {
	Region      string `json:"region"`
	ProjectHash string `json:"project_hash"`
	RegionCode  string `json:"region_code"`
}

func (*CloudRunSettings) URLSuffix added in v0.1.46

func (s *CloudRunSettings) URLSuffix() string

type DatabaseDep added in v0.1.19

type DatabaseDep struct {
	CloudSQL          *gcp.CloudSQL
	CloudSQLDatabases map[string]*gcp.CloudSQLDatabase
	CloudSQLUsers     map[string]*gcp.CloudSQLUser

	Dep   *apiv1.Dependency
	Opts  *DatabaseDepOptions
	Needs map[*apiv1.App]*types.DatabaseDepNeed
}

func NewDatabaseDep added in v0.1.19

func NewDatabaseDep(dep *apiv1.Dependency) (*DatabaseDep, error)

func (*DatabaseDep) Plan added in v0.1.19

type DatabaseDepArgs added in v0.1.19

type DatabaseDepArgs struct {
	ProjectID string
	Region    string
	Needs     map[*apiv1.App]*types.DatabaseDepNeed
}

type DatabaseDepDatabase added in v0.1.19

type DatabaseDepDatabase struct {
	Database string
}

type DatabaseDepOptions added in v0.1.19

type DatabaseDepOptions struct {
	types.DatabaseDepOptions

	DatabaseVersion string `json:"-"`
}

func NewDatabaseDepOptions added in v0.1.19

func NewDatabaseDepOptions(in map[string]interface{}, typ string) (*DatabaseDepOptions, error)

func (*DatabaseDepOptions) AvailabilityZone added in v0.1.23

func (o *DatabaseDepOptions) AvailabilityZone() string

type DatabaseDepUser added in v0.1.19

type DatabaseDepUser struct {
	User     string
	Password string
}

type FunctionApp added in v0.1.99

type FunctionApp struct {
	Bucket             *gcp.Bucket
	Archive            *gcp.BucketObject
	CloudFunction      *gcp.CloudFunction
	CloudSchedulerJobs []*gcp.CloudSchedulerJob

	App        *apiv1.App
	Skip       bool
	Build      *apiv1.AppBuild
	Props      *types.FunctionAppProperties
	DeployOpts *FunctionAppDeployOptions
}

func NewFunctionApp added in v0.1.99

func NewFunctionApp(plan *apiv1.AppPlan) (*FunctionApp, error)

func (*FunctionApp) ID added in v0.1.99

func (o *FunctionApp) ID(pctx *config.PluginContext) string

func (*FunctionApp) Plan added in v0.1.99

type FunctionAppArgs added in v0.1.99

type FunctionAppArgs struct {
	ProjectID string
	Region    string
	Env       map[string]string
	Vars      map[string]interface{}
	Databases []*DatabaseDep
}

type FunctionAppDeployOptions added in v0.1.99

type FunctionAppDeployOptions struct {
	types.FunctionAppDeployOptions
}

func NewFunctionAppDeployOptions added in v0.1.99

func NewFunctionAppDeployOptions(in map[string]interface{}) (*FunctionAppDeployOptions, error)

type LoadBalancer

type LoadBalancer struct {
	Addresses           []*gcp.Address
	ManagedSSLs         []*gcp.ManagedSSL
	ManagedSSLDomainMap map[string]*gcp.ManagedSSL
	SelfManagedSSLs     []*gcp.SelfManagedSSL
	ServerlessNEGs      []*gcp.ServerlessNEG
	BackendServices     []*gcp.BackendService
	URLMaps             []*gcp.URLMap
	TargetHTTPProxies   []*gcp.TargetHTTPProxy
	TargetHTTPSProxies  []*gcp.TargetHTTPSProxy
	ForwardingRules     []*gcp.ForwardingRule
	// contains filtered or unexported fields
}

func NewLoadBalancer

func NewLoadBalancer() *LoadBalancer

func (*LoadBalancer) Plan

func (o *LoadBalancer) Plan(pctx *config.PluginContext, r *registry.Registry, static map[string]*StaticApp, service map[string]*ServiceApp, function map[string]*FunctionApp, domainMatch *types.DomainInfoMatcher, c *LoadBalancerArgs) error

type LoadBalancerArgs

type LoadBalancerArgs struct {
	Name      string
	ProjectID string
	Region    string
}

type ServiceApp added in v0.1.14

type ServiceApp struct {
	Image              *gcp.Image
	CloudRun           *gcp.CloudRun
	CloudSchedulerJobs []*gcp.CloudSchedulerJob

	App        *apiv1.App
	Skip       bool
	Destroy    bool
	Build      *apiv1.AppBuild
	Props      *types.ServiceAppProperties
	DeployOpts *ServiceAppDeployOptions
}

func NewServiceApp added in v0.1.14

func NewServiceApp(plan *apiv1.AppPlan, destroy bool) (*ServiceApp, error)

func (*ServiceApp) ID added in v0.1.46

func (o *ServiceApp) ID(pctx *config.PluginContext) string

func (*ServiceApp) Plan added in v0.1.14

type ServiceAppArgs added in v0.1.14

type ServiceAppArgs struct {
	ProjectID string
	Region    string
	Env       map[string]string
	Vars      map[string]interface{}
	Databases []*DatabaseDep
	Settings  *CloudRunSettings
}

type ServiceAppDeployOptions added in v0.1.19

type ServiceAppDeployOptions struct {
	types.ServiceAppDeployOptions

	SkipRunsd            bool   `json:"skip_runsd"`
	CPUThrottling        *bool  `json:"cpu_throttling" default:"true"`
	ExecutionEnvironment string `json:"execution_environment" default:"gen1"`
}

func NewServiceAppDeployOptions added in v0.1.19

func NewServiceAppDeployOptions(in map[string]interface{}) (*ServiceAppDeployOptions, error)

type StaticApp

type StaticApp struct {
	Bucket   *gcp.Bucket
	Files    []*gcp.BucketObject
	Image    *gcp.Image
	CloudRun *gcp.CloudRun

	App        *apiv1.App
	Skip       bool
	Props      *types.StaticAppProperties
	DeployOpts *StaticAppDeployOptions
}

func NewStaticApp

func NewStaticApp(plan *apiv1.AppPlan) (*StaticApp, error)

func (*StaticApp) ID added in v0.1.68

func (o *StaticApp) ID(pctx *config.PluginContext) string

func (*StaticApp) Plan

type StaticAppArgs

type StaticAppArgs struct {
	ProjectID string
	Region    string
}

type StaticAppDeployOptions added in v0.1.21

type StaticAppDeployOptions struct {
	types.StaticAppDeployOptions
}

func NewStaticAppDeployOptions added in v0.1.21

func NewStaticAppDeployOptions(in map[string]interface{}) (*StaticAppDeployOptions, error)

type StorageDep added in v0.1.46

type StorageDep struct {
	Bucket *gcp.Bucket

	Dep   *apiv1.Dependency
	Opts  *types.StorageDepOptions
	Needs map[*apiv1.App]*StorageDepNeed
}

func NewStorageDep added in v0.1.46

func NewStorageDep(dep *apiv1.Dependency) (*StorageDep, error)

func (*StorageDep) Plan added in v0.1.46

type StorageDepArgs added in v0.1.46

type StorageDepArgs struct {
	ProjectID string
	Region    string
	Needs     map[*apiv1.App]*StorageDepNeed
}

type StorageDepNeed added in v0.1.46

type StorageDepNeed struct{}

func NewStorageDepNeed added in v0.1.46

func NewStorageDepNeed(in map[string]interface{}) (*StorageDepNeed, error)

Jump to

Keyboard shortcuts

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