-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add compatibility aliases for nmsg.base protobuf changes
The previous changes to the nmsg.base protobuf specs changed several enum type names and value names in the generated code. Use type aliases and constant definitions to support the previous names.
- Loading branch information
Showing
1 changed file
with
78 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
package nmsg_base | ||
|
||
// | ||
// Compatibility definitions for code written against older versions | ||
// of the nmsg_base .proto files. | ||
// | ||
|
||
type DnsQRType = DnsQR_DnsQRType | ||
|
||
const ( | ||
DnsQRType_UDP_INVALID = DnsQR_UDP_INVALID | ||
DnsQRType_UDP_QUERY_RESPONSE = DnsQR_UDP_QUERY_RESPONSE | ||
DnsQRType_UDP_UNANSWERED_QUERY = DnsQR_UDP_UNANSWERED_QUERY | ||
DnsQRType_UDP_UNSOLICITED_RESPONSE = DnsQR_UDP_UNSOLICITED_RESPONSE | ||
DnsQRType_TCP = DnsQR_TCP | ||
DnsQRType_ICMP = DnsQR_ICMP | ||
DnsQRType_UDP_QUERY_ONLY = DnsQR_UDP_QUERY_ONLY | ||
DnsQRType_UDP_RESPONSE_ONLY = DnsQR_UDP_RESPONSE_ONLY | ||
) | ||
|
||
type UdpChecksum = DnsQR_UdpChecksum | ||
|
||
const ( | ||
UdpChecksum_ERROR = DnsQR_ERROR | ||
UdpChecksum_ABSENT = DnsQR_ABSENT | ||
UdpChecksum_INCORRECT = DnsQR_INCORRECT | ||
UdpChecksum_CORRECT = DnsQR_CORRECT | ||
) | ||
|
||
type EmailType = Email_EmailType | ||
|
||
const ( | ||
EmailType_unknown = Email_unknown | ||
EmailType_spamtrap = Email_spamtrap | ||
EmailType_rej_network = Email_rej_network | ||
EmailType_rej_content = Email_rej_content | ||
EmailType_rej_user = Email_rej_user | ||
) | ||
|
||
type EncodeType = Encode_EncodeType | ||
|
||
const ( | ||
EncodeType_TEXT = Encode_TEXT | ||
EncodeType_JSON = Encode_JSON | ||
EncodeType_YAML = Encode_YAML | ||
EncodeType_MSGPACK = Encode_MSGPACK | ||
EncodeType_XML = Encode_XML | ||
) | ||
|
||
type HttpType = Http_HttpType | ||
|
||
const ( | ||
HttpType_unknown = Http_unknown | ||
HttpType_sinkhole = Http_sinkhole | ||
) | ||
|
||
type LinkType = Linkpair_Linktype | ||
|
||
const ( | ||
Linktype_anchor = Linkpair_anchor | ||
Linktype_redirect = Linkpair_redirect | ||
) | ||
|
||
type NcapType Ncap_NcapType | ||
|
||
const ( | ||
NcapType_IPV4 = Ncap_IPV4 | ||
NcapType_IPV6 = Ncap_IPV6 | ||
NcapType_Legacy = Ncap_Legacy | ||
) | ||
|
||
type NcapLegacyType = Ncap_NcapLegacyType | ||
|
||
const ( | ||
NcapLegacyType_Ncap_UDP = Ncap_UDP | ||
NcapLegacyType_Ncap_TCP = Ncap_TCP | ||
NcapLegacyType_Ncap_ICMP = Ncap_ICMP | ||
) |