mirror of
https://github.com/aykhans/slash-e.git
synced 2025-04-20 22:07:15 +00:00
86 lines
2.2 KiB
Protocol Buffer
86 lines
2.2 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package slash.api.v2;
|
|
|
|
import "api/v2/subscription_service.proto";
|
|
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/setting"};
|
|
}
|
|
rpc UpdateWorkspaceSetting(UpdateWorkspaceSettingRequest) returns (UpdateWorkspaceSettingResponse) {
|
|
option (google.api.http) = {
|
|
post: "/api/v2/workspace/setting"
|
|
body: "*"
|
|
};
|
|
}
|
|
}
|
|
|
|
message WorkspaceProfile {
|
|
// Current workspace mode: dev, prod.
|
|
string mode = 1;
|
|
// The workspace plan.
|
|
PlanType plan = 2;
|
|
// Whether to enable other users to sign up.
|
|
bool enable_signup = 3;
|
|
// The custom style.
|
|
string custom_style = 4;
|
|
// The custom script.
|
|
string custom_script = 5;
|
|
}
|
|
|
|
message WorkspaceSetting {
|
|
string license_key = 1;
|
|
// Whether to enable other users to sign up.
|
|
bool enable_signup = 2;
|
|
// The custom style.
|
|
string custom_style = 3;
|
|
// The custom script.
|
|
string custom_script = 4;
|
|
// The auto backup setting.
|
|
AutoBackupWorkspaceSetting auto_backup = 5;
|
|
}
|
|
|
|
message AutoBackupWorkspaceSetting {
|
|
// Whether auto backup is enabled.
|
|
bool enabled = 1;
|
|
// The cron expression for auto backup.
|
|
// For example, "0 0 0 * * *" means backup at 00:00:00 every day.
|
|
// See https://en.wikipedia.org/wiki/Cron for more details.
|
|
string cron_expression = 2;
|
|
// The maximum number of backups to keep.
|
|
int32 max_keep = 3;
|
|
}
|
|
|
|
message GetWorkspaceProfileRequest {}
|
|
|
|
message GetWorkspaceProfileResponse {
|
|
// The workspace profile.
|
|
WorkspaceProfile profile = 1;
|
|
}
|
|
|
|
message GetWorkspaceSettingRequest {}
|
|
|
|
message GetWorkspaceSettingResponse {
|
|
// The user setting.
|
|
WorkspaceSetting setting = 1;
|
|
}
|
|
|
|
message UpdateWorkspaceSettingRequest {
|
|
// The user setting.
|
|
WorkspaceSetting setting = 1;
|
|
// The update mask.
|
|
repeated string update_mask = 2;
|
|
}
|
|
|
|
message UpdateWorkspaceSettingResponse {
|
|
// The user setting.
|
|
WorkspaceSetting setting = 1;
|
|
}
|