diff options
author | Jacob Vosmaer <jacob@gitlab.com> | 2019-07-05 12:28:16 +0300 |
---|---|---|
committer | Zeger-Jan van de Weg <git@zjvandeweg.nl> | 2019-07-05 12:28:16 +0300 |
commit | b9c9aec5cf53de4ea1a7fc3b067dd56d7828e080 (patch) | |
tree | 2693a49918682c12ea22e4085b8c569ac9e62497 /proto/cleanup.proto | |
parent | 873a408c49ef1b34fce0cd47a80aa192f426d7c0 (diff) |
Start preparation for migrating .proto files
Diffstat (limited to 'proto/cleanup.proto')
-rw-r--r-- | proto/cleanup.proto | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/proto/cleanup.proto b/proto/cleanup.proto new file mode 100644 index 000000000..276a17e02 --- /dev/null +++ b/proto/cleanup.proto @@ -0,0 +1,69 @@ +syntax = "proto3"; + +package gitaly; + +option go_package = "gitlab.com/gitlab-org/gitaly/proto/go/gitalypb"; + +import "shared.proto"; + +service CleanupService { + // Deprecated in favour of ApplyBfgObjectMapStream + rpc ApplyBfgObjectMap(stream ApplyBfgObjectMapRequest) returns (ApplyBfgObjectMapResponse) { + option (op_type) = { + op: MUTATOR + target_repository_field: "1" + }; + } + + rpc ApplyBfgObjectMapStream(stream ApplyBfgObjectMapStreamRequest) returns (stream ApplyBfgObjectMapStreamResponse) { + option (op_type) = { + op: MUTATOR + target_repository_field: "1" + }; + } + + rpc CloseSession(CloseSessionRequest) returns (CloseSessionResponse) { + option (op_type) = { + op: MUTATOR + scope_level: SERVER, + }; + } +} + +message ApplyBfgObjectMapRequest { + Repository repository = 1; + // A raw object-map file as generated by BFG: https://rtyley.github.io/bfg-repo-cleaner + // Each line in the file has two object SHAs, space-separated - the original + // SHA of the object, and the SHA after BFG has rewritten the object. + bytes object_map = 2; +} + +message ApplyBfgObjectMapResponse {} + +message ApplyBfgObjectMapStreamRequest { + // Only available on the first message + Repository repository = 1; + + // A raw object-map file as generated by BFG: https://rtyley.github.io/bfg-repo-cleaner + // Each line in the file has two object SHAs, space-separated - the original + // SHA of the object, and the SHA after BFG has rewritten the object. + bytes object_map = 2; +} + +message ApplyBfgObjectMapStreamResponse { + // We send back each parsed entry in the request's object map so the client + // can take action + message Entry { + ObjectType type = 1; + string old_oid = 2; + string new_oid = 3; + } + + repeated Entry entries = 1; +} + +message CloseSessionRequest{ + string session_id = 1; +} + +message CloseSessionResponse{} |