trigger

package
v0.0.0-...-d52247b Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TriggerFlags = []cli.Flag{
	cli.StringFlag{
		Name:  "source,s",
		Usage: "trigger source",
	},
	cli.StringFlag{
		Name:  "type, t",
		Usage: "Todo",
	},
	cli.StringSliceFlag{
		Name:  "annotation",
		Usage: "fn annotation (can be specified multiple times)",
	},
}

TriggerFlags used to create/update triggers

Functions

func BashCompleteTriggers

func BashCompleteTriggers(c *cli.Context)

BashCompleteTriggers can be called from a BashComplete function to provide function completion suggestions (Assumes the current context already contains an app name and a function name as the first 2 arguments. This should be confirmed before calling this)

func Create

func Create() cli.Command

Create trigger command

func CreateTrigger

func CreateTrigger(client *fnclient.Fn, trigger *models.Trigger) error

CreateTrigger request

func Delete

func Delete() cli.Command

Delete trigger command

func GetTrigger

func GetTrigger(client *fnclient.Fn, appName, fnName, triggerName string) (*models.Trigger, error)

GetTrigger looks up a trigger using the provided client by app, function and trigger name

func GetTriggerByAppFnAndTriggerNames

func GetTriggerByAppFnAndTriggerNames(appName, fnName, triggerName string) (*models.Trigger, error)

GetTriggerByAppFnAndTriggerNames looks up a trigger using app, fn and trigger names

func GetTriggerByName

func GetTriggerByName(client *fnclient.Fn, appID string, fnID string, triggerName string) (*models.Trigger, error)

GetTriggerByName looks up a trigger using the provided client by app and function ID and trigger name

func Inspect

func Inspect() cli.Command

Inspect trigger command

func List

func List() cli.Command

List trigger command

func PutTrigger

func PutTrigger(t *fnclient.Fn, trigger *models.Trigger) error

PutTrigger updates the provided trigger with new values

func Update

func Update() cli.Command

Update trigger command

func WithFlags

func WithFlags(c *cli.Context, t *models.Trigger)

WithFlags returns a trigger with the specified flags

Types

type NameNotFoundError

type NameNotFoundError struct {
	Name string
}

NameNotFoundError error for app not found when looked up by name

func (NameNotFoundError) Error

func (n NameNotFoundError) Error() string

Jump to

Keyboard shortcuts

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