Pull request: all: imp docs, names

Merge in DNS/adguard-home from imp-text to master

Squashed commit of the following:

commit fa7d64014fb2ac379e1c137eaccc7aefca86419d
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Fri Jun 11 17:09:00 2021 +0300

    all: imp docs, names
This commit is contained in:
Ainar Garipov
2021-06-18 18:13:36 +03:00
parent 3ee0369cb9
commit dab7b439d1
25 changed files with 110 additions and 112 deletions

View File

@@ -3,17 +3,17 @@ package querylog
// Client is the information required by the query log to match against clients
// during searches.
type Client struct {
Whois *ClientWhois `json:"whois,omitempty"`
WHOIS *ClientWHOIS `json:"whois,omitempty"`
Name string `json:"name"`
DisallowedRule string `json:"disallowed_rule"`
Disallowed bool `json:"disallowed"`
}
// ClientWhois is the filtered WHOIS data for the client.
// ClientWHOIS is the filtered WHOIS data for the client.
//
// TODO(a.garipov): Merge with home.RuntimeClientWhoisInfo after the
// TODO(a.garipov): Merge with home.RuntimeClientWHOISInfo after the
// refactoring is done.
type ClientWhois struct {
type ClientWHOIS struct {
City string `json:"city,omitempty"`
Country string `json:"country,omitempty"`
Orgname string `json:"orgname,omitempty"`

View File

@@ -42,9 +42,9 @@ type ClientProto string
// Client protocol names.
const (
ClientProtoDOH ClientProto = "doh"
ClientProtoDOQ ClientProto = "doq"
ClientProtoDOT ClientProto = "dot"
ClientProtoDoH ClientProto = "doh"
ClientProtoDoQ ClientProto = "doq"
ClientProtoDoT ClientProto = "dot"
ClientProtoDNSCrypt ClientProto = "dnscrypt"
ClientProtoPlain ClientProto = ""
)
@@ -54,9 +54,9 @@ const (
func NewClientProto(s string) (cp ClientProto, err error) {
switch cp = ClientProto(s); cp {
case
ClientProtoDOH,
ClientProtoDOQ,
ClientProtoDOT,
ClientProtoDoH,
ClientProtoDoQ,
ClientProtoDoT,
ClientProtoDNSCrypt,
ClientProtoPlain: