File: repository-service.proto

package info (click to toggle)
golang-gitaly-proto 1.37.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 372 kB
  • sloc: ruby: 216; makefile: 93
file content (594 lines) | stat: -rw-r--r-- 13,369 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
syntax = "proto3";

package gitaly;

option go_package = "gitlab.com/gitlab-org/gitaly-proto/go/gitalypb";

import "shared.proto";

service RepositoryService {
  rpc RepositoryExists(RepositoryExistsRequest) returns (RepositoryExistsResponse) {
    option (op_type).op = ACCESSOR;
  }
  rpc RepackIncremental(RepackIncrementalRequest) returns (RepackIncrementalResponse) {
    option (op_type) = {
      op: MUTATOR
      target_repository_field: "1"
    };
  }
  rpc RepackFull(RepackFullRequest) returns (RepackFullResponse) {
    option (op_type) = {
      op: MUTATOR
      target_repository_field: "1"
    };
  }
  rpc GarbageCollect(GarbageCollectRequest) returns (GarbageCollectResponse) {
    option (op_type) = {
      op: MUTATOR
      target_repository_field: "1"
    };
  }
  rpc RepositorySize(RepositorySizeRequest) returns (RepositorySizeResponse) {
    option (op_type) = {
      op: MUTATOR
      target_repository_field: "1"
    };
  }
  rpc ApplyGitattributes(ApplyGitattributesRequest) returns (ApplyGitattributesResponse) {
    option (op_type) = {
      op: MUTATOR
      target_repository_field: "1"
    };
  }
  rpc FetchRemote(FetchRemoteRequest) returns (FetchRemoteResponse) {
    option (op_type) = {
      op: MUTATOR
      target_repository_field: "1"
    };
  }
  rpc CreateRepository(CreateRepositoryRequest) returns (CreateRepositoryResponse) {
    option (op_type) = {
      op: MUTATOR
      target_repository_field: "1"
    };
  }
  rpc GetArchive(GetArchiveRequest) returns (stream GetArchiveResponse) {
    option (op_type) = {
      op: MUTATOR
      target_repository_field: "1"
    };
  }
  rpc HasLocalBranches(HasLocalBranchesRequest) returns (HasLocalBranchesResponse) {
    option (op_type).op = ACCESSOR;
  }
  rpc FetchSourceBranch(FetchSourceBranchRequest) returns (FetchSourceBranchResponse) {
    option (op_type) = {
      op: MUTATOR
      target_repository_field: "1"
    };
  }
  rpc Fsck(FsckRequest) returns (FsckResponse) {
    option (op_type) = {
      op: MUTATOR
      target_repository_field: "1"
    };
  }
  rpc WriteRef(WriteRefRequest) returns (WriteRefResponse) {
    option (op_type) = {
      op: MUTATOR
      target_repository_field: "1"
    };
  }
  rpc FindMergeBase(FindMergeBaseRequest) returns (FindMergeBaseResponse) {
    option (op_type).op = ACCESSOR;
  }
  rpc CreateFork(CreateForkRequest) returns (CreateForkResponse) {
    option (op_type) = {
      op: MUTATOR
      target_repository_field: "1"
    };
  }
  rpc IsRebaseInProgress(IsRebaseInProgressRequest) returns (IsRebaseInProgressResponse) {
    option (op_type).op = ACCESSOR;
  }
  rpc IsSquashInProgress(IsSquashInProgressRequest) returns (IsSquashInProgressResponse) {
    option (op_type).op = ACCESSOR;
  }

  rpc CreateRepositoryFromURL(CreateRepositoryFromURLRequest) returns (CreateRepositoryFromURLResponse) {
    option (op_type) = {
      op: MUTATOR
      target_repository_field: "1"
    };
  }
  rpc CreateBundle(CreateBundleRequest) returns (stream CreateBundleResponse) {
    option (op_type) = {
      op: MUTATOR
      scope_level: SERVER,
    };
  }
  rpc CreateRepositoryFromBundle(stream CreateRepositoryFromBundleRequest) returns (CreateRepositoryFromBundleResponse) {
    option (op_type) = {
      op: MUTATOR
      target_repository_field: "1"
    };
  }
  rpc WriteConfig(WriteConfigRequest) returns (WriteConfigResponse) {
    option (op_type) = {
      op: MUTATOR
      target_repository_field: "1"
    };
  }
  rpc SetConfig(SetConfigRequest) returns (SetConfigResponse) {
    option (op_type) = {
      op: MUTATOR
      target_repository_field: "1"
    };
  }
  rpc DeleteConfig(DeleteConfigRequest) returns (DeleteConfigResponse) {
    option (op_type) = {
      op: MUTATOR
      target_repository_field: "1"
    };
  }
  rpc FindLicense(FindLicenseRequest) returns (FindLicenseResponse) {
    option (op_type).op = ACCESSOR;
  }
  rpc GetInfoAttributes(GetInfoAttributesRequest) returns (stream GetInfoAttributesResponse) {
    option (op_type).op = ACCESSOR;
  }
  rpc CalculateChecksum(CalculateChecksumRequest) returns (CalculateChecksumResponse) {
    option (op_type).op = ACCESSOR;
  }
  rpc Cleanup(CleanupRequest) returns (CleanupResponse) {
    option (op_type) = {
      op: MUTATOR
      target_repository_field: "1"
    };
  }
  rpc GetSnapshot(GetSnapshotRequest) returns (stream GetSnapshotResponse) {
    option (op_type).op = ACCESSOR;
  }
  rpc CreateRepositoryFromSnapshot(CreateRepositoryFromSnapshotRequest) returns (CreateRepositoryFromSnapshotResponse) {
    option (op_type) = {
      op: MUTATOR
      target_repository_field: "1"
    };
  }
  rpc GetRawChanges(GetRawChangesRequest) returns (stream GetRawChangesResponse) {
    option (op_type).op = ACCESSOR;
  }
  rpc SearchFilesByContent(SearchFilesByContentRequest) returns (stream SearchFilesByContentResponse) {
    option (op_type).op = ACCESSOR;
  }
  rpc SearchFilesByName(SearchFilesByNameRequest) returns (stream SearchFilesByNameResponse) {
    option (op_type).op = ACCESSOR;
  }
  rpc RestoreCustomHooks(stream RestoreCustomHooksRequest) returns (RestoreCustomHooksResponse) {
    option (op_type) = {
      op: MUTATOR
      target_repository_field: "1"
    };
  }
  rpc BackupCustomHooks(BackupCustomHooksRequest) returns (stream BackupCustomHooksResponse) {
    option (op_type).op = ACCESSOR;
  }
  rpc PreFetch(PreFetchRequest) returns (PreFetchResponse) {
    option (op_type) = {
      op: MUTATOR
      target_repository_field: "1"
    };
  }
  rpc FetchHTTPRemote(FetchHTTPRemoteRequest) returns (FetchHTTPRemoteResponse) {
    option (op_type) = {
      op: MUTATOR
      target_repository_field: "1"
    };
  }
  rpc GetObjectDirectorySize(GetObjectDirectorySizeRequest) returns (GetObjectDirectorySizeResponse) {
    option (op_type).op = ACCESSOR;
  }
  rpc CloneFromPool(CloneFromPoolRequest) returns (CloneFromPoolResponse) {
    option (op_type) = {
      op: MUTATOR
      target_repository_field: "1"
    };
  }
  rpc CloneFromPoolInternal(CloneFromPoolInternalRequest) returns (CloneFromPoolInternalResponse) {
    option (op_type) = {
      op: MUTATOR
      target_repository_field: "1"
    };
  }
}

