mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
GANDI: Registrar support (#274)
* GANDI: add registrar support for changing nameservers. #87 * Update docs with Gandi registrar support #87 * Updated dependencies for Gandi Registrar Support #87
This commit is contained in:
committed by
Craig Peterson
parent
ccf28349ce
commit
53b72f39a8
3
vendor/github.com/prasmussen/gandi-api/domain/domain.go
generated
vendored
3
vendor/github.com/prasmussen/gandi-api/domain/domain.go
generated
vendored
@ -16,7 +16,8 @@ func New(c *client.Client) *Domain {
|
||||
// Check the availability of some domain
|
||||
func (self *Domain) Available(name string) (string, error) {
|
||||
var result map[string]interface{}
|
||||
params := []interface{}{self.Key, name}
|
||||
domain := []string{name}
|
||||
params := []interface{}{self.Key, domain}
|
||||
if err := self.Call("domain.available", params, &result); err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
24
vendor/github.com/prasmussen/gandi-api/domain/nameservers/nameservers.go
generated
vendored
Normal file
24
vendor/github.com/prasmussen/gandi-api/domain/nameservers/nameservers.go
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
package zone
|
||||
|
||||
import (
|
||||
"github.com/prasmussen/gandi-api/client"
|
||||
"github.com/prasmussen/gandi-api/operation"
|
||||
)
|
||||
|
||||
type Nameservers struct {
|
||||
*client.Client
|
||||
}
|
||||
|
||||
func New(c *client.Client) *Nameservers {
|
||||
return &Nameservers{c}
|
||||
}
|
||||
|
||||
// Set the current zone of a domain
|
||||
func (self *Nameservers) Set(domainName string, nameservers []string) (*operation.OperationInfo, error) {
|
||||
var res map[string]interface{}
|
||||
params := []interface{}{self.Key, domainName, nameservers}
|
||||
if err := self.Call("domain.nameservers.set", params, &res); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return operation.ToOperationInfo(res), nil
|
||||
}
|
2
vendor/github.com/prasmussen/gandi-api/domain/zone/record/record.go
generated
vendored
2
vendor/github.com/prasmussen/gandi-api/domain/zone/record/record.go
generated
vendored
@ -65,7 +65,7 @@ func (self *Record) Add(args RecordAdd) (*RecordInfo, error) {
|
||||
}
|
||||
|
||||
// Remove a record from a zone/version
|
||||
func (self *Record) Delete(zoneId, version, recordId int64) (bool, error) {
|
||||
func (self *Record) Delete(zoneId, version int64, recordId string) (bool, error) {
|
||||
var res int64
|
||||
deleteArgs := map[string]interface{}{"id": recordId}
|
||||
params := []interface{}{self.Key, zoneId, version, deleteArgs}
|
||||
|
Reference in New Issue
Block a user