Documentation ¶
Index ¶
- Constants
- Variables
- func ErrIs403(err error) bool
- func ErrIs404(err error) bool
- func GenericID(id string, suffixes ...string) string
- func GlobalID(e env.Enver, gcpProject, id string) string
- func GlobalIDField(e env.Enver, gcpProject, resourceID string) fields.StringInputField
- func ID(e env.Enver, resourceID string) string
- func IDField(e env.Enver, resourceID string) fields.StringInputField
- func RegionToGCR(region string) string
- func ShortShaID(id string) string
- func SplitURL(url string) (host, path string)
- func WaitForCloudResourceManagerOperation(cli *cloudresourcemanager.Service, op *cloudresourcemanager.Operation) error
- func WaitForGlobalComputeOperation(cli *compute.Service, project, name string) error
- func WaitForRegionComputeOperation(cli *compute.Service, project, region, name string) error
- func WaitForSQLOperation(ctx context.Context, cli *sqladmin.Service, project, name string) error
- func WaitForServiceUsageOperation(cli *serviceusage.Service, op *serviceusage.Operation) error
- type APIService
- func (o *APIService) Create(ctx context.Context, meta interface{}) error
- func (o *APIService) Delete(ctx context.Context, meta interface{}) error
- func (o *APIService) GetName() string
- func (o *APIService) Read(ctx context.Context, meta interface{}) error
- func (o *APIService) UniqueID() string
- func (o *APIService) Update(ctx context.Context, meta interface{}) error
- type Address
- func (o *Address) Create(ctx context.Context, meta interface{}) error
- func (o *Address) Delete(ctx context.Context, meta interface{}) error
- func (o *Address) GetName() string
- func (o *Address) Read(ctx context.Context, meta interface{}) error
- func (o *Address) UniqueID() string
- func (o *Address) Update(ctx context.Context, meta interface{}) error
- type BackendService
- func (o *BackendService) Create(ctx context.Context, meta interface{}) error
- func (o *BackendService) Delete(ctx context.Context, meta interface{}) error
- func (o *BackendService) GetName() string
- func (o *BackendService) Read(ctx context.Context, meta interface{}) error
- func (o *BackendService) RefField() fields.StringInputField
- func (o *BackendService) UniqueID() string
- func (o *BackendService) Update(ctx context.Context, meta interface{}) error
- type Bucket
- func (o *Bucket) Create(ctx context.Context, meta interface{}) error
- func (o *Bucket) Delete(ctx context.Context, meta interface{}) error
- func (o *Bucket) GetName() string
- func (o *Bucket) Read(ctx context.Context, meta interface{}) error
- func (o *Bucket) UniqueID() string
- func (o *Bucket) Update(ctx context.Context, meta interface{}) error
- type BucketObject
- func (o *BucketObject) Create(ctx context.Context, meta interface{}) error
- func (o *BucketObject) Delete(ctx context.Context, meta interface{}) error
- func (o *BucketObject) GetName() string
- func (o *BucketObject) Read(ctx context.Context, meta interface{}) error
- func (o *BucketObject) UniqueID() string
- func (o *BucketObject) Update(ctx context.Context, meta interface{}) error
- type CloudRun
- func (o *CloudRun) Create(ctx context.Context, meta interface{}) error
- func (o *CloudRun) Delete(ctx context.Context, meta interface{}) error
- func (o *CloudRun) GetName() string
- func (o *CloudRun) Read(ctx context.Context, meta interface{}) error
- func (o *CloudRun) UniqueID() string
- func (o *CloudRun) Update(ctx context.Context, meta interface{}) error
- type CloudSQL
- func (o *CloudSQL) Create(ctx context.Context, meta interface{}) error
- func (o *CloudSQL) Delete(ctx context.Context, meta interface{}) error
- func (o *CloudSQL) GetName() string
- func (o *CloudSQL) Read(ctx context.Context, meta interface{}) error
- func (o *CloudSQL) UniqueID() string
- func (o *CloudSQL) Update(ctx context.Context, meta interface{}) error
- type CloudSQLDatabase
- func (o *CloudSQLDatabase) Create(ctx context.Context, meta interface{}) error
- func (o *CloudSQLDatabase) Delete(ctx context.Context, meta interface{}) error
- func (o *CloudSQLDatabase) GetName() string
- func (o *CloudSQLDatabase) Read(ctx context.Context, meta interface{}) error
- func (o *CloudSQLDatabase) UniqueID() string
- func (o *CloudSQLDatabase) Update(ctx context.Context, meta interface{}) error
- type CloudSQLUser
- func (o *CloudSQLUser) Create(ctx context.Context, meta interface{}) error
- func (o *CloudSQLUser) Delete(ctx context.Context, meta interface{}) error
- func (o *CloudSQLUser) GetName() string
- func (o *CloudSQLUser) Read(ctx context.Context, meta interface{}) error
- func (o *CloudSQLUser) UniqueID() string
- func (o *CloudSQLUser) Update(ctx context.Context, meta interface{}) error
- type ForwardingRule
- func (o *ForwardingRule) Create(ctx context.Context, meta interface{}) error
- func (o *ForwardingRule) Delete(ctx context.Context, meta interface{}) error
- func (o *ForwardingRule) GetName() string
- func (o *ForwardingRule) Read(ctx context.Context, meta interface{}) error
- func (o *ForwardingRule) UniqueID() string
- func (o *ForwardingRule) Update(ctx context.Context, meta interface{}) error
- type Image
- func (o *Image) BeforeDiff()
- func (o *Image) Create(ctx context.Context, meta interface{}) error
- func (o *Image) Delete(ctx context.Context, meta interface{}) error
- func (o *Image) GetName() string
- func (o *Image) ImageName() fields.StringInputField
- func (o *Image) Read(ctx context.Context, meta interface{}) error
- func (o *Image) UniqueID() string
- func (o *Image) Update(ctx context.Context, meta interface{}) error
- type ManagedSSL
- func (o *ManagedSSL) Create(ctx context.Context, meta interface{}) error
- func (o *ManagedSSL) Delete(ctx context.Context, meta interface{}) error
- func (o *ManagedSSL) GetName() string
- func (o *ManagedSSL) Init(ctx context.Context, meta interface{}, opts *registry.Options) error
- func (o *ManagedSSL) Read(ctx context.Context, meta interface{}) error
- func (o *ManagedSSL) RefField() fields.StringInputField
- func (o *ManagedSSL) UniqueID() string
- func (o *ManagedSSL) Update(ctx context.Context, meta interface{}) error
- type ServerlessNEG
- func (o *ServerlessNEG) Create(ctx context.Context, meta interface{}) error
- func (o *ServerlessNEG) Delete(ctx context.Context, meta interface{}) error
- func (o *ServerlessNEG) GetName() string
- func (o *ServerlessNEG) Read(ctx context.Context, meta interface{}) error
- func (o *ServerlessNEG) RefField() fields.StringInputField
- func (o *ServerlessNEG) UniqueID() string
- func (o *ServerlessNEG) Update(ctx context.Context, meta interface{}) error
- type TargetHTTPProxy
- func (o *TargetHTTPProxy) Create(ctx context.Context, meta interface{}) error
- func (o *TargetHTTPProxy) Delete(ctx context.Context, meta interface{}) error
- func (o *TargetHTTPProxy) GetName() string
- func (o *TargetHTTPProxy) Read(ctx context.Context, meta interface{}) error
- func (o *TargetHTTPProxy) RefField() fields.StringInputField
- func (o *TargetHTTPProxy) UniqueID() string
- func (o *TargetHTTPProxy) Update(ctx context.Context, meta interface{}) error
- type TargetHTTPSProxy
- func (o *TargetHTTPSProxy) Create(ctx context.Context, meta interface{}) error
- func (o *TargetHTTPSProxy) Delete(ctx context.Context, meta interface{}) error
- func (o *TargetHTTPSProxy) GetName() string
- func (o *TargetHTTPSProxy) Read(ctx context.Context, meta interface{}) error
- func (o *TargetHTTPSProxy) RefField() fields.StringInputField
- func (o *TargetHTTPSProxy) UniqueID() string
- func (o *TargetHTTPSProxy) Update(ctx context.Context, meta interface{}) error
- type URLMap
- func (o *URLMap) Create(ctx context.Context, meta interface{}) error
- func (o *URLMap) Delete(ctx context.Context, meta interface{}) error
- func (o *URLMap) GetName() string
- func (o *URLMap) Read(ctx context.Context, meta interface{}) error
- func (o *URLMap) RefField() fields.StringInputField
- func (o *URLMap) UniqueID() string
- func (o *URLMap) Update(ctx context.Context, meta interface{}) error
- type URLMapping
- type URLPathMatcher
Constants ¶
View Source
const ( ACLPublicRead = "publicRead" ACLProjectPrivate = "projectPrivate" OperationDone = "DONE" CloudRunReady = "Ready" CloudRunStatusTrue = "True" CloudRunStatusFalse = "False" GCSProxyImageName = "nginx-gcs-static-proxy" GCSProxyVersion = "1.21-v4" 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", "sqladmin.googleapis.com", "secretmanager.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"} )
View Source
var Types = []registry.Resource{ (*resources.RandomString)(nil), (*Address)(nil), (*APIService)(nil), (*BackendService)(nil), (*BucketObject)(nil), (*Bucket)(nil), (*CloudRun)(nil), (*CloudSQLDatabase)(nil), (*CloudSQLUser)(nil), (*CloudSQL)(nil), (*ForwardingRule)(nil), (*Image)(nil), (*ManagedSSL)(nil), (*ServerlessNEG)(nil), (*TargetHTTPProxy)(nil), (*TargetHTTPSProxy)(nil), (*URLMap)(nil), }
Functions ¶
func GlobalIDField ¶ added in v0.1.37
func GlobalIDField(e env.Enver, gcpProject, resourceID string) fields.StringInputField
func IDField ¶ added in v0.1.37
func IDField(e env.Enver, resourceID string) fields.StringInputField
func RegionToGCR ¶
func ShortShaID ¶ added in v0.1.31
func WaitForCloudResourceManagerOperation ¶ added in v0.1.6
func WaitForCloudResourceManagerOperation(cli *cloudresourcemanager.Service, op *cloudresourcemanager.Operation) error
func WaitForGlobalComputeOperation ¶ added in v0.1.5
func WaitForRegionComputeOperation ¶ added in v0.1.5
func WaitForSQLOperation ¶ added in v0.1.19
func WaitForServiceUsageOperation ¶ added in v0.1.5
func WaitForServiceUsageOperation(cli *serviceusage.Service, op *serviceusage.Operation) error
Types ¶
type APIService ¶
type APIService struct { registry.ResourceBase ProjectNumber fields.IntInputField `state:"force_new"` 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) UniqueID ¶ added in v0.1.21
func (o *APIService) UniqueID() string
type Address ¶
type Address struct { registry.ResourceBase Name fields.StringInputField `state:"force_new"` ProjectID fields.StringInputField `state:"force_new"` IP fields.StringOutputField }
type BackendService ¶
type BackendService struct { registry.ResourceBase Name fields.StringInputField `state:"force_new"` ProjectID fields.StringInputField `state:"force_new"` NEG fields.StringInputField `state:"force_new"` 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) Read ¶
func (o *BackendService) Read(ctx context.Context, meta interface{}) error
func (*BackendService) RefField ¶ added in v0.1.21
func (o *BackendService) RefField() fields.StringInputField
func (*BackendService) UniqueID ¶ added in v0.1.21
func (o *BackendService) UniqueID() string
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 }
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) UniqueID ¶ added in v0.1.21
func (o *BucketObject) UniqueID() string
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 URL fields.StringOutputField Ready fields.BoolOutputField StatusMessage fields.StringOutputField CloudSQLInstances fields.StringInputField 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 }
type CloudSQL ¶ added in v0.1.19
type CloudSQL struct { registry.ResourceBase Name fields.StringInputField `state:"force_new"` ProjectID fields.StringInputField `state:"force_new"` Region fields.StringInputField `state:"force_new"` DatabaseVersion fields.StringInputField `state:"force_new"` PublicIP fields.StringOutputField PrivateIP fields.StringOutputField ConnectionName fields.StringOutputField Tier fields.StringInputField `default:"db-f1-micro"` AvailabilityZone fields.StringInputField `default:"ZONAL"` IPConfiguration struct { Ipv4Enabled fields.BoolInputField `default:"true"` } BackupConfiguration struct { Enabled fields.BoolInputField `default:"true"` StartTime fields.StringInputField `default:"05:00"` } DatabaseFlags fields.MapInputField SettingsVersion int64 `state:"-"` }
type CloudSQLDatabase ¶ added in v0.1.19
type CloudSQLDatabase struct { registry.ResourceBase ProjectID fields.StringInputField `state:"force_new"` Instance fields.StringInputField `state:"force_new"` Name fields.StringInputField `state:"force_new"` }
func (*CloudSQLDatabase) Create ¶ added in v0.1.19
func (o *CloudSQLDatabase) Create(ctx context.Context, meta interface{}) error
func (*CloudSQLDatabase) Delete ¶ added in v0.1.19
func (o *CloudSQLDatabase) Delete(ctx context.Context, meta interface{}) error
func (*CloudSQLDatabase) GetName ¶ added in v0.1.19
func (o *CloudSQLDatabase) GetName() string
func (*CloudSQLDatabase) Read ¶ added in v0.1.19
func (o *CloudSQLDatabase) Read(ctx context.Context, meta interface{}) error
func (*CloudSQLDatabase) UniqueID ¶ added in v0.1.21
func (o *CloudSQLDatabase) UniqueID() string
type CloudSQLUser ¶ added in v0.1.19
type CloudSQLUser struct { registry.ResourceBase ProjectID fields.StringInputField `state:"force_new"` Instance fields.StringInputField `state:"force_new"` Name fields.StringInputField `state:"force_new"` Password fields.StringInputField }
func (*CloudSQLUser) Create ¶ added in v0.1.19
func (o *CloudSQLUser) Create(ctx context.Context, meta interface{}) error
func (*CloudSQLUser) Delete ¶ added in v0.1.19
func (o *CloudSQLUser) Delete(ctx context.Context, meta interface{}) error
func (*CloudSQLUser) GetName ¶ added in v0.1.19
func (o *CloudSQLUser) GetName() string
func (*CloudSQLUser) Read ¶ added in v0.1.19
func (o *CloudSQLUser) Read(ctx context.Context, meta interface{}) error
func (*CloudSQLUser) UniqueID ¶ added in v0.1.21
func (o *CloudSQLUser) UniqueID() string
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) UniqueID ¶ added in v0.1.21
func (o *ForwardingRule) UniqueID() string
type Image ¶
type Image struct { registry.ResourceBase Name fields.StringInputField `state:"force_new"` Tag fields.StringInputField `state:"force_new"` 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) ImageName ¶
func (o *Image) ImageName() fields.StringInputField
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) RefField ¶ added in v0.1.21
func (o *ManagedSSL) RefField() fields.StringInputField
func (*ManagedSSL) UniqueID ¶ added in v0.1.21
func (o *ManagedSSL) UniqueID() string
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) Read ¶
func (o *ServerlessNEG) Read(ctx context.Context, meta interface{}) error
func (*ServerlessNEG) RefField ¶ added in v0.1.21
func (o *ServerlessNEG) RefField() fields.StringInputField
func (*ServerlessNEG) UniqueID ¶ added in v0.1.21
func (o *ServerlessNEG) UniqueID() string
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) Read ¶
func (o *TargetHTTPProxy) Read(ctx context.Context, meta interface{}) error
func (*TargetHTTPProxy) RefField ¶ added in v0.1.21
func (o *TargetHTTPProxy) RefField() fields.StringInputField
func (*TargetHTTPProxy) UniqueID ¶ added in v0.1.21
func (o *TargetHTTPProxy) UniqueID() string
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) Read ¶
func (o *TargetHTTPSProxy) Read(ctx context.Context, meta interface{}) error
func (*TargetHTTPSProxy) RefField ¶ added in v0.1.21
func (o *TargetHTTPSProxy) RefField() fields.StringInputField
func (*TargetHTTPSProxy) UniqueID ¶ added in v0.1.21
func (o *TargetHTTPSProxy) UniqueID() string
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) RefField ¶ added in v0.1.21
func (o *URLMap) RefField() fields.StringInputField
type URLMapping ¶
type URLMapping struct { Host string PathMatcher []*URLPathMatcher }
type URLPathMatcher ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.