forwardzone

package
v0.0.0-...-e6503be Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ZoneTypeZone        = "zones"
	ZoneTypeForwardZone = "forward-zones"
)
View Source
const (
	ForwardZonesFile        = "/etc/powerdns/forward-zones.conf"
	ForwardZonesConsulKVKey = "forward-zones"
)

TODO: move to config

View Source
const (
	DefaultMaxResults string = "10"
)

Variables

This section is empty.

Functions

func ForwardZoneIsExist

func ForwardZoneIsExist(fzs ForwardZones, searchName string) bool

Types

type ForwardZone

type ForwardZone struct {
	Name        string   `json:"name"`
	Nameservers []string `json:"nameservers"`
}

ForwardZone represent a zones and it nameservers from forward-zones-file

func DeleteForwardZone

func DeleteForwardZone(fzs []ForwardZone, deleteName string) ([]ForwardZone, error)

func ParseForwardZoneLine

func ParseForwardZoneLine(s string) (*ForwardZone, error)

ParseForwardZoneLine parse string to ForwardZone

func (ForwardZone) String

func (fz ForwardZone) String() string

String implements fmt.Stringer interface

type ForwardZones

type ForwardZones []ForwardZone

ForwardZones represent list of zones and its nameservers from forward-zones-file

func ParseForwardZoneFile

func ParseForwardZoneFile(r io.Reader) (ForwardZones, error)

func ParseForwardZonesInput

func ParseForwardZonesInput(data io.Reader) (ForwardZones, error)

ParseForwardZonesInput parses input data and return err if data invalid.

func UpdateForwardZone

func UpdateForwardZone(fzs ForwardZones, fz ForwardZone) (ForwardZones, error)

func (ForwardZones) Len

func (fzs ForwardZones) Len() int

Inplenet sort.Interface

func (ForwardZones) Less

func (fzs ForwardZones) Less(i, j int) bool

func (ForwardZones) Swap

func (fzs ForwardZones) Swap(i, j int)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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