1
0
Fork 0

DNS challenge Cloudflare auth zone

This commit is contained in:
Ludovic Fernandez 2018-10-15 09:40:02 +02:00 committed by Traefiker Bot
parent 0335f6fba9
commit 7c2409b5a7
18 changed files with 312 additions and 248 deletions

View file

@ -89,13 +89,17 @@ type ChangeInfo struct {
}
// NewClient Creates a new client of NIFCLOUD DNS
func NewClient(accessKey string, secretKey string) *Client {
func NewClient(accessKey string, secretKey string) (*Client, error) {
if len(accessKey) == 0 || len(secretKey) == 0 {
return nil, errors.New("credentials missing")
}
return &Client{
accessKey: accessKey,
secretKey: secretKey,
BaseURL: defaultBaseURL,
HTTPClient: &http.Client{},
}
}, nil
}
// Client client of NIFCLOUD DNS