powerdns

package module
v0.0.0-...-a52511e Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2019 License: MIT Imports: 10 Imported by: 1

README

go-powerdns

Implementing the powerdns api in golang.

This is currently work in progress. Use it at your own risk.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Powerdns

type Powerdns struct {
	Hostname    string
	Apikey      string
	VerifySSL   bool
	BaseURL     string
	NameServers []string
	// contains filtered or unexported fields
}

func NewPowerdns

func NewPowerdns(HostName string, ApiKey string, NameServers []string) *Powerdns

func (*Powerdns) CreateDomain

func (powerdns *Powerdns) CreateDomain(domain string) error

func (*Powerdns) Delete

func (powerdns *Powerdns) Delete(endpoint string) (map[string]interface{}, error)

func (*Powerdns) DeleteDomain

func (powerdns *Powerdns) DeleteDomain(domain string) error

func (*Powerdns) DeleteRec

func (powerdns *Powerdns) DeleteRec(domain string, dtype string, name string) error

func (*Powerdns) DeleteRecord

func (powerdns *Powerdns) DeleteRecord(domain string, dtype string, name string) error

func (*Powerdns) Get

func (powerdns *Powerdns) Get(endpoint string) (interface{}, error)

func (*Powerdns) GetTopDomain

func (powerdns *Powerdns) GetTopDomain(domain string) (topdomain string, err error)

func (*Powerdns) Patch

func (powerdns *Powerdns) Patch(endpoint string, jsonData []byte) (err error)

func (*Powerdns) Post

func (powerdns *Powerdns) Post(endpoint string, jsonData []byte) (map[string]interface{}, error)

func (*Powerdns) Put

func (powerdns *Powerdns) Put(endpoint string, jsonData []byte) (err error)

func (*Powerdns) UpdateRec

func (powerdns *Powerdns) UpdateRec(domain string, dtype string, name string, content string, ttl int) error

func (*Powerdns) UpdateRecord

func (powerdns *Powerdns) UpdateRecord(domain string, dtype string, name string, content string, ttl int) error

type Record

type Record struct {
	Content  string `json:"content"`
	Disabled bool   `json:"disabled"`
	Name     string `json:"name"`
	Ttl      int    `json:"ttl"`
	DType    string `json:"type"`
}

type RecordSlice

type RecordSlice []Record

type RrSet

type RrSet struct {
	Name       string        `json:"name"`
	DType      string        `json:"type"`
	Ttl        int           `json:"ttl"`
	ChangeType string        `json:"changetype"`
	Records    []interface{} `json:"records"`
}

type RrSlice

type RrSlice []RrSet

Jump to

Keyboard shortcuts

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