Migrate to go-acme/lego.

This commit is contained in:
Ludovic Fernandez 2019-03-14 11:04:04 +01:00 committed by Traefiker Bot
parent 4a68d29ce2
commit 87da7520de
286 changed files with 14021 additions and 2501 deletions

View file

@ -1,7 +1,6 @@
package egoscale
import (
"fmt"
"net"
)
@ -15,9 +14,6 @@ type Zone struct {
DisplayText string `json:"displaytext,omitempty" doc:"the display text of the zone"`
DNS1 net.IP `json:"dns1,omitempty" doc:"the first DNS for the Zone"`
DNS2 net.IP `json:"dns2,omitempty" doc:"the second DNS for the Zone"`
Domain string `json:"domain,omitempty" doc:"Network domain name for the networks in the zone"`
DomainID *UUID `json:"domainid,omitempty" doc:"the UUID of the containing domain, null for public zones"`
DomainName string `json:"domainname,omitempty" doc:"the name of the containing domain, null for public zones"`
GuestCIDRAddress *CIDR `json:"guestcidraddress,omitempty" doc:"the guest CIDR address for the Zone"`
ID *UUID `json:"id,omitempty" doc:"Zone id"`
InternalDNS1 net.IP `json:"internaldns1,omitempty" doc:"the first internal DNS for the Zone"`
@ -37,18 +33,18 @@ type Zone struct {
// ListRequest builds the ListZones request
func (zone Zone) ListRequest() (ListCommand, error) {
req := &ListZones{
DomainID: zone.DomainID,
ID: zone.ID,
Name: zone.Name,
ID: zone.ID,
Name: zone.Name,
}
return req, nil
}
//go:generate go run generate/main.go -interface=Listable ListZones
// ListZones represents a query for zones
type ListZones struct {
Available *bool `json:"available,omitempty" doc:"true if you want to retrieve all available Zones. False if you only want to return the Zones from which you have at least one VM. Default is false."`
DomainID *UUID `json:"domainid,omitempty" doc:"the ID of the domain associated with the zone"`
ID *UUID `json:"id,omitempty" doc:"the ID of the zone"`
Keyword string `json:"keyword,omitempty" doc:"List by keyword"`
Name string `json:"name,omitempty" doc:"the name of the zone"`
@ -64,31 +60,3 @@ type ListZonesResponse struct {
Count int `json:"count"`
Zone []Zone `json:"zone"`
}
func (ListZones) response() interface{} {
return new(ListZonesResponse)
}
// SetPage sets the current page
func (ls *ListZones) SetPage(page int) {
ls.Page = page
}
// SetPageSize sets the page size
func (ls *ListZones) SetPageSize(pageSize int) {
ls.PageSize = pageSize
}
func (ListZones) each(resp interface{}, callback IterateItemFunc) {
zones, ok := resp.(*ListZonesResponse)
if !ok {
callback(nil, fmt.Errorf("wrong type. ListZonesResponse was expected, got %T", resp))
return
}
for i := range zones.Zone {
if !callback(&zones.Zone[i], nil) {
break
}
}
}