gcf

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package gcf helps with Google cloud functions

Index

Constants

View Source
const Retries = 5

Retries is the max number of tentative to get the operation status on the cloud function deployment, to deal with transient

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	TriggerTopic string `yaml:"triggerTopic,omitempty"`
	BucketName   string `yaml:"bucketName,omitempty"`
}

Event structure

type FunctionDeployment

type FunctionDeployment struct {
	Artifacts struct {
		OperationsService                 *cloudfunctions.OperationsService                 `yaml:"-"`
		ProjectsLocationsFunctionsService *cloudfunctions.ProjectsLocationsFunctionsService `yaml:"-"`
		CloudFunction                     cloudfunctions.CloudFunction
		CloudFunctionZipFullPath          string
		InstanceDeploymentYAMLContent     string
		ZipFiles                          map[string]string
	}
	Core     *deploy.Core
	Settings struct {
		Service struct {
			GCF Parameters
		}
		Instance struct {
			GCF Event
		}
	}
}

FunctionDeployment settings and artifacts structure

func NewFunctionDeployment

func NewFunctionDeployment() *FunctionDeployment

NewFunctionDeployment create deployment structure

func (*FunctionDeployment) Deploy

func (functionDeployment *FunctionDeployment) Deploy() (err error)

Deploy create or update a cloud function

func (*FunctionDeployment) UploadZipUsingSignedURL

func (functionDeployment *FunctionDeployment) UploadZipUsingSignedURL() (response *http.Response, err error)

UploadZipUsingSignedURL upload the rile content using a signed URL

type Parameters

type Parameters struct {
	AvailableMemoryMb      int64 `yaml:"availableMemoryMb" valid:"isAvailableMemory"`
	Description            string
	FunctionType           string `yaml:"functionType"`
	RetryTimeOutSeconds    int64  `yaml:"retryTimeOutSeconds"`
	Timeout                string
	ServiceAccountBindings struct {
		GRM grm.Bindings
		IAM iamgt.Bindings
	} `yaml:"serviceAccountBindings"`
}

Parameters structure

Jump to

Keyboard shortcuts

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