Skip to content

Commit

Permalink
feat: add keyword field in Video proto (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
deep-diver authored May 30, 2021
1 parent 37626f7 commit c2fcec2
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 14 deletions.
8 changes: 8 additions & 0 deletions client/lib/protos/pkg/pr12er/messages.pb.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class Video extends $pb.GeneratedMessage {
..aOS(4, const $core.bool.fromEnvironment('protobuf.omit_field_names') ? '' : 'presenter')
..e<Category>(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
;

Expand All @@ -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) {
Expand All @@ -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);
Expand Down Expand Up @@ -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);
}

3 changes: 2 additions & 1 deletion client/lib/protos/pkg/pr12er/messages.pbjson.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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==');
36 changes: 23 additions & 13 deletions server/pkg/pr12er/messages.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions server/pkg/pr12er/messages.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ message Video {
string presenter = 4;
Category category = 5;
int32 number_of_like = 6;
repeated string keywords = 7;
}

0 comments on commit c2fcec2

Please sign in to comment.