| // Code generated by protoc-gen-go-grpc. DO NOT EDIT. |
| // versions: |
| // - protoc-gen-go-grpc v1.6.0 |
| // - protoc v3.21.12 |
| // source: comment_api.proto |
| |
| package v1 |
| |
| import ( |
| context "context" |
| |
| grpc "google.golang.org/grpc" |
| codes "google.golang.org/grpc/codes" |
| status "google.golang.org/grpc/status" |
| ) |
| |
| // This is a compile-time assertion to ensure that this generated file |
| // is compatible with the grpc package it is being compiled against. |
| // Requires gRPC-Go v1.64.0 or later. |
| const _ = grpc.SupportPackageIsVersion9 |
| |
| const ( |
| CommentRagApiService_SearchComments_FullMethodName = "/commentrag.v1.CommentRagApiService/SearchComments" |
| CommentRagApiService_ListValidCategories_FullMethodName = "/commentrag.v1.CommentRagApiService/ListValidCategories" |
| ) |
| |
| // CommentRagApiServiceClient is the client API for CommentRagApiService service. |
| // |
| // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. |
| type CommentRagApiServiceClient interface { |
| // Searches for past comments semantically matching a query. |
| SearchComments(ctx context.Context, in *SearchCommentsRequest, opts ...grpc.CallOption) (*SearchCommentsResponse, error) |
| // Lists all valid review categories supported by the RAG service. |
| ListValidCategories(ctx context.Context, in *ListValidCategoriesRequest, opts ...grpc.CallOption) (*ListValidCategoriesResponse, error) |
| } |
| |
| type commentRagApiServiceClient struct { |
| cc grpc.ClientConnInterface |
| } |
| |
| func NewCommentRagApiServiceClient(cc grpc.ClientConnInterface) CommentRagApiServiceClient { |
| return &commentRagApiServiceClient{cc} |
| } |
| |
| func (c *commentRagApiServiceClient) SearchComments(ctx context.Context, in *SearchCommentsRequest, opts ...grpc.CallOption) (*SearchCommentsResponse, error) { |
| cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) |
| out := new(SearchCommentsResponse) |
| err := c.cc.Invoke(ctx, CommentRagApiService_SearchComments_FullMethodName, in, out, cOpts...) |
| if err != nil { |
| return nil, err |
| } |
| return out, nil |
| } |
| |
| func (c *commentRagApiServiceClient) ListValidCategories(ctx context.Context, in *ListValidCategoriesRequest, opts ...grpc.CallOption) (*ListValidCategoriesResponse, error) { |
| cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) |
| out := new(ListValidCategoriesResponse) |
| err := c.cc.Invoke(ctx, CommentRagApiService_ListValidCategories_FullMethodName, in, out, cOpts...) |
| if err != nil { |
| return nil, err |
| } |
| return out, nil |
| } |
| |
| // CommentRagApiServiceServer is the server API for CommentRagApiService service. |
| // All implementations must embed UnimplementedCommentRagApiServiceServer |
| // for forward compatibility. |
| type CommentRagApiServiceServer interface { |
| // Searches for past comments semantically matching a query. |
| SearchComments(context.Context, *SearchCommentsRequest) (*SearchCommentsResponse, error) |
| // Lists all valid review categories supported by the RAG service. |
| ListValidCategories(context.Context, *ListValidCategoriesRequest) (*ListValidCategoriesResponse, error) |
| mustEmbedUnimplementedCommentRagApiServiceServer() |
| } |
| |
| // UnimplementedCommentRagApiServiceServer must be embedded to have |
| // forward compatible implementations. |
| // |
| // NOTE: this should be embedded by value instead of pointer to avoid a nil |
| // pointer dereference when methods are called. |
| type UnimplementedCommentRagApiServiceServer struct{} |
| |
| func (UnimplementedCommentRagApiServiceServer) SearchComments(context.Context, *SearchCommentsRequest) (*SearchCommentsResponse, error) { |
| return nil, status.Error(codes.Unimplemented, "method SearchComments not implemented") |
| } |
| func (UnimplementedCommentRagApiServiceServer) ListValidCategories(context.Context, *ListValidCategoriesRequest) (*ListValidCategoriesResponse, error) { |
| return nil, status.Error(codes.Unimplemented, "method ListValidCategories not implemented") |
| } |
| func (UnimplementedCommentRagApiServiceServer) mustEmbedUnimplementedCommentRagApiServiceServer() {} |
| func (UnimplementedCommentRagApiServiceServer) testEmbeddedByValue() {} |
| |
| // UnsafeCommentRagApiServiceServer may be embedded to opt out of forward compatibility for this service. |
| // Use of this interface is not recommended, as added methods to CommentRagApiServiceServer will |
| // result in compilation errors. |
| type UnsafeCommentRagApiServiceServer interface { |
| mustEmbedUnimplementedCommentRagApiServiceServer() |
| } |
| |
| func RegisterCommentRagApiServiceServer(s grpc.ServiceRegistrar, srv CommentRagApiServiceServer) { |
| // If the following call panics, it indicates UnimplementedCommentRagApiServiceServer was |
| // embedded by pointer and is nil. This will cause panics if an |
| // unimplemented method is ever invoked, so we test this at initialization |
| // time to prevent it from happening at runtime later due to I/O. |
| if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { |
| t.testEmbeddedByValue() |
| } |
| s.RegisterService(&CommentRagApiService_ServiceDesc, srv) |
| } |
| |
| func _CommentRagApiService_SearchComments_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| in := new(SearchCommentsRequest) |
| if err := dec(in); err != nil { |
| return nil, err |
| } |
| if interceptor == nil { |
| return srv.(CommentRagApiServiceServer).SearchComments(ctx, in) |
| } |
| info := &grpc.UnaryServerInfo{ |
| Server: srv, |
| FullMethod: CommentRagApiService_SearchComments_FullMethodName, |
| } |
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| return srv.(CommentRagApiServiceServer).SearchComments(ctx, req.(*SearchCommentsRequest)) |
| } |
| return interceptor(ctx, in, info, handler) |
| } |
| |
| func _CommentRagApiService_ListValidCategories_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
| in := new(ListValidCategoriesRequest) |
| if err := dec(in); err != nil { |
| return nil, err |
| } |
| if interceptor == nil { |
| return srv.(CommentRagApiServiceServer).ListValidCategories(ctx, in) |
| } |
| info := &grpc.UnaryServerInfo{ |
| Server: srv, |
| FullMethod: CommentRagApiService_ListValidCategories_FullMethodName, |
| } |
| handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
| return srv.(CommentRagApiServiceServer).ListValidCategories(ctx, req.(*ListValidCategoriesRequest)) |
| } |
| return interceptor(ctx, in, info, handler) |
| } |
| |
| // CommentRagApiService_ServiceDesc is the grpc.ServiceDesc for CommentRagApiService service. |
| // It's only intended for direct use with grpc.RegisterService, |
| // and not to be introspected or modified (even as a copy) |
| var CommentRagApiService_ServiceDesc = grpc.ServiceDesc{ |
| ServiceName: "commentrag.v1.CommentRagApiService", |
| HandlerType: (*CommentRagApiServiceServer)(nil), |
| Methods: []grpc.MethodDesc{ |
| { |
| MethodName: "SearchComments", |
| Handler: _CommentRagApiService_SearchComments_Handler, |
| }, |
| { |
| MethodName: "ListValidCategories", |
| Handler: _CommentRagApiService_ListValidCategories_Handler, |
| }, |
| }, |
| Streams: []grpc.StreamDesc{}, |
| Metadata: "comment_api.proto", |
| } |