Documentation ¶
Overview ¶
Package iplist 根据 IP 对请求进行过滤
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPList ¶
type IPList struct {
// contains filtered or unexported fields
}
func New ¶
New 声明 IPList 对象
white 和 black 分别表示白名单和黑名单的值,格式可参考 IPList.WithWhite。 如果同时存在于黑名单和白名单,则白名单优先于黑名单。
func (*IPList) Middleware ¶
func (l *IPList) Middleware(next web.HandlerFunc) web.HandlerFunc
Click to show internal directories.
Click to hide internal directories.