Documentation
¶
Index ¶
- func Auth(settings func() *types.BasicAuth) func(http.Handler) http.Handler
- func CORS(next http.Handler) http.Handler
- func Info(app, version string) func(http.Handler) http.Handler
- func Ping(path ...string) func(http.Handler) http.Handler
- func Recoverer(next http.Handler) http.Handler
- type Middleware
- type Rest
- type Router
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Middleware ¶
Middleware type for middleware functions
type Rest ¶
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router struct to hold our routes and middleware
func NewRouter ¶
func NewRouter(middlewares ...Middleware) *Router
NewRouter creates and returns a new App with an initialized ServeMux and middleware slice
func (*Router) HandleFunc ¶
func (r *Router) HandleFunc(pattern string, handler http.HandlerFunc)
HandleFunc registers a handler function for a specific route, applying all middleware.
func (*Router) Use ¶
func (r *Router) Use(middlewares ...Middleware)
Use adds middlewares to the chain
Click to show internal directories.
Click to hide internal directories.