Versions in this module Expand all Collapse all v0 v0.31.5 Apr 16, 2019 Changes in this version + func SocketType(listenAddr string) string + type Context struct + HTTPReq *http.Request + JSONReq *RPCRequest + WSConn WSRPCConnection + func (ctx *Context) Context() context.Context + func (ctx *Context) RemoteAddr() string + type JSONRPCIntID int + type JSONRPCStringID string + type RPCError struct + Code int + Data string + Message string + func (err RPCError) Error() string + type RPCRequest struct + ID jsonrpcid + JSONRPC string + Method string + Params json.RawMessage + func ArrayToRequest(cdc *amino.Codec, id jsonrpcid, method string, params []interface{}) (RPCRequest, error) + func MapToRequest(cdc *amino.Codec, id jsonrpcid, method string, params map[string]interface{}) (RPCRequest, error) + func NewRPCRequest(id jsonrpcid, method string, params json.RawMessage) RPCRequest + func (req RPCRequest) String() string + func (request *RPCRequest) UnmarshalJSON(data []byte) error + type RPCResponse struct + Error *RPCError + ID jsonrpcid + JSONRPC string + Result json.RawMessage + func NewRPCErrorResponse(id jsonrpcid, code int, msg string, data string) RPCResponse + func NewRPCSuccessResponse(cdc *amino.Codec, id jsonrpcid, res interface{}) RPCResponse + func RPCInternalError(id jsonrpcid, err error) RPCResponse + func RPCInvalidParamsError(id jsonrpcid, err error) RPCResponse + func RPCInvalidRequestError(id jsonrpcid, err error) RPCResponse + func RPCMethodNotFoundError(id jsonrpcid) RPCResponse + func RPCParseError(id jsonrpcid, err error) RPCResponse + func RPCServerError(id jsonrpcid, err error) RPCResponse + func (resp RPCResponse) String() string + func (response *RPCResponse) UnmarshalJSON(data []byte) error + type WSRPCConnection interface + Codec func() *amino.Codec + Context func() context.Context + GetRemoteAddr func() string + TryWriteRPCResponse func(resp RPCResponse) bool + WriteRPCResponse func(resp RPCResponse)