Versions in this module Expand all Collapse all v3 v3.1.5 Nov 18, 2023 v3.1.4 Feb 22, 2023 v3.1.3 Feb 22, 2023 v3.1.2 Feb 22, 2023 v3.1.1 Jun 30, 2022 v3.1.0 Apr 8, 2022 Changes in this version type RPCClientOpts + DefaultRequestID int type RPCRequest + func NewRequestWithID(id int, method string, params ...interface{}) *RPCRequest v3.0.0 Mar 15, 2022 Changes in this version + func Params(params ...interface{}) interface + type HTTPError struct + Code int + func (e *HTTPError) Error() string + type RPCClient interface + Call func(ctx context.Context, method string, params ...interface{}) (*RPCResponse, error) + CallBatch func(ctx context.Context, requests RPCRequests) (RPCResponses, error) + CallBatchRaw func(ctx context.Context, requests RPCRequests) (RPCResponses, error) + CallFor func(ctx context.Context, out interface{}, method string, params ...interface{}) error + CallRaw func(ctx context.Context, request *RPCRequest) (*RPCResponse, error) + func NewClient(endpoint string) RPCClient + func NewClientWithOpts(endpoint string, opts *RPCClientOpts) RPCClient + type RPCClientOpts struct + AllowUnknownFields bool + CustomHeaders map[string]string + HTTPClient *http.Client + type RPCError struct + Code int + Data interface{} + Message string + func (e *RPCError) Error() string + type RPCRequest struct + ID int + JSONRPC string + Method string + Params interface{} + func NewRequest(method string, params ...interface{}) *RPCRequest + type RPCRequests []*RPCRequest + type RPCResponse struct + Error *RPCError + ID int + JSONRPC string + Result interface{} + func (RPCResponse *RPCResponse) GetBool() (bool, error) + func (RPCResponse *RPCResponse) GetFloat() (float64, error) + func (RPCResponse *RPCResponse) GetInt() (int64, error) + func (RPCResponse *RPCResponse) GetObject(toType interface{}) error + func (RPCResponse *RPCResponse) GetString() (string, error) + type RPCResponses []*RPCResponse + func (res RPCResponses) AsMap() map[int]*RPCResponse + func (res RPCResponses) GetByID(id int) *RPCResponse + func (res RPCResponses) HasError() bool v3.0.0-alpha.2 Mar 15, 2022 v3.0.0-alpha.1 Jan 14, 2020 Other modules containing this package github.com/ybbus/jsonrpc github.com/ybbus/jsonrpc/v2