Documentation
¶
Index ¶
- Variables
- func AppSetConfigToAppSet(c *configs.AppSetConfig, l loader) (i.AppSet, error)
- func AtomicDomainSetToIndexMatcher(atomicSet *configs.AtomicDomainSetConfig, l loader) (strmatcher.IndexMatcher, error)
- func AtomicIpSetToIPMatcher(c *configs.AtomicIPSetConfig, l loader) (*cgeo.IPMatcher, error)
- func GeoIpConfigToCidrs(config *configs.GeoIPConfig, l loader) ([]*cgeo.CIDR, error)
- func GeositeConfigToGeoDomains(c *configs.GeositeConfig, l loader) ([]*cgeo.Domain, error)
- func ToStrMatcher(d *configs.AppId) (strmatcher.Matcher, error)
- type AppSet
- type DomainSet
- type Geo
- func (g *Geo) AddDomain(name string, domain *commongeo.Domain) error
- func (g *Geo) MatchAppId(appId string, tag string) (bool, error)
- func (g *Geo) MatchDomain(domain string, tag string) (bool, error)
- func (g *Geo) MatchIP(ip net.IP, tag string) (bool, error)
- func (g *Geo) RemoveDomain(name string, domain *commongeo.Domain) error
- type GeoWrapper
- func (g *GeoWrapper) AddDomainSet(name string, set i.DomainSet)
- func (g *GeoWrapper) AddIPSet(name string, set i.IPSet)
- func (g *GeoWrapper) GetGeo() *Geo
- func (g *GeoWrapper) MatchAppId(appId string, tag string) (bool, error)
- func (g *GeoWrapper) MatchDomain(domain string, tag string) (bool, error)
- func (g *GeoWrapper) MatchIP(ip net.IP, tag string) (bool, error)
- func (g *GeoWrapper) UpdateGeo(geoConfig *configs.GeoConfig) error
- type GreatDomainSet
- type GreatIPSet
- type IndexMatcherToDomainSet
- type IpSet
- type NullDomainSet
- type StrmatcherToAppSet
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrSetNotFound = errors.New("set not found")
Functions ¶
func AppSetConfigToAppSet ¶
func AppSetConfigToAppSet(c *configs.AppSetConfig, l loader) (i.AppSet, error)
func AtomicDomainSetToIndexMatcher ¶
func AtomicDomainSetToIndexMatcher(atomicSet *configs.AtomicDomainSetConfig, l loader) (strmatcher.IndexMatcher, error)
func AtomicIpSetToIPMatcher ¶
func AtomicIpSetToIPMatcher(c *configs.AtomicIPSetConfig, l loader) (*cgeo.IPMatcher, error)
func GeoIpConfigToCidrs ¶
func GeoIpConfigToCidrs(config *configs.GeoIPConfig, l loader) ([]*cgeo.CIDR, error)
func GeositeConfigToGeoDomains ¶
func GeositeConfigToGeoDomains(c *configs.GeositeConfig, l loader) ([]*cgeo.Domain, error)
func ToStrMatcher ¶
func ToStrMatcher(d *configs.AppId) (strmatcher.Matcher, error)
Types ¶
type DomainSet ¶
type DomainSet struct {
// contains filtered or unexported fields
}
func NewDomainSet ¶
type Geo ¶
type Geo struct {
// domain
OppositeDomainTags map[string]string
DomainSets map[string]i.DomainSet
// ip
OppositeIpTags map[string]string
IpSets map[string]i.IPSet
// app
AppSets map[string]i.AppSet
}
type GeoWrapper ¶
func (*GeoWrapper) AddDomainSet ¶
func (g *GeoWrapper) AddDomainSet(name string, set i.DomainSet)
func (*GeoWrapper) GetGeo ¶
func (g *GeoWrapper) GetGeo() *Geo
func (*GeoWrapper) MatchAppId ¶
func (g *GeoWrapper) MatchAppId(appId string, tag string) (bool, error)
func (*GeoWrapper) MatchDomain ¶
func (g *GeoWrapper) MatchDomain(domain string, tag string) (bool, error)
type GreatDomainSet ¶
type GreatDomainSet struct {
// contains filtered or unexported fields
}
func NewGreatDomainSet ¶
func NewGreatDomainSet(im []string, es []string, geo i.GeoHelper) *GreatDomainSet
func (*GreatDomainSet) Match ¶
func (d *GreatDomainSet) Match(domain string) bool
type GreatIPSet ¶
type GreatIPSet struct {
InMatchers ipSets
ExMatcher ipSets
}
func NewGreatIPSet ¶
func NewGreatIPSet(im []i.IPSet, es []i.IPSet) *GreatIPSet
type IndexMatcherToDomainSet ¶
type IndexMatcherToDomainSet struct {
strmatcher.IndexMatcher
// contains filtered or unexported fields
}
func (*IndexMatcherToDomainSet) Match ¶
func (i *IndexMatcherToDomainSet) Match(domain string) bool
type NullDomainSet ¶
type NullDomainSet struct{}
func (*NullDomainSet) Match ¶
func (d *NullDomainSet) Match(domain string) bool
type StrmatcherToAppSet ¶
type StrmatcherToAppSet struct {
strmatcher.IndexMatcher
}
func (*StrmatcherToAppSet) Match ¶
func (m *StrmatcherToAppSet) Match(appId string) bool
Click to show internal directories.
Click to hide internal directories.