model

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Forbidden     = int64(1)
	Allow         = int64(2)
	Formal        = int64(3)
	Pay           = int64(4)
	AllowDown     = int64(1)
	ForbiddenDown = int64(0)

	AuthOK    = 1
	AuthNotOK = 0
)

auth const

Variables

View Source
var (
	PlayAuth = map[int64]string{
		Forbidden: "play_forbidden",
		Allow:     "play_allown",
		Formal:    "play_formal_member",
		Pay:       "play_pay_member",
	}

	DownAuth = map[int64]string{
		ForbiddenDown: "down_forbidden",
		AllowDown:     "down_allown",
	}
)

for prom

Functions

This section is empty.

Types

type AnonymousIP

type AnonymousIP struct {
	IsAnonymous       bool `json:"is_anonymous" maxminddb:"is_anonymous"`
	IsAnonymousVPN    bool `json:"is_anonymous_vpn" maxminddb:"is_anonymous_vpn"`
	IsHostingProvider bool `json:"is_hosting_provider" maxminddb:"is_hosting_provider"`
	IsPublicProxy     bool `json:"is_public_proxy" maxminddb:"is_public_proxy"`
	IsTorExitNode     bool `json:"is_tor_exit_node" maxminddb:"is_tor_exit_node"`
}

AnonymousIP IP database.

type Archive

type Archive struct {
	Aid int64
	Mid int64
	IP  string
	CIP string
}

Archive for Archive

type ArgIP

type ArgIP struct {
	IP string
}

ArgIP for Zone、Info、InfoComplete、Info2

type ArgPids

type ArgPids struct {
	Pids, IP, CIP string
}

ArgPids for PIDs

type Auth

type Auth struct {
	Play int64 `json:"play"`
	Down int64 `json:"down"`
}

Auth for auth result

type Group

type Group struct {
	Gid int64
	Mid int64
	IP  string
	CIP string
}

Group for group

type IP

type IP struct {
	Addr     string  `json:"addr"`
	Country  string  `json:"country"`
	Province string  `json:"province"`
	City     string  `json:"city"`
	ISP      string  `json:"isp"`
	ZoneID   []int64 `json:"zone_id"`
}

IP dont' use this, will del soon. use InfoComplete.

type Info

type Info struct {
	Addr        string  `json:"addr"`
	Country     string  `json:"country"`
	Province    string  `json:"province"`
	City        string  `json:"city"`
	ISP         string  `json:"isp"`
	Latitude    float64 `json:"latitude"`
	Longitude   float64 `json:"longitude"`
	ZoneID      int64   `json:"zoneId"`
	CountryCode int     `json:"country_code"`
}

Info ipinfo with the smallest zone_id.

type InfoComplete

type InfoComplete struct {
	Addr        string  `json:"addr"`
	Country     string  `json:"country"`
	Province    string  `json:"province"`
	City        string  `json:"city"`
	ISP         string  `json:"isp"`
	Latitude    float64 `json:"latitude"`
	Longitude   float64 `json:"longitude"`
	ZoneID      []int64 `json:"zone_id"`
	CountryCode int     `json:"country_code"`
}

InfoComplete ipinfo with all zone_id.

type TmpInfo

type TmpInfo struct {
	Addr     string `json:"addr"`
	ZoneID   int64  `json:"zoneId"`
	Country  string `json:"country"`
	Province string `json:"province"`
	City     string `json:"city"`
}

TmpInfo old api will del soon

type Version

type Version struct {
	UpdateTimeV4 string `json:"ipv4_flagship_ipdb_update_time"`
	NewestV4     string `json:""ipv4_flagship_ipdb_newest_url`
	StableV4     string `json:"ipv4_flagship_ipdb_stable_url"`
	UpdateTimeV6 string `json:"ipv6_flagship_ipdb_update_time"`
	NewestV6     string `json:""ipv6_flagship_ipdb_newest_url`
	StableV6     string `json:"ipv6_flagship_ipdb_stable_url"`
}

Version for check ip library.

Jump to

Keyboard shortcuts

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