middleware

package
v0.0.0-...-d328d9e Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRelicMiddleware

func NewRelicMiddleware() func(next http.Handler) http.Handler

Types

type Authorizer

type Authorizer struct {
	// contains filtered or unexported fields
}

func NewAuthorizer

func NewAuthorizer(enforcer enforcer.Enforcer) (*Authorizer, error)

NewAuthorizer creates a new authorization middleware using the given auth enforcer

func (*Authorizer) Middleware

func (a *Authorizer) Middleware(next http.Handler) http.Handler

type OpenAPIValidationOptions

type OpenAPIValidationOptions struct {
	// If true, ignore "security" in OpenAPI specs
	IgnoreAuthentication bool
	// If true, ignore "server" declarations in OpenAPI specs when validating requests paths.
	// Only consider the paths relative to the server url versus checking the full paths
	// (which include the server URL) in the requests.
	IgnoreServers bool
}

type OpenAPIValidator

type OpenAPIValidator struct {
	// contains filtered or unexported fields
}

func NewOpenAPIValidator

func NewOpenAPIValidator(options *OpenAPIValidationOptions) (*OpenAPIValidator, error)

func (*OpenAPIValidator) Middleware

func (v *OpenAPIValidator) Middleware() func(http.Handler) http.Handler

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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