message RepositoryExistsRequest {
  Repository repository = 1;
}

message RepositoryExistsResponse {
  bool exists = 1;
}

message RepackIncrementalRequest {
  Repository repository = 1;
}

message RepackIncrementalResponse {}

message RepackFullRequest {
  Repository repository = 1;
  bool create_bitmap = 2;
}

message RepackFullResponse {}

message GarbageCollectRequest {
  Repository repository = 1;
  bool create_bitmap = 2;
}

message GarbageCollectResponse {}

message CleanupRequest {
  Repository repository = 1;
}

message CleanupResponse {}

message RepositorySizeRequest {
  Repository repository = 1;
}

message RepositorySizeResponse {
  // Repository size in kilobytes
  int64 size = 1;
}

message ApplyGitattributesRequest {
  Repository repository = 1;
  bytes revision = 2;
}

message ApplyGitattributesResponse {}

message FetchRemoteRequest {
  Repository repository = 1;
  string remote = 2;
  bool force = 3;
  bool no_tags = 4;
  int32 timeout = 5;
  string ssh_key = 6;
  string known_hosts = 7;
  reserved 8;
  bool no_prune = 9;
  Remote remote_params = 10;
}

message FetchRemoteResponse {}

message CreateRepositoryRequest {
  Repository repository = 1;
}

