Documentation ¶
Index ¶
- Constants
- func NewRpcError(code int, message string) customError
- type Context
- func (c *Context) Array(arr interface{}) error
- func (c *Context) Bind(obj interface{}, bindType bindType) error
- func (c *Context) BindJSON(obj interface{}) error
- func (c *Context) Bool(b bool)
- func (c *Context) Deadline() (deadline time.Time, ok bool)
- func (c *Context) Done() <-chan struct{}
- func (c *Context) Err() error
- func (c *Context) Error(err RpcError)
- func (c *Context) Float(f float64)
- func (c *Context) Int(i int)
- func (c *Context) Object(obj interface{}) error
- func (c *Context) Params() (fastjson.Value, error)
- func (c *Context) Set(key, value interface{})
- func (c *Context) String(str string)
- func (c *Context) Value(key interface{}) interface{}
- type H
- type Handler
- type Method
- type RpcError
Constants ¶
View Source
const ( ParseError rpcError = -32700 InvalidReqError rpcError = -32600 MethodNotFoundError rpcError = -32601 InvalidParamsError rpcError = -32602 InternalErrorError rpcError = -32603 ServerError rpcError = -32000 )
View Source
const ( IntResultType typeResult = iota FloatResultType StringResultType BoolResultType ArrayResultType ObjectResultType )
View Source
const (
BindJSONType bindType = iota
)
Variables ¶
This section is empty.
Functions ¶
func NewRpcError ¶
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Server is a json-rpc server
Click to show internal directories.
Click to hide internal directories.