Documentation
¶
Index ¶
Constants ¶
View Source
const ( StatusOk = 0 StatusErr = 13 StatusInternalErr = -1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct {
Name string
Handler ActionFunc
}
type ActionFunc ¶
type Request ¶
type Request struct {
Action string `json:"ActionFunc"`
Args json.RawMessage `json:"args"`
}
type Response ¶
type Response struct {
Status int `json:"status"`
Error string `json:"error,omitempty"`
Data json.RawMessage `json:"data"`
}
func NewResponse ¶ added in v2.1.2
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) SetHandler ¶
func (sw *Server) SetHandler(name string, action ActionFunc)
Click to show internal directories.
Click to hide internal directories.