Documentation ¶
Overview ¶
Package zone provides methods for parsing DNS zone (master) files as defined in RFC 1035 §5.1.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotImplemented = errors.New("feature is not implemented")
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(zp *ZoneParser) error
func WithDefaultTtl ¶
WithDefaultTtl allows defining the default TTL that will be used when no $TTL directive has been found. The default is `86_400`. If `WithPreferSoaMinTtl(true)` is used, and a SOA record is present, then this value will be ignored.
func WithPreferSoaMinTtl ¶
WithPreferSoaMinTtl will _always_ use the minimum TTL value from the SOA line when value is `true`. Any `$TTL` directives will be ignored.
func WithSkipIncludes ¶
type ResourceRecord ¶
func (*ResourceRecord) IsEmpty ¶
func (rr *ResourceRecord) IsEmpty() bool
func (*ResourceRecord) String ¶
func (rr *ResourceRecord) String() string
type Zone ¶
type Zone struct { SOA ResourceRecord Records []ResourceRecord }
type ZoneParser ¶
type ZoneParser struct {
// contains filtered or unexported fields
}
ZoneParser reads zone master files into Zone objects.
func NewZoneParser ¶
func NewZoneParser(opts ...Option) (*ZoneParser, error)
Click to show internal directories.
Click to hide internal directories.