diff options
author | Daniil Baturin <daniil@baturin.org> | 2017-01-06 01:31:40 +0700 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2017-01-06 01:31:40 +0700 |
commit | f74d68d408e3e1d8dc1313c322851b8ca07ef730 (patch) | |
tree | f731bc17a0beb012412b65d95deebfd12cc81bf5 /data/vyconf.proto | |
parent | e18a945633b74dc0547d61941b15cccb027fecd1 (diff) | |
download | vyconf-f74d68d408e3e1d8dc1313c322851b8ca07ef730.tar.gz vyconf-f74d68d408e3e1d8dc1313c322851b8ca07ef730.zip |
Add initial implementation of the protobuf schema.
Diffstat (limited to 'data/vyconf.proto')
-rw-r--r-- | data/vyconf.proto | 122 |
1 files changed, 122 insertions, 0 deletions
diff --git a/data/vyconf.proto b/data/vyconf.proto new file mode 100644 index 0000000..fa53eec --- /dev/null +++ b/data/vyconf.proto @@ -0,0 +1,122 @@ +message Request { + enum ConfigFormat { + CURLY = 0; + JSON = 1; + } + + message Noop { + } + + message SetupSession { + optional bool Exclusive = 1; + optional bool OverrideExclusive = 2; + } + + message Set { + repeated string Path = 1; + optional string Value = 2; + optional bool Ephemeral = 3; + } + + message Delete { + repeated string Path = 1; + optional string Value = 2; + } + + 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; + } + + message GetValues { + repeated string Path = 1; + } + + message ListChildren { + repeated string Path = 1; + } + + message RunOpMode { + repeated string Path = 1; + } + + oneof msg { + Noop noop = 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; + } +} + +enum Status { + SUCCESS = 0; + FAIL = 1; +} + +message Response { + required Status status = 1; + +} |