You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
settings/proto/settingspb/settingspb.proto

75 lines
1.4 KiB
Protocol Buffer

syntax = "proto3";
package settingspb;
option go_package = "jochum.dev/jo-micro/settings/proto/settingspb;settingspb";
service SettingsService {
rpc Create(CreateRequest) returns (Setting) {}
rpc Update(UpdateRequest) returns (Setting) {}
rpc Upsert(UpsertRequest) returns (Setting) {}
rpc Get(GetRequest) returns (Setting) {}
rpc List(ListRequest) returns (SettingsList) {}
}
message CreateRequest {
string service = 1;
string ownerId = 2;
string name = 3;
bytes content = 4;
repeated string rolesRead = 5;
repeated string rolesUpdate = 6;
}
message UpdateRequest {
string id = 1;
bytes content = 2;
}
message UpsertRequest {
// Selectors
string id = 1;
string ownerId = 2; // For the Update Selector only
string service = 3;
string name = 4;
// Upsert content
bytes content = 5;
repeated string rolesRead = 6;
repeated string rolesUpdate = 7;
}
message GetRequest {
string id = 1;
string ownerId = 2;
string service = 3;
string name = 4;
}
message ListRequest {
string id = 1;
string ownerId = 2;
string service = 3;
string name = 4;
uint64 limit = 5;
uint64 offset = 6;
}
message Setting {
string id = 1;
string service = 2;
string ownerId = 3;
string name = 4;
bytes content = 5;
}
message SettingsList {
repeated Setting data = 1;
uint64 count = 2;
uint64 limit = 3;
uint64 offset = 4;
}