fastly

package
v0.0.0-...-6ac2e72 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ShortName   = "fastly"
	FullName    = "Fastly"
	HostType    = "cdn"
	SourceURL   = "https://www.fastly.com/documentation/reference/api/utils/public-ip-list/"
	DownloadURL = "https://api.fastly.com/public-ip-list"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Doc

type Doc struct {
	IPv4Prefixes []netip.Prefix `json:"addresses" yaml:"addresses"`
	IPv6Prefixes []netip.Prefix `json:"ipv6_addresses" yaml:"ipv6_addresses"`
}

func ProcessData

func ProcessData(data []byte) (doc Doc, err error)

type Fastly

type Fastly struct {
	Client      *retryablehttp.Client
	DownloadURL string
}

func New

func New() Fastly

func (*Fastly) Fetch

func (f *Fastly) Fetch() (doc Doc, err error)

func (*Fastly) FetchData

func (f *Fastly) FetchData() (data []byte, headers http.Header, status int, err error)

type RawDoc

type RawDoc struct {
	IPv4Addresses []string `json:"addresses"`
	IPv6Addresses []string `json:"ipv6_addresses"`
}

Jump to

Keyboard shortcuts

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