1syntax = "proto3";
2
3package gitaly;
4
5option go_package = "gitlab.com/gitlab-org/gitaly/v14/proto/go/gitalypb";
6
7import "google/protobuf/descriptor.proto";
8
9message OperationMsg {
10  enum Operation {
11    UNKNOWN = 0;
12    MUTATOR = 1;
13    ACCESSOR = 2;
14  }
15
16  Operation op = 1;
17
18  enum Scope {
19    REPOSITORY = 0;
20    STORAGE = 2;
21
22    reserved 1;
23    reserved "SERVER";
24  }
25
26  // Scope level indicates what level an RPC interacts with a server:
27  //   - REPOSITORY: scoped to only a single repo
28  //   - SERVER: affects the entire server and potentially all repos
29  //   - STORAGE: scoped to a specific storage location and all repos within
30  Scope scope_level = 2;
31}
32
33extend google.protobuf.ServiceOptions {
34  // intercepted indicates whether the proxy intercepts and handles the call
35  // instead of proxying. Intercepted services do not require scope or operation
36  // annotations.
37  bool intercepted = 82302;
38}
39
40extend google.protobuf.MethodOptions {
41  // Random high number..
42  OperationMsg op_type = 82303;
43  // intercepted_method indicates whether the proxy intercepts and handles the method call
44  // instead of proxying. Intercepted methods do not require operation type annotations.
45  bool intercepted_method = 82304;
46}
47
48extend google.protobuf.FieldOptions {
49  // Used to mark field containing name of affected storage.
50  bool storage = 91233; // Random high number..
51
52  // If this operation modifies a repository, this annotations
53  // will specify the location of the Repository field within
54  // the request message.
55  //
56  // Repository annotation is used mark field used as repository
57  // when parent message is marked as target or additional repository
58  bool repository = 91234;
59  // Used to mark target repository
60  bool target_repository = 91235;
61  // Used to mark additional repository
62  bool additional_repository = 91236;
63}
64