client

package module
v0.0.0-...-7571bc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2016 License: MIT Imports: 12 Imported by: 1

README

go-powerdns-client

API client for PowerDNS server written on Go

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoHttpAddress   = errors.New("No HTTP address specified")
	ErrNoDnsAddress    = errors.New("No DNS address specified")
	ErrInvalidResponse = errors.New("Invalid HTTP response")
	ErrServiceNotFound = errors.New("Service not found")
	ErrConflictingUUID = errors.New("Conflicting UUID")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	DNS bool // if true use the DNS when listing servies
	// contains filtered or unexported fields
}

func NewClient

func NewClient(base, secret, domain, basedns string) (*Client, error)

NewClient creates a new skydns client with the specificed host address and DNS port.

func (*Client) Add

func (c *Client) Add(uuid string, s *msg.Service) error

func (*Client) AddCallback

func (c *Client) AddCallback(uuid string, cb *msg.Callback) error

func (*Client) AddZone

func (c *Client) AddZone(zone string, server interface{}) (*response.ZoneCollection, error)

POST /servers/:server_id/zones

func (*Client) Delete

func (c *Client) Delete(uuid string) error

func (*Client) Get

func (c *Client) Get(uuid string) (*msg.Service, error)

func (*Client) GetAllServices

func (c *Client) GetAllServices() ([]*msg.Service, error)

func (*Client) GetAllServicesDNS

func (c *Client) GetAllServicesDNS() ([]*msg.Service, error)

func (*Client) GetEnvironments

func (c *Client) GetEnvironments() (NameCount, error)

func (*Client) GetRegions

func (c *Client) GetRegions() (NameCount, error)

func (*Client) GetServer

func (c *Client) GetServer(uuid string) (*response.ServerResource, error)

GET /servers/:server_id

func (*Client) GetServerConfig

func (c *Client) GetServerConfig(uuid string) error

GET /servers/:server_id/config/:config_setting_name

func (*Client) GetServerConfigs

func (c *Client) GetServerConfigs() error

GET /servers/:server_id/config

func (*Client) GetServers

func (c *Client) GetServers() (*[]response.ServerResource, error)

GET /servers

func (*Client) GetZones

func (c *Client) GetZones() (*[]response.ZoneCollection, error)

GET /servers/:server_id/zones

func (*Client) Update

func (c *Client) Update(uuid string, ttl uint32) error

type NameCount

type NameCount map[string]int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL