|
|
@ -34,20 +34,20 @@ const ( |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
type RpcRequest struct { |
|
|
|
type RpcRequest struct { |
|
|
|
|
|
|
|
ID interface{} `json:"id"` |
|
|
|
JsonRpc string `json:"jsonrpc"` |
|
|
|
JsonRpc string `json:"jsonrpc"` |
|
|
|
ID int `json:"id"` |
|
|
|
|
|
|
|
Method string `json:"method"` |
|
|
|
Method string `json:"method"` |
|
|
|
Params []json.RawMessage `json:"params"` |
|
|
|
Params []json.RawMessage `json:"params"` |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
type RpcSuccessResponse struct { |
|
|
|
type RpcSuccessResponse struct { |
|
|
|
ID int `json:"id"` |
|
|
|
ID interface{} `json:"id"` |
|
|
|
JsonRpc string `json:"jsonrpc"` |
|
|
|
JsonRpc string `json:"jsonrpc"` |
|
|
|
Result interface{} `json:"result"` |
|
|
|
Result interface{} `json:"result"` |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
type RpcErrorResponse struct { |
|
|
|
type RpcErrorResponse struct { |
|
|
|
ID *int `json:"id"` |
|
|
|
ID interface{} `json:"id"` |
|
|
|
JsonRpc string `json:"jsonrpc"` |
|
|
|
JsonRpc string `json:"jsonrpc"` |
|
|
|
Error *RpcErrorObject `json:"error"` |
|
|
|
Error *RpcErrorObject `json:"error"` |
|
|
|
} |
|
|
|
} |
|
|
|