dns

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AAAARecord

type AAAARecord struct {
	Name string
	IP   string
	TTL  int
}

type ARecord

type ARecord struct {
	Name string
	IP   string
	TTL  int
}

type CNAMERecord

type CNAMERecord struct {
	Name   string
	Target string
	TTL    int
}

type DNSConfig

type DNSConfig struct {
	ZoneDir   string
	NamedConf string
	ReloadCmd string
}

type DNSPlugin

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

func New

func New() *DNSPlugin

func (*DNSPlugin) AddARecord

func (p *DNSPlugin) AddARecord(domain, name, ip string, ttl int) error

AddARecord adds an A record to a zone

func (*DNSPlugin) AddCNAMERecord

func (p *DNSPlugin) AddCNAMERecord(domain, name, target string, ttl int) error

AddCNAMERecord adds a CNAME record

func (*DNSPlugin) Capabilities

func (p *DNSPlugin) Capabilities() []plugin.Capability

func (*DNSPlugin) CreateZone

func (p *DNSPlugin) CreateZone(zone *DNSZone) error

CreateZone creates a DNS zone file

func (*DNSPlugin) Init

func (p *DNSPlugin) Init(ctx context.Context, config map[string]interface{}) error

func (*DNSPlugin) Name

func (p *DNSPlugin) Name() string

func (*DNSPlugin) Shutdown

func (p *DNSPlugin) Shutdown(ctx context.Context) error

func (*DNSPlugin) Version

func (p *DNSPlugin) Version() string

type DNSZone

type DNSZone struct {
	Domain string
	TTL    int
	SOA    SOARecord
	NS     []string
	A      []ARecord
	AAAA   []AAAARecord
	CNAME  []CNAMERecord
	MX     []MXRecord
	TXT    []TXTRecord
}

type MXRecord

type MXRecord struct {
	Priority int
	Host     string
	TTL      int
}

type SOARecord

type SOARecord struct {
	Primary    string
	Admin      string
	Serial     int
	Refresh    int
	Retry      int
	Expire     int
	MinimumTTL int
}

type TXTRecord

type TXTRecord struct {
	Name  string
	Value string
	TTL   int
}

Jump to

Keyboard shortcuts

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