action

package
v1.6.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action added in v1.0.1

type Action struct {
	Command          string
	ExecutorBindings []string
	DisplayName      string
}

Action describes an automated action for a given event.

type ExecutorFactory

type ExecutorFactory interface {
	NewDefault(cfg execute.NewDefaultInput) execute.Executor
}

ExecutorFactory facilitates creation of execute.Executor instances.

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

Provider provides automations for events.

func NewProvider

func NewProvider(log logrus.FieldLogger, cfg config.Actions, executorFactory ExecutorFactory) *Provider

NewProvider returns new instance of Provider.

func (*Provider) ExecuteAction added in v1.0.0

func (p *Provider) ExecuteAction(ctx context.Context, action Action) interactive.CoreMessage

ExecuteAction executes action for given event.

func (*Provider) RenderedActions added in v1.0.0

func (p *Provider) RenderedActions(e any, sourceBindings []string) ([]Action, error)

RenderedActions finds and processes actions for given data.

Jump to

Keyboard shortcuts

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