Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateConfig ¶
Types ¶
type Config ¶
type Config struct {
// V4Prefix is the prefix length for IPv4 blocks
V4Prefix int `json:"v4_prefix"`
// V6Prefix is the prefix length for IPv6 blocks
V6Prefix int `json:"v6_prefix"`
}
IPBlockConfig represents the configuration for an IPBlock. It's used to specify the prefix length for IPv4 and IPv6 blocks for IP blocking.
type IPBlock ¶
type IPBlock struct {
// contains filtered or unexported fields
}
IPBlock represents either an IPv4 or IPv6 block Data representation: v6: Stored as first 8 bytes of the address v4: Stored as 2001:db8:<v4>
func NewIPBlock ¶
NewIPBlock creates a new IPBlock from an IP address
Click to show internal directories.
Click to hide internal directories.