geoip

package
v0.0.0-...-c2832fb Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2016 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const MD5URL = "http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.md5"
View Source
const URL = "http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz"

Variables

This section is empty.

Functions

func ImplicitPath

func ImplicitPath() string

Types

type GeoIP

type GeoIP struct {
	Path   string `short:"p" long:"path" description:"Path to maxmind GeoIP database (default config)"`
	Field  string `short:"f" long:"field" description:"Field containing an ip to calculate geo information from"`
	Strict bool   `short:"s" long:"strict" description:"Error out rather than ignore problems calculate the geoip info"`

	All bool `short:"a" long:"all" description:"Include all geo information"`
	// contains filtered or unexported fields
}

func NewGeoIP

func NewGeoIP() (*GeoIP, error)

func (*GeoIP) Description

func (g *GeoIP) Description() string

func (*GeoIP) Execute

func (g *GeoIP) Execute(args []string) error

func (*GeoIP) Filter

func (g *GeoIP) Filter(m *cypress.Message) (*cypress.Message, error)

func (*GeoIP) Filterer

func (g *GeoIP) Filterer() (cypress.Filterer, error)

func (*GeoIP) Open

func (g *GeoIP) Open() error

type Update

type Update struct {
	Path string `short:"p" long:"path" default:"~/.cypress/geoip.db" description:"Where to store the database"`
}

func (*Update) Execute

func (u *Update) Execute(args []string) error

Jump to

Keyboard shortcuts

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