# Generated by the protocol buffer compiler. DO NOT EDIT! # Source: repository.proto for package 'gitaly' require 'grpc' require 'repository_pb' module Gitaly module RepositoryService # RepositoryService is a service providing RPCs accessing repositories as a whole. class Service include ::GRPC::GenericService self.marshal_class_method = :encode self.unmarshal_class_method = :decode self.service_name = 'gitaly.RepositoryService' # RepositoryExists ... rpc :RepositoryExists, ::Gitaly::RepositoryExistsRequest, ::Gitaly::RepositoryExistsResponse # RepositorySize returns information on the complete on-disk repository size. If you need more # detailed information about the size of various sub-structures you should instead use the # repositoryInfo RPC. rpc :RepositorySize, ::Gitaly::RepositorySizeRequest, ::Gitaly::RepositorySizeResponse # RepositoryInfo returns detailed information about a repository and its data structures. rpc :RepositoryInfo, ::Gitaly::RepositoryInfoRequest, ::Gitaly::RepositoryInfoResponse # ObjectsSize calculates the total on-disk object size of reachable objects in bytes. In contrast # to RepositorySize and RepositoryInfo, this RPC performs a graph walk of the specified revisions # and will thus return an accurate view of how large the accumulated on-disk size of reachable # objects is. # # As this RPC needs to perform a revision walk, it is significantly more expensive than the RPCs # which simply check the size of on-disk data structures. On the other hand, it allows the caller # to accurately compute the size of objects in a way that is at least somewhat detached from the # on-disk representation: # # - Objects which exist in multiple packfiles will not be double-counted. # - Objects which aren't reachable will not be accounted for. # - It is possible to only account for a subset of references, e.g. only those that an admin # would have direct control over. # # It is thus recommended to use this RPC whenever you want to calculate sizes which will end up # being shown to the user. # # Note that the size is still bound to change when repositories are getting repacked and thus # cannot be considered to be stable. This is because the on-disk size of any object can change # depending on how Git decides to deltify it in a packfile. Thus, when a repack would cause a # different delta base to be picked, the actual on-disk size of any given object may change. rpc :ObjectsSize, stream(::Gitaly::ObjectsSizeRequest), ::Gitaly::ObjectsSizeResponse # ObjectFormat determines the object format that is being used by the repository. rpc :ObjectFormat, ::Gitaly::ObjectFormatRequest, ::Gitaly::ObjectFormatResponse # ApplyGitattributes ... rpc :ApplyGitattributes, ::Gitaly::ApplyGitattributesRequest, ::Gitaly::ApplyGitattributesResponse # FetchRemote fetches references from a remote repository into the local # repository. rpc :FetchRemote, ::Gitaly::FetchRemoteRequest, ::Gitaly::FetchRemoteResponse # CreateRepository ... rpc :CreateRepository, ::Gitaly::CreateRepositoryRequest, ::Gitaly::CreateRepositoryResponse # GetArchive ... rpc :GetArchive, ::Gitaly::GetArchiveRequest, stream(::Gitaly::GetArchiveResponse) # HasLocalBranches ... rpc :HasLocalBranches, ::Gitaly::HasLocalBranchesRequest, ::Gitaly::HasLocalBranchesResponse # FetchSourceBranch fetches a branch from a second (potentially remote) # repository into the given repository. rpc :FetchSourceBranch, ::Gitaly::FetchSourceBranchRequest, ::Gitaly::FetchSourceBranchResponse # Fsck checks the repository for consistency via git-fsck(1). This can be used to check for # repository corruption. rpc :Fsck, ::Gitaly::FsckRequest, ::Gitaly::FsckResponse # WriteRef ... rpc :WriteRef, ::Gitaly::WriteRefRequest, ::Gitaly::WriteRefResponse # FindMergeBase ... rpc :FindMergeBase, ::Gitaly::FindMergeBaseRequest, ::Gitaly::FindMergeBaseResponse # CreateFork creates a new repository from a specific source repository. This new repository will # have the same branches and tags as the source repository. Internal references will not be # recreated in the forked repository. # # all objects of the source repository will be duplicated, that is there are no space savings by # creating the repository like this. The newly created repository does not join the object pool # of the source repository, if there is any. rpc :CreateFork, ::Gitaly::CreateForkRequest, ::Gitaly::CreateForkResponse # CreateRepositoryFromURL ... rpc :CreateRepositoryFromURL, ::Gitaly::CreateRepositoryFromURLRequest, ::Gitaly::CreateRepositoryFromURLResponse # CreateBundle creates a bundle from all refs rpc :CreateBundle, ::Gitaly::CreateBundleRequest, stream(::Gitaly::CreateBundleResponse) # CreateBundleFromRefList creates a bundle from a stream of ref patterns. # When the bundle would be empty the FailedPrecondition error code is returned. rpc :CreateBundleFromRefList, stream(::Gitaly::CreateBundleFromRefListRequest), stream(::Gitaly::CreateBundleFromRefListResponse) # FetchBundle fetches references from a bundle into the local repository. # refs will be mirrored to the target repository with the refspec # "+refs/*:refs/*" and refs that do not exist in the bundle will be removed. rpc :FetchBundle, stream(::Gitaly::FetchBundleRequest), ::Gitaly::FetchBundleResponse # CreateRepositoryFromBundle creates a Git repository at the specified storage and path, if it # does not already exist, from the provided Git bundle. rpc :CreateRepositoryFromBundle, stream(::Gitaly::CreateRepositoryFromBundleRequest), ::Gitaly::CreateRepositoryFromBundleResponse # GetConfig reads the target repository's gitconfig and streams its contents # back. Returns a NotFound error in case no gitconfig was found. rpc :GetConfig, ::Gitaly::GetConfigRequest, stream(::Gitaly::GetConfigResponse) # FindLicense looks in the given repository and attempts to detect all the # details about the license used in the repository. rpc :FindLicense, ::Gitaly::FindLicenseRequest, ::Gitaly::FindLicenseResponse # GetInfoAttributes ... rpc :GetInfoAttributes, ::Gitaly::GetInfoAttributesRequest, stream(::Gitaly::GetInfoAttributesResponse) # CalculateChecksum ... rpc :CalculateChecksum, ::Gitaly::CalculateChecksumRequest, ::Gitaly::CalculateChecksumResponse # GetSnapshot ... rpc :GetSnapshot, ::Gitaly::GetSnapshotRequest, stream(::Gitaly::GetSnapshotResponse) # CreateRepositoryFromSnapshot ... rpc :CreateRepositoryFromSnapshot, ::Gitaly::CreateRepositoryFromSnapshotRequest, ::Gitaly::CreateRepositoryFromSnapshotResponse # GetRawChanges ... rpc :GetRawChanges, ::Gitaly::GetRawChangesRequest, stream(::Gitaly::GetRawChangesResponse) # SearchFilesByContent ... rpc :SearchFilesByContent, ::Gitaly::SearchFilesByContentRequest, stream(::Gitaly::SearchFilesByContentResponse) # SearchFilesByName ... rpc :SearchFilesByName, ::Gitaly::SearchFilesByNameRequest, stream(::Gitaly::SearchFilesByNameResponse) # RestoreCustomHooks sets the git hooks for a repository. The hooks are sent # in a tar archive containing a `custom_hooks` directory. This directory is # ultimately extracted to the repository. rpc :RestoreCustomHooks, stream(::Gitaly::RestoreCustomHooksRequest), ::Gitaly::RestoreCustomHooksResponse # SetCustomHooks sets the git hooks for a repository. The hooks are sent in a # tar archive containing a `custom_hooks` directory. This directory is # ultimately extracted to the repository. rpc :SetCustomHooks, stream(::Gitaly::SetCustomHooksRequest), ::Gitaly::SetCustomHooksResponse # BackupCustomHooks fetches the git hooks for a repository. The hooks are # sent in a tar archive containing a `custom_hooks` directory. If no hooks # are present in the repository, the response will have no data. rpc :BackupCustomHooks, ::Gitaly::BackupCustomHooksRequest, stream(::Gitaly::BackupCustomHooksResponse) # GetCustomHooks fetches the git hooks for a repository. The hooks are sent # in a tar archive containing a `custom_hooks` directory. If no hooks are # present in the repository, the response will have no data. rpc :GetCustomHooks, ::Gitaly::GetCustomHooksRequest, stream(::Gitaly::GetCustomHooksResponse) # GetObjectDirectorySize ... rpc :GetObjectDirectorySize, ::Gitaly::GetObjectDirectorySizeRequest, ::Gitaly::GetObjectDirectorySizeResponse # RemoveRepository will move the repository to `+gitaly/tmp/_removed` and # eventually remove it. This ensures that even on networked filesystems the # data is actually removed even if there's someone still handling the data. rpc :RemoveRepository, ::Gitaly::RemoveRepositoryRequest, ::Gitaly::RemoveRepositoryResponse # RenameRepository ... rpc :RenameRepository, ::Gitaly::RenameRepositoryRequest, ::Gitaly::RenameRepositoryResponse # ReplicateRepository replicates data from a source repository to target repository. On the # target repository, this operation ensures synchronization of the following components: # # - Git config # - Git attributes # - Custom Git hooks, # - References and objects # - (Optional) Object deduplication network membership rpc :ReplicateRepository, ::Gitaly::ReplicateRepositoryRequest, ::Gitaly::ReplicateRepositoryResponse # OptimizeRepository performs all maintenance tasks in a repository to keep # it in an efficient state. It cleans up stale data, repacks objects, # updates auxiliary caches like commit-graphs and packs references. The # optimizations performed are based on heuristics and will adapt to the # repository's size. This RPC call is designed as a black-box such that # Gitaly has complete control of the on-disk state of repositories. rpc :OptimizeRepository, ::Gitaly::OptimizeRepositoryRequest, ::Gitaly::OptimizeRepositoryResponse # PruneUnreachableObjects will prune all objects which aren't reachable from # the repository's current set of references. Because pruning can only # happen for objects which aren't packed, you are required to first run # OptimizeRepository to explode any unreachable objects into loose objects. # # Furthermore, this RPC call has a grace period of 30 minutes: any # unreachable loose objects must not have been accessed or modified in the # last 30 minutes. This is a hard requirement to avoid repository corruption. # # to make proper use of this RPC you thus need to call OptimizeRepository, # wait 30 minutes, and then call PruneUnreachableObjects. rpc :PruneUnreachableObjects, ::Gitaly::PruneUnreachableObjectsRequest, ::Gitaly::PruneUnreachableObjectsResponse # SetFullPath writes the "gitlab.fullpath" configuration into the # repository's gitconfig. This is mainly to help debugging purposes in case # an admin inspects the repository's gitconfig such that he can easily see # what the repository name is. rpc :SetFullPath, ::Gitaly::SetFullPathRequest, ::Gitaly::SetFullPathResponse # FullPath reads the "gitlab.fullpath" configuration from the repository's # gitconfig. Returns an error in case the full path has not been configured. rpc :FullPath, ::Gitaly::FullPathRequest, ::Gitaly::FullPathResponse # RemoveAll deletes all repositories on a specified storage. rpc :RemoveAll, ::Gitaly::RemoveAllRequest, ::Gitaly::RemoveAllResponse # BackupRepository creates a full backup streamed directly to # object-storage. The backup is created synchronously. The destination must # be configured in config.backup.go_cloud_url rpc :BackupRepository, ::Gitaly::BackupRepositoryRequest, ::Gitaly::BackupRepositoryResponse # RestoreRepository restores a backup streamed directly from object-storage. # The repository is restored synchronously. The source object-storage must # be configured in config.backup.go_cloud_url rpc :RestoreRepository, ::Gitaly::RestoreRepositoryRequest, ::Gitaly::RestoreRepositoryResponse # GetFileAttributes queries given file attributes as specified in .gitattributes file rpc :GetFileAttributes, ::Gitaly::GetFileAttributesRequest, ::Gitaly::GetFileAttributesResponse end Stub = Service.rpc_stub_class end end