Documentation ¶
Index ¶
- func AuthMiddleware(scopes ...string) mux.MiddlewareFunc
- func CacheMiddleware() mux.MiddlewareFunc
- func DIMiddleware[T any](tc di.ToContext[T], provide func() T) mux.MiddlewareFunc
- func HandleFunc(router *mux.Router, path string, f http.HandlerFunc, ...) *mux.Route
- func LangMiddleware() mux.MiddlewareFunc
- func NewRouter() *mux.Router
- func PathKey[T comparable](req *http.Request, name string, out key[T])
- func PathParam(req *http.Request, name string) string
- func Serve(configs httpext.Configs, controllers []ControllerRegister, ...)
- type ControllerRegister
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthMiddleware ¶
func AuthMiddleware(scopes ...string) mux.MiddlewareFunc
func CacheMiddleware ¶
func CacheMiddleware() mux.MiddlewareFunc
func DIMiddleware ¶
func DIMiddleware[T any](tc di.ToContext[T], provide func() T) mux.MiddlewareFunc
func HandleFunc ¶
func HandleFunc(router *mux.Router, path string, f http.HandlerFunc, middlewares ...mux.MiddlewareFunc) *mux.Route
func LangMiddleware ¶
func LangMiddleware() mux.MiddlewareFunc
func Serve ¶
func Serve(configs httpext.Configs, controllers []ControllerRegister, middlewares []mux.MiddlewareFunc, cors *cors.Cors)
Types ¶
type ControllerRegister ¶
Click to show internal directories.
Click to hide internal directories.