Documentation
¶
Index ¶
- func Error(w http.ResponseWriter, status int, err *types.ErrorV1)
- func ErrorString(w http.ResponseWriter, status int, code string, err error)
- func JSON(w http.ResponseWriter, code int, v any, pretty bool)
- func JSONOK(w http.ResponseWriter, v any, pretty bool)
- type Server
- func (s *Server) Init() *Server
- func (s *Server) ListenAndServe(addr string) error
- func (s *Server) WithConfig(config *config.Service) *Server
- func (s *Server) WithDatabase(db *database.Database) *Server
- func (s *Server) WithReadiness(fn func(context.Context) error) *Server
- func (s *Server) WithRouter(router *http.ServeMux) *Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorString ¶
func ErrorString(w http.ResponseWriter, status int, code string, err error)
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func (*Server) ListenAndServe ¶
func (*Server) WithReadiness ¶
Click to show internal directories.
Click to hide internal directories.