forked from crosbymichael/skydock
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpowerdns.go
27 lines (24 loc) · 814 Bytes
/
powerdns.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package main
import (
"github.com/skynetservices/skydns1/msg"
"github.com/artemkaint/go-powerdns-client/response"
)
// Interface to allow mocking of the
// skydns client
type PowerDNS interface {
// GET /servers
GetServers() (*[]response.ServerResource, error)
// GET /servers/:server_id
GetServer(uuid string) (*response.ServerResource, error)
// GET /servers/:server_id/config
GetServerConfigs() error
// GET /servers/:server_id/config/:config_setting_name
GetServerConfig(uuid string) error
// GET /servers/:server_id/zones
GetZones() (*[]response.ZoneCollection, error)
// POST /servers/:server_id/zones
AddZone(zone string, server interface{}) (*response.ZoneCollection, error)
Add(uuid string, service *msg.Service) error
Delete(uuid string) error
Update(uuid string, ttl uint32) error
}