Versions in this module Expand all Collapse all v12 v12.0.1 Sep 13, 2019 v12.0.0 Sep 12, 2019 Changes in this version + const InternalErrorCode + const InternalErrorMessage + const InvalidParamsCode + const InvalidParamsMessage + const InvalidRequestCode + const InvalidRequestMessage + const MaxReservedErrorCode + const MethodNotFoundCode + const MethodNotFoundMessage + const MinReservedErrorCode + const ParseErrorCode + const ParseErrorMessage + const Version + var DebugMethodFunc = false + func HTTPRequestHandler(methods MethodMap) http.HandlerFunc + type BatchRequest []Request + func (br BatchRequest) String() string + type BatchResponse []Response + func (br BatchResponse) String() string + type Client struct + BasicAuth bool + DebugRequest bool + Header http.Header + Log Logger + Password string + User string + func NewClient(doer RequestDoer) *Client + func (c *Client) Request(url, method string, params, result interface{}) error + type Error struct + Code ErrorCode + Data interface{} + Message string + func InvalidParams(data interface{}) *Error + func NewError(code ErrorCode, message string, data interface{}) *Error + func (e Error) Error() string + type ErrorCode int + func (c ErrorCode) IsReserved() bool + type Logger interface + Println func(...interface{}) + type MethodFunc func(params json.RawMessage) interface + type MethodMap map[string]MethodFunc + type Request struct + ID interface{} + JSONRPC string + Method string + Params interface{} + func NewRequest(method string, id, params interface{}) Request + func (r Request) MarshalJSON() ([]byte, error) + func (r Request) String() string + type RequestDoer interface + Do func(req *http.Request) (*http.Response, error) + type Response struct + Error *Error + ID interface{} + JSONRPC string + Result interface{} + func (r Response) IsValid() bool + func (r Response) MarshalJSON() ([]byte, error) + func (r Response) String() string Other modules containing this package github.com/AdamSLevy/jsonrpc2 github.com/AdamSLevy/jsonrpc2/v10 github.com/AdamSLevy/jsonrpc2/v11 github.com/AdamSLevy/jsonrpc2/v13 github.com/AdamSLevy/jsonrpc2/v14 github.com/AdamSLevy/jsonrpc2/v2 github.com/AdamSLevy/jsonrpc2/v3 github.com/AdamSLevy/jsonrpc2/v4 github.com/AdamSLevy/jsonrpc2/v5 github.com/AdamSLevy/jsonrpc2/v6 github.com/AdamSLevy/jsonrpc2/v7 github.com/AdamSLevy/jsonrpc2/v8 github.com/AdamSLevy/jsonrpc2/v9