Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface {
Invoke(ctx context.Context, result interface{}, method string, params ...interface{}) error
}
func NewRPCClient ¶
func NewRPCClient(httpClient *resty.Client) Client
type RPCRequest ¶
type RPCRequest struct {
JSONRpc string `json:"jsonrpc"`
ID json.RawMessage `json:"id"`
Method string `json:"method"`
Params []interface{} `json:"params,omitempty"`
}
type RPCResponse ¶
type RPCResponse struct {
JSONRpc string `json:"jsonrpc"`
ID json.RawMessage `json:"id"`
Result json.RawMessage `json:"result,omitempty"`
Error *RPCError `json:"error,omitempty"`
}
func (*RPCResponse) Message ¶
func (r *RPCResponse) Message() string
Click to show internal directories.
Click to hide internal directories.