Documentation
¶
Index ¶
Constants ¶
View Source
const ErrInvalidIP = "Invalid ip input"
ErrInvalidIP error for invalid ip input
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPServer ¶
type HTTPServer struct {
// contains filtered or unexported fields
}
HTTPServer to serve endpoint
func NewHTTPServer ¶
func NewHTTPServer(sugar *zap.SugaredLogger, dataDir string, host string) (*HTTPServer, error)
NewHTTPServer return an instance of HTTPServer
type Locator ¶
type Locator struct {
// contains filtered or unexported fields
}
Locator is a resolver that query data of IP from MaxMind's GeoLite2 database.
func NewLocator ¶
func NewLocator(sugar *zap.SugaredLogger, dataDir string) (*Locator, error)
NewLocator returns an instance of ipLocator.
Click to show internal directories.
Click to hide internal directories.