selector

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateSelector

func CreateSelector(typeName string, param map[string]interface{}) (interface{}, error)

CreateSelector create a new selector

Types

type All

type All struct {
}

All is a selector pass all the triggers

func (*All) Select

func (slt *All) Select(triggerParam, selectParam map[string]interface{}) bool

Select will always pass

type ExceptMap added in v1.2.0

type ExceptMap struct {
}

ExceptMap is a selector only pass when specified key not matched

func (*ExceptMap) Select added in v1.2.0

func (slt *ExceptMap) Select(triggerParam, selectParam map[string]interface{}) bool

Select will only pass when key not matched

type External

type External struct {
	util.BaseLogger
	Program         string
	TriggerParamEnv string
	SelectParamEnv  string
}

External is a selector call a sub process to check the result

func (*External) Select

func (slt *External) Select(triggerParam, selectParam map[string]interface{}) bool

Select will call a sub process to check the exit code

type MatchMap

type MatchMap struct {
}

MatchMap is a selector only pass when specified key found

func (*MatchMap) Select

func (slt *MatchMap) Select(triggerParam, selectParam map[string]interface{}) bool

Select will only pass when key found

type Skip

type Skip struct {
}

Skip is a selector skip counters regularly

func (*Skip) Select

func (slt *Skip) Select(triggerParam, selectParam map[string]interface{}) bool

Select will skip certain numbers

Jump to

Keyboard shortcuts

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