summaryrefslogtreecommitdiff
path: root/data/vyconf.proto
blob: d989fb31ce981fa9bcfcf95b16c764d80e18da9f (plain)
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
message Request {
  enum ConfigFormat {
    CURLY = 0;
    JSON = 1;
  }

  enum OutputFormat {
    OutPlain = 0;
    OutJSON = 1;
  }

  message Status {
  }

  message SetupSession {
    optional string ClientApplication = 1;
    optional int32 OnBehalfOf = 2;
  }

  message Teardown {
    optional int32 OnBehalfOf = 1;
  }

  message Validate {
    repeated string Path = 1;
    optional OutputFormat output_format = 2;
  }

  message Set {
    repeated string Path = 1;
    optional bool Ephemeral = 3; 
  }

  message Delete {
    repeated string Path = 1;
  }

  message Rename {
    repeated string EditLevel = 1;
    required string From = 2;
    required string To = 3;
  }

  message Copy {
    repeated string EditLevel = 1;
    required string From = 2;
    required string To = 3;
  }

  message Comment {
    repeated string Path = 1;
    required string Comment = 2;
  }

  message Commit {
    optional bool Confirm = 1;
    optional int32 ConfirmTimeout = 2;
    optional string Comment = 3;
  }

  message Rollback {
    required int32 Revision = 1;
  }

  message Load {
    required string Location = 1;
    optional ConfigFormat format = 2;
  }

  message Merge {
    required string Location = 1;
    optional ConfigFormat format = 2;
  }

  message Save {
    required string Location = 1;
    optional ConfigFormat format = 2;
  }

  message ShowConfig {
    repeated string Path = 1;
    optional ConfigFormat format = 2;
  }

  message Exists {
    repeated string Path = 1;
  }

  message GetValue {
    repeated string Path = 1;
    optional OutputFormat output_format = 2;
  }

  message GetValues {
    repeated string Path = 1;
    optional OutputFormat output_format = 2;
  }

  message ListChildren {
    repeated string Path = 1;
    optional OutputFormat output_format = 2;
  }

  message RunOpMode {
    repeated string Path = 1;
    optional OutputFormat output_format = 2;
  }

  message Confirm {
  }

  message EnterConfigurationMode {
    required bool Exclusive = 1;
    required bool OverrideExclusive = 2;
  }

  message ExitConfigurationMode {
  }

  oneof msg {
    Status status = 1;
    SetupSession setup_session = 2;
    Set set = 3;
    Delete delete = 4;
    Rename rename = 5;
    Copy copy = 6;
    Comment comment = 7;
    Commit commit = 8;
    Rollback rollback = 9;
    Merge merge = 10;
    Save save = 11;
    ShowConfig show_config = 12;
    Exists exists = 13;
    GetValue get_value = 14;
    GetValues get_values = 15;
    ListChildren list_children = 16;
    RunOpMode run_op_mode = 17;
    Confirm confirm = 18;
    EnterConfigurationMode configure = 19;
    ExitConfigurationMode exit_configure = 20;
    Validate validate = 21;
    Teardown teardown = 22;
  }
}

message RequestEnvelope {
    optional string token = 1;
    required Request request = 2;
}

enum Status {
  SUCCESS = 0;
  FAIL = 1;
  INVALID_PATH = 2;
  INVALID_VALUE = 3;
  COMMIT_IN_PROGRESS = 4;
  CONFIGURATION_LOCKED = 5;
  INTERNAL_ERROR = 6;
  PERMISSION_DENIED = 7;
  PATH_ALREADY_EXISTS = 8;
}

message Response {
  required Status status = 1;
  optional string output = 2;
  optional string error = 3;
  optional string warning = 4;
}