Documentation ¶
Index ¶
Constants ¶
View Source
const ( JSONRPCError_ParseError JSONRPCErrorCode = -32700 JSONRPCError_InvalidRequest = -32600 JSONRPCError_NotFound = -32601 JSONRPCError_InvalidParams = -32602 JSONRPCError_InternalError = -32603 JSONRPCError_ServerError = -32000 )
Variables ¶
View Source
var JSONRPCErrorMap = []JSONRPCErrorCode{ JSONRPCError_InvalidRequest, JSONRPCError_NotFound, JSONRPCError_InvalidParams, JSONRPCError_InternalError, JSONRPCError_ServerError, }
Functions ¶
This section is empty.
Types ¶
type JSONRPC ¶
type JSONRPC struct { }
func (*JSONRPC) ParseRequest ¶
func (je *JSONRPC) ParseRequest(r io.Reader) (*websocket_server.RPCRequest, error)
func (*JSONRPC) PrepareNotification ¶
func (*JSONRPC) PrepareResponse ¶
func (je *JSONRPC) PrepareResponse(res *websocket_server.RPCResponse) ([]byte, error)
type JSONRPCError ¶
type JSONRPCError struct { JSONRPC string `json:"jsonrpc"` ID int64 `json:"id"` Error JSONRPCErrorInfo `json:"error"` }
type JSONRPCErrorCode ¶
type JSONRPCErrorCode int32
type JSONRPCErrorInfo ¶
type JSONRPCErrorInfo struct { Code JSONRPCErrorCode `json:"code"` Message string `json:"message"` Data interface{} `json:"data,omitempty"` }
type JSONRPCRequest ¶
type JSONRPCResponse ¶
type NotificationEntry ¶
Click to show internal directories.
Click to hide internal directories.