ConditionParser

package
v0.0.0-...-a93fc24 Latest Latest
Warning

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

Go to latest
Published: May 24, 2017 License: GPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrElementNotFound = errors.New("Key could not be found in the event/metadata")

ErrElementNotFound will be returned if the key is not found in the event

Functions

func NewDataStore

func NewDataStore(jsonData interface{}, eventMetadata map[string]interface{}, size int, debug bool) *dataStore

Types

type ConditionParser

type ConditionParser struct {
	//Prints debug output on std
	Debug bool
}

ConditionParser parses a given string which should contain a go like condition, conditions can reference on a given JSON struct

func (ConditionParser) ParseString

func (p ConditionParser) ParseString(condition string, jsonData interface{}, eventMetadata map[string]interface{}) (bool, error)

ParseString parses the string and JSON object, if there is an error the result is irrelevant

func (ConditionParser) ParseStringChannel

func (p ConditionParser) ParseStringChannel(condition string, jsonData interface{}, eventMetadata map[string]interface{}, output chan bool, errors chan error)

ParseStringChannel parses the string and communicates through channels, if there is an error the result is irrelevant

type Lparen

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

func (Lparen) End

func (p Lparen) End() token.Pos

func (Lparen) Pos

func (p Lparen) Pos() token.Pos

func (Lparen) String

func (p Lparen) String() string

type Rparen

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

func (Rparen) End

func (p Rparen) End() token.Pos

func (Rparen) Pos

func (p Rparen) Pos() token.Pos

func (Rparen) String

func (p Rparen) String() string

Jump to

Keyboard shortcuts

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