Documentation
¶
Index ¶
- Constants
- func ListFunctionResources(ctx context.Context, client Client, projectID string, location string) ([]core.IntegrationResource, error)
- func ListLocationResources(ctx context.Context, client Client, projectID string) ([]core.IntegrationResource, error)
- func SetClientFactory(...)
- type Client
- type FunctionDetails
- type InvokeFunction
- func (c *InvokeFunction) Actions() []core.Action
- func (c *InvokeFunction) Cancel(_ core.ExecutionContext) error
- func (c *InvokeFunction) Cleanup(_ core.SetupContext) error
- func (c *InvokeFunction) Color() string
- func (c *InvokeFunction) Configuration() []configuration.Field
- func (c *InvokeFunction) Description() string
- func (c *InvokeFunction) Documentation() string
- func (c *InvokeFunction) ExampleOutput() map[string]any
- func (c *InvokeFunction) Execute(ctx core.ExecutionContext) error
- func (c *InvokeFunction) HandleAction(_ core.ActionContext) error
- func (c *InvokeFunction) HandleWebhook(_ core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
- func (c *InvokeFunction) Icon() string
- func (c *InvokeFunction) Label() string
- func (c *InvokeFunction) Name() string
- func (c *InvokeFunction) OutputChannels(_ any) []core.OutputChannel
- func (c *InvokeFunction) ProcessQueueItem(ctx core.ProcessQueueContext) (*uuid.UUID, error)
- func (c *InvokeFunction) Setup(ctx core.SetupContext) error
- type InvokeFunctionConfiguration
- type InvokeFunctionMetadata
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 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 ¶
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 (c *InvokeFunction) Cancel(_ core.ExecutionContext) error
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 (c *InvokeFunction) HandleWebhook(_ core.WebhookRequestContext) (int, *core.WebhookResponseBody, error)
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 InvokeFunctionMetadata ¶
Click to show internal directories.
Click to hide internal directories.