Documentation ¶
Index ¶
Constants ¶
View Source
const (
AppName = "ip2region"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IPInfo ¶
type IPInfo struct { Country string `bson:"country" json:"country"` Region string `bson:"region" json:"region"` Province string `bson:"province" json:"province"` City string `bson:"city" json:"city"` ISP string `bson:"isp" json:"isp"` }
IPInfo todo
func ParseIpInfoFromString ¶
中国|0|四川省|成都市|电信
type Ip2Region ¶
type Ip2Region struct { ioc.ObjectImpl // 功能开关, 开启后 需要读取DB文件, 在执行单元测试时很不方便 Enable bool `json:"enable" yaml:"enable" toml:"enable" env:"ENABLE"` // DB 文件路径 DBPath string `json:"db_path" yaml:"db_path" toml:"db_path" env:"DB_PATH"` // contains filtered or unexported fields }
type IpRegionSearcher ¶
func Get ¶
func Get() IpRegionSearcher
Click to show internal directories.
Click to hide internal directories.