Skip to content

Commit

Permalink
doc(qa): better documentation of Event fields (#3)
Browse files Browse the repository at this point in the history
Clarify which fields are really DNS specific and which can instead be
extended to other protocols in the future.

Also, make sure we use `[]byte` rather than string for `RawQuery` and
`RawResponse`.
  • Loading branch information
bassosimone authored Nov 29, 2024
1 parent 3ffcc5c commit d5a39c8
Showing 1 changed file with 16 additions and 6 deletions.
22 changes: 16 additions & 6 deletions internal/qa/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,26 @@ type Event struct {
// DNS-specific fields
//

// RawQuery is the raw DNS query message.
RawQuery string `json:"rawQuery,omitempty"`
// RawQuery contains the raw DNS query message.
RawQuery []byte `json:"rawQuery,omitempty"`

// RawResponse is the raw DNS response message.
RawResponse string `json:"rawResponse,omitempty"`
// RawResponse contains the raw DNS response message.
RawResponse []byte `json:"rawResponse,omitempty"`

// ServerAddr is the DNS server address.
//
// Server-specific fields
//

// ServerAddr is the server address.
//
// This field is currently used for DNS but may be extended
// to other applicative protocols in the future.
ServerAddr string `json:"serverAddr,omitempty"`

// ServerProtocol is the DNS server protocol.
// ServerProtocol is the server protocol.
//
// This field is currently used for DNS but may be extended
// to other applicative protocols in the future.
ServerProtocol string `json:"serverProtocol,omitempty"`

//
Expand Down

0 comments on commit d5a39c8

Please sign in to comment.