Documentation ¶
Index ¶
- type Domain
- type DomainType
- type Domains
- func (d *Domains) Add(domain string, domainType DomainType, userdata UserData) error
- func (d *Domains) Find(domain string) *Domain
- func (d *Domains) Remove(f func(domain string, domainType DomainType, uesrdata UserData) bool)
- func (d *Domains) RemoveDomain(domain string, domainType DomainType, ...) error
- func (d *Domains) RemoveType(domainType DomainType, ...)
- type UserData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DomainType ¶
type DomainType int
const ( Base DomainType = iota //基本匹配,必须完全一致才匹配 Suffix // 后缀匹配 , abc.com 匹配 www.abc.com 、123.abc.com、123.456.abc.com 及 abc.com Pan // 泛解析 ,处理 * 及 ? Regex //正则,正则表达式 )
type Domains ¶ added in v0.4.4
type Domains struct {
// contains filtered or unexported fields
}
func NewDomains ¶
func (*Domains) Add ¶ added in v0.4.4
func (d *Domains) Add(domain string, domainType DomainType, userdata UserData) error
追加新的域名
func (*Domains) Remove ¶ added in v0.4.4
func (d *Domains) Remove(f func(domain string, domainType DomainType, uesrdata UserData) bool)
移除域名 使用过滤函数来识别需要删除的内容,返回 true 时表示需要删除
func (*Domains) RemoveDomain ¶ added in v0.4.4
func (d *Domains) RemoveDomain(domain string, domainType DomainType, f func(domain string, domainType DomainType, uesrdata UserData) bool) error
func (*Domains) RemoveType ¶ added in v0.4.4
func (d *Domains) RemoveType(domainType DomainType, f func(domain string, domainType DomainType, uesrdata UserData) bool)
移除域名 使用过滤函数来识别需要删除的内容,返回 true 时表示需要删除
Click to show internal directories.
Click to hide internal directories.