Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Message ¶
type Message struct { Id uint16 RCode int Opcode int IsResponse bool // Corresponds to the QR bit IsAuthoritative bool // Corresponds to the AA bit IsTruncated bool // Corresponds to the TC bit IsRecursionDesired bool // Corresponds to the RD bit IsRecursionAvailable bool // Corresponds to the RA bit IsAuthenticatedData bool // Corresponds to the AD bit (DNSSEC) IsCheckingDisabled bool // Corresponds to the CD bit (DNSSEC) // Question contains the question as returned by the name server. Question []ResourceRecord Answer []ResourceRecord Authority []ResourceRecord Additional []ResourceRecord // OriginalBytes bytes of the message to restore it on deserialization. // This is the downside of working with the wire format of miekg dns, we can't really // serialize/deserialize well unless we use pack()/unpack() OriginalBytes string }
func (Message) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Message) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Message) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Message) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface
type MessageExchange ¶
type MessageExchange struct { OriginalQuestion model.Question ResponseAddr string NameServerIP netip.Addr Metadata model.Metadata Message *Message Error *model.SendError }
func From ¶
func From(ex *model.MessageExchange) MessageExchange
func (MessageExchange) MarshalEasyJSON ¶
func (v MessageExchange) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (MessageExchange) MarshalJSON ¶
func (v MessageExchange) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*MessageExchange) UnmarshalEasyJSON ¶
func (v *MessageExchange) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*MessageExchange) UnmarshalJSON ¶
func (v *MessageExchange) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type NameServer ¶
func (NameServer) MarshalEasyJSON ¶
func (v NameServer) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (NameServer) MarshalJSON ¶
func (v NameServer) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*NameServer) UnmarshalEasyJSON ¶
func (v *NameServer) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*NameServer) UnmarshalJSON ¶
func (v *NameServer) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type Reader ¶
type Reader struct { // If provided, sets the format of the files to read. // If nil, the format is auto-detected from the file extension. Zip *serialization.ZipAlgorithm // contains filtered or unexported fields }
type ResourceRecord ¶
ResourceRecord represents a DNS record
func (ResourceRecord) MarshalEasyJSON ¶
func (v ResourceRecord) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (ResourceRecord) MarshalJSON ¶
func (v ResourceRecord) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*ResourceRecord) UnmarshalEasyJSON ¶
func (v *ResourceRecord) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*ResourceRecord) UnmarshalJSON ¶
func (v *ResourceRecord) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type TaggedDomain ¶
type TaggedDomain struct { Idx uint Name model.DomainName Tags string }
func (TaggedDomain) MarshalEasyJSON ¶
func (v TaggedDomain) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (TaggedDomain) MarshalJSON ¶
func (v TaggedDomain) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*TaggedDomain) UnmarshalEasyJSON ¶
func (v *TaggedDomain) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*TaggedDomain) UnmarshalJSON ¶
func (v *TaggedDomain) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type WriteModel ¶
type WriteModel struct { Domains []TaggedDomain StartTime time.Time Duration time.Duration Zonedata Zone Messages []MessageExchange }
WriteModel defines the format that is written to the file.
func (WriteModel) MarshalEasyJSON ¶
func (v WriteModel) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (WriteModel) MarshalJSON ¶
func (v WriteModel) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*WriteModel) UnmarshalEasyJSON ¶
func (v *WriteModel) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*WriteModel) UnmarshalJSON ¶
func (v *WriteModel) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type Writer ¶
type Writer struct { *serialization.FileWriterBase // contains filtered or unexported fields }
func NewWriter ¶
func NewWriter(outDir string, filePrefix string, outputFileSize uint, zipAlgo serialization.ZipAlgorithm, compression serialization.CompressionLevel, parallelFiles uint32) *Writer
type Zone ¶
type Zone struct { Name string Subzones []Zone NameServers []NameServer ResourceRecords []string }
func (Zone) MarshalEasyJSON ¶
MarshalEasyJSON supports easyjson.Marshaler interface
func (Zone) MarshalJSON ¶
MarshalJSON supports json.Marshaler interface
func (*Zone) UnmarshalEasyJSON ¶
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*Zone) UnmarshalJSON ¶
UnmarshalJSON supports json.Unmarshaler interface