Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct {
Code int64 `json:"code"`
Message string `json:"message"`
Data *json.RawMessage `json:"data"`
}
Error represents a JSON-RPC2 response error.
func (Error) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Error) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Error) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Error) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type HTTPClient ¶
type HTTPClient struct {
// contains filtered or unexported fields
}
HTTPClient is the client to communicate with steemd via http.
func NewHTTPClient ¶
func NewHTTPClient(nodeAddr string, timeout time.Duration) *HTTPClient
func (*HTTPClient) Call ¶
func (c *HTTPClient) Call(method string, params, result interface{}) error
type Request ¶
type Request struct {
Version string `json:"jsonrpc"`
Method string `json:"method"`
Params json.RawMessage `json:"params,omitempty"`
ID uint64 `json:"id"`
}
Request represents a JSON-RPC request or notification. See http://www.jsonrpc.org/specification#request_object and http://www.jsonrpc.org/specification#notification.
func (Request) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Request) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Request) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Request) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type Response ¶
type Response struct {
Version string `json:"jsonrpc"`
ID uint64 `json:"id"`
Result json.RawMessage `json:"result,omitempty"`
Error *Error `json:"error,omitempty"`
}
func (Response) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Response) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Response) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Response) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface