Versions in this module Expand all Collapse all v1 v1.3.1 Jan 10, 2019 v1.2.0 Dec 15, 2018 Changes in this version + var DefaultEncoder = &encoder + var DefaultEncoderSelector = &encoderSelector + func WriteError(w http.ResponseWriter, status int, msg string) + type Codec interface + NewRequest func(*http.Request) CodecRequest + type CodecRequest interface + Method func() (string, error) + ReadRequest func(interface{}) error + WriteError func(w http.ResponseWriter, status int, err error) + WriteResponse func(http.ResponseWriter, interface{}) + type CompressionSelector struct + func (*CompressionSelector) Select(r *http.Request) Encoder + type Encoder interface + Encode func(w http.ResponseWriter) io.Writer + type EncoderSelector interface + Select func(r *http.Request) Encoder + type RequestInfo struct + Error error + Method string + Request *http.Request + StatusCode int + type Server struct + func NewServer() *Server + func (s *Server) HasMethod(method string) bool + func (s *Server) RegisterAfterFunc(f func(i *RequestInfo)) + func (s *Server) RegisterBeforeFunc(f func(i *RequestInfo)) + func (s *Server) RegisterCodec(codec Codec, contentType string) + func (s *Server) RegisterInterceptFunc(f func(i *RequestInfo) *http.Request) + func (s *Server) RegisterService(receiver interface{}, name string) error + func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)