geoip

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Composite

type Composite struct {
	// contains filtered or unexported fields
}

Composite chain two geoip services

func NewComposite

func NewComposite(primary Service, next Service) *Composite

NewComposite creates a composite geoip service

func (*Composite) CountryAndCity

func (s *Composite) CountryAndCity(header http.Header, ipString string) (string, string, error)

CountryAndCity return country and city by http headers and remote ip address nolint: revive

type Service

type Service interface {
	// CountryAndCity return country and city by http headers and remote ip address
	// nolint: revive
	CountryAndCity(header http.Header, ipString string) (string, string, error)
}

Service interface for geo ip

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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