goip_czdb

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BTREE  = "BTREE"
	MEMORY = "MEMORY" // 内存
)
View Source
const (
	Version = "1.0.0"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AnalyseResult

type AnalyseResult struct {
	Ip       string `json:"ip"`       // IP
	Country  string `json:"country"`  // 国家
	Province string `json:"province"` // 省份
	City     string `json:"city"`     // 城市
	Isp      string `json:"isp"`      // 运营商
}

type Client

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

func NewClient

func NewClient(opts ...Option) (*Client, error)

func (*Client) Analyse

func (c *Client) Analyse(ip string) (resp AnalyseResult)

func (*Client) Close

func (c *Client) Close()

type Option

type Option func(*Client)

func WithV4Config

func WithV4Config(dbFile string, queryType string, key string) Option

func WithV6Config

func WithV6Config(dbFile string, queryType string, key string) Option

Jump to

Keyboard shortcuts

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