ip

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressQuery

type AddressQuery func(ip string) string

AddressQuery 查询 ip 实际地址

type AddressService

type AddressService interface {
	Query(ip string) string
}

func NewDefaultAddressService

func NewDefaultAddressService() AddressService

type BaiduIPAddrData

type BaiduIPAddrData struct {
	ExtendedLocation string `json:"ExtendedLocation,omitempty"`
	OriginQuery      string `json:"OriginQuery,omitempty"`
	AppInfo          string `json:"appinfo,omitempty"`
	DispType         int    `json:"disp_type,omitempty"`
	FetchKey         string `json:"fetchkey,omitempty"`
	Location         string `json:"location"`
	OrigIP           string `json:"origip,omitempty"`
	OrigIPQuery      string `json:"origipquery,omitempty"`
	ResourceID       string `json:"resourceid,omitempty"`
	RoleID           int    `json:"role_id,omitempty"`
	ShareImage       int    `json:"shareImage,omitempty"`
	ShowLikeShare    int    `json:"showLikeShare,omitempty"`
	ShowLamp         string `json:"showlamp,omitempty"`
	TitleCont        string `json:"titlecont,omitempty"`
	Tplt             string `json:"tplt,omitempty"`
}

type BaiduIPAddrResponse

type BaiduIPAddrResponse struct {
	Status       string            `json:"status"`
	T            string            `json:"t,omitempty"`
	SetCacheTime string            `json:"set_cache_time,omitempty"`
	Data         []BaiduIPAddrData `json:"data"`
}

Jump to

Keyboard shortcuts

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