diff --git a/docs/_includes/matrix.html b/docs/_includes/matrix.html index 869457694..3950cb430 100644 --- a/docs/_includes/matrix.html +++ b/docs/_includes/matrix.html @@ -813,6 +813,13 @@ + + + + + AZURE_ALIAS + + @@ -833,16 +840,23 @@ + + + + + - AZURE_ALIAS + DS + - - + + + diff --git a/vendor/github.com/prasmussen/gandi-api/domain/structs.go b/vendor/github.com/prasmussen/gandi-api/domain/structs.go new file mode 100644 index 000000000..103fbee22 --- /dev/null +++ b/vendor/github.com/prasmussen/gandi-api/domain/structs.go @@ -0,0 +1,57 @@ +package domain + +import ( + "time" +) + +type DomainInfoBase struct { + AuthInfo string + DateCreated time.Time + DateRegistryCreation time.Time + DateRegistryEnd time.Time + DateUpdated time.Time + Fqdn string + Id int64 + Status []string + Tld string +} + +type DomainInfoExtra struct { + DateDelete time.Time + DateHoldBegin time.Time + DateHoldEnd time.Time + DatePendingDeleteEnd time.Time + DateRenewBegin time.Time + DateRestoreEnd time.Time + Nameservers []string + Services []string + ZoneId int64 + Autorenew *AutorenewInfo + Contacts *ContactInfo +} + +type DomainInfo struct { + *DomainInfoBase + *DomainInfoExtra +} + +type AutorenewInfo struct { + Active bool + Contact string + Id int64 + ProductId int64 + ProductTypeId int64 +} + +type ContactInfo struct { + Admin *ContactDetails + Bill *ContactDetails + Owner *ContactDetails + Reseller *ContactDetails + Tech *ContactDetails +} + +type ContactDetails struct { + Handle string + Id int64 +} diff --git a/vendor/github.com/prasmussen/gandi-api/domain/util.go b/vendor/github.com/prasmussen/gandi-api/domain/util.go new file mode 100644 index 000000000..b7ff3532e --- /dev/null +++ b/vendor/github.com/prasmussen/gandi-api/domain/util.go @@ -0,0 +1,69 @@ +package domain + +import ( + "github.com/prasmussen/gandi-api/util" +) + +func ToDomainInfoBase(res map[string]interface{}) *DomainInfoBase { + return &DomainInfoBase{ + AuthInfo: util.ToString(res["authinfo"]), + DateCreated: util.ToTime(res["date_created"]), + DateRegistryCreation: util.ToTime(res["date_registry_creation"]), + DateRegistryEnd: util.ToTime(res["date_registry_end"]), + DateUpdated: util.ToTime(res["date_updated"]), + Fqdn: util.ToString(res["fqdn"]), + Id: util.ToInt64(res["id"]), + Status: util.ToStringSlice(util.ToInterfaceSlice(res["status"])), + Tld: util.ToString(res["tld"]), + } +} + +func ToDomainInfoExtra(res map[string]interface{}) *DomainInfoExtra { + return &DomainInfoExtra{ + DateDelete: util.ToTime(res["date_delete"]), + DateHoldBegin: util.ToTime(res["date_hold_begin"]), + DateHoldEnd: util.ToTime(res["date_hold_end"]), + DatePendingDeleteEnd: util.ToTime(res["date_pending_delete_end"]), + DateRenewBegin: util.ToTime(res["date_renew_begin"]), + DateRestoreEnd: util.ToTime(res["date_restore_end"]), + Nameservers: util.ToStringSlice(util.ToInterfaceSlice(res["nameservers"])), + Services: util.ToStringSlice(util.ToInterfaceSlice(res["services"])), + ZoneId: util.ToInt64(res["zone_id"]), + Autorenew: toAutorenewInfo(util.ToXmlrpcStruct(res["autorenew"])), + Contacts: toContactInfo(util.ToXmlrpcStruct(res["contacts"])), + } +} + +func ToDomainInfo(res map[string]interface{}) *DomainInfo { + return &DomainInfo{ + ToDomainInfoBase(res), + ToDomainInfoExtra(res), + } +} + +func toAutorenewInfo(res map[string]interface{}) *AutorenewInfo { + return &AutorenewInfo{ + Active: util.ToBool(res["active"]), + Contact: util.ToString(res["contact"]), + Id: util.ToInt64(res["id"]), + ProductId: util.ToInt64(res["product_id"]), + ProductTypeId: util.ToInt64(res["product_type_id"]), + } +} + +func toContactInfo(res map[string]interface{}) *ContactInfo { + return &ContactInfo{ + Admin: toContactDetails(util.ToXmlrpcStruct(res["admin"])), + Bill: toContactDetails(util.ToXmlrpcStruct(res["bill"])), + Owner: toContactDetails(util.ToXmlrpcStruct(res["owner"])), + Reseller: toContactDetails(util.ToXmlrpcStruct(res["reseller"])), + Tech: toContactDetails(util.ToXmlrpcStruct(res["tech"])), + } +} + +func toContactDetails(res map[string]interface{}) *ContactDetails { + return &ContactDetails{ + Handle: util.ToString(res["handle"]), + Id: util.ToInt64(res["id"]), + } +} diff --git a/vendor/github.com/prasmussen/gandi-api/domain/zone/structs.go b/vendor/github.com/prasmussen/gandi-api/domain/zone/structs.go new file mode 100644 index 000000000..1a53345d5 --- /dev/null +++ b/vendor/github.com/prasmussen/gandi-api/domain/zone/structs.go @@ -0,0 +1,24 @@ +package zone + +import ( + "time" +) + +type ZoneInfoBase struct { + DateUpdated time.Time + Id int64 + Name string + Public bool + Version int64 +} + +type ZoneInfoExtra struct { + Domains int64 + Owner string + Versions []int64 +} + +type ZoneInfo struct { + *ZoneInfoBase + *ZoneInfoExtra +} diff --git a/vendor/github.com/prasmussen/gandi-api/domain/zone/util.go b/vendor/github.com/prasmussen/gandi-api/domain/zone/util.go new file mode 100644 index 000000000..7d5f21728 --- /dev/null +++ b/vendor/github.com/prasmussen/gandi-api/domain/zone/util.go @@ -0,0 +1,30 @@ +package zone + +import ( + "github.com/prasmussen/gandi-api/util" +) + +func ToZoneInfoBase(res map[string]interface{}) *ZoneInfoBase { + return &ZoneInfoBase{ + DateUpdated: util.ToTime(res["date_updated"]), + Id: util.ToInt64(res["id"]), + Name: util.ToString(res["name"]), + Public: util.ToBool(res["public"]), + Version: util.ToInt64(res["version"]), + } +} + +func ToZoneInfoExtra(res map[string]interface{}) *ZoneInfoExtra { + return &ZoneInfoExtra{ + Domains: util.ToInt64(res["domains"]), + Owner: util.ToString(res["owner"]), + Versions: util.ToIntSlice(util.ToInterfaceSlice(res["versions"])), + } +} + +func ToZoneInfo(res map[string]interface{}) *ZoneInfo { + return &ZoneInfo{ + ToZoneInfoBase(res), + ToZoneInfoExtra(res), + } +} diff --git a/vendor/github.com/prasmussen/gandi-api/domain/zone/version/structs.go b/vendor/github.com/prasmussen/gandi-api/domain/zone/version/structs.go new file mode 100644 index 000000000..f0e6d0cf1 --- /dev/null +++ b/vendor/github.com/prasmussen/gandi-api/domain/zone/version/structs.go @@ -0,0 +1,10 @@ +package version + +import ( + "time" +) + +type VersionInfo struct { + Id int64 + DateCreated time.Time +} diff --git a/vendor/github.com/prasmussen/gandi-api/domain/zone/version/util.go b/vendor/github.com/prasmussen/gandi-api/domain/zone/version/util.go new file mode 100644 index 000000000..d6482f1f5 --- /dev/null +++ b/vendor/github.com/prasmussen/gandi-api/domain/zone/version/util.go @@ -0,0 +1,12 @@ +package version + +import ( + "github.com/prasmussen/gandi-api/util" +) + +func ToVersionInfo(res map[string]interface{}) *VersionInfo { + return &VersionInfo{ + Id: util.ToInt64(res["id"]), + DateCreated: util.ToTime(res["date_created"]), + } +} diff --git a/vendor/github.com/prasmussen/gandi-api/operation/structs.go b/vendor/github.com/prasmussen/gandi-api/operation/structs.go new file mode 100644 index 000000000..baf30f8c6 --- /dev/null +++ b/vendor/github.com/prasmussen/gandi-api/operation/structs.go @@ -0,0 +1,29 @@ +package operation + +import ( + "time" +) + +type OperationInfo struct { + DateCreated time.Time + DateStart time.Time + DateUpdated time.Time + Eta string + Id int64 + LastError string + SessionId int64 + Source string + Step string + Type string + Params map[string]interface{} + OperationDetails *OperationDetails +} + +type OperationDetails struct { + Id string + Label string + ProductAction string + ProductName string + ProductType string + Quantity int64 +} diff --git a/vendor/github.com/prasmussen/gandi-api/operation/util.go b/vendor/github.com/prasmussen/gandi-api/operation/util.go new file mode 100644 index 000000000..572444a03 --- /dev/null +++ b/vendor/github.com/prasmussen/gandi-api/operation/util.go @@ -0,0 +1,33 @@ +package operation + +import ( + "github.com/prasmussen/gandi-api/util" +) + +func ToOperationInfo(res map[string]interface{}) *OperationInfo { + return &OperationInfo{ + DateCreated: util.ToTime(res["date_created"]), + DateStart: util.ToTime(res["date_start"]), + DateUpdated: util.ToTime(res["date_updated"]), + Eta: util.ToString(res["eta"]), + Id: util.ToInt64(res["id"]), + LastError: util.ToString(res["last_error"]), + SessionId: util.ToInt64(res["session_id"]), + Source: util.ToString(res["source"]), + Step: util.ToString(res["step"]), + Type: util.ToString(res["type"]), + OperationDetails: ToOperationDetails(util.ToXmlrpcStruct(res["infos"])), + Params: util.ToXmlrpcStruct(res["params"]), + } +} + +func ToOperationDetails(res map[string]interface{}) *OperationDetails { + return &OperationDetails{ + Id: util.ToString(res["id"]), + Label: util.ToString(res["label"]), + ProductAction: util.ToString(res["product_action"]), + ProductName: util.ToString(res["product_name"]), + ProductType: util.ToString(res["product_type"]), + Quantity: util.ToInt64(res["quantity"]), + } +}