Documentation ¶
Index ¶
Constants ¶
View Source
const ( // JSON-RPC spec compliant error codes JsonRpcParseErrorCode = -32700 JsonRpcInvalidRequestCode = -32600 JsonRpcMethodNotFoundCode = -32601 JsonRpcInvalidParams = -32602 JsonRpcInternalErrorCode = -32603 JsonRpcForbidden = -32003 // Not part of the official spec // Application error codes HttpMethodNotAllowedCode = http.StatusMethodNotAllowed )
Variables ¶
This section is empty.
Functions ¶
func NewHandler ¶
Types ¶
type JsonRpcError ¶
type JsonRpcErrorResponse ¶
type JsonRpcErrorResponse struct { JsonRpc string `json:"jsonrpc"` ID *string `json:"id"` Error JsonRpcError `json:"error"` }
type JsonRpcRequest ¶
type JsonRpcRequest struct { JsonRpc string `json:"jsonrpc"` ID string `json:"id"` Method string `json:"method"` Params map[string]any `json:"params"` }
func (JsonRpcRequest) Valid ¶
func (r JsonRpcRequest) Valid() bool
type JsonRpcSuccessResponse ¶
Click to show internal directories.
Click to hide internal directories.