filters

package module
v0.0.0-...-cebfa58 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2019 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNonZero

func IsNonZero(val interface{}) (bool, interface{})

func New

Associates the filter name to the filter

Types

type Activity

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

Activity ... Activity is an activity that is used to filter a message to the console

func (*Activity) Eval

func (a *Activity) Eval(ctx activity.Context) (done bool, err error)

Eval implements api.Activity.Eval - Filters the Message

func (*Activity) Metadata

func (a *Activity) Metadata() *activity.Metadata

Metadata returns activity's metadata

type Filter

type Filter interface {
	FilterOut(val interface{}) (bool, interface{})
}

type Input

type Input struct {
	Value interface{} `md:"value"`
}

type NonZeroFilter

type NonZeroFilter struct{}

func (*NonZeroFilter) FilterOut

func (*NonZeroFilter) FilterOut(val interface{}) (bool, interface{})

type Output

type Output struct {
	Filtered bool        `md:"filtered"`
	Value    interface{} `md:"value"`
}

type Settings

type Settings struct {
	Type              string `md:"type,allowed(non-zero)"`
	ProceedOnlyOnEmit bool
}

Jump to

Keyboard shortcuts

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