Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Chain ¶
func Chain(f http.HandlerFunc, middlewares ...Middleware) http.HandlerFunc
Chain applies middlewares to a http.HandlerFunc
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
func NewApp ¶
func NewApp(logger *slog.Logger, paymentUseCase contract.PaymentUseCase, orderUseCase contract.OrderUseCase, ) *App
type Middleware ¶
type Middleware func(http.HandlerFunc) http.HandlerFunc
func Logging ¶
func Logging() Middleware
Logging logs all requests with its path and the time it took to process
func Method ¶
func Method(m string) Middleware
Method ensures that url can only be requested with a specific method, else returns a 400 Bad Request
Click to show internal directories.
Click to hide internal directories.