Documentation ¶
Index ¶
Constants ¶
View Source
const ShutdownTimeout = 1 * time.Second
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bootstrapper ¶
type Bootstrapper interface {
BootstrapControllers(db *dbCommon.DB) []Controller
}
type Controller ¶
type ErrorResponse ¶
type Responder ¶
type Responder struct{}
func NewResponder ¶
func NewResponder() *Responder
func (*Responder) RespondError ¶
func (r *Responder) RespondError(w http.ResponseWriter, message string, httpStatus int)
func (*Responder) RespondErrorNotFound ¶
func (r *Responder) RespondErrorNotFound(w http.ResponseWriter)
func (*Responder) RespondSuccessNoContent ¶
func (r *Responder) RespondSuccessNoContent(w http.ResponseWriter)
func (*Responder) RespondSuccessOk ¶
func (r *Responder) RespondSuccessOk(w http.ResponseWriter, data any, n int)
type Server ¶
func NewServer ¶
func NewServer(controllers []Controller) *Server
func (*Server) RegisterRoutes ¶
func (s *Server) RegisterRoutes()
type SuccessResponse ¶
Click to show internal directories.
Click to hide internal directories.