Versions in this module Expand all Collapse all v1 v1.0.1 Dec 22, 2017 Changes in this version type RPCError + func (e *RPCError) Error() string v1.0.0 Aug 4, 2017 Changes in this version + type BatchResponse struct + func (batchResponse *BatchResponse) GetResponseOf(request *RPCRequest) (*RPCResponse, error) + type RPCClient struct + func NewRPCClient(endpoint string) *RPCClient + func (client *RPCClient) Batch(requests ...interface{}) (*BatchResponse, error) + func (client *RPCClient) Call(method string, params ...interface{}) (*RPCResponse, error) + func (client *RPCClient) CallNamed(method string, params map[string]interface{}) (*RPCResponse, error) + func (client *RPCClient) NewRPCNotificationObject(method string, params ...interface{}) *RPCNotification + func (client *RPCClient) NewRPCRequestObject(method string, params ...interface{}) *RPCRequest + func (client *RPCClient) Notification(method string, params ...interface{}) error + func (client *RPCClient) SetAutoIncrementID(flag bool) + func (client *RPCClient) SetBasicAuth(username string, password string) + func (client *RPCClient) SetCustomHeader(key string, value string) + func (client *RPCClient) SetHTTPClient(httpClient *http.Client) + func (client *RPCClient) SetNextID(id uint) + func (client *RPCClient) UnsetCustomHeader(key string) + func (client *RPCClient) UpdateRequestID(rpcRequest *RPCRequest) + type RPCError struct + Code int + Data interface{} + Message string + type RPCNotification struct + JSONRPC string + Method string + Params interface{} + type RPCRequest struct + ID uint + JSONRPC string + Method string + Params interface{} + type RPCResponse struct + Error *RPCError + ID uint + JSONRPC string + Result interface{} + func (rpcResponse *RPCResponse) GetBool() (bool, error) + func (rpcResponse *RPCResponse) GetFloat64() (float64, error) + func (rpcResponse *RPCResponse) GetInt() (int, error) + func (rpcResponse *RPCResponse) GetInt64() (int64, error) + func (rpcResponse *RPCResponse) GetObject(toType interface{}) error + func (rpcResponse *RPCResponse) GetString() (string, error)