Documentation
¶
Index ¶
- Constants
- Variables
- func GetAccessLogByIp(accessLogs []*waf.WafAccessLogDto)
- func GetAccessLogMapByIp(accessLogs []*waf.WafAccessLogMapDto)
- func GetClientIp() (string, error)
- func GetIpAddr(ips []string) map[string]ResultQQwry
- func GetOnline() ([]byte, error)
- func GetServerIp(serverIpUrl string) string
- func InitIP()
- type QQwry
- type Response
- type ResultQQwry
Constants ¶
View Source
const ( // IndexLen 索引长度 IndexLen = 7 // RedirectMode1 国家的类型, 指向另一个指向 RedirectMode1 = 0x01 // RedirectMode2 国家的类型, 指向一个指向 RedirectMode2 = 0x02 )
Variables ¶
View Source
var IPData fileData
IPData IP库的数据
View Source
var Service_IP string
Functions ¶
func GetAccessLogByIp ¶
func GetAccessLogByIp(accessLogs []*waf.WafAccessLogDto)
func GetAccessLogMapByIp ¶
func GetAccessLogMapByIp(accessLogs []*waf.WafAccessLogMapDto)
func GetClientIp ¶
func GetIpAddr ¶
func GetIpAddr(ips []string) map[string]ResultQQwry
func GetServerIp ¶
Types ¶
type QQwry ¶
type QQwry struct { Data *fileData Offset int64 }
QQwry 纯真ip库
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
Response 向客户端返回数据的
type ResultQQwry ¶
type ResultQQwry struct { IP string `json:"ip"` Country string `json:"country"` Area string `json:"area"` }
ResultQQwry 归属地信息
func GetOnlyIpAddr ¶
func GetOnlyIpAddr(ip string) ResultQQwry
Click to show internal directories.
Click to hide internal directories.