deploy

package
v0.1.19 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIName          = "api"
	CommonName       = "common"
	LoadBalancerName = "load balancer"
)

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:"-"`
	// contains filtered or unexported fields
}

func (*CacheInvalidate) CalculateDiff added in v0.1.5

func (o *CacheInvalidate) CalculateDiff() registry.DiffType

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 DatabaseDep added in v0.1.19

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

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

func NewDatabaseDep added in v0.1.19

func NewDatabaseDep(dep *types.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[*types.App]*DatabaseDepNeed
}

type DatabaseDepDatabase added in v0.1.19

type DatabaseDepDatabase struct {
	Database string
}

type DatabaseDepNeed added in v0.1.19

type DatabaseDepNeed struct {
	User     string `mapstructure:"user"`
	Database string `mapstructure:"database"`
}

func NewDatabaseDepNeed added in v0.1.19

func NewDatabaseDepNeed(in interface{}) (*DatabaseDepNeed, error)

type DatabaseDepOptions added in v0.1.19

type DatabaseDepOptions struct {
	Version string `mapstructure:"version"`
}

func NewDatabaseDepOptions added in v0.1.19

func NewDatabaseDepOptions(in interface{}) (*DatabaseDepOptions, error)

type DatabaseDepUser added in v0.1.19

type DatabaseDepUser struct {
	User     string
	Password string
}

type LoadBalancer

type LoadBalancer struct {
	Addresses           []*gcp.Address
	ManagedSSLs         []*gcp.ManagedSSL
	ManagedSSLDomainMap map[string]*gcp.ManagedSSL
	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, 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

	App        *types.App
	Opts       *ServiceAppOptions
	DeployOpts *ServiceAppDeployOptions
}

func NewServiceApp added in v0.1.14

func NewServiceApp(plan *types.AppPlan) (*ServiceApp, error)

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
}

type ServiceAppDeployOptions added in v0.1.19

type ServiceAppDeployOptions struct {
	CPULimit    int `mapstructure:"cpu-limit" default:"1"`
	MemoryLimit int `mapstructure:"memory-limit" default:"128"`
	MinScale    int `mapstructure:"min-scale" default:"0"`
	MaxScale    int `mapstructure:"max-scale" default:"100"`
}

func NewServiceAppDeployOptions added in v0.1.19

func NewServiceAppDeployOptions(in interface{}) (*ServiceAppDeployOptions, error)

type ServiceAppOptions added in v0.1.14

type ServiceAppOptions struct {
	Build struct {
		Dockerfile    string `mapstructure:"dockerfile"`
		DockerContext string `mapstructure:"context"`
	} `mapstructure:"build"`

	Container struct {
		Port int `mapstructure:"port" default:"80"`
	} `mapstructure:"container"`

	LocalDockerImage string `mapstructure:"local_docker_image"`
	LocalDockerHash  string `mapstructure:"local_docker_hash"`

	CDN struct {
		Enabled bool `mapstructure:"enabled"`
	} `mapstructure:"cdn"`
}

func NewServiceAppOptions added in v0.1.19

func NewServiceAppOptions(in interface{}) (*ServiceAppOptions, error)

type StaticApp

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

	App  *types.App
	Opts *StaticAppOptions
}

func NewStaticApp

func NewStaticApp(app *types.App) (*StaticApp, error)

func (*StaticApp) Plan

type StaticAppArgs

type StaticAppArgs struct {
	ProjectID string
	Region    string
}

type StaticAppOptions

type StaticAppOptions struct {
	Build struct {
		Dir string `mapstructure:"dir"`
	} `mapstructure:"build"`

	Routing string `mapstructure:"routing"`

	CDN struct {
		Enabled bool `mapstructure:"enabled"`
	} `mapstructure:"cdn"`
}

func NewStaticAppOptions added in v0.1.19

func NewStaticAppOptions(in interface{}) (*StaticAppOptions, error)

Jump to

Keyboard shortcuts

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