Documentation ¶
Overview ¶
Package ipaddr implements IP whitelist check.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Whitelist ¶
type Whitelist struct {
// contains filtered or unexported fields
}
Whitelist holds all named IP whitelists and the whitelist assignment map.
func NewWhitelist ¶
func NewWhitelist(wl []*protocol.AuthIPWhitelist, as []*protocol.AuthIPWhitelistAssignment) (Whitelist, error)
NewWhitelist creates new populated IP whitelist.
func (Whitelist) GetWhitelistForIdentity ¶
GetWhitelistForIdentity returns name of the IP whitelist to use to check IP of requests from given `ident`.
Returns an empty string if the identity is not IP-restricted.
Click to show internal directories.
Click to hide internal directories.