Documentation
¶
Overview ¶
Copyright 2026 Google LLC. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Package beta defines operations in the declarative SDK.
Copyright 2026 Google LLC. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2026 Google LLC. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2026 Google LLC. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2026 Google LLC. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2026 Google LLC. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- func CanonicalizeFunctionSourceRepoURL(m any, n any) bool
- func DCLFunctionSchema() *dcl.Schema
- func ExpandFunctionEventTriggerFailurePolicy(_ *Client, _ *bool, res *Function) (any, error)
- func ExpandFunctionEventTriggerResource(_ *Client, _ *string, res *Function) (*string, error)
- type Client
- func (c *Client) ApplyFunction(ctx context.Context, rawDesired *Function, opts ...dcl.ApplyOption) (*Function, error)
- func (c *Client) DeleteAllFunction(ctx context.Context, project, region string, filter func(*Function) bool) error
- func (c *Client) DeleteFunction(ctx context.Context, r *Function) error
- func (c *Client) GetFunction(ctx context.Context, r *Function) (*Function, error)
- func (c *Client) ListFunction(ctx context.Context, project, region string) (*FunctionList, error)
- func (c *Client) ListFunctionWithMaxResults(ctx context.Context, project, region string, pageSize int32) (*FunctionList, error)
- type Function
- func (r *Function) Describe() dcl.ServiceTypeVersion
- func (r *Function) GetPolicy(basePath string) (string, string, *bytes.Buffer, error)
- func (r *Function) IAMPolicyVersion() int
- func (r *Function) ID() (string, error)
- func (r *Function) SetPolicyURL(userBasePath string) string
- func (r *Function) SetPolicyVerb() string
- func (r *Function) String() string
- type FunctionEventTrigger
- type FunctionHttpsTrigger
- type FunctionHttpsTriggerSecurityLevelEnum
- type FunctionIngressSettingsEnum
- type FunctionList
- type FunctionSourceRepository
- type FunctionStatusEnum
- type FunctionVPCConnectorEgressSettingsEnum
Constants ¶
const FunctionMaxPage = -1
Variables ¶
var YAML_function []byte
Functions ¶
func CanonicalizeFunctionSourceRepoURL ¶
CanonicalizeFunctionSourceRepoURL compares source repo url because /paths/ can be omitted but will be added by the API.
func DCLFunctionSchema ¶ added in v1.10.3
func ExpandFunctionEventTriggerFailurePolicy ¶
ExpandFunctionEventTriggerFailurePolicy inverts the flattenFunctionEventTriggerFailurePolicy transformation.
func ExpandFunctionEventTriggerResource ¶
ExpandFunctionEventTriggerResource handles the special case for StorageBucket and makes sure resource field has format projects/{{project}}/buckets/{{name}}. http://b/210923505
Types ¶
type Client ¶
The Client is the base struct of all operations. This will receive the Get, Delete, List, and Apply operations on all resources.
func (*Client) ApplyFunction ¶
func (*Client) DeleteAllFunction ¶
func (c *Client) DeleteAllFunction(ctx context.Context, project, region string, filter func(*Function) bool) error
DeleteAllFunction deletes all resources that the filter functions returns true on.
func (*Client) DeleteFunction ¶
func (*Client) GetFunction ¶
func (*Client) ListFunction ¶
func (*Client) ListFunctionWithMaxResults ¶
type Function ¶
type Function struct {
Name *string `json:"name"`
Description *string `json:"description"`
SourceArchiveUrl *string `json:"sourceArchiveUrl"`
SourceRepository *FunctionSourceRepository `json:"sourceRepository"`
HttpsTrigger *FunctionHttpsTrigger `json:"httpsTrigger"`
EventTrigger *FunctionEventTrigger `json:"eventTrigger"`
Status *FunctionStatusEnum `json:"status"`
EntryPoint *string `json:"entryPoint"`
Runtime *string `json:"runtime"`
Timeout *string `json:"timeout"`
AvailableMemoryMb *int64 `json:"availableMemoryMb"`
ServiceAccountEmail *string `json:"serviceAccountEmail"`
UpdateTime *string `json:"updateTime"`
VersionId *int64 `json:"versionId"`
Labels map[string]string `json:"labels"`
EnvironmentVariables map[string]string `json:"environmentVariables"`
MaxInstances *int64 `json:"maxInstances"`
VPCConnector *string `json:"vpcConnector"`
VPCConnectorEgressSettings *FunctionVPCConnectorEgressSettingsEnum `json:"vpcConnectorEgressSettings"`
IngressSettings *FunctionIngressSettingsEnum `json:"ingressSettings"`
Region *string `json:"region"`
Project *string `json:"project"`
}
func (*Function) Describe ¶
func (r *Function) Describe() dcl.ServiceTypeVersion
Describe returns a simple description of this resource to ensure that automated tools can identify it.
func (*Function) IAMPolicyVersion ¶
func (*Function) SetPolicyURL ¶
func (*Function) SetPolicyVerb ¶
type FunctionEventTrigger ¶
type FunctionEventTrigger struct {
EventType *string `json:"eventType"`
Resource *string `json:"resource"`
Service *string `json:"service"`
FailurePolicy *bool `json:"failurePolicy"`
// contains filtered or unexported fields
}
var EmptyFunctionEventTrigger *FunctionEventTrigger = &FunctionEventTrigger{empty: true}
This object is used to assert a desired state where this FunctionEventTrigger is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.
func (*FunctionEventTrigger) Empty ¶
func (r *FunctionEventTrigger) Empty() bool
func (*FunctionEventTrigger) HashCode ¶
func (r *FunctionEventTrigger) HashCode() string
func (*FunctionEventTrigger) String ¶
func (r *FunctionEventTrigger) String() string
func (*FunctionEventTrigger) UnmarshalJSON ¶
func (r *FunctionEventTrigger) UnmarshalJSON(data []byte) error
type FunctionHttpsTrigger ¶
type FunctionHttpsTrigger struct {
Url *string `json:"url"`
SecurityLevel *FunctionHttpsTriggerSecurityLevelEnum `json:"securityLevel"`
// contains filtered or unexported fields
}
var EmptyFunctionHttpsTrigger *FunctionHttpsTrigger = &FunctionHttpsTrigger{empty: true}
This object is used to assert a desired state where this FunctionHttpsTrigger is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.
func (*FunctionHttpsTrigger) Empty ¶
func (r *FunctionHttpsTrigger) Empty() bool
func (*FunctionHttpsTrigger) HashCode ¶
func (r *FunctionHttpsTrigger) HashCode() string
func (*FunctionHttpsTrigger) String ¶
func (r *FunctionHttpsTrigger) String() string
func (*FunctionHttpsTrigger) UnmarshalJSON ¶
func (r *FunctionHttpsTrigger) UnmarshalJSON(data []byte) error
type FunctionHttpsTriggerSecurityLevelEnum ¶
type FunctionHttpsTriggerSecurityLevelEnum string
The enum FunctionHttpsTriggerSecurityLevelEnum.
func FunctionHttpsTriggerSecurityLevelEnumRef ¶
func FunctionHttpsTriggerSecurityLevelEnumRef(s string) *FunctionHttpsTriggerSecurityLevelEnum
FunctionHttpsTriggerSecurityLevelEnumRef returns a *FunctionHttpsTriggerSecurityLevelEnum with the value of string s If the empty string is provided, nil is returned.
func (FunctionHttpsTriggerSecurityLevelEnum) Validate ¶
func (v FunctionHttpsTriggerSecurityLevelEnum) Validate() error
type FunctionIngressSettingsEnum ¶
type FunctionIngressSettingsEnum string
The enum FunctionIngressSettingsEnum.
func FunctionIngressSettingsEnumRef ¶
func FunctionIngressSettingsEnumRef(s string) *FunctionIngressSettingsEnum
FunctionIngressSettingsEnumRef returns a *FunctionIngressSettingsEnum with the value of string s If the empty string is provided, nil is returned.
func (FunctionIngressSettingsEnum) Validate ¶
func (v FunctionIngressSettingsEnum) Validate() error
type FunctionList ¶
type FunctionList struct {
Items []*Function
// contains filtered or unexported fields
}
func (*FunctionList) HasNext ¶
func (l *FunctionList) HasNext() bool
type FunctionSourceRepository ¶
type FunctionSourceRepository struct {
Url *string `json:"url"`
DeployedUrl *string `json:"deployedUrl"`
// contains filtered or unexported fields
}
var EmptyFunctionSourceRepository *FunctionSourceRepository = &FunctionSourceRepository{empty: true}
This object is used to assert a desired state where this FunctionSourceRepository is empty. Go lacks global const objects, but this object should be treated as one. Modifying this object will have undesirable results.
func (*FunctionSourceRepository) Empty ¶
func (r *FunctionSourceRepository) Empty() bool
func (*FunctionSourceRepository) HashCode ¶
func (r *FunctionSourceRepository) HashCode() string
func (*FunctionSourceRepository) String ¶
func (r *FunctionSourceRepository) String() string
func (*FunctionSourceRepository) UnmarshalJSON ¶
func (r *FunctionSourceRepository) UnmarshalJSON(data []byte) error
type FunctionStatusEnum ¶
type FunctionStatusEnum string
The enum FunctionStatusEnum.
func FunctionStatusEnumRef ¶
func FunctionStatusEnumRef(s string) *FunctionStatusEnum
FunctionStatusEnumRef returns a *FunctionStatusEnum with the value of string s If the empty string is provided, nil is returned.
func (FunctionStatusEnum) Validate ¶
func (v FunctionStatusEnum) Validate() error
type FunctionVPCConnectorEgressSettingsEnum ¶
type FunctionVPCConnectorEgressSettingsEnum string
The enum FunctionVPCConnectorEgressSettingsEnum.
func FunctionVPCConnectorEgressSettingsEnumRef ¶
func FunctionVPCConnectorEgressSettingsEnumRef(s string) *FunctionVPCConnectorEgressSettingsEnum
FunctionVPCConnectorEgressSettingsEnumRef returns a *FunctionVPCConnectorEgressSettingsEnum with the value of string s If the empty string is provided, nil is returned.
func (FunctionVPCConnectorEgressSettingsEnum) Validate ¶
func (v FunctionVPCConnectorEgressSettingsEnum) Validate() error