Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Component = &component.Component{ Dependencies: component.Components{ basic.Component, chi.Component, }, PreExecute: component.StepFunc(func(container container.Container) error { return container.Invoke(func(r http.Router, auth *basic.Auth) { r.Use(auth) }) }), }
Component automatically adds basic authentication middleware to the HTTP router. It depends on:
- basic.Component (the authentication middleware itself)
- chi.Component (the router)
Usage:
compogo.WithComponents(
http.Component,
chi.Component,
basic.Component,
)
All routes will now require valid basic authentication credentials.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.