accesscontrol

package
Version: v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2021 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPWhitelistMiddleware

type IPWhitelistMiddleware struct {
	Config *config.Config
	Logger *zap.Logger
	// contains filtered or unexported fields
}

IPWhitelistMiddleware ...

func NewIPWhitelistMiddleware

func NewIPWhitelistMiddleware(conf *config.Config, logger *zap.Logger, next http.Handler) *IPWhitelistMiddleware

NewIPWhitelistMiddleware returns a *WhitelistMiddleware. next is an http.Handler which will be used if the request IP is not whitelisted. If next is nil then the middleware will return http.StatusUnauthorized (401)

func (*IPWhitelistMiddleware) Middleware

func (mdw *IPWhitelistMiddleware) Middleware(next http.Handler) http.Handler

Middleware ...

Source Files

Jump to

Keyboard shortcuts

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