Versions in this module Expand all Collapse all v1 v1.1.0 Apr 30, 2020 Changes in this version + const ErrCodeParseError + func RequestIDFromContext(ctx context.Context) (*json.RawMessage, bool) + func WithHttpClient(httpClient HTTPClient) clientOption + func WithRequestID(ctx context.Context, id *json.RawMessage) context.Context + type Client interface + Call func(ctx context.Context, methodName string, params interface{}, result interface{}) error + func NewClient(rpcEndpointURL string, options ...clientOption) Client + type HTTPClient interface + Post func(ctx context.Context, url string, body []byte) ([]byte, error) + func NewHttpClient(c *http.Client) HTTPClient + type Request struct + Id *json.RawMessage + Method string + Params interface{} + Version string + func (v *Request) UnmarshalEasyJSON(l *jlexer.Lexer) + func (v *Request) UnmarshalJSON(data []byte) error + func (v Request) MarshalEasyJSON(w *jwriter.Writer) + func (v Request) MarshalJSON() ([]byte, error) + type Response struct + Error *json.RawMessage + Id *json.RawMessage + Result *json.RawMessage + Version string + func (v *Response) UnmarshalEasyJSON(l *jlexer.Lexer) + func (v *Response) UnmarshalJSON(data []byte) error + func (v Response) MarshalEasyJSON(w *jwriter.Writer) + func (v Response) MarshalJSON() ([]byte, error) + type ResponseError struct + Code int + Data interface{} + Message string + func (e *ResponseError) Error() string + func (v *ResponseError) UnmarshalEasyJSON(l *jlexer.Lexer) + func (v *ResponseError) UnmarshalJSON(data []byte) error + func (v ResponseError) MarshalEasyJSON(w *jwriter.Writer) + func (v ResponseError) MarshalJSON() ([]byte, error)