gcp

package
v0.1.16 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2021 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ACLPublicRead     = "publicRead"
	ACLProjectPrivate = "projectPrivate"

	GCSProxyImageName   = "nginx-gcs-static-proxy"
	GCSProxyVersion     = "1.21"
	GCSProxyDockerImage = "docker.io/outblocks/nginx-gcs-static-proxy:" + GCSProxyVersion

	DefaultConcurrency = 5
)
View Source
const (
	URLPathMatcherServiceIDKey         = "service_id"
	URLPathMatcherPathPrefixRewriteKey = "path_redirect"
)

Variables

View Source
var (
	APISRequired = []string{"run.googleapis.com", "containerregistry.googleapis.com", "compute.googleapis.com"}
	ValidRegions = []string{"asia-east1", "asia-east2", "asia-northeast1", "asia-northeast2", "asia-northeast3", "asia-south1", "asia-southeast1", "australia-southeast1", "europe-north1", "europe-west1", "europe-west2", "europe-west3", "europe-west4", "europe-west6", "northamerica-northeast1", "southamerica-east1", "us-central1", "us-east1", "us-east4", "us-west1", "us-west2", "us-west3"}
)

Functions

func ErrIs403 added in v0.1.16

func ErrIs403(err error) bool

func ErrIs404

func ErrIs404(err error) bool

func GlobalID added in v0.1.15

func GlobalID(project, gcpProject, id string) string

func ID

func ID(project, id string) string

func RegionToGCR

func RegionToGCR(region string) string

func SplitURL added in v0.1.5

func SplitURL(url string) (host, path string)

func WaitForCloudResourceManagerOperation added in v0.1.6

func WaitForCloudResourceManagerOperation(cli *cloudresourcemanager.Service, op *cloudresourcemanager.Operation) error

func WaitForGlobalComputeOperation added in v0.1.5

func WaitForGlobalComputeOperation(cli *compute.Service, project, name string) error

func WaitForRegionComputeOperation added in v0.1.5

func WaitForRegionComputeOperation(cli *compute.Service, project, region, name string) error

func WaitForServiceUsageOperation added in v0.1.5

func WaitForServiceUsageOperation(cli *serviceusage.Service, op *serviceusage.Operation) error

Types

type APIService

type APIService struct {
	registry.ResourceBase

	Name fields.StringInputField `state:"force_new"`
}

func (*APIService) Create

func (o *APIService) Create(ctx context.Context, meta interface{}) error

func (*APIService) Delete

func (o *APIService) Delete(ctx context.Context, meta interface{}) error

func (*APIService) GetName

func (o *APIService) GetName() string

func (*APIService) Read

func (o *APIService) Read(ctx context.Context, meta interface{}) error

func (*APIService) Update

func (o *APIService) Update(ctx context.Context, meta interface{}) error

type Address

type Address struct {
	registry.ResourceBase

	Name      fields.StringInputField `state:"force_new"`
	ProjectID fields.StringInputField `state:"force_new"`
	IP        fields.StringInputField
}

func (*Address) Create

func (o *Address) Create(ctx context.Context, meta interface{}) error

func (*Address) Delete

func (o *Address) Delete(ctx context.Context, meta interface{}) error

func (*Address) GetName

func (o *Address) GetName() string

func (*Address) Read

func (o *Address) Read(ctx context.Context, meta interface{}) error

func (*Address) Update

func (o *Address) Update(ctx context.Context, meta interface{}) error

type BackendService

type BackendService struct {
	registry.ResourceBase

	Name      fields.StringInputField `state:"force_new"`
	ProjectID fields.StringInputField `state:"force_new"`
	NEG       fields.StringInputField

	CDN struct {
		Enabled        fields.BoolInputField
		CacheMode      fields.StringInputField `default:"CACHE_ALL_STATIC"`
		CacheKeyPolicy struct {
			IncludeHost        fields.BoolInputField `default:"1"`
			IncludeProtocol    fields.BoolInputField `default:"1"`
			IncludeQueryString fields.BoolInputField `default:"1"`
		}
		DefaultTTL fields.IntInputField `default:"3600"`
		MaxTTL     fields.IntInputField `default:"86400"`
		ClientTTL  fields.IntInputField `default:"3600"`
	}

	Fingerprint string `state:"-"`
}

func (*BackendService) Create

func (o *BackendService) Create(ctx context.Context, meta interface{}) error

func (*BackendService) Delete

func (o *BackendService) Delete(ctx context.Context, meta interface{}) error

func (*BackendService) GetName

func (o *BackendService) GetName() string

func (*BackendService) ID

func (*BackendService) Read

func (o *BackendService) Read(ctx context.Context, meta interface{}) error

func (*BackendService) Update

func (o *BackendService) Update(ctx context.Context, meta interface{}) error

type Bucket

type Bucket struct {
	registry.ResourceBase

	Name       fields.StringInputField `state:"force_new"`
	Location   fields.StringInputField `state:"force_new"`
	ProjectID  fields.StringInputField
	Versioning fields.BoolInputField
}

func (*Bucket) Create

func (o *Bucket) Create(ctx context.Context, meta interface{}) error

func (*Bucket) Delete

func (o *Bucket) Delete(ctx context.Context, meta interface{}) error

func (*Bucket) GetName

func (o *Bucket) GetName() string

func (*Bucket) Read

func (o *Bucket) Read(ctx context.Context, meta interface{}) error

func (*Bucket) Update

func (o *Bucket) Update(ctx context.Context, meta interface{}) error

type BucketObject

type BucketObject struct {
	registry.ResourceBase

	BucketName   fields.StringInputField `state:"force_new"`
	ContentType  fields.StringInputField
	Name         fields.StringInputField `state:"force_new"`
	Hash         fields.StringInputField
	IsPublic     fields.BoolInputField
	CacheControl fields.StringInputField

	Path string `state:"-"`
}

func (*BucketObject) Create

func (o *BucketObject) Create(ctx context.Context, meta interface{}) error

func (*BucketObject) Delete

func (o *BucketObject) Delete(ctx context.Context, meta interface{}) error

func (*BucketObject) GetName

func (o *BucketObject) GetName() string

func (*BucketObject) Read

func (o *BucketObject) Read(ctx context.Context, meta interface{}) error

func (*BucketObject) Update

func (o *BucketObject) Update(ctx context.Context, meta interface{}) error

type CloudRun

type CloudRun struct {
	registry.ResourceBase

	Name      fields.StringInputField `state:"force_new"`
	ProjectID fields.StringInputField `state:"force_new"`
	Region    fields.StringInputField `state:"force_new"`
	Image     fields.StringInputField
	IsPublic  fields.BoolInputField

	MinScale             fields.IntInputField    `default:"0"`
	MaxScale             fields.IntInputField    `default:"100"`
	CPULimit             fields.StringInputField `default:"1000m"`
	MemoryLimit          fields.StringInputField `default:"128Mi"`
	ContainerConcurrency fields.IntInputField    `default:"250"`
	TimeoutSeconds       fields.IntInputField    `default:"300"`
	Port                 fields.IntInputField    `default:"80"`
	EnvVars              fields.MapInputField
}

func (*CloudRun) Create

func (o *CloudRun) Create(ctx context.Context, meta interface{}) error

func (*CloudRun) Delete

func (o *CloudRun) Delete(ctx context.Context, meta interface{}) error

func (*CloudRun) GetName

func (o *CloudRun) GetName() string

func (*CloudRun) Read

func (o *CloudRun) Read(ctx context.Context, meta interface{}) error

func (*CloudRun) Update

func (o *CloudRun) Update(ctx context.Context, meta interface{}) error

type ForwardingRule

type ForwardingRule struct {
	registry.ResourceBase

	Name      fields.StringInputField `state:"force_new"`
	ProjectID fields.StringInputField `state:"force_new"`
	IPAddress fields.StringInputField `state:"force_new"`
	Target    fields.StringInputField
	PortRange fields.StringInputField

	Fingerprint string `state:"-"`
}

func (*ForwardingRule) Create

func (o *ForwardingRule) Create(ctx context.Context, meta interface{}) error

func (*ForwardingRule) Delete

func (o *ForwardingRule) Delete(ctx context.Context, meta interface{}) error

func (*ForwardingRule) GetName

func (o *ForwardingRule) GetName() string

func (*ForwardingRule) Read

func (o *ForwardingRule) Read(ctx context.Context, meta interface{}) error

func (*ForwardingRule) Update

func (o *ForwardingRule) Update(ctx context.Context, meta interface{}) error

type Image

type Image struct {
	registry.ResourceBase

	Name       fields.StringInputField
	Tag        fields.StringInputField
	ProjectID  fields.StringInputField `state:"force_new"`
	GCR        fields.StringInputField `state:"force_new"`
	Digest     fields.StringOutputField
	Source     fields.StringInputField
	SourceHash fields.StringInputField

	Pull bool `state:"-"`
}

func (*Image) BeforeDiff added in v0.1.14

func (o *Image) BeforeDiff()

func (*Image) Create

func (o *Image) Create(ctx context.Context, meta interface{}) error

func (*Image) Delete

func (o *Image) Delete(ctx context.Context, meta interface{}) error

func (*Image) GetName

func (o *Image) GetName() string

func (*Image) ImageName

func (o *Image) ImageName() fields.StringInputField

func (*Image) Read

func (o *Image) Read(ctx context.Context, meta interface{}) error

func (*Image) Update

func (o *Image) Update(ctx context.Context, meta interface{}) error

type ManagedSSL

type ManagedSSL struct {
	registry.ResourceBase

	Name         fields.StringInputField `state:"force_new"`
	ProjectID    fields.StringInputField `state:"force_new"`
	Domains      fields.ArrayInputField  `state:"force_new"`
	Status       fields.StringOutputField
	DomainStatus fields.MapOutputField
}

