Versions in this module Expand all Collapse all v1 v1.3.2 May 10, 2023 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 + ID func() ([]byte, error) + 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) RegisterValidateRequestFunc(f func(r *RequestInfo, i interface{}) error) + func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)