safeconf

package
v1.10.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlackListConfigure

type BlackListConfigure struct {
	BlackList []BlackListItem `json:"BlackList"` //黑名单列表
}

type BlackListItem

type BlackListItem WhiteListItem

func (*BlackListItem) Contains

func (w *BlackListItem) Contains(ip string) bool

type WhiteListBaseConfigure

type WhiteListBaseConfigure struct {
	URL                string `json:"URL"`
	ActivelifeDuration int32  `json:"ActivelifeDuration"` //有效期限,小时
	BasicAccount       string `json:"BasicAccount"`
	BasicPassword      string `json:"BasicPassword"`
}

type WhiteListConfigure

type WhiteListConfigure struct {
	BaseConfigure WhiteListBaseConfigure `json:"BaseConfigure"`
	WhiteList     []WhiteListItem        `json:"WhiteList"` //白名单列表
}

type WhiteListItem

type WhiteListItem struct {
	IP            string     `json:"IP"`
	EffectiveTime string     `json:"Effectivetime"` //有效时间
	NetIP         net.IP     `json:"-"`
	Cidr          *net.IPNet `json:"-"`
}

func (*WhiteListItem) Contains

func (w *WhiteListItem) Contains(ip string) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL