1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00
Files
stackexchange-dnscontrol/vendor/github.com/exoscale/egoscale/instancegroups_response.go
Joel Margolis a57bf35788 EXOSCALE: Update exoscale/egoscale client to v0.23.0 (#664)
* Update Exoscale provider

* Update vendor folder for exoscale/egoscale v0.23.0

* Fix typos and SRV parsing

* Add . at the end of SRV records for exoscale
2020-02-27 23:06:12 -05:00

44 lines
1.0 KiB
Go

// code generated; DO NOT EDIT.
package egoscale
import "fmt"
// Response returns the struct to unmarshal
func (ListInstanceGroups) Response() interface{} {
return new(ListInstanceGroupsResponse)
}
// ListRequest returns itself
func (ls *ListInstanceGroups) ListRequest() (ListCommand, error) {
if ls == nil {
return nil, fmt.Errorf("%T cannot be nil", ls)
}
return ls, nil
}
// SetPage sets the current apge
func (ls *ListInstanceGroups) SetPage(page int) {
ls.Page = page
}
// SetPageSize sets the page size
func (ls *ListInstanceGroups) SetPageSize(pageSize int) {
ls.PageSize = pageSize
}
// Each triggers the callback for each, valid answer or any non 404 issue
func (ListInstanceGroups) Each(resp interface{}, callback IterateItemFunc) {
items, ok := resp.(*ListInstanceGroupsResponse)
if !ok {
callback(nil, fmt.Errorf("wrong type, ListInstanceGroupsResponse was expected, got %T", resp))
return
}
for i := range items.InstanceGroup {
if !callback(&items.InstanceGroup[i], nil) {
break
}
}
}