diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-07-23 15:54:43 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-07-26 13:34:28 +0300 |
commit | 604630cc8b454059bd995ed8242d7e20e4789fb0 (patch) | |
tree | e82a4d6395338e055fe1287142e0735e454ebaa4 /ruby | |
parent | bf55b6fc1a0c9bba1e9d1af29cf4ccab168d30e0 (diff) |
proto: Add new ListAllBlobs RPC
Add a new ListAllBlobs RPC which lists all blobs of the repository, no
matter whether they're reachable via any of the references or not. The
design is the same as for ListAllLFSPointers.
Diffstat (limited to 'ruby')
-rw-r--r-- | ruby/proto/gitaly/blob_pb.rb | 16 | ||||
-rw-r--r-- | ruby/proto/gitaly/blob_services_pb.rb | 3 |
2 files changed, 19 insertions, 0 deletions
diff --git a/ruby/proto/gitaly/blob_pb.rb b/ruby/proto/gitaly/blob_pb.rb index 6805ee63b..3ade3769c 100644 --- a/ruby/proto/gitaly/blob_pb.rb +++ b/ruby/proto/gitaly/blob_pb.rb @@ -50,6 +50,19 @@ Google::Protobuf::DescriptorPool.generated_pool.build do optional :size, :int64, 2 optional :data, :bytes, 3 end + add_message "gitaly.ListAllBlobsRequest" do + optional :repository, :message, 1, "gitaly.Repository" + optional :limit, :uint32, 2 + optional :bytes_limit, :int64, 3 + end + add_message "gitaly.ListAllBlobsResponse" do + repeated :blobs, :message, 1, "gitaly.ListAllBlobsResponse.Blob" + end + add_message "gitaly.ListAllBlobsResponse.Blob" do + optional :oid, :string, 1 + optional :size, :int64, 2 + optional :data, :bytes, 3 + end add_message "gitaly.LFSPointer" do optional :size, :int64, 1 optional :data, :bytes, 2 @@ -94,6 +107,9 @@ module Gitaly ListBlobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.ListBlobsRequest").msgclass ListBlobsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.ListBlobsResponse").msgclass ListBlobsResponse::Blob = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.ListBlobsResponse.Blob").msgclass + ListAllBlobsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.ListAllBlobsRequest").msgclass + ListAllBlobsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.ListAllBlobsResponse").msgclass + ListAllBlobsResponse::Blob = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.ListAllBlobsResponse.Blob").msgclass LFSPointer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.LFSPointer").msgclass NewBlobObject = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.NewBlobObject").msgclass GetLFSPointersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("gitaly.GetLFSPointersRequest").msgclass diff --git a/ruby/proto/gitaly/blob_services_pb.rb b/ruby/proto/gitaly/blob_services_pb.rb index b06824da5..5eb951f5e 100644 --- a/ruby/proto/gitaly/blob_services_pb.rb +++ b/ruby/proto/gitaly/blob_services_pb.rb @@ -23,6 +23,9 @@ module Gitaly # doing a graph walk. It is not valid to pass revisions which do not resolve # to an existing object. rpc :ListBlobs, ::Gitaly::ListBlobsRequest, stream(::Gitaly::ListBlobsResponse) + # ListAllBlobs retrieves all blobs pointers in the repository, including + # those not reachable by any reference. + rpc :ListAllBlobs, ::Gitaly::ListAllBlobsRequest, stream(::Gitaly::ListAllBlobsResponse) # GetLFSPointers retrieves LFS pointers from a given set of object IDs. # This RPC filters all requested objects and only returns those which refer # to a valid LFS pointer. |