opentofu/vendor/github.com/sethvargo/go-fastly/ip.go
Clint 46f3a17b5b provider/fastly: Add Gzip rule support (#6247)
* vendor: Update go-fastly

* provider/fastly: Add basic Gzip support

* add flattengzip tests
2016-04-20 13:43:54 -05:00

19 lines
445 B
Go

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
}