Versions in this module Expand all Collapse all v7 v7.0.0 Nov 27, 2018 Changes in this version + const HighestReservedErrorCode + const InternalErrorCode + const InternalErrorMessage + const InvalidParamsCode + const InvalidParamsMessage + const InvalidRequestCode + const InvalidRequestMessage + const LowestReservedErrorCode + const MethodNotFoundCode + const MethodNotFoundMessage + const ParseErrorCode + const ParseErrorMessage + var DebugMethodFunc = false + var InternalError = NewError(InternalErrorCode, InternalErrorMessage, nil) + var InvalidParams = NewError(InvalidParamsCode, InvalidParamsMessage, nil) + var InvalidRequest = NewError(InvalidRequestCode, InvalidRequestMessage, nil) + var MethodNotFound = NewError(MethodNotFoundCode, MethodNotFoundMessage, nil) + var ParseError = NewError(ParseErrorCode, ParseErrorMessage, nil) + func HTTPRequestHandler(methods MethodMap) http.HandlerFunc + type BatchRequest []Request + func (br BatchRequest) String() string + type BatchResponse []Response + func (br BatchResponse) String() string + type Error struct + Code ErrorCode + Data interface{} + Message string + func NewError(code ErrorCode, message string, data interface{}) Error + type ErrorCode int + func (c ErrorCode) IsReserved() bool + type MethodFunc func(params json.RawMessage) Response + type MethodMap map[string]MethodFunc + func (methods MethodMap) IsValid() error + type Request struct + ID interface{} + JSONRPC string + Method string + Params interface{} + func NewRequest(method string, id, params interface{}) Request + func (r Request) IsValid() bool + func (r Request) String() string + type Response struct + ID interface{} + JSONRPC string + Result interface{} + func NewErrorResponse(code ErrorCode, message string, data interface{}) Response + func NewInvalidParamsErrorResponse(data interface{}) Response + func NewResponse(result interface{}) Response + func (r Response) IsValid() bool + 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/v12 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/v8 github.com/AdamSLevy/jsonrpc2/v9