actions

package
v0.0.0-...-678a821 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2019 License: GPL-3.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action interface {
	Info() Info
	Run(input interface{}, ctx context.Context) (interface{}, error)
}

type BaseInfo

type BaseInfo struct {
	Name        string
	Description string
	SVGIcon     []byte
	Parent      *BaseInfo
}

func (BaseInfo) Info

func (i BaseInfo) Info() BaseInfo

func (BaseInfo) Path

func (i BaseInfo) Path() string

type Group

type Group interface {
	AddAction(name, description string, svgInput []byte, runFunc interface{})
	AddManualTrigger(name, description string, svgIcon []byte, runFunc interface{})
	Actions() []Action
	Info() BaseInfo
}

type Info

type Info struct {
	BaseInfo
	InputType  reflect.Type
	OutputType reflect.Type
	IsTrigger  bool
}

type Provider

type Provider interface {
	AddGroup(name, description string, svgIcon []byte) Group
	Groups() []Group

	AddRequirement(req Requirement)
	Info() BaseInfo
}

type ProviderRegistry

type ProviderRegistry interface {
	AddProvider(name, description string, svgIcon []byte) Provider
	GetAction(provider, group, action string) (Action, error)
	Providers() []Provider
}
var Registry ProviderRegistry

type Requirement

type Requirement interface {
	Name() string
	Init(providerName string)
	Config() interface{}
	ConfigHelp() string
	SetConfig(interface{}) error
	Fulfilled() bool
}

Requirements specify the things an action needs to be able to run.

Jump to

Keyboard shortcuts

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