chore: add get workspace profile api

This commit is contained in:
Steven
2023-09-21 08:39:39 +08:00
parent 271c133913
commit 58cb5c7e2e
7 changed files with 552 additions and 132 deletions

View File

@ -7,17 +7,29 @@ import "google/api/annotations.proto";
option go_package = "gen/api/v2";
service WorkspaceService {
rpc GetWorkspaceProfile(GetWorkspaceProfileRequest) returns (GetWorkspaceProfileResponse) {
option (google.api.http) = {get: "/api/v2/workspace/profile"};
}
rpc GetWorkspaceSetting(GetWorkspaceSettingRequest) returns (GetWorkspaceSettingResponse) {
option (google.api.http) = {get: "/api/v2/workspace/settings"};
option (google.api.http) = {get: "/api/v2/workspace/setting"};
}
rpc UpdateWorkspaceSetting(UpdateWorkspaceSettingRequest) returns (UpdateWorkspaceSettingResponse) {
option (google.api.http) = {
post: "/api/v2/workspace/settings"
post: "/api/v2/workspace/setting"
body: "*"
};
}
}
message WorkspaceProfile {
string mode = 1;
bool enable_signup = 2;
// The custom style.
string custom_style = 3;
// The custom script.
string custom_script = 4;
}
message WorkspaceSetting {
string license_key = 1;
// Whether to enable other users to sign up.
@ -43,6 +55,13 @@ message AutoBackupWorkspaceSetting {
int32 max_keep = 3;
}
message GetWorkspaceProfileRequest {}
message GetWorkspaceProfileResponse {
// The workspace profile.
WorkspaceProfile profile = 1;
}
message GetWorkspaceSettingRequest {}
message GetWorkspaceSettingResponse {