| // Code generated by protoc-gen-go. DO NOT EDIT. |
| // versions: |
| // protoc-gen-go v1.36.10 |
| // protoc v3.21.12 |
| // source: comment_api.proto |
| |
| package v1 |
| |
| import ( |
| reflect "reflect" |
| sync "sync" |
| unsafe "unsafe" |
| |
| _ "google.golang.org/genproto/googleapis/api/annotations" |
| protoreflect "google.golang.org/protobuf/reflect/protoreflect" |
| protoimpl "google.golang.org/protobuf/runtime/protoimpl" |
| ) |
| |
| const ( |
| // Verify that this generated code is sufficiently up-to-date. |
| _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) |
| // Verify that runtime/protoimpl is sufficiently up-to-date. |
| _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) |
| ) |
| |
| type ListValidCategoriesRequest struct { |
| state protoimpl.MessageState `protogen:"open.v1"` |
| unknownFields protoimpl.UnknownFields |
| sizeCache protoimpl.SizeCache |
| } |
| |
| func (x *ListValidCategoriesRequest) Reset() { |
| *x = ListValidCategoriesRequest{} |
| mi := &file_comment_api_proto_msgTypes[0] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| |
| func (x *ListValidCategoriesRequest) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*ListValidCategoriesRequest) ProtoMessage() {} |
| |
| func (x *ListValidCategoriesRequest) ProtoReflect() protoreflect.Message { |
| mi := &file_comment_api_proto_msgTypes[0] |
| if x != nil { |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| if ms.LoadMessageInfo() == nil { |
| ms.StoreMessageInfo(mi) |
| } |
| return ms |
| } |
| return mi.MessageOf(x) |
| } |
| |
| // Deprecated: Use ListValidCategoriesRequest.ProtoReflect.Descriptor instead. |
| func (*ListValidCategoriesRequest) Descriptor() ([]byte, []int) { |
| return file_comment_api_proto_rawDescGZIP(), []int{0} |
| } |
| |
| type ListValidCategoriesResponse struct { |
| state protoimpl.MessageState `protogen:"open.v1"` |
| Categories []string `protobuf:"bytes,1,rep,name=categories,proto3" json:"categories,omitempty"` |
| unknownFields protoimpl.UnknownFields |
| sizeCache protoimpl.SizeCache |
| } |
| |
| func (x *ListValidCategoriesResponse) Reset() { |
| *x = ListValidCategoriesResponse{} |
| mi := &file_comment_api_proto_msgTypes[1] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| |
| func (x *ListValidCategoriesResponse) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*ListValidCategoriesResponse) ProtoMessage() {} |
| |
| func (x *ListValidCategoriesResponse) ProtoReflect() protoreflect.Message { |
| mi := &file_comment_api_proto_msgTypes[1] |
| if x != nil { |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| if ms.LoadMessageInfo() == nil { |
| ms.StoreMessageInfo(mi) |
| } |
| return ms |
| } |
| return mi.MessageOf(x) |
| } |
| |
| // Deprecated: Use ListValidCategoriesResponse.ProtoReflect.Descriptor instead. |
| func (*ListValidCategoriesResponse) Descriptor() ([]byte, []int) { |
| return file_comment_api_proto_rawDescGZIP(), []int{1} |
| } |
| |
| func (x *ListValidCategoriesResponse) GetCategories() []string { |
| if x != nil { |
| return x.Categories |
| } |
| return nil |
| } |
| |
| type SearchCommentsRequest struct { |
| state protoimpl.MessageState `protogen:"open.v1"` |
| // Required. Gerrit instance GoB project (e.g., 'chromium'). |
| Project string `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"` |
| // Required. Git repository path within the project (e.g., 'chromium/src'). |
| Repo string `protobuf:"bytes,2,opt,name=repo,proto3" json:"repo,omitempty"` |
| Query string `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` |
| // The maximum number of comment records to return. If not specified or <= 0, defaults to 10. |
| MaxComments int64 `protobuf:"varint,4,opt,name=max_comments,json=maxComments,proto3" json:"max_comments,omitempty"` |
| // Required. At least one category must be specified (e.g., 'IPC_SECURITY'). |
| Categories []string `protobuf:"bytes,5,rep,name=categories,proto3" json:"categories,omitempty"` |
| unknownFields protoimpl.UnknownFields |
| sizeCache protoimpl.SizeCache |
| } |
| |
| func (x *SearchCommentsRequest) Reset() { |
| *x = SearchCommentsRequest{} |
| mi := &file_comment_api_proto_msgTypes[2] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| |
| func (x *SearchCommentsRequest) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*SearchCommentsRequest) ProtoMessage() {} |
| |
| func (x *SearchCommentsRequest) ProtoReflect() protoreflect.Message { |
| mi := &file_comment_api_proto_msgTypes[2] |
| if x != nil { |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| if ms.LoadMessageInfo() == nil { |
| ms.StoreMessageInfo(mi) |
| } |
| return ms |
| } |
| return mi.MessageOf(x) |
| } |
| |
| // Deprecated: Use SearchCommentsRequest.ProtoReflect.Descriptor instead. |
| func (*SearchCommentsRequest) Descriptor() ([]byte, []int) { |
| return file_comment_api_proto_rawDescGZIP(), []int{2} |
| } |
| |
| func (x *SearchCommentsRequest) GetProject() string { |
| if x != nil { |
| return x.Project |
| } |
| return "" |
| } |
| |
| func (x *SearchCommentsRequest) GetRepo() string { |
| if x != nil { |
| return x.Repo |
| } |
| return "" |
| } |
| |
| func (x *SearchCommentsRequest) GetQuery() string { |
| if x != nil { |
| return x.Query |
| } |
| return "" |
| } |
| |
| func (x *SearchCommentsRequest) GetMaxComments() int64 { |
| if x != nil { |
| return x.MaxComments |
| } |
| return 0 |
| } |
| |
| func (x *SearchCommentsRequest) GetCategories() []string { |
| if x != nil { |
| return x.Categories |
| } |
| return nil |
| } |
| |
| type SearchCommentsResponse struct { |
| state protoimpl.MessageState `protogen:"open.v1"` |
| Comments []*SearchCommentsResponse_CommentRecord `protobuf:"bytes,1,rep,name=comments,proto3" json:"comments,omitempty"` |
| unknownFields protoimpl.UnknownFields |
| sizeCache protoimpl.SizeCache |
| } |
| |
| func (x *SearchCommentsResponse) Reset() { |
| *x = SearchCommentsResponse{} |
| mi := &file_comment_api_proto_msgTypes[3] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| |
| func (x *SearchCommentsResponse) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*SearchCommentsResponse) ProtoMessage() {} |
| |
| func (x *SearchCommentsResponse) ProtoReflect() protoreflect.Message { |
| mi := &file_comment_api_proto_msgTypes[3] |
| if x != nil { |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| if ms.LoadMessageInfo() == nil { |
| ms.StoreMessageInfo(mi) |
| } |
| return ms |
| } |
| return mi.MessageOf(x) |
| } |
| |
| // Deprecated: Use SearchCommentsResponse.ProtoReflect.Descriptor instead. |
| func (*SearchCommentsResponse) Descriptor() ([]byte, []int) { |
| return file_comment_api_proto_rawDescGZIP(), []int{3} |
| } |
| |
| func (x *SearchCommentsResponse) GetComments() []*SearchCommentsResponse_CommentRecord { |
| if x != nil { |
| return x.Comments |
| } |
| return nil |
| } |
| |
| type SearchCommentsResponse_CommentRecord struct { |
| state protoimpl.MessageState `protogen:"open.v1"` |
| Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` |
| Project string `protobuf:"bytes,2,opt,name=project,proto3" json:"project,omitempty"` |
| Repo string `protobuf:"bytes,3,opt,name=repo,proto3" json:"repo,omitempty"` |
| ChangeId int64 `protobuf:"varint,4,opt,name=change_id,json=changeId,proto3" json:"change_id,omitempty"` |
| Category string `protobuf:"bytes,5,opt,name=category,proto3" json:"category,omitempty"` |
| FilePath string `protobuf:"bytes,6,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"` |
| CommentText string `protobuf:"bytes,7,opt,name=comment_text,json=commentText,proto3" json:"comment_text,omitempty"` |
| CodeSnippet string `protobuf:"bytes,8,opt,name=code_snippet,json=codeSnippet,proto3" json:"code_snippet,omitempty"` |
| ClSubject string `protobuf:"bytes,9,opt,name=cl_subject,json=clSubject,proto3" json:"cl_subject,omitempty"` |
| ClDescription string `protobuf:"bytes,10,opt,name=cl_description,json=clDescription,proto3" json:"cl_description,omitempty"` |
| Analysis string `protobuf:"bytes,11,opt,name=analysis,proto3" json:"analysis,omitempty"` |
| CosineDistance float32 `protobuf:"fixed32,12,opt,name=cosine_distance,json=cosineDistance,proto3" json:"cosine_distance,omitempty"` |
| unknownFields protoimpl.UnknownFields |
| sizeCache protoimpl.SizeCache |
| } |
| |
| func (x *SearchCommentsResponse_CommentRecord) Reset() { |
| *x = SearchCommentsResponse_CommentRecord{} |
| mi := &file_comment_api_proto_msgTypes[4] |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| ms.StoreMessageInfo(mi) |
| } |
| |
| func (x *SearchCommentsResponse_CommentRecord) String() string { |
| return protoimpl.X.MessageStringOf(x) |
| } |
| |
| func (*SearchCommentsResponse_CommentRecord) ProtoMessage() {} |
| |
| func (x *SearchCommentsResponse_CommentRecord) ProtoReflect() protoreflect.Message { |
| mi := &file_comment_api_proto_msgTypes[4] |
| if x != nil { |
| ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| if ms.LoadMessageInfo() == nil { |
| ms.StoreMessageInfo(mi) |
| } |
| return ms |
| } |
| return mi.MessageOf(x) |
| } |
| |
| // Deprecated: Use SearchCommentsResponse_CommentRecord.ProtoReflect.Descriptor instead. |
| func (*SearchCommentsResponse_CommentRecord) Descriptor() ([]byte, []int) { |
| return file_comment_api_proto_rawDescGZIP(), []int{3, 0} |
| } |
| |
| func (x *SearchCommentsResponse_CommentRecord) GetId() string { |
| if x != nil { |
| return x.Id |
| } |
| return "" |
| } |
| |
| func (x *SearchCommentsResponse_CommentRecord) GetProject() string { |
| if x != nil { |
| return x.Project |
| } |
| return "" |
| } |
| |
| func (x *SearchCommentsResponse_CommentRecord) GetRepo() string { |
| if x != nil { |
| return x.Repo |
| } |
| return "" |
| } |
| |
| func (x *SearchCommentsResponse_CommentRecord) GetChangeId() int64 { |
| if x != nil { |
| return x.ChangeId |
| } |
| return 0 |
| } |
| |
| func (x *SearchCommentsResponse_CommentRecord) GetCategory() string { |
| if x != nil { |
| return x.Category |
| } |
| return "" |
| } |
| |
| func (x *SearchCommentsResponse_CommentRecord) GetFilePath() string { |
| if x != nil { |
| return x.FilePath |
| } |
| return "" |
| } |
| |
| func (x *SearchCommentsResponse_CommentRecord) GetCommentText() string { |
| if x != nil { |
| return x.CommentText |
| } |
| return "" |
| } |
| |
| func (x *SearchCommentsResponse_CommentRecord) GetCodeSnippet() string { |
| if x != nil { |
| return x.CodeSnippet |
| } |
| return "" |
| } |
| |
| func (x *SearchCommentsResponse_CommentRecord) GetClSubject() string { |
| if x != nil { |
| return x.ClSubject |
| } |
| return "" |
| } |
| |
| func (x *SearchCommentsResponse_CommentRecord) GetClDescription() string { |
| if x != nil { |
| return x.ClDescription |
| } |
| return "" |
| } |
| |
| func (x *SearchCommentsResponse_CommentRecord) GetAnalysis() string { |
| if x != nil { |
| return x.Analysis |
| } |
| return "" |
| } |
| |
| func (x *SearchCommentsResponse_CommentRecord) GetCosineDistance() float32 { |
| if x != nil { |
| return x.CosineDistance |
| } |
| return 0 |
| } |
| |
| var File_comment_api_proto protoreflect.FileDescriptor |
| |
| const file_comment_api_proto_rawDesc = "" + |
| "\n" + |
| "\x11comment_api.proto\x12\rcommentrag.v1\x1a\x1cgoogle/api/annotations.proto\"\x1c\n" + |
| "\x1aListValidCategoriesRequest\"=\n" + |
| "\x1bListValidCategoriesResponse\x12\x1e\n" + |
| "\n" + |
| "categories\x18\x01 \x03(\tR\n" + |
| "categories\"\x9e\x01\n" + |
| "\x15SearchCommentsRequest\x12\x18\n" + |
| "\aproject\x18\x01 \x01(\tR\aproject\x12\x12\n" + |
| "\x04repo\x18\x02 \x01(\tR\x04repo\x12\x14\n" + |
| "\x05query\x18\x03 \x01(\tR\x05query\x12!\n" + |
| "\fmax_comments\x18\x04 \x01(\x03R\vmaxComments\x12\x1e\n" + |
| "\n" + |
| "categories\x18\x05 \x03(\tR\n" + |
| "categories\"\xe0\x03\n" + |
| "\x16SearchCommentsResponse\x12O\n" + |
| "\bcomments\x18\x01 \x03(\v23.commentrag.v1.SearchCommentsResponse.CommentRecordR\bcomments\x1a\xf4\x02\n" + |
| "\rCommentRecord\x12\x0e\n" + |
| "\x02id\x18\x01 \x01(\tR\x02id\x12\x18\n" + |
| "\aproject\x18\x02 \x01(\tR\aproject\x12\x12\n" + |
| "\x04repo\x18\x03 \x01(\tR\x04repo\x12\x1b\n" + |
| "\tchange_id\x18\x04 \x01(\x03R\bchangeId\x12\x1a\n" + |
| "\bcategory\x18\x05 \x01(\tR\bcategory\x12\x1b\n" + |
| "\tfile_path\x18\x06 \x01(\tR\bfilePath\x12!\n" + |
| "\fcomment_text\x18\a \x01(\tR\vcommentText\x12!\n" + |
| "\fcode_snippet\x18\b \x01(\tR\vcodeSnippet\x12\x1d\n" + |
| "\n" + |
| "cl_subject\x18\t \x01(\tR\tclSubject\x12%\n" + |
| "\x0ecl_description\x18\n" + |
| " \x01(\tR\rclDescription\x12\x1a\n" + |
| "\banalysis\x18\v \x01(\tR\banalysis\x12'\n" + |
| "\x0fcosine_distance\x18\f \x01(\x02R\x0ecosineDistance2\xae\x02\n" + |
| "\x14CommentRagApiService\x12~\n" + |
| "\x0eSearchComments\x12$.commentrag.v1.SearchCommentsRequest\x1a%.commentrag.v1.SearchCommentsResponse\"\x1f\x82\xd3\xe4\x93\x02\x19\x12\x17/commentrag/v1/comments\x12\x95\x01\n" + |
| "\x13ListValidCategories\x12).commentrag.v1.ListValidCategoriesRequest\x1a*.commentrag.v1.ListValidCategoriesResponse\"'\x82\xd3\xe4\x93\x02!\x12\x1f/commentrag/v1/valid_categoriesB0Z.go.skia.org/infra/comment_rag/proto/comment/v1b\x06proto3" |
| |
| var ( |
| file_comment_api_proto_rawDescOnce sync.Once |
| file_comment_api_proto_rawDescData []byte |
| ) |
| |
| func file_comment_api_proto_rawDescGZIP() []byte { |
| file_comment_api_proto_rawDescOnce.Do(func() { |
| file_comment_api_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_comment_api_proto_rawDesc), len(file_comment_api_proto_rawDesc))) |
| }) |
| return file_comment_api_proto_rawDescData |
| } |
| |
| var file_comment_api_proto_msgTypes = make([]protoimpl.MessageInfo, 5) |
| var file_comment_api_proto_goTypes = []any{ |
| (*ListValidCategoriesRequest)(nil), // 0: commentrag.v1.ListValidCategoriesRequest |
| (*ListValidCategoriesResponse)(nil), // 1: commentrag.v1.ListValidCategoriesResponse |
| (*SearchCommentsRequest)(nil), // 2: commentrag.v1.SearchCommentsRequest |
| (*SearchCommentsResponse)(nil), // 3: commentrag.v1.SearchCommentsResponse |
| (*SearchCommentsResponse_CommentRecord)(nil), // 4: commentrag.v1.SearchCommentsResponse.CommentRecord |
| } |
| var file_comment_api_proto_depIdxs = []int32{ |
| 4, // 0: commentrag.v1.SearchCommentsResponse.comments:type_name -> commentrag.v1.SearchCommentsResponse.CommentRecord |
| 2, // 1: commentrag.v1.CommentRagApiService.SearchComments:input_type -> commentrag.v1.SearchCommentsRequest |
| 0, // 2: commentrag.v1.CommentRagApiService.ListValidCategories:input_type -> commentrag.v1.ListValidCategoriesRequest |
| 3, // 3: commentrag.v1.CommentRagApiService.SearchComments:output_type -> commentrag.v1.SearchCommentsResponse |
| 1, // 4: commentrag.v1.CommentRagApiService.ListValidCategories:output_type -> commentrag.v1.ListValidCategoriesResponse |
| 3, // [3:5] is the sub-list for method output_type |
| 1, // [1:3] is the sub-list for method input_type |
| 1, // [1:1] is the sub-list for extension type_name |
| 1, // [1:1] is the sub-list for extension extendee |
| 0, // [0:1] is the sub-list for field type_name |
| } |
| |
| func init() { file_comment_api_proto_init() } |
| func file_comment_api_proto_init() { |
| if File_comment_api_proto != nil { |
| return |
| } |
| type x struct{} |
| out := protoimpl.TypeBuilder{ |
| File: protoimpl.DescBuilder{ |
| GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
| RawDescriptor: unsafe.Slice(unsafe.StringData(file_comment_api_proto_rawDesc), len(file_comment_api_proto_rawDesc)), |
| NumEnums: 0, |
| NumMessages: 5, |
| NumExtensions: 0, |
| NumServices: 1, |
| }, |
| GoTypes: file_comment_api_proto_goTypes, |
| DependencyIndexes: file_comment_api_proto_depIdxs, |
| MessageInfos: file_comment_api_proto_msgTypes, |
| }.Build() |
| File_comment_api_proto = out.File |
| file_comment_api_proto_goTypes = nil |
| file_comment_api_proto_depIdxs = nil |
| } |