handler

package
v0.0.0-...-3bfe646 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2023 License: Apache-2.0 Imports: 31 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL