Documentation ¶
Index ¶
- func RemoveDuplicatesAndEmpty(a []string) (ret []string)
- type HeadIndex
- type Service
- func (s *Service) Anonym(ipStr string) (res *model.AnonymousIP, err error)
- func (s *Service) Archive2(c context.Context, aid, mid int64, ipaddr, cdnip string) (res *model.Auth, err error)
- func (s *Service) Auth(c context.Context, aid, mid int64, ipaddr, cdnip string) (ret int64, err error)
- func (s *Service) Auth2(c context.Context, aid int64, ipaddr, cdnip string) (ret, retdown int64, err error)
- func (s *Service) AuthGID(c context.Context, gid, mid int64, ipaddr, cdnip string) (res *model.Auth)
- func (s *Service) AuthGID2(c context.Context, gid int64, ipaddr, cdnip string) (ret, retdown int64)
- func (s *Service) AuthGIDs(c context.Context, gids []int64, mid int64, ipaddr, cdnip string) (res map[int64]*model.Auth)
- func (s *Service) AuthPIDs(c context.Context, pidStr, ipaddr, cdnip string) (res map[int64]*model.Auth, err error)
- func (s *Service) Close()
- func (s *Service) Info(c context.Context, addr string) (res *model.Info, err error)
- func (s *Service) InfoComplete(c context.Context, addr string) (res *model.InfoComplete, err error)
- func (s *Service) Infos(c context.Context, addrs []string) (res map[string]*model.Info, err error)
- func (s *Service) InfosComplete(c context.Context, ipsStr []string) (res map[string]*model.InfoComplete, err error)
- func (s *Service) LoadPolicy() (err error)
- func (s *Service) NewAnonym(path string) (reader *maxminddb.Reader, err error)
- func (s *Service) PgcZone(c context.Context, zoneIDs []int64) (res map[string][]int64, err error)
- func (s *Service) Ping(c context.Context) (err error)
- func (s *Service) TmpInfo(addr string) (ti *model.TmpInfo, err error)
- func (s *Service) TmpInfo2(c context.Context, addr string) (zone *xip.Zone, err error)
- func (s *Service) TmpInfos(c context.Context, addrs ...string) (zone []*xip.Zone, err error)
- type ZoneInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RemoveDuplicatesAndEmpty ¶
RemoveDuplicatesAndEmpty string去重 去空
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service define resource service
func (*Service) Anonym ¶
func (s *Service) Anonym(ipStr string) (res *model.AnonymousIP, err error)
Anonym .
func (*Service) Archive2 ¶
func (s *Service) Archive2(c context.Context, aid, mid int64, ipaddr, cdnip string) (res *model.Auth, err error)
Archive2 get auth by aid and ipaddr & check mid.
func (*Service) Auth ¶
func (s *Service) Auth(c context.Context, aid, mid int64, ipaddr, cdnip string) (ret int64, err error)
Auth get auth by aid and ipaddr & check mid.
func (*Service) Auth2 ¶
func (s *Service) Auth2(c context.Context, aid int64, ipaddr, cdnip string) (ret, retdown int64, err error)
Auth2 get auth by aid and ipaddr.
func (*Service) AuthGID ¶
func (s *Service) AuthGID(c context.Context, gid, mid int64, ipaddr, cdnip string) (res *model.Auth)
AuthGID auth by group_id and ipaddr(or cdnip) & check mid.
func (*Service) AuthGIDs ¶
func (s *Service) AuthGIDs(c context.Context, gids []int64, mid int64, ipaddr, cdnip string) (res map[int64]*model.Auth)
AuthGIDs auth by group_id and ipaddr(or cdnip) & check mid.
func (*Service) AuthPIDs ¶
func (s *Service) AuthPIDs(c context.Context, pidStr, ipaddr, cdnip string) (res map[int64]*model.Auth, err error)
AuthPIDs check by policy_ids and ipaddr
func (*Service) InfoComplete ¶
InfoComplete find get whole ip info.
func (*Service) InfosComplete ¶
func (s *Service) InfosComplete(c context.Context, ipsStr []string) (res map[string]*model.InfoComplete, err error)
InfosComplete finds get whole ips infos.
func (*Service) LoadPolicy ¶
LoadPolicy locad policy from db
Click to show internal directories.
Click to hide internal directories.