micro/config/source/mucp/proto/mucp.proto

76 lines
1.2 KiB
Protocol Buffer
Raw Normal View History

2020-01-16 19:10:15 +03:00
syntax = "proto3";
service Source {
rpc Create (CreateRequest) returns (CreateResponse) {
}
rpc Update (UpdateRequest) returns (UpdateResponse) {
}
rpc Delete (DeleteRequest) returns (DeleteResponse) {
}
rpc List (ListRequest) returns (ListResponse) {
}
rpc Read (ReadRequest) returns (ReadResponse) {
}
rpc Watch (WatchRequest) returns (stream WatchResponse) {
}
}
message ChangeSet {
bytes data = 1;
string checksum = 2;
string format = 3;
string source = 4;
int64 timestamp = 5;
}
message Change {
string key = 1;
string path = 2;
ChangeSet changeSet = 3;
}
message CreateRequest {
Change change = 1;
}
message CreateResponse {
}
message UpdateRequest {
Change change = 1;
}
message UpdateResponse {
}
message DeleteRequest {
Change change = 1;
}
message DeleteResponse {
}
message ListRequest {
}
message ListResponse {
repeated Change configs = 1;
}
message ReadRequest {
string key = 1;
string path = 2;
}
message ReadResponse {
Change change = 1;
}
message WatchRequest {
string key = 1;
}
message WatchResponse {
string key = 1;
ChangeSet changeSet = 2;
}