actions

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultAction = "default"
)

DefaultAction the name for default action name

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action interface {
	Init(map[interface{}]interface{}) error
	TakeAction(obj interface{})
}

Action interface so that other actions like slack can implement this

func MapToAction

func MapToAction(actionName string) Action

MapToAction maps the action name to the actual action type

func PopulateFromConfig

func PopulateFromConfig(configActions []config.Action) []Action

PopulateFromConfig populates the actions for a specific controller from config

type Default

type Default struct {
}

Default class with empty implementations for any action that we dont support currently

func (*Default) Init

func (d *Default) Init(params map[interface{}]interface{}) error

Init initializes handler configuration Do nothing for default handler

func (*Default) TakeAction

func (d *Default) TakeAction(obj interface{})

TakeAction the main business logic of Action

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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