awl/internal/helpers/query.go
Sam Therapy 92812c337f
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
Another day's work
Signed-off-by: Sam Therapy <sam@samtherapy.net>
2022-07-21 19:06:46 -05:00

24 lines
577 B
Go

// SPDX-License-Identifier: BSD-3-Clause
package helpers
import (
"time"
"github.com/miekg/dns"
)
// The DNS response.
type Response struct {
DNS *dns.Msg // The full DNS response
RTT time.Duration `json:"rtt"` // The time it took to make the DNS query
}
// A structure for a DNS query.
type Request struct {
Server string `json:"server"` // The server to make the DNS request from
Type uint16 `json:"request"` // The type of request
Class uint16 `json:"class"` // DNS Class
Name string `json:"name"` // The domain name to make a DNS request for
}