powerdns

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckUserInput

func CheckUserInput() (map[string]string, error)

CheckUserInput check cli input provided by user meets requirements and return input in map if it does

func LogErr

func LogErr(err error)

LogErr error check and logging

Types

type ClientConn

type ClientConn struct {
	Client  http.Client
	Records RRsets
	Input   map[string]string
}

ClientConn required data for interaction with the powerdns api

func NewClientConn

func NewClientConn() (*ClientConn, error)

NewClientConn validate the user input is as expected and add it to a ClientConn structure.

func (*ClientConn) UpdateARecord added in v1.0.1

func (c *ClientConn) UpdateARecord() error

UpdateARecord add/delete A record

type Comments

type Comments struct {
	Content    string `json:"content,omitempty"`
	Account    string `json:"account,omitempty"`
	ModifiedAT int64  `json:"modified_at,omitempty"`
}

Comments structure with JSON API metadata

type Error

type Error struct {
	Status  string
	Message string `json:"error"`
}

Error structure with customised error message

func (Error) Error

func (e Error) Error() string

type RRset

type RRset struct {
	Name       string     `json:"name,omitempty"`
	Type       string     `json:"type,omitempty"`
	TTL        int        `json:"ttl,omitempty"`
	Changetype string     `json:"changetype,omitempty"`
	Records    []Records  `json:"records"`
	Comments   []Comments `json:"comments"`
}

RRset structure with JSON API metadata

type RRsets

type RRsets struct {
	Sets []RRset `json:"rrsets,omitempty"`
}

RRsets structure with JSON API metadata

type Records

type Records struct {
	Content  string `json:"content,omitempty"`
	Disabled bool   `json:"disabled"`
	SetPTR   bool   `json:"set-ptr,omitempty"`
}

Records structure with JSON API metadata

Jump to

Keyboard shortcuts

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