add func
This commit is contained in:
parent
6c69e9871f
commit
99a0f794cb
@ -12,15 +12,18 @@ import (
|
|||||||
|
|
||||||
// AWSClient -
|
// AWSClient -
|
||||||
type AWSClient struct {
|
type AWSClient struct {
|
||||||
Session *session.Session
|
Session *session.Session
|
||||||
Config *aws.Config
|
Config *aws.Config
|
||||||
Services struct {
|
R53 *route53.Route53
|
||||||
R53 *route53.Route53
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var client *AWSClient
|
var client *AWSClient
|
||||||
|
|
||||||
|
// Error messages
|
||||||
|
var (
|
||||||
|
ErrNoClient = errors.New("client not init")
|
||||||
|
)
|
||||||
|
|
||||||
// NewAWS -
|
// NewAWS -
|
||||||
func NewAWS() error {
|
func NewAWS() error {
|
||||||
conf := config.GetConfig()
|
conf := config.GetConfig()
|
||||||
@ -41,6 +44,19 @@ func NewAWS() error {
|
|||||||
client = &AWSClient{}
|
client = &AWSClient{}
|
||||||
client.Session = sess
|
client.Session = sess
|
||||||
client.Config = awsConf
|
client.Config = awsConf
|
||||||
|
client.R53 = route53.New(client.Session)
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ZoneData -
|
||||||
|
type ZoneData struct {
|
||||||
|
ID *string
|
||||||
|
Name string
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryDomain -
|
||||||
|
func QueryDomain() (*ZoneData, error) {
|
||||||
|
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user