Versions in this module Expand all Collapse all v1 v1.0.2 Jan 31, 2021 v1.0.1 Jan 30, 2021 Changes in this version type Router + Routes map[string]Handler v1.0.0 Jan 30, 2021 Changes in this version + type Handler interface + Handle func(context.Context, json.RawMessage) (json.RawMessage, error) + type HandlerFunc func(context.Context, json.RawMessage) (json.RawMessage, error) + func (f HandlerFunc) Handle(ctx context.Context, body json.RawMessage) (json.RawMessage, error) + type Option func(*Router) + func MarshalErrorsWith(f func(error) ([]byte, error)) Option + type Request struct + Body json.RawMessage + Procedure string + type Response struct + Body json.RawMessage + Error json.RawMessage + type Router struct + func New(opts ...Option) *Router + func (r *Router) Handle(ctx context.Context, req Request) (*Response, error) + func (r *Router) Route(procedure string, handler Handler)