1
0
mirror of https://github.com/StackExchange/dnscontrol.git synced 2024-05-11 05:55:12 +00:00

Upgrade vendor/github.com/prasmussen/gandi-api

This commit is contained in:
Tom Limoncelli
2017-08-05 13:21:18 -04:00
parent 9b01ed9eb3
commit 4ae2e172eb
8 changed files with 227 additions and 12 deletions

View File

@@ -73,7 +73,7 @@ func (self *Record) Update(args RecordUpdate) ([]*RecordInfo, error) {
"value": args.Value,
"ttl": args.Ttl,
}
updateOpts := map[string]int64{
updateOpts := map[string]string{
"id": args.Id,
}

View File

@@ -1,7 +1,7 @@
package record
type RecordInfo struct {
Id int64
Id string
Name string
Ttl int64
Type string
@@ -24,7 +24,7 @@ type RecordUpdate struct {
Type string `goptions:"-t, --type, obligatory, description='Record type'"`
Value string `goptions:"-V, --value, obligatory, description='Value for record. Semantics depends on the record type.'"`
Ttl int64 `goptions:"-T, --ttl, description='Time to live, in seconds, between 5 minutes and 30 days'"`
Id int64 `goptions:"-r, --record, obligatory, description='Record id'"`
Id string `goptions:"-r, --record, obligatory, description='Record id'"`
}
type RecordSet map[string]interface{}

View File

@@ -1,16 +1,15 @@
package record
import (
"github.com/prasmussen/gandi-api/util"
"github.com/prasmussen/gandi-api/util"
)
func ToRecordInfo(res map[string]interface{}) *RecordInfo {
return &RecordInfo{
Id: util.ToInt64(res["id"]),
Name: util.ToString(res["name"]),
Ttl: util.ToInt64(res["ttl"]),
Type: util.ToString(res["type"]),
Value: util.ToString(res["value"]),
}
return &RecordInfo{
Id: util.ToString(res["id"]),
Name: util.ToString(res["name"]),
Ttl: util.ToInt64(res["ttl"]),
Type: util.ToString(res["type"]),
Value: util.ToString(res["value"]),
}
}