func (*ManagedSSL) Create

func (o *ManagedSSL) Create(ctx context.Context, meta interface{}) error

func (*ManagedSSL) Delete

func (o *ManagedSSL) Delete(ctx context.Context, meta interface{}) error

func (*ManagedSSL) GetName

func (o *ManagedSSL) GetName() string

func (*ManagedSSL) ID

func (*ManagedSSL) Init added in v0.1.14

func (o *ManagedSSL) Init(ctx context.Context, meta interface{}, opts *registry.Options) error

func (*ManagedSSL) Read

func (o *ManagedSSL) Read(ctx context.Context, meta interface{}) error

func (*ManagedSSL) Update

func (o *ManagedSSL) Update(ctx context.Context, meta interface{}) error

type ServerlessNEG

type ServerlessNEG struct {
	registry.ResourceBase

	Name      fields.StringInputField `state:"force_new"`
	ProjectID fields.StringInputField `state:"force_new"`
	Region    fields.StringInputField `state:"force_new"`
	CloudRun  fields.StringInputField `state:"force_new"`
}

func (*ServerlessNEG) Create

func (o *ServerlessNEG) Create(ctx context.Context, meta interface{}) error

func (*ServerlessNEG) Delete

func (o *ServerlessNEG) Delete(ctx context.Context, meta interface{}) error

func (*ServerlessNEG) GetName

func (o *ServerlessNEG) GetName() string

func (*ServerlessNEG) ID

func (*ServerlessNEG) Read

func (o *ServerlessNEG) Read(ctx context.Context, meta interface{}) error

func (*ServerlessNEG) Update

func (o *ServerlessNEG) Update(ctx context.Context, meta interface{}) error

type TargetHTTPProxy

type TargetHTTPProxy struct {
	registry.ResourceBase

	Name      fields.StringInputField `state:"force_new"`
	ProjectID fields.StringInputField `state:"force_new"`
	URLMap    fields.StringInputField

	Fingerprint string `state:"-"`
}

func (*TargetHTTPProxy) Create

func (o *TargetHTTPProxy) Create(ctx context.Context, meta interface{}) error

func (*TargetHTTPProxy) Delete

func (o *TargetHTTPProxy) Delete(ctx context.Context, meta interface{}) error

func (*TargetHTTPProxy) GetName

func (o *TargetHTTPProxy) GetName() string

func (*TargetHTTPProxy) ID

func (*TargetHTTPProxy) Read

func (o *TargetHTTPProxy) Read(ctx context.Context, meta interface{}) error

func (*TargetHTTPProxy) Update

func (o *TargetHTTPProxy) Update(ctx context.Context, meta interface{}) error

type TargetHTTPSProxy

type TargetHTTPSProxy struct {
	registry.ResourceBase

	Name            fields.StringInputField `state:"force_new"`
	ProjectID       fields.StringInputField `state:"force_new"`
	URLMap          fields.StringInputField
	SSLCertificates fields.ArrayInputField

	Fingerprint string `state:"-"`
}

func (*TargetHTTPSProxy) Create

func (o *TargetHTTPSProxy) Create(ctx context.Context, meta interface{}) error

func (*TargetHTTPSProxy) Delete

func (o *TargetHTTPSProxy) Delete(ctx context.Context, meta interface{}) error

func (*TargetHTTPSProxy) GetName

func (o *TargetHTTPSProxy) GetName() string

func (*TargetHTTPSProxy) ID

func (*TargetHTTPSProxy) Read

func (o *TargetHTTPSProxy) Read(ctx context.Context, meta interface{}) error

func (*TargetHTTPSProxy) Update

func (o *TargetHTTPSProxy) Update(ctx context.Context, meta interface{}) error

type URLMap

type URLMap struct {
	registry.ResourceBase

	Name       fields.StringInputField `state:"force_new"`
	ProjectID  fields.StringInputField `state:"force_new"`
	URLMapping fields.MapInputField
	AppMapping fields.MapInputField

	Fingerprint string `state:"-"`
}

func (*URLMap) Create

func (o *URLMap) Create(ctx context.Context, meta interface{}) error

func (*URLMap) Delete

func (o *URLMap) Delete(ctx context.Context, meta interface{}) error

func (*URLMap) GetName

func (o *URLMap) GetName() string

func (*URLMap) ID

func (o *URLMap) ID() fields.StringInputField

func (*URLMap) Read

func (o *URLMap) Read(ctx context.Context, meta interface{}) error

func (*URLMap) Update

func (o *URLMap) Update(ctx context.Context, meta interface{}) error

type URLMapping

type URLMapping struct {
	Host        string
	PathMatcher []*URLPathMatcher
}

type URLPathMatcher

type URLPathMatcher struct {
	Paths             []string
	ServiceID         string
	PathPrefixRewrite string
}

Jump to

Keyboard shortcuts

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