memos/proto/api/v2/system_service.proto

49 lines
1.1 KiB
Protocol Buffer
Raw Normal View History

syntax = "proto3";
package memos.api.v2;
import "google/api/annotations.proto";
2023-10-21 12:41:55 +08:00
import "google/api/client.proto";
import "google/protobuf/field_mask.proto";
option go_package = "gen/api/v2";
service SystemService {
rpc GetSystemInfo(GetSystemInfoRequest) returns (GetSystemInfoResponse) {
option (google.api.http) = {get: "/api/v2/system/info"};
}
2023-09-06 21:54:12 +08:00
rpc UpdateSystemInfo(UpdateSystemInfoRequest) returns (UpdateSystemInfoResponse) {
2023-10-21 12:41:55 +08:00
option (google.api.http) = {
patch: "/api/v2/system/info",
body: "system_info"
};
option (google.api.method_signature) = "system_info,update_mask";
2023-09-06 21:54:12 +08:00
}
}
message SystemInfo {
string version = 1;
string mode = 2;
bool allow_registration = 3;
bool disable_password_login = 4;
string additional_script = 5;
string additional_style = 6;
int64 db_size = 7;
}
message GetSystemInfoRequest {}
message GetSystemInfoResponse {
SystemInfo system_info = 1;
}
2023-09-06 21:54:12 +08:00
message UpdateSystemInfoRequest {
// System info is the updated data.
SystemInfo system_info = 1;
2023-10-21 12:41:55 +08:00
google.protobuf.FieldMask update_mask = 2;
2023-09-06 21:54:12 +08:00
}
message UpdateSystemInfoResponse {
SystemInfo system_info = 1;
}