middleware

package
v0.0.0-...-b534984 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: Apache-2.0 Imports: 22 Imported by: 5

Documentation

Index

Constants

View Source
const (
	ContextKeyLog contextKey = iota
	ContextKeyOriginalPath
	ContextKeyBody
	ContextKeySystemData
)
View Source
const (
	MockIdentityURL = "" /* 283-byte string literal not displayed */

)

Variables

This section is empty.

Functions

func Body

func Body(h http.Handler) http.Handler

func Headers

func Headers(h http.Handler) http.Handler

func Lowercase

func Lowercase(h http.Handler) http.Handler

func MockMSIMiddleware

func MockMSIMiddleware(h http.Handler) http.Handler

func Panic

func Panic(h http.Handler) http.Handler

func SystemData

func SystemData(h http.Handler) http.Handler

Types

type ApiVersionValidator

type ApiVersionValidator struct {
	APIs map[string]*api.Version
}

func (ApiVersionValidator) ValidateAPIVersion

func (a ApiVersionValidator) ValidateAPIVersion(h http.Handler) http.Handler

func (ApiVersionValidator) ValidatePreflightAPIVersion

func (a ApiVersionValidator) ValidatePreflightAPIVersion(h http.Handler) http.Handler

type AuthMiddleware

type AuthMiddleware struct {
	AdminAuth clientauthorizer.ClientAuthorizer
	ArmAuth   clientauthorizer.ClientAuthorizer
}

func (AuthMiddleware) Authenticate

func (a AuthMiddleware) Authenticate(h http.Handler) http.Handler

type LogMiddleware

type LogMiddleware struct {
	EnvironmentName string
	Hostname        string
	Location        string
	AuditLog        *logrus.Entry
	BaseLog         *logrus.Entry
}

func (LogMiddleware) Log

type MaintenanceMiddleware

type MaintenanceMiddleware struct {
	metrics.Emitter
}

func (MaintenanceMiddleware) UnplannedMaintenanceSignal

func (mm MaintenanceMiddleware) UnplannedMaintenanceSignal(h http.Handler) http.Handler

Emit metric for unplanned maintenance

type MetricsMiddleware

type MetricsMiddleware struct {
	metrics.Emitter
}

func (MetricsMiddleware) Metrics

func (mm MetricsMiddleware) Metrics(h http.Handler) http.Handler

Metric records request metrics for tracking

type ValidateMiddleware

type ValidateMiddleware struct {
	Location string
	Apis     map[string]*api.Version
}

func (ValidateMiddleware) Validate

func (v ValidateMiddleware) Validate(h http.Handler) http.Handler

Jump to

Keyboard shortcuts

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