Documentation
¶
Index ¶
- Variables
- func ParseIPRange(startIP, endIP string) ([]netip.Prefix, error)
- func ParsePrefix(ip string) (pfx netip.Prefix, err error)
- func ToPrefixes(start netip.Addr, end netip.Addr) ([]netip.Prefix, error)
- func Validate(ip string) error
- func ValidateRange(startIP, endIP string) error
- func ValidateRows(ctx echo.Context, iplist string) error
- type Factory
- func (f *Factory[UK, GK]) DeleteGroup(groupID GK) *Factory[UK, GK]
- func (f *Factory[UK, GK]) DeleteUser(userID UK) *Factory[UK, GK]
- func (f *Factory[UK, GK]) IsAllowed(ctx echo.Context, userID UK, groupID GK, ipBlacklist string, ...) bool
- func (f *Factory[UK, GK]) SetGroupGetter(...) *Factory[UK, GK]
- type IPFilter
- func (a *IPFilter) AddBlacklist(ips ...string) error
- func (a *IPFilter) AddWhitelist(ips ...string) error
- func (a *IPFilter) Allowed(ip string) error
- func (a *IPFilter) Blocked(ip string) error
- func (a *IPFilter) IsAllowed(realIP string) bool
- func (a *IPFilter) IsAllowedAddr(ip netip.Addr) bool
- func (a *IPFilter) SetDisallow(dfl bool) *IPFilter
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ValidateRange ¶ added in v0.7.23
Types ¶
type Factory ¶ added in v0.7.24
func (*Factory[UK, GK]) DeleteGroup ¶ added in v0.7.26
func (*Factory[UK, GK]) DeleteUser ¶ added in v0.7.26
type IPFilter ¶
type IPFilter struct {
// contains filtered or unexported fields
}
func (*IPFilter) AddBlacklist ¶
func (*IPFilter) AddWhitelist ¶
func (*IPFilter) IsAllowedAddr ¶ added in v0.7.22
func (*IPFilter) SetDisallow ¶ added in v0.8.2
Click to show internal directories.
Click to hide internal directories.