Documentation ¶
Overview ¶
Package ipaddr implements IP allowlist check.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Allowlist ¶
type Allowlist struct {
// contains filtered or unexported fields
}
Allowlist holds all named IP allowlist and the allowlist assignment map.
func NewAllowlist ¶
func NewAllowlist(wl []*protocol.AuthIPWhitelist, as []*protocol.AuthIPWhitelistAssignment) (Allowlist, error)
NewAllowlist creates new populated IP allowlist set.
func (Allowlist) GetAllowlistForIdentity ¶
GetAllowlistForIdentity returns name of the IP allowlist 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.