servers

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

This package contains a specialized client for interacting with PowerDNS' "Servers" API.

More information

Official API documentation: https://doc.powerdns.com/authoritative/http-api/server.html

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {

	// ListServers lists all known servers
	ListServers(ctx context.Context) ([]Server, error)

	// GetServer returns a specific server. If the server with the given "serverID" does
	// not exist, the error return value will contain a pdnshttp.ErrNotFound error (see example)
	GetServer(ctx context.Context, serverID string) (*Server, error)
}

Client defines method for interacting with the PowerDNS "Servers" endpoints

func New

func New(hc *pdnshttp.Client) Client

type Server

type Server struct {
	ID         string `json:"id"`
	Type       string `json:"type"`
	DaemonType string `json:"daemon_type"`
	Version    string `json:"version"`
	URL        string `json:"url,omitempty"`
	ConfigURL  string `json:"config_url,omitempty"`
	ZonesURL   string `json:"zones_url,omitempty"`
}

Server models a PowerDNS server.

More information: https://doc.powerdns.com/authoritative/http-api/server.html#server

Jump to

Keyboard shortcuts

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