Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // UseSentry whether ipd server use sentry or not UseSentry bool = true // SentryDSN sentry DSN SentryDSN string = "https://3d94eafaf06c4626aa6fec57a5e78176:4d1da97ba2e14289b34d0aa5e09ef49b@sentry.io/1200974" // Port ipd server port Port string = "6789" // IPChanelBuf chanel buffer size for FindIP go routine IPChanelBuf int = 200 // AuthKey used for authorization, should not be changed AuthKey string = "thisisaveryimportantkey" // APITimeOut ip api timeout APITimeOut time.Duration = time.Duration(3) * time.Second // BaiDuAK baidu ak key BaiDuAK string = "dXkvR03fdzCvUvfb69Ztnlr6UBMk7Azy" // BaiDuReferer baidu api referer BaiDuReferer string = "www.mygoipapi.com" // RequestOrder request order RequestOrder []string = []string{"ip2region", "chunzhen", "geolite2", "api"} // IP2RegionURL url to download ip2region.db file IP2RegionURL string = "https://github.com/lionsoul2014/ip2region/raw/master/data/ip2region.db" // Expiration cache expiration time Expiration time.Duration = time.Duration(10) * time.Minute // MaxEntry max entry size MaxEntry int = 1000 // bigcache cache client Cache *bigcache.BigCache // StoreES store ip information in elasticsearch or not StoreES bool = true // ESURL elasticsearch url ESURL string = "http://127.0.0.1:9200" // ESIndex elasticsearch index used to store the ip information ESIndex string = "ipinfo" //ESMapping ipinfo mapping ESMapping string = `` /* 578-byte string literal not displayed */ )
View Source
var GeoMap = map[string]Geo{}/* 219 elements not displayed */
GeoMap geo map
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.