message CreateRepositoryResponse {}

message GetArchiveRequest {
  enum Format {
    ZIP = 0;
    TAR = 1;
    TAR_GZ = 2;
    TAR_BZ2 = 3;
  }

  Repository repository = 1;
  string commit_id = 2;
  string prefix = 3;
  Format format = 4;
  bytes path = 5;
}

message GetArchiveResponse {
  bytes data = 1;
}

message HasLocalBranchesRequest {
  Repository repository = 1;
}

message HasLocalBranchesResponse {
  bool value = 1;
}

message FetchSourceBranchRequest {
  Repository repository = 1;
  Repository source_repository = 2;
  bytes source_branch = 3;
  bytes target_ref = 4;
}

message FetchSourceBranchResponse {
  bool result = 1;
}

message FsckRequest {
  Repository repository = 1;
}

message FsckResponse {
  bytes error = 1;
}

message WriteRefRequest {
  Repository repository = 1;
  bytes ref = 2;
  bytes revision = 3;
  bytes old_revision = 4;
  bool force = 5;
  // This used to be a boolean indicating whether or not to shell out or use
  // the rugged implementation
  reserved 6;
}

message WriteRefResponse {
  // This used to contain an error message. Since we're shelling out
  // all exceptions are wrapped in GRPC errors.
  reserved 1;
}

message FindMergeBaseRequest {
  Repository repository = 1;
  // We use a repeated field because rugged supports finding a base
  // for more than 2 revisions, so if we needed that in the future we don't
  // need to change the protocol.
  repeated bytes revisions = 2;
}

message FindMergeBaseResponse {
  string base = 1;
}

message CreateForkRequest {
  Repository repository = 1;
  Repository source_repository = 2;
}

message CreateForkResponse {}

message IsRebaseInProgressRequest {
  Repository repository = 1;
  string rebase_id = 2;
}

message IsRebaseInProgressResponse {
  bool in_progress = 1;
}

message IsSquashInProgressRequest {
  Repository repository = 1;
  string squash_id = 2;
}

message IsSquashInProgressResponse {
  bool in_progress = 1;
}

message CreateRepositoryFromURLRequest {
  Repository repository = 1;
  string url = 2;
}

message CreateRepositoryFromURLResponse {}

message CreateBundleRequest {
  Repository repository = 1;
}

message CreateBundleResponse {
  bytes data = 1;
}

message WriteConfigRequest {
  Repository repository = 1;
  string full_path = 2;
}

message WriteConfigResponse {
  bytes error = 1;
}

message SetConfigRequest {
  Repository repository = 1;
  message Entry {
    string key = 1;
    oneof value {
      string value_str = 2;
      int32 value_int32 = 3;
      bool value_bool = 4;
    }
  }
  repeated Entry entries = 2;
}

