cloudfunctions

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ResourceTypeLocation = "cloudfunctions.location"
	ResourceTypeFunction = "cloudfunctions.function"
)

Variables

This section is empty.

Functions

func ListFunctionResources

func ListFunctionResources(ctx context.Context, client Client, projectID string, location string) ([]core.IntegrationResource, error)

ListFunctionResources lists Cloud Functions v2 and Cloud Run services for a given location. Both are shown because Gen 2 Cloud Functions ("Cloud Run functions") may be deployed directly as Cloud Run services and won't appear in the Cloud Functions API.

func ListLocationResources

func ListLocationResources(ctx context.Context, client Client, projectID string) ([]core.IntegrationResource, error)

func SetClientFactory

func SetClientFactory(fn func(httpCtx core.HTTPContext, integration core.IntegrationContext) (Client, error))

Types

type Client

type Client interface {
	GetURL(ctx context.Context, fullURL string) ([]byte, error)
	PostURL(ctx context.Context, fullURL string, body any) ([]byte, error)
	ProjectID() string
}

Client is the interface used by Cloud Functions components to call the API.

type FunctionDetails

type FunctionDetails struct {
	Environment string
	URI         string
}

func GetFunctionDetails

func GetFunctionDetails(ctx context.Context, client Client, resourceName string) (*FunctionDetails, error)

GetFunctionDetails fetches function details from Cloud Functions v2 or Cloud Run, depending on the resource name format (functions/* vs services/*).

type InvokeFunction

type InvokeFunction struct{}

func (*InvokeFunction) Actions

func (c *InvokeFunction) Actions() []core.Action

func (*InvokeFunction) Cancel

func (*InvokeFunction) Cleanup

func (c *InvokeFunction) Cleanup(_ core.SetupContext) error

func (*InvokeFunction) Color

func (c *InvokeFunction) Color() string

func (*InvokeFunction) Configuration

func (c *InvokeFunction) Configuration() []configuration.Field

func (*InvokeFunction) Description

func (c *InvokeFunction) Description() string

func (*InvokeFunction) Documentation

func (c *InvokeFunction) Documentation() string

func (*InvokeFunction) ExampleOutput

func (c *InvokeFunction) ExampleOutput() map[string]any

func (*InvokeFunction) Execute

func (c *InvokeFunction) Execute(ctx core.ExecutionContext) error

func (*InvokeFunction) HandleAction

func (c *InvokeFunction) HandleAction(_ core.ActionContext) error

func (*InvokeFunction) HandleWebhook

func (*InvokeFunction) Icon

func (c *InvokeFunction) Icon() string

func (*InvokeFunction) Label

func (c *InvokeFunction) Label() string

func (*InvokeFunction) Name

func (c *InvokeFunction) Name() string

func (*InvokeFunction) OutputChannels

func (c *InvokeFunction) OutputChannels(_ any) []core.OutputChannel

func (*InvokeFunction) ProcessQueueItem

func (c *InvokeFunction) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)

func (*InvokeFunction) Setup

func (c *InvokeFunction) Setup(ctx core.SetupContext) error

type InvokeFunctionConfiguration

type InvokeFunctionConfiguration struct {
	Location string `json:"location" mapstructure:"location"`
	Function string `json:"function" mapstructure:"function"`
	Payload  any    `json:"payload" mapstructure:"payload"`
}

type InvokeFunctionMetadata

type InvokeFunctionMetadata struct {
	FunctionName string `json:"functionName" mapstructure:"functionName"`
	FunctionURI  string `json:"functionUri,omitempty" mapstructure:"functionUri,omitempty"`
	Environment  string `json:"environment,omitempty" mapstructure:"environment,omitempty"`
}

Jump to

Keyboard shortcuts

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