Documentation
¶
Index ¶
- Constants
- Variables
- func FileURLToString(url string) (string, error)
- func LoadFileURLToJSON(url string, to interface{}) error
- func LoadTextURLToRange(url string) ([]string, error)
- type Alibaba
- type Aws
- type Azure
- type Cloudflare
- type Digitalocean
- type Fastly
- type FastlyIPRangeResponse
- type Gcp
- type IPCat
- type IPRange
- type IPRangeSource
- type Ibm
- type Linode
- type Oracle
- type Ovh
- type Scaleway
- type Tencent
- type Ucloud
- type Vercel
Constants ¶
View Source
const LinodeFileURL = "https://raw.githubusercontent.com/devanshbatham/ip2cloud/main/data/linode.txt"
Variables ¶
View Source
var AllSources = []IPRangeSource{ Alibaba{}, Aws{}, Azure{}, Cloudflare{}, Digitalocean{}, Fastly{}, Gcp{}, Ibm{}, Linode{}, Oracle{}, Ovh{}, Scaleway{}, Tencent{}, Ucloud{}, Vercel{}, }
Functions ¶
func FileURLToString ¶
func LoadFileURLToJSON ¶
func LoadTextURLToRange ¶
Types ¶
type Cloudflare ¶
type Cloudflare struct{}
func (Cloudflare) GetIPRanges ¶
func (a Cloudflare) GetIPRanges() []*IPRange
type Digitalocean ¶
type Digitalocean struct{}
func (Digitalocean) GetIPRanges ¶
func (a Digitalocean) GetIPRanges() []*IPRange
type FastlyIPRangeResponse ¶
type IPRange ¶
type IPRange struct { Network *net.IPNet `json:"n"` Cat IPCat `json:"c"` Provider provider.Provider `json:"p"` }
func GetAllIPRanges ¶
func GetAllIPRanges(sources []IPRangeSource) []*IPRange
type IPRangeSource ¶
type IPRangeSource interface {
GetIPRanges() []*IPRange
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.