geoip

package
v1.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DownloadGeoIPDatabaseJob

type DownloadGeoIPDatabaseJob struct {
	GeoDBDownloader *geoip.DatabaseDownloader
}

DownloadGeoIPDatabaseJob is a background job for updating the GeoIP database

func (DownloadGeoIPDatabaseJob) Name

func (job DownloadGeoIPDatabaseJob) Name() string

Name returns the name of the job

func (DownloadGeoIPDatabaseJob) Run

func (job DownloadGeoIPDatabaseJob) Run()

Run runs the job and logs errors

type GeoIP

type GeoIP struct {
	GeoDB           *geoip.Database
	GeoDBDownloader *geoip.DatabaseDownloader
}

GeoIP defines the geoip module

func (*GeoIP) Register

func (module *GeoIP) Register(router *echo.Echo)

Register the endpoints on the router

func (*GeoIP) Start

func (module *GeoIP) Start()

Start is executed when the server starts

func (*GeoIP) Stop

func (module *GeoIP) Stop()

Stop is executed when the server stop

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL