Versions in this module Expand all Collapse all v1 v1.0.3 Aug 26, 2022 v1.0.1 Aug 24, 2022 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) Request + 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 Request interface + Method func() (string, error) + ReadRequest func(interface{}) error + WriteError func(w http.ResponseWriter, status int, err error) + WriteResponse func(http.ResponseWriter, interface{}) + 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) RegisterAlias(alias, target string) error + 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) RegisterMethod(receiver any, name string, method string) error + 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)