mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
chore: tweak workspace service
This commit is contained in:
@@ -1,48 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package memos.api.v2;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
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"};
|
||||
}
|
||||
rpc UpdateSystemInfo(UpdateSystemInfoRequest) returns (UpdateSystemInfoResponse) {
|
||||
option (google.api.http) = {
|
||||
patch: "/api/v2/system/info",
|
||||
body: "system_info"
|
||||
};
|
||||
option (google.api.method_signature) = "system_info,update_mask";
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
message UpdateSystemInfoRequest {
|
||||
// System info is the updated data.
|
||||
SystemInfo system_info = 1;
|
||||
google.protobuf.FieldMask update_mask = 2;
|
||||
}
|
||||
|
||||
message UpdateSystemInfoResponse {
|
||||
SystemInfo system_info = 1;
|
||||
}
|
47
proto/api/v2/workspace_service.proto
Normal file
47
proto/api/v2/workspace_service.proto
Normal file
@@ -0,0 +1,47 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package memos.api.v2;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "google/api/client.proto";
|
||||
import "google/protobuf/field_mask.proto";
|
||||
|
||||
option go_package = "gen/api/v2";
|
||||
|
||||
service WorkspaceService {
|
||||
rpc GetWorkspaceProfile(GetWorkspaceProfileRequest) returns (GetWorkspaceProfileResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/workspace/profile"};
|
||||
}
|
||||
rpc UpdateWorkspaceProfile(UpdateWorkspaceProfileRequest) returns (UpdateWorkspaceProfileResponse) {
|
||||
option (google.api.http) = {
|
||||
patch: "/api/v2/workspace/profile",
|
||||
body: "workspace_profile"
|
||||
};
|
||||
option (google.api.method_signature) = "workspace_profile,update_mask";
|
||||
}
|
||||
}
|
||||
|
||||
message WorkspaceProfile {
|
||||
string version = 1;
|
||||
string mode = 2;
|
||||
bool allow_registration = 3;
|
||||
bool disable_password_login = 4;
|
||||
string additional_script = 5;
|
||||
string additional_style = 6;
|
||||
}
|
||||
|
||||
message GetWorkspaceProfileRequest {}
|
||||
|
||||
message GetWorkspaceProfileResponse {
|
||||
WorkspaceProfile workspace_profile = 1;
|
||||
}
|
||||
|
||||
message UpdateWorkspaceProfileRequest {
|
||||
// System info is the updated data.
|
||||
WorkspaceProfile workspace_profile = 1;
|
||||
google.protobuf.FieldMask update_mask = 2;
|
||||
}
|
||||
|
||||
message UpdateWorkspaceProfileResponse {
|
||||
WorkspaceProfile workspace_profile = 1;
|
||||
}
|
Reference in New Issue
Block a user