iploc

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package iploc implement ipdb.

Index

Constants

View Source
const (
	FileSeparator = " "

	ErrInvalidIP = "Invalid IP address"
	ErrInvalidDB = "Invalid database file"
)

Variables

This section is empty.

Functions

func InitLog

func InitLog()

Types

type DB

type DB interface {
	Get_all(ipaddress string) (ip2location.IP2Locationrecord, error)
}

type IPloc

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

func (*IPloc) Geo

func (iploc *IPloc) Geo(ip string) (*ipdb.IPdbRecord, error)

func (*IPloc) Init

func (iploc *IPloc) Init(dataDir string, config map[string]string)

func (*IPloc) SearchIsp

func (iploc *IPloc) SearchIsp(ip string) string

Jump to

Keyboard shortcuts

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