Versions in this module Expand all Collapse all v0 v0.0.1 Apr 11, 2020 Changes in this version + const StatusInternalError + const StatusInvalidParams + const StatusInvalidRequest + const StatusMethodNotFound + const StatusParseError + type Encoder interface + Encode func(v interface{}) error + type Error struct + Code int + Data interface{} + Message string + func WrapError(err error) *Error + func (err *Error) Error() string + func (err *Error) Unwrap() error + type Handler struct + Encoder func(w io.Writer) Encoder + RequestInterceptor func(ctx context.Context, req *Request) error + ResponseInterceptor func(ctx context.Context, req Request, res *Response) error + func NewHandler(rcvrs ...interface{}) *Handler + func (h *Handler) Register(rcvr interface{}) + func (h *Handler) RegisterMethod(name string, fn interface{}) + func (h *Handler) RegisterName(name string, rcvr interface{}) + func (h *Handler) ServeConn(ctx context.Context, rw io.ReadWriter) + func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request) + type Request struct + Method string + Params json.RawMessage + type Response struct + Error *Error + Result interface{}