From 76d8d6ada2696708f3ec2da6e647581eb2b16ebb Mon Sep 17 00:00:00 2001 From: chansung park Date: Mon, 31 May 2021 00:20:52 +0900 Subject: [PATCH] add keyword field in Video proto --- client/lib/protos/pkg/pr12er/messages.pb.dart | 8 +++++ .../protos/pkg/pr12er/messages.pbjson.dart | 3 +- server/pkg/pr12er/messages.pb.go | 36 ++++++++++++------- server/pkg/pr12er/messages.proto | 1 + 4 files changed, 34 insertions(+), 14 deletions(-) diff --git a/client/lib/protos/pkg/pr12er/messages.pb.dart b/client/lib/protos/pkg/pr12er/messages.pb.dart index 4a62f6ef..24b73815 100644 --- a/client/lib/protos/pkg/pr12er/messages.pb.dart +++ b/client/lib/protos/pkg/pr12er/messages.pb.dart @@ -21,6 +21,7 @@ class Video extends $pb.GeneratedMessage { ..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'presenter') ..e(5, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'category', $pb.PbFieldType.OE, defaultOrMaker: Category.CATEGORY_UNSPECIFIED, valueOf: Category.valueOf, enumValues: Category.values) ..a<$core.int>(6, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'numberOfLike', $pb.PbFieldType.O3) + ..pPS(7, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'keywords') ..hasRequiredFields = false ; @@ -32,6 +33,7 @@ class Video extends $pb.GeneratedMessage { $core.String? presenter, Category? category, $core.int? numberOfLike, + $core.Iterable<$core.String>? keywords, }) { final _result = create(); if (id != null) { @@ -52,6 +54,9 @@ class Video extends $pb.GeneratedMessage { if (numberOfLike != null) { _result.numberOfLike = numberOfLike; } + if (keywords != null) { + _result.keywords.addAll(keywords); + } return _result; } factory Video.fromBuffer($core.List<$core.int> i, [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY]) => create()..mergeFromBuffer(i, r); @@ -128,5 +133,8 @@ class Video extends $pb.GeneratedMessage { $core.bool hasNumberOfLike() => $_has(5); @$pb.TagNumber(6) void clearNumberOfLike() => clearField(6); + + @$pb.TagNumber(7) + $core.List<$core.String> get keywords => $_getList(6); } diff --git a/client/lib/protos/pkg/pr12er/messages.pbjson.dart b/client/lib/protos/pkg/pr12er/messages.pbjson.dart index 3160e6b2..6d556018 100644 --- a/client/lib/protos/pkg/pr12er/messages.pbjson.dart +++ b/client/lib/protos/pkg/pr12er/messages.pbjson.dart @@ -33,8 +33,9 @@ const Video$json = const { const {'1': 'presenter', '3': 4, '4': 1, '5': 9, '10': 'presenter'}, const {'1': 'category', '3': 5, '4': 1, '5': 14, '6': '.pkg.pr12er.Category', '10': 'category'}, const {'1': 'number_of_like', '3': 6, '4': 1, '5': 5, '10': 'numberOfLike'}, + const {'1': 'keywords', '3': 7, '4': 3, '5': 9, '10': 'keywords'}, ], }; /// Descriptor for `Video`. Decode as a `google.protobuf.DescriptorProto`. -final $typed_data.Uint8List videoDescriptor = $convert.base64Decode('CgVWaWRlbxIOCgJpZBgBIAEoBVICaWQSFAoFdGl0bGUYAiABKAlSBXRpdGxlEhIKBGxpbmsYAyABKAlSBGxpbmsSHAoJcHJlc2VudGVyGAQgASgJUglwcmVzZW50ZXISMAoIY2F0ZWdvcnkYBSABKA4yFC5wa2cucHIxMmVyLkNhdGVnb3J5UghjYXRlZ29yeRIkCg5udW1iZXJfb2ZfbGlrZRgGIAEoBVIMbnVtYmVyT2ZMaWtl'); +final $typed_data.Uint8List videoDescriptor = $convert.base64Decode('CgVWaWRlbxIOCgJpZBgBIAEoBVICaWQSFAoFdGl0bGUYAiABKAlSBXRpdGxlEhIKBGxpbmsYAyABKAlSBGxpbmsSHAoJcHJlc2VudGVyGAQgASgJUglwcmVzZW50ZXISMAoIY2F0ZWdvcnkYBSABKA4yFC5wa2cucHIxMmVyLkNhdGVnb3J5UghjYXRlZ29yeRIkCg5udW1iZXJfb2ZfbGlrZRgGIAEoBVIMbnVtYmVyT2ZMaWtlEhoKCGtleXdvcmRzGAcgAygJUghrZXl3b3Jkcw=='); diff --git a/server/pkg/pr12er/messages.pb.go b/server/pkg/pr12er/messages.pb.go index e5000d80..9afd4f1d 100644 --- a/server/pkg/pr12er/messages.pb.go +++ b/server/pkg/pr12er/messages.pb.go @@ -89,6 +89,7 @@ type Video struct { Presenter string `protobuf:"bytes,4,opt,name=presenter,proto3" json:"presenter,omitempty"` Category Category `protobuf:"varint,5,opt,name=category,proto3,enum=pkg.pr12er.Category" json:"category,omitempty"` NumberOfLike int32 `protobuf:"varint,6,opt,name=number_of_like,json=numberOfLike,proto3" json:"number_of_like,omitempty"` + Keywords []string `protobuf:"bytes,7,rep,name=keywords,proto3" json:"keywords,omitempty"` } func (x *Video) Reset() { @@ -165,12 +166,19 @@ func (x *Video) GetNumberOfLike() int32 { return 0 } +func (x *Video) GetKeywords() []string { + if x != nil { + return x.Keywords + } + return nil +} + var File_pkg_pr12er_messages_proto protoreflect.FileDescriptor var file_pkg_pr12er_messages_proto_rawDesc = []byte{ 0x0a, 0x19, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x31, 0x32, 0x65, 0x72, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x70, 0x6b, 0x67, - 0x2e, 0x70, 0x72, 0x31, 0x32, 0x65, 0x72, 0x22, 0xb7, 0x01, 0x0a, 0x05, 0x56, 0x69, 0x64, 0x65, + 0x2e, 0x70, 0x72, 0x31, 0x32, 0x65, 0x72, 0x22, 0xd3, 0x01, 0x0a, 0x05, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, @@ -182,18 +190,20 @@ var file_pkg_pr12er_messages_proto_rawDesc = []byte{ 0x79, 0x52, 0x08, 0x63, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x24, 0x0a, 0x0e, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x6f, 0x66, 0x5f, 0x6c, 0x69, 0x6b, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x4c, 0x69, 0x6b, - 0x65, 0x2a, 0x82, 0x01, 0x0a, 0x08, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x18, - 0x0a, 0x14, 0x43, 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x41, 0x54, 0x45, - 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x56, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x10, 0x0a, - 0x0c, 0x43, 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x4e, 0x4c, 0x50, 0x10, 0x02, 0x12, - 0x10, 0x0a, 0x0c, 0x43, 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x4f, 0x43, 0x52, 0x10, - 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x41, 0x55, - 0x44, 0x49, 0x4f, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, - 0x59, 0x5f, 0x52, 0x53, 0x10, 0x05, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x70, 0x6f, 0x74, 0x2f, 0x73, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x31, 0x32, 0x65, 0x72, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x08, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x73, 0x2a, 0x82, 0x01, + 0x0a, 0x08, 0x43, 0x61, 0x74, 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x14, 0x43, 0x41, + 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x13, 0x0a, 0x0f, 0x43, 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, + 0x5f, 0x56, 0x49, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x43, 0x41, 0x54, + 0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x4e, 0x4c, 0x50, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x43, + 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x4f, 0x43, 0x52, 0x10, 0x03, 0x12, 0x12, 0x0a, + 0x0e, 0x43, 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x41, 0x55, 0x44, 0x49, 0x4f, 0x10, + 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x41, 0x54, 0x45, 0x47, 0x4f, 0x52, 0x59, 0x5f, 0x52, 0x53, + 0x10, 0x05, 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x70, 0x6f, 0x74, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x31, 0x32, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/server/pkg/pr12er/messages.proto b/server/pkg/pr12er/messages.proto index ffecde66..c79f3a28 100644 --- a/server/pkg/pr12er/messages.proto +++ b/server/pkg/pr12er/messages.proto @@ -19,4 +19,5 @@ message Video { string presenter = 4; Category category = 5; int32 number_of_like = 6; + repeated string keywords = 7; }