middleware

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Logger

func Logger(next http.Handler) http.Handler

func Register

func Register(mux http.Handler, middlewares ...func(http.Handler) http.Handler) (handler http.Handler)

Types

type CIDRCheck

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

func NewCIDRCheck

func NewCIDRCheck(config *core.Config) (*CIDRCheck, error)

func (*CIDRCheck) Middleware

func (c *CIDRCheck) Middleware() func(next http.Handler) http.Handler

type TokenProvider

type TokenProvider interface {
	GetPushPullToken(project string) (string, error)
	GetCatalogToken() (string, error)
}

type UnauthMiddleware

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

func NewUnauthMiddleware

func NewUnauthMiddleware(upstream *url.URL, tokenProvider TokenProvider) *UnauthMiddleware

func (*UnauthMiddleware) Middleware

func (um *UnauthMiddleware) Middleware() func(next http.Handler) http.Handler

Jump to

Keyboard shortcuts

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