| 1 |
package dns |
| 2 |
|
| 3 |
import ( |
| 4 |
"log" |
| 5 |
|
| 6 |
"github.com/denverdino/aliyungo/common" |
| 7 |
) |
| 8 |
|
| 9 |
type DomainType struct { |
| 10 |
DomainId string |
| 11 |
DomainName string |
| 12 |
AliDomain bool |
| 13 |
GroupId string |
| 14 |
GroupName string |
| 15 |
InstanceId string |
| 16 |
VersionCode string |
| 17 |
PunyCode string |
| 18 |
DnsServers struct { |
| 19 |
DnsServer []string |
| 20 |
} |
| 21 |
} |
| 22 |
|
| 23 |
type DescribeDomainInfoArgs struct { |
| 24 |
DomainName string |
| 25 |
} |
| 26 |
|
| 27 |
type DescribeDomainInfoResponse struct { |
| 28 |
response common.Response |
| 29 |
DomainType |
| 30 |
} |
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
func (client *Client) DescribeDomainInfo(args *DescribeDomainInfoArgs) (domain DomainType, err error) { |
| 36 |
action := "DescribeDomainInfo" |
| 37 |
response := &DescribeDomainInfoResponse{} |
| 38 |
err = client.Invoke(action, args, response) |
| 39 |
|
| 40 |
if err != nil { |
| 41 |
log.Printf("%s error, %v", action, err) |
| 42 |
return DomainType{}, err |
| 43 |
} |
| 44 |
|
| 45 |
return response.DomainType, nil |
| 46 |
} |