backend

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ANY   string = "ANY"
	SOA   string = "SOA"
	A     string = "A"
	AAAA  string = "AAAA"
	NS    string = "NS"
	CNAME string = "CNAME"
	DNAME string = "DNAME"
	TXT   string = "TXT"
)
View Source
const (
	IPV4B32CROCKFORD_BUILTIN_RESOLVER_NAME string = "builtin:ipv4b32crockford"
)

Base32 alphabets

View Source
const IPV4B32_BUILTIN_RESOLVER_NAME = "builtin:ipv4b32"
View Source
const IPV4DASHED_BUILTIN_RESOLVER_NAME = "builtin:ipv4dashed"
View Source
const IPV4DOTTED_BUILTIN_RESOLVER_NAME = "builtin:ipv4dotted"
View Source
const IPV4HEXA_BUILTIN_RESOLVER_NAME = "builtin:ipv4hexa"

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	// Always required:
	Initialize() bool
	Lookup(qtype string, qname string, zoneId string) (lookupResultArray []LookupResult, err error)

	// Filling the Zone Cache:
	GetAllDomains(includeDisabled bool) (domainInfoResultArray []DomainInfoResult, err error)
	GetAllDomainMetadata(qname string) (metadata map[string][]string, err error)
}

Backend @see https://doc.powerdns.com/authoritative/backends/remote.html

type BuiltinResolverError

type BuiltinResolverError struct {
	// contains filtered or unexported fields
}

func (BuiltinResolverError) Error

func (err BuiltinResolverError) Error() string

type Delegate

type Delegate struct {
	Backends []Backend
}

func NewDelegate

func NewDelegate() *Delegate

func (*Delegate) AddDelegate

func (delegate *Delegate) AddDelegate(backend Backend)

func (*Delegate) GetAllDomainMetadata

func (delegate *Delegate) GetAllDomainMetadata(qname string) (metadata map[string][]string, err error)

func (*Delegate) GetAllDomains

func (delegate *Delegate) GetAllDomains(includeDisabled bool) (domainInfoResultArray []DomainInfoResult, err error)

func (*Delegate) Initialize

func (delegate *Delegate) Initialize() bool

func (*Delegate) Lookup

func (delegate *Delegate) Lookup(qtype string, qname string, zoneId string) (lookupResultArray []LookupResult, err error)

type DelegateBase

type DelegateBase struct {
	Conf *config.DelegateConfig
	// contains filtered or unexported fields
}

func NewDelagateBase

func NewDelagateBase(conf *config.DelegateConfig) (delegate *DelegateBase, err error)

func (*DelegateBase) GetAllDomainMetadata

func (delegateBase *DelegateBase) GetAllDomainMetadata(qname string) (metadata map[string][]string, err error)

func (*DelegateBase) GetAllDomains

func (delegateBase *DelegateBase) GetAllDomains(_ bool) (domainInfoResultArray []DomainInfoResult, err error)

func (*DelegateBase) Initialize

func (*DelegateBase) Initialize() bool

func (*DelegateBase) Lookup

func (delegateBase *DelegateBase) Lookup(qtype string, qname string, zoneid string) (lookupResultArray []LookupResult, err error)

type DomainInfoResult

type DomainInfoResult struct {
	ID             uint32   `json:"id"`
	Zone           string   `json:"zone"`
	Masters        []string `json:"masters"`
	NotifiedSerial uint32   `json:"notified_serial"`
	Serial         uint32   `json:"serial"`
	LastCheck      uint32   `json:"last_check"`
	Kind           string   `json:"kind"`
}

type IPv4B32CrockfordResolver

type IPv4B32CrockfordResolver struct {
	// contains filtered or unexported fields
}

func NewIPv4B32CrockfordResolver

func NewIPv4B32CrockfordResolver(settings map[string]interface{}) *IPv4B32CrockfordResolver

func (*IPv4B32CrockfordResolver) Lookup

func (resolver *IPv4B32CrockfordResolver) Lookup(qtype string, qname string, _ string) (lookupResultArray []LookupResult, err error)

type IPv4B32Resolver

type IPv4B32Resolver struct {
	// contains filtered or unexported fields
}

func NewIPv4B32Resolver

func NewIPv4B32Resolver(settings map[string]interface{}) *IPv4B32Resolver

func (*IPv4B32Resolver) Lookup

func (resolver *IPv4B32Resolver) Lookup(qtype string, qname string, _ string) (lookupResultArray []LookupResult, err error)

type IPv4DashedResolver

type IPv4DashedResolver struct {
	// contains filtered or unexported fields
}

func NewIPv4DashedResolver

func NewIPv4DashedResolver(settings map[string]interface{}) *IPv4DashedResolver

func (*IPv4DashedResolver) Lookup

func (resolver *IPv4DashedResolver) Lookup(qtype string, qname string, _ string) (lookupResultArray []LookupResult, err error)

type IPv4DottedResolver

type IPv4DottedResolver struct {
	// contains filtered or unexported fields
}

func NewIPv4DottedResolver

func NewIPv4DottedResolver(settings map[string]interface{}) *IPv4DottedResolver

func (*IPv4DottedResolver) Lookup

func (resolver *IPv4DottedResolver) Lookup(qtype string, qname string, _ string) (lookupResultArray []LookupResult, err error)

type IPv4HexaResolver

type IPv4HexaResolver struct {
	// contains filtered or unexported fields
}

func NewIPv4HexaResolver

func NewIPv4HexaResolver(settings map[string]interface{}) *IPv4HexaResolver

func (*IPv4HexaResolver) Lookup

func (resolver *IPv4HexaResolver) Lookup(qtype string, qname string, _ string) (lookupResultArray []LookupResult, err error)

type LookupResult

type LookupResult struct {
	QType   string `json:"qtype"`
	QName   string `json:"qname"`
	Content string `json:"content"`
	TTL     uint32 `json:"ttl"`
}

type NewResolverType

type NewResolverType func(map[string]interface{}) Resolver

type Resolver

type Resolver interface {
	Lookup(qtype string, qname string, zoneId string) (lookupResultArray []LookupResult, err error)
}

func BuiltinResolver

func BuiltinResolver(name string, settings map[string]interface{}) (resolver Resolver, err error)

func LoadResolver

func LoadResolver(uri string, settings map[string]interface{}) (resolver Resolver, err error)

func NewResolver

func NewResolver(uri string, settings map[string]interface{}) (resolver Resolver, err error)

Jump to

Keyboard shortcuts

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