Versions in this module Expand all Collapse all v1 v1.2.0 Mar 25, 2019 Changes in this version type Codec + func NewCustomCodecWithErrorMapper(encSel rpc.EncoderSelector, errorMapper func(error) error) *Codec v1.1.0 Sep 27, 2016 Changes in this version + var ErrNullResult = errors.New("result is null") + var Version = "2.0" + func DecodeClientResponse(r io.Reader, reply interface{}) error + func EncodeClientRequest(method string, args interface{}) ([]byte, error) + type Codec struct + func NewCodec() *Codec + func NewCustomCodec(encSel rpc.EncoderSelector) *Codec + func (c *Codec) NewRequest(r *http.Request) rpc.CodecRequest + type CodecRequest struct + func (c *CodecRequest) Method() (string, error) + func (c *CodecRequest) ReadRequest(args interface{}) error + func (c *CodecRequest) WriteError(w http.ResponseWriter, status int, err error) + func (c *CodecRequest) WriteResponse(w http.ResponseWriter, reply interface{}) + type EmptyResponse struct + type Error struct + Code ErrorCode + Data interface{} + Message string + func (e *Error) Error() string + type ErrorCode int + const E_BAD_PARAMS + const E_INTERNAL + const E_INVALID_REQ + const E_NO_METHOD + const E_PARSE + const E_SERVER