common

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

* * MIT License * * (C) Copyright 2022 Hewlett Packard Enterprise Development LP * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. *

Index

Constants

View Source
const (
	DNSSecKeyType = iota
	TSIGKeyType
)

Variables

This section is empty.

Functions

func GetDNAMERRSet added in v0.8.0

func GetDNAMERRSet(masterZoneName string, baseDomain string, masterZoneNames []string) (rrSet powerdns.RRset, err error)

func GetForwardCIDRStringForReverseZone

func GetForwardCIDRStringForReverseZone(reverseZone *powerdns.Zone) (forwardCIDRString string, err error)

GetForwardCIDRStringForReverseZone generates a forward IP address from a reverse zone.

func GetForwardIP added in v0.7.0

func GetForwardIP(reverseName string) string

GetForwardIP get the IP address from a reverse record name.

func GetNameserverRRset

func GetNameserverRRset(nameserver Nameserver) powerdns.RRset

func GetNetworkForCIDRString

func GetNetworkForCIDRString(networks []sls_common.Network, cidr string) (*sls_common.Network, *string)

GetNetworkForCIDRString computes the network and IP range for a CIDR string.

func GetReverseName

func GetReverseName(cidrParts []string) string

GetReverseName computes a reverse name from a slice of IPv4 parts.

func GetReverseZoneName

func GetReverseZoneName(cidr *net.IPNet) string

GetReverseZoneName computes a reverse zone name from a slice of IPv4 parts.

func GetStartOfAuthorityRRSet added in v0.8.0

func GetStartOfAuthorityRRSet(zoneName string,
	mname string,
	rname string,
	refresh string,
	retry string,
	expire string,
	ttl string) powerdns.RRset

func GetZoneForRRSet

func GetZoneForRRSet(rrSet powerdns.RRset, zones PowerDNSZones) *string

func MakeDomainCanonical

func MakeDomainCanonical(domain string) string

func RRsetsContains added in v0.6.9

func RRsetsContains(a []powerdns.RRset, b powerdns.RRset) bool

func RRsetsEqual

func RRsetsEqual(a powerdns.RRset, b powerdns.RRset) bool

func SliceContains

func SliceContains(needle string, haystack []string) bool

Types

type DNSKey

type DNSKey struct {
	Name string
	Data string
	Type DNSKeyType
}

func (DNSKey) String

func (key DNSKey) String() string

type DNSKeyType

type DNSKeyType int

type Nameserver

type Nameserver struct {
	FQDN string
	IP   string
}

type NetworkNameCIDRMap

type NetworkNameCIDRMap struct {
	Name string
	CIDR *net.IPNet
}

type PowerDNSZones

type PowerDNSZones []*powerdns.Zone

func (PowerDNSZones) Len

func (zones PowerDNSZones) Len() int

func (PowerDNSZones) Less

func (zones PowerDNSZones) Less(i, j int) bool

func (PowerDNSZones) Swap

func (zones PowerDNSZones) Swap(i, j int)

Jump to

Keyboard shortcuts

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