Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Action ¶
type Action struct {
ID string `json:"id"`
Query []StateQuery `json:"query"`
Perform *types.Command `json:"perform"`
}
Action is composed of a list of Queries and a Command to perform in case the AND composition of queries returns true
type MixedQuery ¶
MixedQuery compares an element of State.Current with a constant only if that element is different from the same in State.Previous
func (*MixedQuery) Execute ¶
func (q *MixedQuery) Execute(state *State) (res QueryResult, err error)
type QueryResult ¶ added in v1.4.0
type QueryResult struct {
// contains filtered or unexported fields
}
type State ¶
type State struct {
Current interface{} `json:"current"`
Previous interface{} `json:"previous"`
}
func (*State) GetFieldDescriptor ¶ added in v1.4.0
type StateQuery ¶
type StateQuery interface {
Execute(state *State) (QueryResult, error)
}
type StructQuery ¶
StructQuery compares two elements of the State oin every state change
func (*StructQuery) Execute ¶
func (q *StructQuery) Execute(state *State) (res QueryResult, err error)
Click to show internal directories.
Click to hide internal directories.