message SetConfigResponse {}

message DeleteConfigRequest {
  Repository repository = 1;
  repeated string keys = 2;
}

message DeleteConfigResponse {}

message  RestoreCustomHooksRequest {
  Repository repository = 1;
  bytes data = 2;
}

message RestoreCustomHooksResponse {}

message BackupCustomHooksRequest {
  Repository repository = 1;
}

message BackupCustomHooksResponse {
  bytes data = 1;
}

message CreateRepositoryFromBundleRequest {
  // Only available on the first message
  Repository repository = 1;
  bytes data = 2;
}

message CreateRepositoryFromBundleResponse {}

message FindLicenseRequest {
  Repository repository = 1;
}

message FindLicenseResponse {
  string license_short_name = 1;
}

message GetInfoAttributesRequest {
  Repository repository = 1;
}

message GetInfoAttributesResponse {
  bytes attributes = 1;
}

message CalculateChecksumRequest {
  Repository repository = 1;
}

message CalculateChecksumResponse {
  string checksum = 1;
}

message GetSnapshotRequest {
  Repository repository = 1;
}

message GetSnapshotResponse {
  bytes data = 1;
}

message CreateRepositoryFromSnapshotRequest {
  Repository repository = 1;
  string http_url = 2;
  string http_auth = 3;
}

message CreateRepositoryFromSnapshotResponse {}

message GetRawChangesRequest {
  Repository repository = 1;
  string from_revision = 2;
  string to_revision = 3;
}

message GetRawChangesResponse {
  message RawChange {
    enum Operation {
      UNKNOWN = 0;
      ADDED = 1;
      COPIED = 2;
      DELETED = 3;
      MODIFIED = 4;
      RENAMED = 5;
      TYPE_CHANGED = 6;
    }

    string blob_id = 1;
    int64 size= 2;
    
    // use fields 9 and 10 in place of 3 and 4 (respectively)
    string new_path = 3 [deprecated=true];
    string old_path = 4 [deprecated=true];
    
    Operation operation= 5;
    string raw_operation = 6;
    int32 old_mode = 7;
    int32 new_mode = 8;
    
    // the following fields, 9 and 10, will eventually replace 3 and 4
    bytes new_path_bytes = 9;
    bytes old_path_bytes = 10;
  }

  repeated RawChange raw_changes = 1;
}

message SearchFilesByNameRequest {
  Repository repository = 1;
  string query = 2;
  bytes ref = 3;
}

message SearchFilesByNameResponse {
  repeated bytes files = 1;
}

message SearchFilesByContentRequest {
  Repository repository = 1;
  string query = 2;
  bytes ref = 3;
  bool chunked_response = 4;
}

message SearchFilesByContentResponse {
  repeated bytes matches = 1;
  bytes match_data = 2;
  bool end_of_match = 3;
}

message PreFetchRequest {
  Repository source_repository = 1;
  Repository target_repository = 2;
  ObjectPool object_pool = 3;
}

message PreFetchResponse {}

message Remote {
  string url = 1;
  string name = 2;
  string http_authorization_header = 3;
  repeated string mirror_refmaps = 4;
}

message FetchHTTPRemoteRequest {
  Repository repository = 1;
  Remote remote = 2;
  int32 timeout = 3;
}

message FetchHTTPRemoteResponse {}

message GetObjectDirectorySizeRequest {
  Repository repository = 1;
}

message GetObjectDirectorySizeResponse {
  // Object directory size in kilobytes
  int64 size = 1;
}

message CloneFromPoolRequest {
  Repository repository = 1;
  ObjectPool pool = 2;
  Remote remote = 3;
}

message CloneFromPoolResponse {
}

message CloneFromPoolInternalRequest {
  Repository repository = 1;
  ObjectPool pool = 2;
  Repository source_repository = 3;
}

message CloneFromPoolInternalResponse {
}