Documentation
¶
Index ¶
Constants ¶
View Source
const ( DATA_DIR = "data/geoip" DB_NAME = "GeoLite2-City.mmdb" EDITION = "GeoLite2-City" DBREFRESH = "24h" VERBOSE_UPDATE = false LICENSE_KEY = "testing" ACCOUNT_ID = 123 )
View Source
const ( SERVICE_NAME = "GeoService" BLOCK_MEASUREMENT = "ip_block" TIME_LAYOUT = "Jul 13 15:20:54" )
Variables ¶
This section is empty.
Functions ¶
func NewGeoHandler ¶
Types ¶
type GeoHandler ¶
func (GeoHandler) GetPrefix ¶
func (gh GeoHandler) GetPrefix() string
func (GeoHandler) GetRoutes ¶
func (gh GeoHandler) GetRoutes() []models.Route
func (GeoHandler) GetService ¶
func (gh GeoHandler) GetService() models.Service
type GeoIPService ¶
type GeoIPService struct { Config *GeoIpConfig Updater *update.GeoIpUpdater InfluxDbWriter *influxwriter.InfluxDbWriter // contains filtered or unexported fields }
func (GeoIPService) GetName ¶
func (gs GeoIPService) GetName() (name string)
type GeoIpConfig ¶
type GeoIpConfig struct { AccountId int DatabaseDirectory string DatabaseName string EditionIDs []string LicenseKey string RefreshDuration time.Duration VerboseUpdate bool }
func InitGeoIpConfig ¶
func InitGeoIpConfig() (config *GeoIpConfig, err error)
Click to show internal directories.
Click to hide internal directories.