ipsb

package
v0.0.0-...-3d4fdec Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package ipsb get ip information from https://ip.sb/

Index

Constants

View Source
const (
	// IpSbApiUrl https://api.ip.sb
	IpSbApiUrl = "https://api.ip.sb"
)

Variables

This section is empty.

Functions

func JsonIp

func JsonIp(ctx context.Context) (string, error)

JsonIp https://api.ip.sb/jsonip

Types

type GeoIpRes

type GeoIpRes struct {
	Organization    string  `json:"organization"`
	Longitude       float64 `json:"longitude"`
	City            string  `json:"city"`
	Timezone        string  `json:"timezone"`
	Isp             string  `json:"isp"`
	Offset          int64   `json:"offset"`
	Region          string  `json:"region"`
	Asn             int64   `json:"asn"`
	AsnOrganization string  `json:"asn_organization"`
	Country         string  `json:"country"`
	Ip              string  `json:"ip"`
	Latitude        float64 `json:"latitude"`
	ContinentCode   string  `json:"continent_code"`
	CountryCode     string  `json:"country_code"`
	RegionCode      string  `json:"region_code"`
}

func GeoIp

func GeoIp(ctx context.Context) (*GeoIpRes, error)

GeoIp https://api.ip.sb/geoip

type JsonIpRes

type JsonIpRes struct {
	Ip string `json:"ip"`
}

Jump to

Keyboard shortcuts

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