You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
terraform/vendor/github.com/sethvargo/go-fastly/ip.go

19 lines
445 B

package fastly
// IPAddrs is a sortable list of IP addresses returned by the Fastly API.
type IPAddrs []string
// IPs returns the list of public IP addresses for Fastly's network.
func (c *Client) IPs() (IPAddrs, error) {
resp, err := c.Get("/public-ip-list", nil)
if err != nil {
return nil, err
}
var m map[string][]string
if err := decodeJSON(&m, resp.Body); err != nil {
return nil, err
}
return IPAddrs(m["addresses"]), nil
}