ip2region

package
v0.6.7 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppName = "ip2region"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IPInfo

type IPInfo struct {
	CityID   int64  `bson:"city_id" json:"city_id"`
	Country  string `bson:"country" json:"country"`
	Region   string `bson:"region" json:"region"`
	Province string `bson:"province" json:"province"`
	City     string `bson:"city" json:"city"`
	ISP      string `bson:"isp" json:"isp"`
}

IPInfo todo

func NewDefaultIPInfo

func NewDefaultIPInfo() *IPInfo

NewDefaultIPInfo todo

func (IPInfo) String

func (ip IPInfo) String() string

type Service

type Service interface {
	UpdateDBFile(*UpdateDBFileRequest) error
	LookupIP(ip string) (*IPInfo, error)
}

Service todo

type UpdateDBFileRequest

type UpdateDBFileRequest struct {
	*session.Session
	// contains filtered or unexported fields
}

UpdateDBFileRequest 上传文件请求

func NewUploadFileRequestFromHTTP

func NewUploadFileRequestFromHTTP(r *http.Request) (*UpdateDBFileRequest, error)

NewUploadFileRequestFromHTTP todo

func (*UpdateDBFileRequest) ReadCloser

func (req *UpdateDBFileRequest) ReadCloser() io.ReadCloser

ReadCloser todo

func (*UpdateDBFileRequest) Validate

func (req *UpdateDBFileRequest) Validate() error

Validate 校验参数

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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