Documentation ¶
Index ¶
Constants ¶
View Source
const ( ParamTypeEmail = iota + 7 ParamTypePhone ParamTypePassword ParamTypeURL )
Hints; should be strings
View Source
const ( // Type of array is being specified by adding ParamType, // e.g. ParamTypeArray + ParamTypeInt indicates array of integers ([]int) ParamTypeArray = 0x2A // Because it's hard to specify map types with enums, there's only // type for map[string]type. As in ParamTypeArray, type of value // is being specified by adding ParamType, // e.g. ParamTypeMap + ParamTypeInt indicates map with string keys and // int values (map[string]int) ParamTypeStringMap = 0x6A )
Composite types
View Source
const (
ExecTypeEmpty = ExecutorType("")
)
View Source
const ParamTypeAny = 0xFF
Right anything.
Variables ¶
View Source
var ActionExecutors = map[ExecutorType]Executor{ ExecTypeEmpty: PassExecutor{}, }
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor interface { Run(Params) error Type() ExecutorType ParamsList() Params CheckValid(Params) (bool, string) }
Executor interface wraps all possible action executors
type Param ¶
type Param struct { Type ParamType `json:"type" bson:"type"` Value interface{} `json:"value" bson:"value"` }
type PassExecutor ¶
type PassExecutor struct{}
func (PassExecutor) CheckValid ¶
func (PassExecutor) CheckValid(Params) (bool, string)
func (PassExecutor) ParamsList ¶
func (PassExecutor) ParamsList() Params
func (PassExecutor) Run ¶
func (PassExecutor) Run(Params) error
func (PassExecutor) Type ¶
func (PassExecutor) Type() ExecutorType
Click to show internal directories.
Click to hide internal directories.