Documentation ¶
Index ¶
Constants ¶
View Source
const Version = "2.0"
Version is JSON-RPC version
Variables ¶
View Source
var ErrNullResult = errors.New("result is null")
ErrNullResult is ...
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct { // A Number that indicates the error type that occurred. // This MUST be an integer. Code ErrorCode `json:"code"` /* required */ // A String providing a short description of the error. // The message SHOULD be limited to a concise single sentence. Message string `json:"message"` /* required */ // A Primitive or Structured value that contains additional information about the error. Data interface{} `json:"data"` /* optional */ }
Error represents an JSON-RPC error object
type Request ¶
type Request struct { // A String specifying the version of the JSON-RPC protocol. // MUST be exactly "2.0". Version string `json:"jsonrpc"` // A String containing the name of the method to be invoked Method string `json:"method"` // A Structured value that holds the parameter values to be used during the // invocation of the method. This member MAY be omitted. Params *json.RawMessage `json:"params"` // An identifier established by the Client that MUST contain a String, Number, // or NULL value if included. // If it is not included it is assumed to be a notification. // The value SHOULD normally not be Null // and Numbers SHOULD NOT contain fractional parts ID *json.RawMessage `json:"id"` }
Request represents a JSON-RPC request sent by a client.
Click to show internal directories.
Click to hide internal directories.