Documentation
¶
Index ¶
- func FormatValidationErrors(err error) map[string]string
- func GetHTTPStatusFromStoreError(err error) (int, string)
- type Config
- type HTTP
- type Logger
- type Server
- func (s *Server) Close() error
- func (s *Server) Decode(dst any, src map[string][]string) error
- func (s *Server) DecodeJSON(w http.ResponseWriter, r *http.Request, destination any) error
- func (s *Server) Host() string
- func (s *Server) JSON(w http.ResponseWriter, r *http.Request, code int, value any)
- func (s *Server) LogDebug(r *http.Request, err error)
- func (s *Server) LogError(r *http.Request, err error)
- func (s *Server) LogWarn(r *http.Request, err error)
- func (s *Server) RegisterMiddleWare(middlewares ...func(http.Handler) http.Handler)
- func (s *Server) RegisterRoutes(routes ...func(chi.Router))
- func (s *Server) Run() error
- func (s *Server) Schema() string
- func (s *Server) URI() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatValidationErrors ¶
Types ¶
type Server ¶
type Server struct {
Validate *validator.Validate
Log *zap.Logger
// contains filtered or unexported fields
}
func (*Server) DecodeJSON ¶
func (*Server) RegisterMiddleWare ¶
func (*Server) RegisterRoutes ¶
Click to show internal directories.
Click to hide internal directories.