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 ...
Click to show internal directories.
Click to hide internal directories.