Documentation ¶
Index ¶
- Variables
- func Alias(name string, alias string)
- func Register(name string, handler Handler)
- func RegisterGroup(name string, group map[string]Handler)
- type Handler
- type Process
- func (process *Process) ArgsArray(index int) []interface{}
- func (process *Process) ArgsBool(i int, defaults ...bool) bool
- func (process *Process) ArgsInt(i int, defaults ...int) int
- func (process *Process) ArgsMap(i int, defaults ...maps.MapStrAny) maps.MapStrAny
- func (process *Process) ArgsNotNull(i int)
- func (process *Process) ArgsQueryParams(i int, defaults ...types.QueryParam) types.QueryParam
- func (process *Process) ArgsRecords(index int) []map[string]interface{}
- func (process *Process) ArgsString(i int, defaults ...string) string
- func (process *Process) ArgsStrings(index int) []string
- func (process *Process) ArgsURLValue(i int, name string, defaults ...string) string
- func (process *Process) ArgsUint32(i int, defaults ...uint32) uint32
- func (process *Process) Exec() (value interface{}, err error)
- func (process *Process) NumOfArgs() int
- func (process *Process) NumOfArgsIs(num int) bool
- func (process *Process) Run() interface{}
- func (process *Process) ValidateArgNums(length int)
- func (process *Process) WithGlobal(global map[string]interface{}) *Process
- func (process *Process) WithSID(sid string) *Process
Constants ¶
This section is empty.
Variables ¶
View Source
var Handlers = map[string]Handler{}
Handlers ProcessHanlders
Functions ¶
func RegisterGroup ¶
RegisterGroup register a process handler group
Types ¶
type Process ¶
type Process struct { Name string Group string Method string Handler string ID string Args []interface{} Global map[string]interface{} // Global vars Sid string // Session ID }
Process the process sturct
func (*Process) ArgsNotNull ¶
ArgsNotNull parameters should be not null
func (*Process) ArgsQueryParams ¶
func (process *Process) ArgsQueryParams(i int, defaults ...types.QueryParam) types.QueryParam
ArgsQueryParams 读取参数 QueryParam
func (*Process) ArgsRecords ¶
ArgsRecords 读取 []map[string]interface{} 参数值
func (*Process) ArgsString ¶
ArgsString 读取参数 String
func (*Process) ArgsStrings ¶
ArgsStrings 读取 []string 参数值
func (*Process) ArgsURLValue ¶
ArgsURLValue 读取参数
func (*Process) ArgsUint32 ¶
ArgsUint32 get Uint32
func (*Process) NumOfArgsIs ¶
NumOfArgsIs check if the number of parameters is the given value
func (*Process) ValidateArgNums ¶
ValidateArgNums Validate the parameters numbers
func (*Process) WithGlobal ¶
WithGlobal set the global vars
Click to show internal directories.
Click to hide internal directories.