Documentation ¶
Index ¶
- func DecodeReply(key, data []byte, obj interface{}) error
- func Encode(key []byte, r *ReplyInfo) []byte
- func Reply(key []byte, obj interface{}) []byte
- func ReplyError(key []byte, err error) []byte
- func Send(key []byte, path string, obj interface{}) []byte
- type HandlerFunc
- type ReplyInfo
- type Req
- type Server
- type SvrConf
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeReply ¶
func ReplyError ¶
Types ¶
type HandlerFunc ¶
type HandlerFunc func(*Req) interface{}
type ReplyInfo ¶
type ReplyInfo struct { Token string `json:"token"` Code int `json:"code,omitempty"` Path string `json:"path,omitempty"` Payload json.RawMessage `json:"payload"` }
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) DecodeRequest ¶
func (s *Server) DecodeRequest(w http.ResponseWriter, body []byte) error
func (*Server) HandleFunc ¶
func (s *Server) HandleFunc(path string, f HandlerFunc)
Click to show internal directories.
Click to hide internal directories.