Documentation
¶
Index ¶
- func AnswerToString(answer []dns.RR) string
- func Chunks(s string, chunkSize int) []string
- func CreateAnswerFromQuestion(question dns.Question, ip net.IP, remainingTTL uint32) (dns.RR, error)
- func ExtractDomain(question dns.Question) string
- func ExtractDomainOnly(in string) string
- func FatalOnError(message string, err error)
- func IterateValueSorted(in map[string]int, fn func(string, int))
- func LogOnError(message string, err error)
- func LogOnErrorWithEntry(logEntry *logrus.Entry, message string, err error)
- func NewMsgWithAnswer(domain string, ttl uint, dnsType uint16, address string) (*dns.Msg, error)
- func NewMsgWithQuestion(question string, mType uint16) *dns.Msg
- func QuestionToString(questions []dns.Question) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnswerToString ¶
AnswerToString creates a user-friendly representation of an answer
func CreateAnswerFromQuestion ¶
func CreateAnswerFromQuestion(question dns.Question, ip net.IP, remainingTTL uint32) (dns.RR, error)
CreateAnswerFromQuestion creates new answer from a question
func ExtractDomain ¶
ExtractDomain returns domain string from the question
func ExtractDomainOnly ¶
ExtractDomainOnly extracts domain from the DNS query
func FatalOnError ¶
FatalOnError logs the message only if error is not nil and exits the program execution
func IterateValueSorted ¶
IterateValueSorted iterates over maps value in a sorted order and applies the passed function
func LogOnError ¶
LogOnError logs the message only if error is not nil
func LogOnErrorWithEntry ¶
LogOnErrorWithEntry logs the message only if error is not nil
func NewMsgWithAnswer ¶
NewMsgWithAnswer creates new DNS message with answer
func NewMsgWithQuestion ¶
NewMsgWithQuestion creates new DNS message with question
func QuestionToString ¶
QuestionToString creates a user-friendly representation of a question
Types ¶
This section is empty.