Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WebHandler ¶
type WebHandler struct { httprouter.Router WebHandlerConfig // contains filtered or unexported fields }
func NewWebHandler ¶
func NewWebHandler(cfg WebHandlerConfig) (*WebHandler, error)
func (*WebHandler) ServeHTTP ¶
func (h *WebHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP lets the authentication middleware serve the request before passing it through to the router.
type WebHandlerConfig ¶
type WebHandlerConfig struct { // Users provides access to the users service. Users users.Identity // Applications provides access to the application service. Applications app.Applications // Packages provides access to the package service. Packages pack.PackageService // Charts provides access to the chart repository. Charts helm.Repository // Authenticator is used to authenticate requests. Authenticator users.Authenticator }
WebHandlerConfig defines app service web handler configuration.
func (*WebHandlerConfig) CheckAndSetDefaults ¶
func (c *WebHandlerConfig) CheckAndSetDefaults() error
CheckAndSetDefaults validates the config and sets some defaults.
Click to show internal directories.
Click to hide internal directories.