From 3f6fd15a362f2a5b00f95840a73f0dbd71a6d007 Mon Sep 17 00:00:00 2001 From: Hylke Visser Date: Mon, 8 Aug 2022 11:38:41 +0200 Subject: [PATCH 1/9] Initialize buf module --- annotations.proto | 104 +------------------------- api/buf.yaml | 10 +++ api/thethings/flags/annotations.proto | 103 +++++++++++++++++++++++++ buf.gen.yaml | 5 ++ buf.work.yaml | 3 + 5 files changed, 122 insertions(+), 103 deletions(-) mode change 100644 => 120000 annotations.proto create mode 100644 api/buf.yaml create mode 100644 api/thethings/flags/annotations.proto create mode 100644 buf.gen.yaml create mode 100644 buf.work.yaml diff --git a/annotations.proto b/annotations.proto deleted file mode 100644 index bb07e97..0000000 --- a/annotations.proto +++ /dev/null @@ -1,103 +0,0 @@ -// Copyright © 2021 The Things Industries B.V. -// SPDX-License-Identifier: Apache-2.0 - -syntax = "proto2"; - -package thethings.flags; - -option go_package = "github.com/TheThingsIndustries/protoc-gen-go-flags/annotations"; - -import "google/protobuf/descriptor.proto"; - -// NOTE: protoc-gen-go-flags is primarily intended for internal use by -// The Things Industries. We have therefore chosen to use option number 51886, -// which is in the 50000-99999 range reserved for internal use within individual -// organizations. For this reason, the option number is not registered on -// https://github.com/protocolbuffers/protobuf/blob/master/docs/options.md. - -message FileOptions { - -} - -extend google.protobuf.FileOptions { - optional FileOptions file = 51886; -} - -message MessageOptions { - // Generate (field mask) selector flags for this message. - optional bool select = 1; - // Generate setter flags for this message. - optional bool set = 2; - // Treat this message as a wrapper for the value field inside it. - optional bool wrapper = 3; - // Generate semantical flags for this message. Only active when set is also set. - optional bool semantical = 4; -} - -extend google.protobuf.MessageOptions { - optional MessageOptions message = 51886; -} - -message FieldOptions { - // Skip generating (field mask) selector flags for this field. - optional bool select = 1; - // Skip generating setter flags for this field. - optional bool set = 2; - // New flag definition for custom type flag. - // Specified as github.com/username/repo/package.New{CustomType}Flag. - optional string set_flag_new_func = 3; - // Custom value getter from the custom flag type. - // Specified as github.com/username/repo/package.Get{CustomType}FromFlag. - optional string set_flag_getter_func = 4; - // Set flag and all of its subfield flags to hidden. - optional bool hidden = 5; - // Implies field has meaning just by existing. Only active when set is also set. - optional bool semantical = 6; -} - -extend google.protobuf.FieldOptions { - optional FieldOptions field = 51886; -} - -message OneofOptions { - -} - -extend google.protobuf.OneofOptions { - optional OneofOptions oneof = 51886; -} - -message EnumOptions { - // Path where the custom enum values are defined. - // The map must be of type string to int32, where string is an alias name and - // int32 must be a valid enum int32. - optional string alias_map = 1; -} - -extend google.protobuf.EnumOptions { - optional EnumOptions enum = 51886; -} - -message EnumValueOptions { - -} - -extend google.protobuf.EnumValueOptions { - optional EnumValueOptions enum_value = 51886; -} - -message ServiceOptions { - -} - -extend google.protobuf.ServiceOptions { - optional ServiceOptions service = 51886; -} - -message MethodOptions { - -} - -extend google.protobuf.MethodOptions { - optional MethodOptions method = 51886; -} diff --git a/annotations.proto b/annotations.proto new file mode 120000 index 0000000..5636a88 --- /dev/null +++ b/annotations.proto @@ -0,0 +1 @@ +./api/thethings/flags/annotations.proto \ No newline at end of file diff --git a/api/buf.yaml b/api/buf.yaml new file mode 100644 index 0000000..7b998ff --- /dev/null +++ b/api/buf.yaml @@ -0,0 +1,10 @@ +version: v1 +name: buf.build/thethingsindustries/protoc-gen-go-flags +lint: + use: + - DEFAULT + except: + - PACKAGE_VERSION_SUFFIX +breaking: + use: + - FILE diff --git a/api/thethings/flags/annotations.proto b/api/thethings/flags/annotations.proto new file mode 100644 index 0000000..bb07e97 --- /dev/null +++ b/api/thethings/flags/annotations.proto @@ -0,0 +1,103 @@ +// Copyright © 2021 The Things Industries B.V. +// SPDX-License-Identifier: Apache-2.0 + +syntax = "proto2"; + +package thethings.flags; + +option go_package = "github.com/TheThingsIndustries/protoc-gen-go-flags/annotations"; + +import "google/protobuf/descriptor.proto"; + +// NOTE: protoc-gen-go-flags is primarily intended for internal use by +// The Things Industries. We have therefore chosen to use option number 51886, +// which is in the 50000-99999 range reserved for internal use within individual +// organizations. For this reason, the option number is not registered on +// https://github.com/protocolbuffers/protobuf/blob/master/docs/options.md. + +message FileOptions { + +} + +extend google.protobuf.FileOptions { + optional FileOptions file = 51886; +} + +message MessageOptions { + // Generate (field mask) selector flags for this message. + optional bool select = 1; + // Generate setter flags for this message. + optional bool set = 2; + // Treat this message as a wrapper for the value field inside it. + optional bool wrapper = 3; + // Generate semantical flags for this message. Only active when set is also set. + optional bool semantical = 4; +} + +extend google.protobuf.MessageOptions { + optional MessageOptions message = 51886; +} + +message FieldOptions { + // Skip generating (field mask) selector flags for this field. + optional bool select = 1; + // Skip generating setter flags for this field. + optional bool set = 2; + // New flag definition for custom type flag. + // Specified as github.com/username/repo/package.New{CustomType}Flag. + optional string set_flag_new_func = 3; + // Custom value getter from the custom flag type. + // Specified as github.com/username/repo/package.Get{CustomType}FromFlag. + optional string set_flag_getter_func = 4; + // Set flag and all of its subfield flags to hidden. + optional bool hidden = 5; + // Implies field has meaning just by existing. Only active when set is also set. + optional bool semantical = 6; +} + +extend google.protobuf.FieldOptions { + optional FieldOptions field = 51886; +} + +message OneofOptions { + +} + +extend google.protobuf.OneofOptions { + optional OneofOptions oneof = 51886; +} + +message EnumOptions { + // Path where the custom enum values are defined. + // The map must be of type string to int32, where string is an alias name and + // int32 must be a valid enum int32. + optional string alias_map = 1; +} + +extend google.protobuf.EnumOptions { + optional EnumOptions enum = 51886; +} + +message EnumValueOptions { + +} + +extend google.protobuf.EnumValueOptions { + optional EnumValueOptions enum_value = 51886; +} + +message ServiceOptions { + +} + +extend google.protobuf.ServiceOptions { + optional ServiceOptions service = 51886; +} + +message MethodOptions { + +} + +extend google.protobuf.MethodOptions { + optional MethodOptions method = 51886; +} diff --git a/buf.gen.yaml b/buf.gen.yaml new file mode 100644 index 0000000..977c7af --- /dev/null +++ b/buf.gen.yaml @@ -0,0 +1,5 @@ +version: v1 +plugins: + - name: go + out: . + opt: module=github.com/TheThingsIndustries/protoc-gen-go-flags diff --git a/buf.work.yaml b/buf.work.yaml new file mode 100644 index 0000000..a2fa5f5 --- /dev/null +++ b/buf.work.yaml @@ -0,0 +1,3 @@ +version: v1 +directories: + - api From ad9dee8297ac4f74604a4a7bc4b14a9d1fdcd66c Mon Sep 17 00:00:00 2001 From: Johan Stokking Date: Fri, 4 Aug 2023 14:28:41 +0200 Subject: [PATCH 2/9] Update Go --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index 21017c8..8e41f57 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/TheThingsIndustries/protoc-gen-go-flags -go 1.17 +go 1.20 require ( github.com/google/go-cmp v0.5.9 From 193cf216cd41ace6ca0e142a5176bbd7936be0ec Mon Sep 17 00:00:00 2001 From: Johan Stokking Date: Fri, 4 Aug 2023 14:28:53 +0200 Subject: [PATCH 3/9] Move annotations.proto to api/thethings/flags --- annotations.proto | 1 - api/thethings/flags/annotations.proto | 24 +++++++----------------- 2 files changed, 7 insertions(+), 18 deletions(-) delete mode 120000 annotations.proto diff --git a/annotations.proto b/annotations.proto deleted file mode 120000 index 5636a88..0000000 --- a/annotations.proto +++ /dev/null @@ -1 +0,0 @@ -./api/thethings/flags/annotations.proto \ No newline at end of file diff --git a/api/thethings/flags/annotations.proto b/api/thethings/flags/annotations.proto index bb07e97..c323e9c 100644 --- a/api/thethings/flags/annotations.proto +++ b/api/thethings/flags/annotations.proto @@ -5,19 +5,17 @@ syntax = "proto2"; package thethings.flags; -option go_package = "github.com/TheThingsIndustries/protoc-gen-go-flags/annotations"; - import "google/protobuf/descriptor.proto"; +option go_package = "github.com/TheThingsIndustries/protoc-gen-go-flags/annotations"; + // NOTE: protoc-gen-go-flags is primarily intended for internal use by // The Things Industries. We have therefore chosen to use option number 51886, // which is in the 50000-99999 range reserved for internal use within individual // organizations. For this reason, the option number is not registered on // https://github.com/protocolbuffers/protobuf/blob/master/docs/options.md. -message FileOptions { - -} +message FileOptions {} extend google.protobuf.FileOptions { optional FileOptions file = 51886; @@ -59,9 +57,7 @@ extend google.protobuf.FieldOptions { optional FieldOptions field = 51886; } -message OneofOptions { - -} +message OneofOptions {} extend google.protobuf.OneofOptions { optional OneofOptions oneof = 51886; @@ -78,25 +74,19 @@ extend google.protobuf.EnumOptions { optional EnumOptions enum = 51886; } -message EnumValueOptions { - -} +message EnumValueOptions {} extend google.protobuf.EnumValueOptions { optional EnumValueOptions enum_value = 51886; } -message ServiceOptions { - -} +message ServiceOptions {} extend google.protobuf.ServiceOptions { optional ServiceOptions service = 51886; } -message MethodOptions { - -} +message MethodOptions {} extend google.protobuf.MethodOptions { optional MethodOptions method = 51886; From 01f92f7a0c53410c956159b7267a14b10080c8cb Mon Sep 17 00:00:00 2001 From: Johan Stokking Date: Fri, 4 Aug 2023 14:29:46 +0200 Subject: [PATCH 4/9] Format files and update imports --- test/enums.proto | 28 ++++++++----- test/message.proto | 41 +++++++++++++------- test/scalars.proto | 97 ++++++++++++++++++++++++---------------------- test/wkts.proto | 56 ++++++++++++++------------ 4 files changed, 127 insertions(+), 95 deletions(-) diff --git a/test/enums.proto b/test/enums.proto index 29b9a8a..4768442 100644 --- a/test/enums.proto +++ b/test/enums.proto @@ -3,10 +3,10 @@ syntax = "proto3"; -import "annotations.proto"; - package thethings.flags.test; +import "thethings/flags/annotations.proto"; + option go_package = "github.com/TheThingsIndustries/protoc-gen-go-flags/test"; enum RegularEnum { @@ -17,23 +17,28 @@ enum RegularEnum { } enum CustomEnum { - option (thethings.flags.enum) = { - alias_map: "github.com/TheThingsIndustries/protoc-gen-go-flags/test/enum.CustomEnum_customvalue" - }; + option (thethings.flags.enum) = {alias_map: "github.com/TheThingsIndustries/protoc-gen-go-flags/test/enum.CustomEnum_customvalue"}; CUSTOM_UNKNOWN = 0; - CUSTOM_V1_0 = 1; - CUSTOM_V1_0_1 = 2; + CUSTOM_V1_0 = 1; + CUSTOM_V1_0_1 = 2; } message CustomEnumValue { - option (thethings.flags.message) = { select: true, set: true, wrapper: true }; + option (thethings.flags.message) = { + select: true, + set: true, + wrapper: true + }; CustomEnum value = 1; } message MessageWithEnums { - option (thethings.flags.message) = { select: true, set: true }; + option (thethings.flags.message) = { + select: true, + set: true + }; RegularEnum regular = 1; repeated RegularEnum regulars = 2; @@ -46,7 +51,10 @@ message MessageWithEnums { } message MessageWithOneofEnums { - option (thethings.flags.message) = { select: true, set: true }; + option (thethings.flags.message) = { + select: true, + set: true + }; oneof value { RegularEnum regular = 1; diff --git a/test/message.proto b/test/message.proto index d7138db..6bb4464 100644 --- a/test/message.proto +++ b/test/message.proto @@ -3,41 +3,55 @@ syntax = "proto3"; -import "annotations.proto"; - package thethings.flags.test; +import "thethings/flags/annotations.proto"; + option go_package = "github.com/TheThingsIndustries/protoc-gen-go-flags/test"; message SemanticalMessage { - option (thethings.flags.message) = { select: false, set: true, semantical: true }; + option (thethings.flags.message) = { + select: false, + set: true, + semantical: true + }; message Empty { - option (thethings.flags.message) = { select: false, set: true}; + option (thethings.flags.message) = { + select: false, + set: true + }; } message NonEmpty { - option (thethings.flags.message) = { select: false, set: true}; - + option (thethings.flags.message) = { + select: false, + set: true + }; + bool bool_value = 1; } Empty empty = 1; - Empty empty_overruled = 2 [ - (thethings.flags.field) = { semantical: false } - ]; + Empty empty_overruled = 2 [(thethings.flags.field) = {semantical: false}]; NonEmpty non_empty = 3; } message SemanticalOneOfMessage { - option (thethings.flags.message) = { select: false, set: true, semantical: true }; - message Empty { - } + option (thethings.flags.message) = { + select: false, + set: true, + semantical: true + }; + message Empty {} message NonEmpty { - option (thethings.flags.message) = { select: false, set: true }; + option (thethings.flags.message) = { + select: false, + set: true + }; bool bool_value = 1; } @@ -46,4 +60,3 @@ message SemanticalOneOfMessage { NonEmpty alternative = 2; } } - diff --git a/test/scalars.proto b/test/scalars.proto index 2d43b53..1b809f3 100644 --- a/test/scalars.proto +++ b/test/scalars.proto @@ -3,14 +3,17 @@ syntax = "proto3"; -import "annotations.proto"; - package thethings.flags.test; +import "thethings/flags/annotations.proto"; + option go_package = "github.com/TheThingsIndustries/protoc-gen-go-flags/test"; message MessageWithScalars { - option (thethings.flags.message) = { select: true, set: true }; + option (thethings.flags.message) = { + select: true, + set: true + }; double double_value = 1; repeated double double_values = 2; @@ -57,22 +60,21 @@ message MessageWithScalars { bytes bytes_value = 29; repeated bytes bytes_values = 30; - bytes hex_bytes_value = 31 [ - (thethings.flags.field) = { - set_flag_new_func: "github.com/TheThingsIndustries/protoc-gen-go-flags/flagsplugin.NewHexBytesFlag", - set_flag_getter_func: "github.com/TheThingsIndustries/protoc-gen-go-flags/flagsplugin.GetBytes" - } - ]; - repeated bytes hex_bytes_values = 32 [ - (thethings.flags.field) = { - set_flag_new_func: "github.com/TheThingsIndustries/protoc-gen-go-flags/flagsplugin.NewHexBytesSliceFlag", - set_flag_getter_func: "github.com/TheThingsIndustries/protoc-gen-go-flags/flagsplugin.GetBytesSlice" - } - ]; + bytes hex_bytes_value = 31 [(thethings.flags.field) = { + set_flag_new_func: "github.com/TheThingsIndustries/protoc-gen-go-flags/flagsplugin.NewHexBytesFlag", + set_flag_getter_func: "github.com/TheThingsIndustries/protoc-gen-go-flags/flagsplugin.GetBytes" + }]; + repeated bytes hex_bytes_values = 32 [(thethings.flags.field) = { + set_flag_new_func: "github.com/TheThingsIndustries/protoc-gen-go-flags/flagsplugin.NewHexBytesSliceFlag", + set_flag_getter_func: "github.com/TheThingsIndustries/protoc-gen-go-flags/flagsplugin.GetBytesSlice" + }]; } message MessageWithOneofScalars { - option (thethings.flags.message) = { select: true, set: true }; + option (thethings.flags.message) = { + select: true, + set: true + }; oneof value { double double_value = 1; @@ -90,60 +92,61 @@ message MessageWithOneofScalars { bool bool_value = 13; string string_value = 14; bytes bytes_value = 15; - bytes hex_bytes_value = 16 [ - (thethings.flags.field) = { + bytes hex_bytes_value = 16 [(thethings.flags.field) = { set_flag_new_func: "github.com/TheThingsIndustries/protoc-gen-go-flags/flagsplugin.NewHexBytesFlag", set_flag_getter_func: "github.com/TheThingsIndustries/protoc-gen-go-flags/flagsplugin.GetBytes" - } - ]; + }]; } } message MessageWithScalarMaps { - option (thethings.flags.message) = { select: true, set: true }; + option (thethings.flags.message) = { + select: true, + set: true + }; - map string_double_map = 1; + map string_double_map = 1; // map is impossible. - map string_float_map = 3; + map string_float_map = 3; // map is impossible. - map string_int32_map = 5; - map int32_string_map = 6; + map string_int32_map = 5; + map int32_string_map = 6; - map string_int64_map = 7; - map int64_string_map = 8; + map string_int64_map = 7; + map int64_string_map = 8; - map string_uint32_map = 9; - map uint32_string_map = 10; + map string_uint32_map = 9; + map uint32_string_map = 10; - map string_uint64_map = 11; - map uint64_string_map = 12; + map string_uint64_map = 11; + map uint64_string_map = 12; - map string_sint32_map = 13; - map sint32_string_map = 14; + map string_sint32_map = 13; + map sint32_string_map = 14; - map string_sint64_map = 15; - map sint64_string_map = 16; + map string_sint64_map = 15; + map sint64_string_map = 16; - map string_fixed32_map = 17; - map fixed32_string_map = 18; + map string_fixed32_map = 17; + map fixed32_string_map = 18; - map string_fixed64_map = 19; - map fixed64_string_map = 20; + map string_fixed64_map = 19; + map fixed64_string_map = 20; - map string_sfixed32_map = 21; - map sfixed32_string_map = 22; + map string_sfixed32_map = 21; + map sfixed32_string_map = 22; - map string_sfixed64_map = 23; - map sfixed64_string_map = 24; + map string_sfixed64_map = 23; + map sfixed64_string_map = 24; - map string_bool_map = 25; - map bool_string_map = 26; + map string_bool_map = 25; + map bool_string_map = 26; - map string_string_map = 27; + map string_string_map = 27; // map is above. - map string_bytes_map = 29; + map string_bytes_map = 29; // map is impossible. } diff --git a/test/wkts.proto b/test/wkts.proto index 9bc15ec..03d2b1a 100644 --- a/test/wkts.proto +++ b/test/wkts.proto @@ -3,7 +3,7 @@ syntax = "proto3"; -import "annotations.proto"; +package thethings.flags.test; import "google/protobuf/any.proto"; import "google/protobuf/duration.proto"; @@ -12,13 +12,15 @@ import "google/protobuf/field_mask.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; - -package thethings.flags.test; +import "thethings/flags/annotations.proto"; option go_package = "github.com/TheThingsIndustries/protoc-gen-go-flags/test"; message MessageWithWKTs { - option (thethings.flags.message) = { select: true, set: true }; + option (thethings.flags.message) = { + select: true, + set: true + }; google.protobuf.DoubleValue double_value = 1; repeated google.protobuf.DoubleValue double_values = 2; @@ -73,7 +75,10 @@ message MessageWithWKTs { } message MessageWithOneofWKTs { - option (thethings.flags.message) = { select: true, set: true }; + option (thethings.flags.message) = { + select: true, + set: true + }; oneof value { google.protobuf.DoubleValue double_value = 1; @@ -97,23 +102,26 @@ message MessageWithOneofWKTs { } message MessageWithWKTMaps { - option (thethings.flags.message) = { select: true, set: true }; - - map string_double_map = 1; - map string_float_map = 2; - map string_int32_map = 3; - map string_int64_map = 4; - map string_uint32_map = 5; - map string_uint64_map = 6; - map string_bool_map = 7; - map string_string_map = 8; - map string_bytes_map = 9; - map string_empty_map = 10; - map string_timestamp_map = 11; - map string_duration_map = 12; - map string_field_mask_map = 13; - map string_value_map = 14; - map string_list_value_map = 15; - map string_struct_map = 16; - map string_any_map = 17; + option (thethings.flags.message) = { + select: true, + set: true + }; + + map string_double_map = 1; + map string_float_map = 2; + map string_int32_map = 3; + map string_int64_map = 4; + map string_uint32_map = 5; + map string_uint64_map = 6; + map string_bool_map = 7; + map string_string_map = 8; + map string_bytes_map = 9; + map string_empty_map = 10; + map string_timestamp_map = 11; + map string_duration_map = 12; + map string_field_mask_map = 13; + map string_value_map = 14; + map string_list_value_map = 15; + map string_struct_map = 16; + map string_any_map = 17; } From 7605746efe33a2533a239cca111f68266fea46de Mon Sep 17 00:00:00 2001 From: Johan Stokking Date: Fri, 4 Aug 2023 14:29:56 +0200 Subject: [PATCH 5/9] Regenerate protos --- annotations/annotations.pb.go | 314 ++++++++++++++++---------------- test/golang/api.pb.go | 4 +- test/golang/enums.pb.go | 7 +- test/golang/enums_flags.pb.go | 2 +- test/golang/message.pb.go | 7 +- test/golang/message_flags.pb.go | 2 +- test/golang/scalars.pb.go | 7 +- test/golang/scalars_flags.pb.go | 2 +- test/golang/wkts.pb.go | 7 +- test/golang/wkts_flags.pb.go | 2 +- 10 files changed, 179 insertions(+), 175 deletions(-) diff --git a/annotations/annotations.pb.go b/annotations/annotations.pb.go index 1f04579..5d47ba6 100644 --- a/annotations/annotations.pb.go +++ b/annotations/annotations.pb.go @@ -3,9 +3,9 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v3.20.1 -// source: protoc-gen-go-flags/annotations.proto +// protoc-gen-go v1.31.0 +// protoc (unknown) +// source: thethings/flags/annotations.proto package annotations @@ -33,7 +33,7 @@ type FileOptions struct { func (x *FileOptions) Reset() { *x = FileOptions{} if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_go_flags_annotations_proto_msgTypes[0] + mi := &file_thethings_flags_annotations_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -46,7 +46,7 @@ func (x *FileOptions) String() string { func (*FileOptions) ProtoMessage() {} func (x *FileOptions) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_go_flags_annotations_proto_msgTypes[0] + mi := &file_thethings_flags_annotations_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -59,7 +59,7 @@ func (x *FileOptions) ProtoReflect() protoreflect.Message { // Deprecated: Use FileOptions.ProtoReflect.Descriptor instead. func (*FileOptions) Descriptor() ([]byte, []int) { - return file_protoc_gen_go_flags_annotations_proto_rawDescGZIP(), []int{0} + return file_thethings_flags_annotations_proto_rawDescGZIP(), []int{0} } type MessageOptions struct { @@ -80,7 +80,7 @@ type MessageOptions struct { func (x *MessageOptions) Reset() { *x = MessageOptions{} if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_go_flags_annotations_proto_msgTypes[1] + mi := &file_thethings_flags_annotations_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -93,7 +93,7 @@ func (x *MessageOptions) String() string { func (*MessageOptions) ProtoMessage() {} func (x *MessageOptions) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_go_flags_annotations_proto_msgTypes[1] + mi := &file_thethings_flags_annotations_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -106,7 +106,7 @@ func (x *MessageOptions) ProtoReflect() protoreflect.Message { // Deprecated: Use MessageOptions.ProtoReflect.Descriptor instead. func (*MessageOptions) Descriptor() ([]byte, []int) { - return file_protoc_gen_go_flags_annotations_proto_rawDescGZIP(), []int{1} + return file_thethings_flags_annotations_proto_rawDescGZIP(), []int{1} } func (x *MessageOptions) GetSelect() bool { @@ -161,7 +161,7 @@ type FieldOptions struct { func (x *FieldOptions) Reset() { *x = FieldOptions{} if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_go_flags_annotations_proto_msgTypes[2] + mi := &file_thethings_flags_annotations_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -174,7 +174,7 @@ func (x *FieldOptions) String() string { func (*FieldOptions) ProtoMessage() {} func (x *FieldOptions) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_go_flags_annotations_proto_msgTypes[2] + mi := &file_thethings_flags_annotations_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -187,7 +187,7 @@ func (x *FieldOptions) ProtoReflect() protoreflect.Message { // Deprecated: Use FieldOptions.ProtoReflect.Descriptor instead. func (*FieldOptions) Descriptor() ([]byte, []int) { - return file_protoc_gen_go_flags_annotations_proto_rawDescGZIP(), []int{2} + return file_thethings_flags_annotations_proto_rawDescGZIP(), []int{2} } func (x *FieldOptions) GetSelect() bool { @@ -241,7 +241,7 @@ type OneofOptions struct { func (x *OneofOptions) Reset() { *x = OneofOptions{} if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_go_flags_annotations_proto_msgTypes[3] + mi := &file_thethings_flags_annotations_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -254,7 +254,7 @@ func (x *OneofOptions) String() string { func (*OneofOptions) ProtoMessage() {} func (x *OneofOptions) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_go_flags_annotations_proto_msgTypes[3] + mi := &file_thethings_flags_annotations_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -267,7 +267,7 @@ func (x *OneofOptions) ProtoReflect() protoreflect.Message { // Deprecated: Use OneofOptions.ProtoReflect.Descriptor instead. func (*OneofOptions) Descriptor() ([]byte, []int) { - return file_protoc_gen_go_flags_annotations_proto_rawDescGZIP(), []int{3} + return file_thethings_flags_annotations_proto_rawDescGZIP(), []int{3} } type EnumOptions struct { @@ -284,7 +284,7 @@ type EnumOptions struct { func (x *EnumOptions) Reset() { *x = EnumOptions{} if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_go_flags_annotations_proto_msgTypes[4] + mi := &file_thethings_flags_annotations_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -297,7 +297,7 @@ func (x *EnumOptions) String() string { func (*EnumOptions) ProtoMessage() {} func (x *EnumOptions) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_go_flags_annotations_proto_msgTypes[4] + mi := &file_thethings_flags_annotations_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -310,7 +310,7 @@ func (x *EnumOptions) ProtoReflect() protoreflect.Message { // Deprecated: Use EnumOptions.ProtoReflect.Descriptor instead. func (*EnumOptions) Descriptor() ([]byte, []int) { - return file_protoc_gen_go_flags_annotations_proto_rawDescGZIP(), []int{4} + return file_thethings_flags_annotations_proto_rawDescGZIP(), []int{4} } func (x *EnumOptions) GetAliasMap() string { @@ -329,7 +329,7 @@ type EnumValueOptions struct { func (x *EnumValueOptions) Reset() { *x = EnumValueOptions{} if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_go_flags_annotations_proto_msgTypes[5] + mi := &file_thethings_flags_annotations_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -342,7 +342,7 @@ func (x *EnumValueOptions) String() string { func (*EnumValueOptions) ProtoMessage() {} func (x *EnumValueOptions) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_go_flags_annotations_proto_msgTypes[5] + mi := &file_thethings_flags_annotations_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -355,7 +355,7 @@ func (x *EnumValueOptions) ProtoReflect() protoreflect.Message { // Deprecated: Use EnumValueOptions.ProtoReflect.Descriptor instead. func (*EnumValueOptions) Descriptor() ([]byte, []int) { - return file_protoc_gen_go_flags_annotations_proto_rawDescGZIP(), []int{5} + return file_thethings_flags_annotations_proto_rawDescGZIP(), []int{5} } type ServiceOptions struct { @@ -367,7 +367,7 @@ type ServiceOptions struct { func (x *ServiceOptions) Reset() { *x = ServiceOptions{} if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_go_flags_annotations_proto_msgTypes[6] + mi := &file_thethings_flags_annotations_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -380,7 +380,7 @@ func (x *ServiceOptions) String() string { func (*ServiceOptions) ProtoMessage() {} func (x *ServiceOptions) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_go_flags_annotations_proto_msgTypes[6] + mi := &file_thethings_flags_annotations_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -393,7 +393,7 @@ func (x *ServiceOptions) ProtoReflect() protoreflect.Message { // Deprecated: Use ServiceOptions.ProtoReflect.Descriptor instead. func (*ServiceOptions) Descriptor() ([]byte, []int) { - return file_protoc_gen_go_flags_annotations_proto_rawDescGZIP(), []int{6} + return file_thethings_flags_annotations_proto_rawDescGZIP(), []int{6} } type MethodOptions struct { @@ -405,7 +405,7 @@ type MethodOptions struct { func (x *MethodOptions) Reset() { *x = MethodOptions{} if protoimpl.UnsafeEnabled { - mi := &file_protoc_gen_go_flags_annotations_proto_msgTypes[7] + mi := &file_thethings_flags_annotations_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -418,7 +418,7 @@ func (x *MethodOptions) String() string { func (*MethodOptions) ProtoMessage() {} func (x *MethodOptions) ProtoReflect() protoreflect.Message { - mi := &file_protoc_gen_go_flags_annotations_proto_msgTypes[7] + mi := &file_thethings_flags_annotations_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -431,17 +431,17 @@ func (x *MethodOptions) ProtoReflect() protoreflect.Message { // Deprecated: Use MethodOptions.ProtoReflect.Descriptor instead. func (*MethodOptions) Descriptor() ([]byte, []int) { - return file_protoc_gen_go_flags_annotations_proto_rawDescGZIP(), []int{7} + return file_thethings_flags_annotations_proto_rawDescGZIP(), []int{7} } -var file_protoc_gen_go_flags_annotations_proto_extTypes = []protoimpl.ExtensionInfo{ +var file_thethings_flags_annotations_proto_extTypes = []protoimpl.ExtensionInfo{ { ExtendedType: (*descriptorpb.FileOptions)(nil), ExtensionType: (*FileOptions)(nil), Field: 51886, Name: "thethings.flags.file", Tag: "bytes,51886,opt,name=file", - Filename: "protoc-gen-go-flags/annotations.proto", + Filename: "thethings/flags/annotations.proto", }, { ExtendedType: (*descriptorpb.MessageOptions)(nil), @@ -449,7 +449,7 @@ var file_protoc_gen_go_flags_annotations_proto_extTypes = []protoimpl.ExtensionI Field: 51886, Name: "thethings.flags.message", Tag: "bytes,51886,opt,name=message", - Filename: "protoc-gen-go-flags/annotations.proto", + Filename: "thethings/flags/annotations.proto", }, { ExtendedType: (*descriptorpb.FieldOptions)(nil), @@ -457,7 +457,7 @@ var file_protoc_gen_go_flags_annotations_proto_extTypes = []protoimpl.ExtensionI Field: 51886, Name: "thethings.flags.field", Tag: "bytes,51886,opt,name=field", - Filename: "protoc-gen-go-flags/annotations.proto", + Filename: "thethings/flags/annotations.proto", }, { ExtendedType: (*descriptorpb.OneofOptions)(nil), @@ -465,7 +465,7 @@ var file_protoc_gen_go_flags_annotations_proto_extTypes = []protoimpl.ExtensionI Field: 51886, Name: "thethings.flags.oneof", Tag: "bytes,51886,opt,name=oneof", - Filename: "protoc-gen-go-flags/annotations.proto", + Filename: "thethings/flags/annotations.proto", }, { ExtendedType: (*descriptorpb.EnumOptions)(nil), @@ -473,7 +473,7 @@ var file_protoc_gen_go_flags_annotations_proto_extTypes = []protoimpl.ExtensionI Field: 51886, Name: "thethings.flags.enum", Tag: "bytes,51886,opt,name=enum", - Filename: "protoc-gen-go-flags/annotations.proto", + Filename: "thethings/flags/annotations.proto", }, { ExtendedType: (*descriptorpb.EnumValueOptions)(nil), @@ -481,7 +481,7 @@ var file_protoc_gen_go_flags_annotations_proto_extTypes = []protoimpl.ExtensionI Field: 51886, Name: "thethings.flags.enum_value", Tag: "bytes,51886,opt,name=enum_value", - Filename: "protoc-gen-go-flags/annotations.proto", + Filename: "thethings/flags/annotations.proto", }, { ExtendedType: (*descriptorpb.ServiceOptions)(nil), @@ -489,7 +489,7 @@ var file_protoc_gen_go_flags_annotations_proto_extTypes = []protoimpl.ExtensionI Field: 51886, Name: "thethings.flags.service", Tag: "bytes,51886,opt,name=service", - Filename: "protoc-gen-go-flags/annotations.proto", + Filename: "thethings/flags/annotations.proto", }, { ExtendedType: (*descriptorpb.MethodOptions)(nil), @@ -497,160 +497,160 @@ var file_protoc_gen_go_flags_annotations_proto_extTypes = []protoimpl.ExtensionI Field: 51886, Name: "thethings.flags.method", Tag: "bytes,51886,opt,name=method", - Filename: "protoc-gen-go-flags/annotations.proto", + Filename: "thethings/flags/annotations.proto", }, } // Extension fields to descriptorpb.FileOptions. var ( // optional thethings.flags.FileOptions file = 51886; - E_File = &file_protoc_gen_go_flags_annotations_proto_extTypes[0] + E_File = &file_thethings_flags_annotations_proto_extTypes[0] ) // Extension fields to descriptorpb.MessageOptions. var ( // optional thethings.flags.MessageOptions message = 51886; - E_Message = &file_protoc_gen_go_flags_annotations_proto_extTypes[1] + E_Message = &file_thethings_flags_annotations_proto_extTypes[1] ) // Extension fields to descriptorpb.FieldOptions. var ( // optional thethings.flags.FieldOptions field = 51886; - E_Field = &file_protoc_gen_go_flags_annotations_proto_extTypes[2] + E_Field = &file_thethings_flags_annotations_proto_extTypes[2] ) // Extension fields to descriptorpb.OneofOptions. var ( // optional thethings.flags.OneofOptions oneof = 51886; - E_Oneof = &file_protoc_gen_go_flags_annotations_proto_extTypes[3] + E_Oneof = &file_thethings_flags_annotations_proto_extTypes[3] ) // Extension fields to descriptorpb.EnumOptions. var ( // optional thethings.flags.EnumOptions enum = 51886; - E_Enum = &file_protoc_gen_go_flags_annotations_proto_extTypes[4] + E_Enum = &file_thethings_flags_annotations_proto_extTypes[4] ) // Extension fields to descriptorpb.EnumValueOptions. var ( // optional thethings.flags.EnumValueOptions enum_value = 51886; - E_EnumValue = &file_protoc_gen_go_flags_annotations_proto_extTypes[5] + E_EnumValue = &file_thethings_flags_annotations_proto_extTypes[5] ) // Extension fields to descriptorpb.ServiceOptions. var ( // optional thethings.flags.ServiceOptions service = 51886; - E_Service = &file_protoc_gen_go_flags_annotations_proto_extTypes[6] + E_Service = &file_thethings_flags_annotations_proto_extTypes[6] ) // Extension fields to descriptorpb.MethodOptions. var ( // optional thethings.flags.MethodOptions method = 51886; - E_Method = &file_protoc_gen_go_flags_annotations_proto_extTypes[7] + E_Method = &file_thethings_flags_annotations_proto_extTypes[7] ) -var File_protoc_gen_go_flags_annotations_proto protoreflect.FileDescriptor - -var file_protoc_gen_go_flags_annotations_proto_rawDesc = []byte{ - 0x0a, 0x25, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x67, 0x6f, 0x2d, - 0x66, 0x6c, 0x61, 0x67, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x74, 0x68, 0x65, 0x74, 0x68, 0x69, 0x6e, - 0x67, 0x73, 0x2e, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, - 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0d, 0x0a, 0x0b, 0x46, 0x69, - 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x74, 0x0a, 0x0e, 0x4d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, - 0x65, 0x6c, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x65, 0x6c, - 0x65, 0x63, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x03, 0x73, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, - 0x1e, 0x0a, 0x0a, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x0a, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x22, - 0xcc, 0x01, 0x0a, 0x0c, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x06, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x74, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x73, 0x65, 0x74, 0x12, 0x29, 0x0a, 0x11, 0x73, 0x65, - 0x74, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x66, 0x75, 0x6e, 0x63, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x73, 0x65, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x4e, 0x65, - 0x77, 0x46, 0x75, 0x6e, 0x63, 0x12, 0x2f, 0x0a, 0x14, 0x73, 0x65, 0x74, 0x5f, 0x66, 0x6c, 0x61, - 0x67, 0x5f, 0x67, 0x65, 0x74, 0x74, 0x65, 0x72, 0x5f, 0x66, 0x75, 0x6e, 0x63, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x11, 0x73, 0x65, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x47, 0x65, 0x74, 0x74, - 0x65, 0x72, 0x46, 0x75, 0x6e, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x12, 0x1e, - 0x0a, 0x0a, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0a, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x22, 0x0e, - 0x0a, 0x0c, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2a, - 0x0a, 0x0b, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1b, 0x0a, - 0x09, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x4d, 0x61, 0x70, 0x22, 0x12, 0x0a, 0x10, 0x45, 0x6e, - 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x10, - 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x22, 0x0f, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x3a, 0x50, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, - 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xae, 0x95, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1c, 0x2e, 0x74, 0x68, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x66, 0x6c, 0x61, 0x67, - 0x73, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x04, 0x66, - 0x69, 0x6c, 0x65, 0x3a, 0x5c, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1f, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0xae, 0x95, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x68, 0x65, 0x74, 0x68, 0x69, - 0x6e, 0x67, 0x73, 0x2e, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x3a, 0x54, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, - 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xae, 0x95, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x68, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x66, 0x6c, - 0x61, 0x67, 0x73, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x3a, 0x54, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, - 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, - 0xae, 0x95, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x68, 0x65, 0x74, 0x68, 0x69, - 0x6e, 0x67, 0x73, 0x2e, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x3a, 0x50, 0x0a, - 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, +var File_thethings_flags_annotations_proto protoreflect.FileDescriptor + +var file_thethings_flags_annotations_proto_rawDesc = []byte{ + 0x0a, 0x21, 0x74, 0x68, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x66, 0x6c, 0x61, 0x67, + 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x74, 0x68, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x66, + 0x6c, 0x61, 0x67, 0x73, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x0d, 0x0a, 0x0b, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x74, 0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6c, 0x65, 0x63, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x12, + 0x10, 0x0a, 0x03, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x73, 0x65, + 0x74, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x07, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x73, + 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0a, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x22, 0xcc, 0x01, 0x0a, 0x0c, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x16, 0x0a, 0x06, + 0x73, 0x65, 0x6c, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x73, 0x65, + 0x6c, 0x65, 0x63, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x03, 0x73, 0x65, 0x74, 0x12, 0x29, 0x0a, 0x11, 0x73, 0x65, 0x74, 0x5f, 0x66, 0x6c, + 0x61, 0x67, 0x5f, 0x6e, 0x65, 0x77, 0x5f, 0x66, 0x75, 0x6e, 0x63, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0e, 0x73, 0x65, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x4e, 0x65, 0x77, 0x46, 0x75, 0x6e, + 0x63, 0x12, 0x2f, 0x0a, 0x14, 0x73, 0x65, 0x74, 0x5f, 0x66, 0x6c, 0x61, 0x67, 0x5f, 0x67, 0x65, + 0x74, 0x74, 0x65, 0x72, 0x5f, 0x66, 0x75, 0x6e, 0x63, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x11, 0x73, 0x65, 0x74, 0x46, 0x6c, 0x61, 0x67, 0x47, 0x65, 0x74, 0x74, 0x65, 0x72, 0x46, 0x75, + 0x6e, 0x63, 0x12, 0x16, 0x0a, 0x06, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x06, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x73, 0x65, + 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, + 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x22, 0x0e, 0x0a, 0x0c, 0x4f, 0x6e, + 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2a, 0x0a, 0x0b, 0x45, 0x6e, + 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x6c, 0x69, + 0x61, 0x73, 0x5f, 0x6d, 0x61, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x6c, + 0x69, 0x61, 0x73, 0x4d, 0x61, 0x70, 0x22, 0x12, 0x0a, 0x10, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x10, 0x0a, 0x0e, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x0f, 0x0a, 0x0d, + 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x50, 0x0a, + 0x04, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xae, 0x95, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, 0x68, - 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x2e, 0x45, 0x6e, - 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x3a, - 0x65, 0x0a, 0x0a, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x2e, + 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x2e, 0x46, 0x69, + 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x3a, + 0x5c, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xae, 0x95, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x68, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x2e, + 0x66, 0x6c, 0x61, 0x67, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x54, 0x0a, + 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x1d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xae, 0x95, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, + 0x74, 0x68, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x2e, + 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x05, 0x66, 0x69, + 0x65, 0x6c, 0x64, 0x3a, 0x54, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x1d, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4f, + 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xae, 0x95, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x74, 0x68, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x2e, + 0x66, 0x6c, 0x61, 0x67, 0x73, 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x3a, 0x50, 0x0a, 0x04, 0x65, 0x6e, 0x75, + 0x6d, 0x12, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0xae, 0x95, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, 0x68, 0x65, 0x74, 0x68, 0x69, + 0x6e, 0x67, 0x73, 0x2e, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x04, 0x65, 0x6e, 0x75, 0x6d, 0x3a, 0x65, 0x0a, 0x0a, 0x65, + 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x21, 0x2e, 0x67, 0x6f, 0x6f, 0x67, + 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6e, 0x75, 0x6d, + 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xae, 0x95, 0x03, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x74, 0x68, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x73, + 0x2e, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x09, 0x65, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x5c, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0xae, 0x95, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x74, 0x68, 0x65, 0x74, 0x68, - 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, - 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x09, 0x65, 0x6e, 0x75, - 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x5c, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x1f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0xae, 0x95, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x68, 0x65, - 0x74, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x2e, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x3a, 0x58, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x1e, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xae, - 0x95, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74, 0x68, 0x65, 0x74, 0x68, 0x69, 0x6e, - 0x67, 0x73, 0x2e, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, - 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x40, - 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x68, 0x65, - 0x54, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x49, 0x6e, 0x64, 0x75, 0x73, 0x74, 0x72, 0x69, 0x65, 0x73, - 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x67, 0x6f, 0x2d, 0x66, - 0x6c, 0x61, 0x67, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xae, + 0x95, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x74, 0x68, 0x65, 0x74, 0x68, 0x69, 0x6e, + 0x67, 0x73, 0x2e, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x3a, 0x58, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x1e, 0x2e, 0x67, 0x6f, 0x6f, + 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x4d, 0x65, 0x74, + 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0xae, 0x95, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74, 0x68, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x66, + 0x6c, 0x61, 0x67, 0x73, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x42, 0x40, 0x5a, 0x3e, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x54, 0x68, 0x65, 0x54, 0x68, 0x69, 0x6e, + 0x67, 0x73, 0x49, 0x6e, 0x64, 0x75, 0x73, 0x74, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x67, 0x6f, 0x2d, 0x66, 0x6c, 0x61, 0x67, 0x73, + 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, } var ( - file_protoc_gen_go_flags_annotations_proto_rawDescOnce sync.Once - file_protoc_gen_go_flags_annotations_proto_rawDescData = file_protoc_gen_go_flags_annotations_proto_rawDesc + file_thethings_flags_annotations_proto_rawDescOnce sync.Once + file_thethings_flags_annotations_proto_rawDescData = file_thethings_flags_annotations_proto_rawDesc ) -func file_protoc_gen_go_flags_annotations_proto_rawDescGZIP() []byte { - file_protoc_gen_go_flags_annotations_proto_rawDescOnce.Do(func() { - file_protoc_gen_go_flags_annotations_proto_rawDescData = protoimpl.X.CompressGZIP(file_protoc_gen_go_flags_annotations_proto_rawDescData) +func file_thethings_flags_annotations_proto_rawDescGZIP() []byte { + file_thethings_flags_annotations_proto_rawDescOnce.Do(func() { + file_thethings_flags_annotations_proto_rawDescData = protoimpl.X.CompressGZIP(file_thethings_flags_annotations_proto_rawDescData) }) - return file_protoc_gen_go_flags_annotations_proto_rawDescData + return file_thethings_flags_annotations_proto_rawDescData } -var file_protoc_gen_go_flags_annotations_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_protoc_gen_go_flags_annotations_proto_goTypes = []interface{}{ +var file_thethings_flags_annotations_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_thethings_flags_annotations_proto_goTypes = []interface{}{ (*FileOptions)(nil), // 0: thethings.flags.FileOptions (*MessageOptions)(nil), // 1: thethings.flags.MessageOptions (*FieldOptions)(nil), // 2: thethings.flags.FieldOptions @@ -668,7 +668,7 @@ var file_protoc_gen_go_flags_annotations_proto_goTypes = []interface{}{ (*descriptorpb.ServiceOptions)(nil), // 14: google.protobuf.ServiceOptions (*descriptorpb.MethodOptions)(nil), // 15: google.protobuf.MethodOptions } -var file_protoc_gen_go_flags_annotations_proto_depIdxs = []int32{ +var file_thethings_flags_annotations_proto_depIdxs = []int32{ 8, // 0: thethings.flags.file:extendee -> google.protobuf.FileOptions 9, // 1: thethings.flags.message:extendee -> google.protobuf.MessageOptions 10, // 2: thethings.flags.field:extendee -> google.protobuf.FieldOptions @@ -692,13 +692,13 @@ var file_protoc_gen_go_flags_annotations_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_protoc_gen_go_flags_annotations_proto_init() } -func file_protoc_gen_go_flags_annotations_proto_init() { - if File_protoc_gen_go_flags_annotations_proto != nil { +func init() { file_thethings_flags_annotations_proto_init() } +func file_thethings_flags_annotations_proto_init() { + if File_thethings_flags_annotations_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_protoc_gen_go_flags_annotations_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_thethings_flags_annotations_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FileOptions); i { case 0: return &v.state @@ -710,7 +710,7 @@ func file_protoc_gen_go_flags_annotations_proto_init() { return nil } } - file_protoc_gen_go_flags_annotations_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_thethings_flags_annotations_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MessageOptions); i { case 0: return &v.state @@ -722,7 +722,7 @@ func file_protoc_gen_go_flags_annotations_proto_init() { return nil } } - file_protoc_gen_go_flags_annotations_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + file_thethings_flags_annotations_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*FieldOptions); i { case 0: return &v.state @@ -734,7 +734,7 @@ func file_protoc_gen_go_flags_annotations_proto_init() { return nil } } - file_protoc_gen_go_flags_annotations_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_thethings_flags_annotations_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*OneofOptions); i { case 0: return &v.state @@ -746,7 +746,7 @@ func file_protoc_gen_go_flags_annotations_proto_init() { return nil } } - file_protoc_gen_go_flags_annotations_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + file_thethings_flags_annotations_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EnumOptions); i { case 0: return &v.state @@ -758,7 +758,7 @@ func file_protoc_gen_go_flags_annotations_proto_init() { return nil } } - file_protoc_gen_go_flags_annotations_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_thethings_flags_annotations_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*EnumValueOptions); i { case 0: return &v.state @@ -770,7 +770,7 @@ func file_protoc_gen_go_flags_annotations_proto_init() { return nil } } - file_protoc_gen_go_flags_annotations_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + file_thethings_flags_annotations_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ServiceOptions); i { case 0: return &v.state @@ -782,7 +782,7 @@ func file_protoc_gen_go_flags_annotations_proto_init() { return nil } } - file_protoc_gen_go_flags_annotations_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_thethings_flags_annotations_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MethodOptions); i { case 0: return &v.state @@ -799,19 +799,19 @@ func file_protoc_gen_go_flags_annotations_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_protoc_gen_go_flags_annotations_proto_rawDesc, + RawDescriptor: file_thethings_flags_annotations_proto_rawDesc, NumEnums: 0, NumMessages: 8, NumExtensions: 8, NumServices: 0, }, - GoTypes: file_protoc_gen_go_flags_annotations_proto_goTypes, - DependencyIndexes: file_protoc_gen_go_flags_annotations_proto_depIdxs, - MessageInfos: file_protoc_gen_go_flags_annotations_proto_msgTypes, - ExtensionInfos: file_protoc_gen_go_flags_annotations_proto_extTypes, + GoTypes: file_thethings_flags_annotations_proto_goTypes, + DependencyIndexes: file_thethings_flags_annotations_proto_depIdxs, + MessageInfos: file_thethings_flags_annotations_proto_msgTypes, + ExtensionInfos: file_thethings_flags_annotations_proto_extTypes, }.Build() - File_protoc_gen_go_flags_annotations_proto = out.File - file_protoc_gen_go_flags_annotations_proto_rawDesc = nil - file_protoc_gen_go_flags_annotations_proto_goTypes = nil - file_protoc_gen_go_flags_annotations_proto_depIdxs = nil + File_thethings_flags_annotations_proto = out.File + file_thethings_flags_annotations_proto_rawDesc = nil + file_thethings_flags_annotations_proto_goTypes = nil + file_thethings_flags_annotations_proto_depIdxs = nil } diff --git a/test/golang/api.pb.go b/test/golang/api.pb.go index c10bd5c..7e2d7bc 100644 --- a/test/golang/api.pb.go +++ b/test/golang/api.pb.go @@ -3,8 +3,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v3.20.1 +// protoc-gen-go v1.31.0 +// protoc (unknown) // source: api.proto package test diff --git a/test/golang/enums.pb.go b/test/golang/enums.pb.go index 47bb264..effa1e3 100644 --- a/test/golang/enums.pb.go +++ b/test/golang/enums.pb.go @@ -3,8 +3,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v3.20.1 +// protoc-gen-go v1.31.0 +// protoc (unknown) // source: enums.proto package test @@ -356,7 +356,8 @@ var File_enums_proto protoreflect.FileDescriptor var file_enums_proto_rawDesc = []byte{ 0x0a, 0x0b, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x74, 0x68, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x2e, 0x74, - 0x65, 0x73, 0x74, 0x1a, 0x11, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x65, 0x73, 0x74, 0x1a, 0x21, 0x74, 0x68, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x66, + 0x6c, 0x61, 0x67, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x55, 0x0a, 0x0f, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20, 0x2e, 0x74, 0x68, 0x65, 0x74, 0x68, diff --git a/test/golang/enums_flags.pb.go b/test/golang/enums_flags.pb.go index 1f801f2..a7cc3b3 100644 --- a/test/golang/enums_flags.pb.go +++ b/test/golang/enums_flags.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-flags. DO NOT EDIT. // versions: // - protoc-gen-go-flags v0.0.0-dev -// - protoc v3.20.1 +// - protoc (unknown) // source: enums.proto package test diff --git a/test/golang/message.pb.go b/test/golang/message.pb.go index ea702ab..5539cbb 100644 --- a/test/golang/message.pb.go +++ b/test/golang/message.pb.go @@ -3,8 +3,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v3.20.1 +// protoc-gen-go v1.31.0 +// protoc (unknown) // source: message.proto package test @@ -343,7 +343,8 @@ var File_message_proto protoreflect.FileDescriptor var file_message_proto_rawDesc = []byte{ 0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x74, 0x68, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x66, 0x6c, 0x61, 0x67, 0x73, - 0x2e, 0x74, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x2e, 0x74, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x74, 0x68, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x73, + 0x2f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdb, 0x02, 0x0a, 0x11, 0x53, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x43, 0x0a, 0x05, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, diff --git a/test/golang/message_flags.pb.go b/test/golang/message_flags.pb.go index b597abd..fe85d51 100644 --- a/test/golang/message_flags.pb.go +++ b/test/golang/message_flags.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-flags. DO NOT EDIT. // versions: // - protoc-gen-go-flags v0.0.0-dev -// - protoc v3.20.1 +// - protoc (unknown) // source: message.proto package test diff --git a/test/golang/scalars.pb.go b/test/golang/scalars.pb.go index 75e35bd..ee01364 100644 --- a/test/golang/scalars.pb.go +++ b/test/golang/scalars.pb.go @@ -3,8 +3,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v3.20.1 +// protoc-gen-go v1.31.0 +// protoc (unknown) // source: scalars.proto package test @@ -848,7 +848,8 @@ var File_scalars_proto protoreflect.FileDescriptor var file_scalars_proto_rawDesc = []byte{ 0x0a, 0x0d, 0x73, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x74, 0x68, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x66, 0x6c, 0x61, 0x67, 0x73, - 0x2e, 0x74, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, + 0x2e, 0x74, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x74, 0x68, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x73, + 0x2f, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf6, 0x0b, 0x0a, 0x12, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x57, 0x69, 0x74, 0x68, 0x53, 0x63, 0x61, 0x6c, 0x61, 0x72, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, diff --git a/test/golang/scalars_flags.pb.go b/test/golang/scalars_flags.pb.go index 79f23c6..5131b70 100644 --- a/test/golang/scalars_flags.pb.go +++ b/test/golang/scalars_flags.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-flags. DO NOT EDIT. // versions: // - protoc-gen-go-flags v0.0.0-dev -// - protoc v3.20.1 +// - protoc (unknown) // source: scalars.proto package test diff --git a/test/golang/wkts.pb.go b/test/golang/wkts.pb.go index 23bdd4b..7a37fb6 100644 --- a/test/golang/wkts.pb.go +++ b/test/golang/wkts.pb.go @@ -3,8 +3,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 -// protoc v3.20.1 +// protoc-gen-go v1.31.0 +// protoc (unknown) // source: wkts.proto package test @@ -813,7 +813,8 @@ var File_wkts_proto protoreflect.FileDescriptor var file_wkts_proto_rawDesc = []byte{ 0x0a, 0x0a, 0x77, 0x6b, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x14, 0x74, 0x68, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x66, 0x6c, 0x61, 0x67, 0x73, 0x2e, 0x74, 0x65, - 0x73, 0x74, 0x1a, 0x11, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, + 0x73, 0x74, 0x1a, 0x21, 0x74, 0x68, 0x65, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x2f, 0x66, 0x6c, + 0x61, 0x67, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, diff --git a/test/golang/wkts_flags.pb.go b/test/golang/wkts_flags.pb.go index 5c7e157..bd3e6a2 100644 --- a/test/golang/wkts_flags.pb.go +++ b/test/golang/wkts_flags.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-flags. DO NOT EDIT. // versions: // - protoc-gen-go-flags v0.0.0-dev -// - protoc v3.20.1 +// - protoc (unknown) // source: wkts.proto package test From d1107ecb67518f71e3ecf100f635874720d1f1ad Mon Sep 17 00:00:00 2001 From: Johan Stokking Date: Fri, 4 Aug 2023 14:30:10 +0200 Subject: [PATCH 6/9] Add test to workspace --- buf.work.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/buf.work.yaml b/buf.work.yaml index a2fa5f5..d302066 100644 --- a/buf.work.yaml +++ b/buf.work.yaml @@ -1,3 +1,4 @@ version: v1 directories: - api + - test From 1d2c0a06ba75a45a5ba51e521d0719dcfa9fb902 Mon Sep 17 00:00:00 2001 From: Johan Stokking Date: Fri, 4 Aug 2023 14:30:31 +0200 Subject: [PATCH 7/9] Build protos with buf --- Makefile | 37 +++++++------------------------------ buf.gen.test.yaml | 10 ++++++++++ buf.gen.yaml | 1 + test/buf.yaml | 15 +++++++++++++++ 4 files changed, 33 insertions(+), 30 deletions(-) create mode 100644 buf.gen.test.yaml create mode 100644 test/buf.yaml diff --git a/Makefile b/Makefile index d7bb90a..673bd87 100644 --- a/Makefile +++ b/Makefile @@ -11,15 +11,11 @@ clean: rm -f ./annotations/*.pb.go rm -f ./test/*/*.pb.go -.dev/protoc-gen-go-flags/annotations.proto: annotations.proto - mkdir -p $(shell dirname $@) - cp $< $@ +.bin/protoc-gen-go: go.mod + GOBIN=$(PWD)/.bin go install google.golang.org/protobuf/cmd/protoc-gen-go -annotations/annotations.pb.go: .dev/protoc-gen-go-flags/annotations.proto .dev/golangproto/bin/protoc .dev/golangproto/bin/protoc-gen-go - PATH="$$PWD/.bin:$$PWD/.dev/golangproto/bin:$$PATH" protoc -I .dev --go_opt=module=github.com/TheThingsIndustries/protoc-gen-go-flags --go_out=./ $< - -internal/flagsplugin/annotations.pb.go: internal/flagsplugin/annotations.proto - protoc -I . --go_opt=paths=source_relative --go_out=./ ./internal/flagsplugin/annotations.proto +annotations/annotations.pb.go: api/thethings/flags/annotations.proto .bin/protoc-gen-go + buf generate api BINARY_DEPS = annotations/annotations.pb.go $(wildcard cmd/protoc-gen-go-flags/*.go) $(wildcard internal/gen/*.go) @@ -43,31 +39,12 @@ build: .bin/protoc-gen-go-flags .bin/protoc-gen-go-flags-linux-amd64 .bin/protoc .PHONY: watch watch: - ls annotations.proto cmd/protoc-gen-go-flags/*.go internal/gen/*.go test/*.proto | entr make build test - -OS := -ifeq ($(shell uname),Linux) - OS = linux -endif -ifeq ($(shell uname),Darwin) - OS = osx -endif - -.dev/golangproto/bin/protoc: - mkdir -p .dev/golangproto/bin - curl -sSL -o .dev/golangproto/protoc.zip https://github.com/protocolbuffers/protobuf/releases/download/v3.20.1/protoc-3.20.1-$(OS)-x86_64.zip - unzip -o .dev/golangproto/protoc.zip -d .dev/golangproto/ - -.dev/golangproto/bin/protoc-gen-go: - go build -o $@ google.golang.org/protobuf/cmd/protoc-gen-go + ls api/thethings/flags/annotations.proto cmd/protoc-gen-go-flags/*.go internal/gen/*.go test/*.proto | entr make build test .PHONY: testprotos -testprotos: build .dev/golangproto/bin/protoc .dev/golangproto/bin/protoc-gen-go - PATH="$$PWD/.bin:$$PWD/.dev/golangproto/bin:$$PATH" protoc -I ./test -I . \ - --go_opt=paths=source_relative --go_out=./test/golang \ - --go-flags_opt=paths=source_relative --go-flags_out=./test/golang \ - ./test/*.proto +testprotos: build .bin/protoc-gen-go + buf generate --template buf.gen.test.yaml test .PHONY: test diff --git a/buf.gen.test.yaml b/buf.gen.test.yaml new file mode 100644 index 0000000..968be36 --- /dev/null +++ b/buf.gen.test.yaml @@ -0,0 +1,10 @@ +version: v1 +plugins: + - name: go + path: .bin/protoc-gen-go + out: ./test/golang + opt: paths=source_relative + - name: go-flags + path: .bin/protoc-gen-go-flags + out: ./test/golang + opt: paths=source_relative diff --git a/buf.gen.yaml b/buf.gen.yaml index 977c7af..ebaa688 100644 --- a/buf.gen.yaml +++ b/buf.gen.yaml @@ -1,5 +1,6 @@ version: v1 plugins: - name: go + path: .bin/protoc-gen-go out: . opt: module=github.com/TheThingsIndustries/protoc-gen-go-flags diff --git a/test/buf.yaml b/test/buf.yaml new file mode 100644 index 0000000..98bec8d --- /dev/null +++ b/test/buf.yaml @@ -0,0 +1,15 @@ +version: v1 +name: buf.build/thethingsindustries/protoc-gen-go-flags-test +deps: + - buf.build/thethingsindustries/protoc-gen-go-flags +breaking: + use: + - FILE +lint: + use: + - DEFAULT + except: + - PACKAGE_VERSION_SUFFIX + - PACKAGE_DIRECTORY_MATCH + - ENUM_VALUE_PREFIX + - ENUM_ZERO_VALUE_SUFFIX From cf3fc5f700c4f6c4fd3aa27badd1c3c63fbc6938 Mon Sep 17 00:00:00 2001 From: Johan Stokking Date: Fri, 4 Aug 2023 14:30:45 +0200 Subject: [PATCH 8/9] Lint, format and push protos in CI --- .github/workflows/bsr.yml | 23 +++++++++++++++++++++++ .github/workflows/buf.yml | 21 +++++++++++++++++++++ .github/workflows/{go-code.yml => go.yml} | 17 ++++++++++------- 3 files changed, 54 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/bsr.yml create mode 100644 .github/workflows/buf.yml rename .github/workflows/{go-code.yml => go.yml} (50%) diff --git a/.github/workflows/bsr.yml b/.github/workflows/bsr.yml new file mode 100644 index 0000000..23c1439 --- /dev/null +++ b/.github/workflows/bsr.yml @@ -0,0 +1,23 @@ +name: Buf Schema Registry + +on: + push: + tags: + - "v*" + +jobs: + push: + name: Push + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v3 + - name: Install Buf + uses: bufbuild/buf-setup-action@v1 + with: + version: "1.25.1" + - name: Push + uses: bufbuild/buf-push-action@v1 + with: + input: api + buf_token: ${{ secrets.BUF_TOKEN }} diff --git a/.github/workflows/buf.yml b/.github/workflows/buf.yml new file mode 100644 index 0000000..4e1a0d5 --- /dev/null +++ b/.github/workflows/buf.yml @@ -0,0 +1,21 @@ +name: Buf + +on: + - push + - pull_request + +jobs: + lint: + name: Lint and Format + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v3 + - name: Install Buf + uses: bufbuild/buf-setup-action@v1 + with: + version: "1.25.1" + - name: Buf lint + uses: bufbuild/buf-lint-action@v1 + - name: Buf format + run: buf format --exit-code diff --git a/.github/workflows/go-code.yml b/.github/workflows/go.yml similarity index 50% rename from .github/workflows/go-code.yml rename to .github/workflows/go.yml index 21f948b..60e101b 100644 --- a/.github/workflows/go-code.yml +++ b/.github/workflows/go.yml @@ -1,4 +1,4 @@ -name: Go Code +name: Go on: - push @@ -6,17 +6,20 @@ on: jobs: test: - name: Go Test - runs-on: ubuntu-22.04 - timeout-minutes: 10 + name: Test + runs-on: ubuntu-latest steps: - name: Check out code uses: actions/checkout@v3 - name: Set up Go uses: actions/setup-go@v4 with: - go-version: "~1.19" - - name: Clean Build + go-version: "~1.20" + - name: Install Buf + uses: bufbuild/buf-setup-action@v1 + with: + version: "1.25.1" + - name: Clean and Build run: make clean build - - name: Go Test + - name: Test run: make test From 6f0dbb8907d5d405820e95d28520904c13467146 Mon Sep 17 00:00:00 2001 From: Johan Stokking Date: Fri, 4 Aug 2023 14:30:51 +0200 Subject: [PATCH 9/9] Remove triage for PRs --- .github/workflows/issue-triage.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/issue-triage.yml b/.github/workflows/issue-triage.yml index a4b3ee7..f7122ea 100644 --- a/.github/workflows/issue-triage.yml +++ b/.github/workflows/issue-triage.yml @@ -2,13 +2,11 @@ name: Triage New Issues on: issues: types: [opened] - pull_request_target: - types: [opened] jobs: triage: name: Triage New Issues - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest timeout-minutes: 5 steps: - name: Add "needs/triage" label