mirror of
https://github.com/aykhans/slash-e.git
synced 2025-06-15 04:17:50 +00:00
chore: initial workspace setting proto definition
This commit is contained in:
59
proto/api/v2/workspace_setting_service.proto
Normal file
59
proto/api/v2/workspace_setting_service.proto
Normal file
@ -0,0 +1,59 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package slash.api.v2;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "google/api/client.proto";
|
||||
|
||||
option go_package = "gen/api/v2";
|
||||
|
||||
service WorkspaceSettingService {
|
||||
rpc GetWorkspaceSetting(GetWorkspaceSettingRequest) returns (GetWorkspaceSettingResponse) {
|
||||
option (google.api.http) = {get: "/api/v2/workspace/settings"};
|
||||
}
|
||||
rpc UpdateWorkspaceSetting(UpdateWorkspaceSettingRequest) returns (UpdateWorkspaceSettingResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v2/workspace/settings"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
message WorkspaceSetting {
|
||||
// Whether to enable other users to sign up.
|
||||
bool enable_signup = 1;
|
||||
// The relative path of the resource directory.
|
||||
string resource_relative_path = 2;
|
||||
// The auto backup setting.
|
||||
AutoBackupWorkspaceSetting auto_backup = 3;
|
||||
}
|
||||
|
||||
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 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;
|
||||
}
|
Reference in New Issue
Block a user