Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RPCError ¶
type RPCRequest ¶
type RPCRequest struct {
Method string `json:"method"`
Params interface{} `json:"params"`
JsonRPC string `json:"jsonrpc"`
ID json.RawMessage `json:"id,omitempty"`
}
RPCRequest JSON-RPC 请求和响应结构
func (*RPCRequest) IDString ¶
func (r *RPCRequest) IDString() string
func (*RPCRequest) IsNotification ¶
func (r *RPCRequest) IsNotification() bool
type RPCResponse ¶
type RPCResponse struct {
Result interface{} `json:"result,omitempty"`
Error *RPCError `json:"error,omitempty"`
JsonRPC string `json:"jsonrpc"`
ID json.RawMessage `json:"id"`
}
Click to show internal directories.
Click to hide internal directories.