diff options
Diffstat (limited to 'src/gnunet/enums/gns.go')
-rw-r--r-- | src/gnunet/enums/gns.go | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/gnunet/enums/gns.go b/src/gnunet/enums/gns.go index f6e58a2..8f786f8 100644 --- a/src/gnunet/enums/gns.go +++ b/src/gnunet/enums/gns.go | |||
@@ -19,12 +19,15 @@ | |||
19 | //nolint:stylecheck // allow non-camel-case for constants | 19 | //nolint:stylecheck // allow non-camel-case for constants |
20 | package enums | 20 | package enums |
21 | 21 | ||
22 | // GNSFlag type | ||
23 | type GNSFlag uint32 | ||
24 | |||
22 | const ( | 25 | const ( |
23 | // GNS record flags | 26 | // GNS record flags |
24 | GNS_FLAG_PRIVATE = 2 // Record is not shared on the DHT | 27 | GNS_FLAG_PRIVATE GNSFlag = 2 // Record is not shared on the DHT |
25 | GNS_FLAG_SUPPL = 4 // Supplemental records (e.g. NICK) in a block | 28 | GNS_FLAG_SUPPL GNSFlag = 4 // Supplemental records (e.g. NICK) in a block |
26 | GNS_FLAG_EXPREL = 8 // Expire time in record is in relative time. | 29 | GNS_FLAG_EXPREL GNSFlag = 8 // Expire time in record is in relative time. |
27 | GNS_FLAG_SHADOW = 16 // Record is ignored if non-expired records of same type exist in block | 30 | GNS_FLAG_SHADOW GNSFlag = 16 // Record is ignored if non-expired records of same type exist in block |
28 | 31 | ||
29 | // GNS_LocalOptions | 32 | // GNS_LocalOptions |
30 | GNS_LO_DEFAULT = 0 // Defaults, look in cache, then in DHT. | 33 | GNS_LO_DEFAULT = 0 // Defaults, look in cache, then in DHT. |
@@ -39,3 +42,9 @@ const ( | |||
39 | //go:generate go run generate.go gnunet-gns.rec gnunet-gns.tpl gns_type.go | 42 | //go:generate go run generate.go gnunet-gns.rec gnunet-gns.tpl gns_type.go |
40 | 43 | ||
41 | //go:generate stringer -type=GNSType gns_type.go | 44 | //go:generate stringer -type=GNSType gns_type.go |
45 | |||
46 | // GNSSpec is the combination of type and flags | ||
47 | type GNSSpec struct { | ||
48 | Type GNSType | ||
49 | Flags GNSFlag | ||
50 | } | ||