Documentation ¶
Index ¶
- func MarshalArgs(args ...interface{}) (core.Arguments, error)
- func UnMarshalResponse(resp []byte, typeHolders []interface{}) ([]interface{}, error)
- type Params
- type QueryType
- type RequestHandler
- func (rh *RequestHandler) ProcessCreateMember() (map[string]interface{}, error)
- func (rh *RequestHandler) ProcessDumpUsers(all bool) (map[string]interface{}, error)
- func (rh *RequestHandler) ProcessGetBalance() (map[string]interface{}, error)
- func (rh *RequestHandler) ProcessSendMoney() (map[string]interface{}, error)
- type Runner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalArgs ¶
MarshalArgs marshals arguments by cbor
func UnMarshalResponse ¶
UnMarshalResponse unmarshals return values by cbor
Types ¶
type Params ¶
type Params struct { QType string `json:"query_type"` Name string `json:"name"` Reference string `json:"reference"` From string `json:"from"` To string `json:"to"` QID string `json:"qid"` Amount int `json:"amount"` }
Params contains supported query params
type QueryType ¶
type QueryType int
QueryType represents type of query
Supported query types
func QTypeFromString ¶
QTypeFromString converts string representation to enum
type RequestHandler ¶
type RequestHandler struct {
// contains filtered or unexported fields
}
RequestHandler encapsulate processing of request
func NewRequestHandler ¶
func NewRequestHandler(params *Params, router core.MessageRouter, rootDomainReference core.RecordRef) *RequestHandler
NewRequestHandler creates new query handler
func (*RequestHandler) ProcessCreateMember ¶
func (rh *RequestHandler) ProcessCreateMember() (map[string]interface{}, error)
ProcessCreateMember processes CreateMember query type
func (*RequestHandler) ProcessDumpUsers ¶
func (rh *RequestHandler) ProcessDumpUsers(all bool) (map[string]interface{}, error)
ProcessDumpUsers processes Dump users query type
func (*RequestHandler) ProcessGetBalance ¶
func (rh *RequestHandler) ProcessGetBalance() (map[string]interface{}, error)
ProcessGetBalance processes get_balance query type
func (*RequestHandler) ProcessSendMoney ¶
func (rh *RequestHandler) ProcessSendMoney() (map[string]interface{}, error)
ProcessSendMoney processes send_money query type
Click to show internal directories.
Click to hide internal directories.