chore: initial workspace setting proto definition

This commit is contained in:
Steven 2023-09-12 08:50:23 +08:00
parent 032d9c1220
commit e843594a02
17 changed files with 1910 additions and 52 deletions

View File

@ -0,0 +1,194 @@
// @generated by protoc-gen-es v1.3.0
// @generated from file api/v2/workspace_setting_service.proto (package slash.api.v2, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
/**
* @generated from message slash.api.v2.WorkspaceSetting
*/
export declare class WorkspaceSetting extends Message<WorkspaceSetting> {
/**
* Whether to enable other users to sign up.
*
* @generated from field: bool enable_signup = 1;
*/
enableSignup: boolean;
/**
* The relative path of the resource directory.
*
* @generated from field: string resource_relative_path = 2;
*/
resourceRelativePath: string;
/**
* The auto backup setting.
*
* @generated from field: slash.api.v2.AutoBackupWorkspaceSetting auto_backup = 3;
*/
autoBackup?: AutoBackupWorkspaceSetting;
constructor(data?: PartialMessage<WorkspaceSetting>);
static readonly runtime: typeof proto3;
static readonly typeName = "slash.api.v2.WorkspaceSetting";
static readonly fields: FieldList;
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): WorkspaceSetting;
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): WorkspaceSetting;
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): WorkspaceSetting;
static equals(a: WorkspaceSetting | PlainMessage<WorkspaceSetting> | undefined, b: WorkspaceSetting | PlainMessage<WorkspaceSetting> | undefined): boolean;
}
/**
* @generated from message slash.api.v2.AutoBackupWorkspaceSetting
*/
export declare class AutoBackupWorkspaceSetting extends Message<AutoBackupWorkspaceSetting> {
/**
* Whether auto backup is enabled.
*
* @generated from field: bool enabled = 1;
*/
enabled: boolean;
/**
* 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.
*
* @generated from field: string cron_expression = 2;
*/
cronExpression: string;
/**
* The maximum number of backups to keep.
*
* @generated from field: int32 max_keep = 3;
*/
maxKeep: number;
constructor(data?: PartialMessage<AutoBackupWorkspaceSetting>);
static readonly runtime: typeof proto3;
static readonly typeName = "slash.api.v2.AutoBackupWorkspaceSetting";
static readonly fields: FieldList;
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AutoBackupWorkspaceSetting;
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AutoBackupWorkspaceSetting;
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AutoBackupWorkspaceSetting;
static equals(a: AutoBackupWorkspaceSetting | PlainMessage<AutoBackupWorkspaceSetting> | undefined, b: AutoBackupWorkspaceSetting | PlainMessage<AutoBackupWorkspaceSetting> | undefined): boolean;
}
/**
* @generated from message slash.api.v2.GetWorkspaceSettingRequest
*/
export declare class GetWorkspaceSettingRequest extends Message<GetWorkspaceSettingRequest> {
constructor(data?: PartialMessage<GetWorkspaceSettingRequest>);
static readonly runtime: typeof proto3;
static readonly typeName = "slash.api.v2.GetWorkspaceSettingRequest";
static readonly fields: FieldList;
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetWorkspaceSettingRequest;
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetWorkspaceSettingRequest;
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetWorkspaceSettingRequest;
static equals(a: GetWorkspaceSettingRequest | PlainMessage<GetWorkspaceSettingRequest> | undefined, b: GetWorkspaceSettingRequest | PlainMessage<GetWorkspaceSettingRequest> | undefined): boolean;
}
/**
* @generated from message slash.api.v2.GetWorkspaceSettingResponse
*/
export declare class GetWorkspaceSettingResponse extends Message<GetWorkspaceSettingResponse> {
/**
* The user setting.
*
* @generated from field: slash.api.v2.WorkspaceSetting setting = 1;
*/
setting?: WorkspaceSetting;
constructor(data?: PartialMessage<GetWorkspaceSettingResponse>);
static readonly runtime: typeof proto3;
static readonly typeName = "slash.api.v2.GetWorkspaceSettingResponse";
static readonly fields: FieldList;
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetWorkspaceSettingResponse;
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetWorkspaceSettingResponse;
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetWorkspaceSettingResponse;
static equals(a: GetWorkspaceSettingResponse | PlainMessage<GetWorkspaceSettingResponse> | undefined, b: GetWorkspaceSettingResponse | PlainMessage<GetWorkspaceSettingResponse> | undefined): boolean;
}
/**
* @generated from message slash.api.v2.UpdateWorkspaceSettingRequest
*/
export declare class UpdateWorkspaceSettingRequest extends Message<UpdateWorkspaceSettingRequest> {
/**
* The user setting.
*
* @generated from field: slash.api.v2.WorkspaceSetting setting = 1;
*/
setting?: WorkspaceSetting;
/**
* The update mask.
*
* @generated from field: repeated string update_mask = 2;
*/
updateMask: string[];
constructor(data?: PartialMessage<UpdateWorkspaceSettingRequest>);
static readonly runtime: typeof proto3;
static readonly typeName = "slash.api.v2.UpdateWorkspaceSettingRequest";
static readonly fields: FieldList;
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateWorkspaceSettingRequest;
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateWorkspaceSettingRequest;
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateWorkspaceSettingRequest;
static equals(a: UpdateWorkspaceSettingRequest | PlainMessage<UpdateWorkspaceSettingRequest> | undefined, b: UpdateWorkspaceSettingRequest | PlainMessage<UpdateWorkspaceSettingRequest> | undefined): boolean;
}
/**
* @generated from message slash.api.v2.UpdateWorkspaceSettingResponse
*/
export declare class UpdateWorkspaceSettingResponse extends Message<UpdateWorkspaceSettingResponse> {
/**
* The user setting.
*
* @generated from field: slash.api.v2.WorkspaceSetting setting = 1;
*/
setting?: WorkspaceSetting;
constructor(data?: PartialMessage<UpdateWorkspaceSettingResponse>);
static readonly runtime: typeof proto3;
static readonly typeName = "slash.api.v2.UpdateWorkspaceSettingResponse";
static readonly fields: FieldList;
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateWorkspaceSettingResponse;
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateWorkspaceSettingResponse;
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateWorkspaceSettingResponse;
static equals(a: UpdateWorkspaceSettingResponse | PlainMessage<UpdateWorkspaceSettingResponse> | undefined, b: UpdateWorkspaceSettingResponse | PlainMessage<UpdateWorkspaceSettingResponse> | undefined): boolean;
}

View File

@ -0,0 +1,70 @@
// @generated by protoc-gen-es v1.3.0
// @generated from file api/v2/workspace_setting_service.proto (package slash.api.v2, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import { proto3 } from "@bufbuild/protobuf";
/**
* @generated from message slash.api.v2.WorkspaceSetting
*/
export const WorkspaceSetting = proto3.makeMessageType(
"slash.api.v2.WorkspaceSetting",
() => [
{ no: 1, name: "enable_signup", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 2, name: "resource_relative_path", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "auto_backup", kind: "message", T: AutoBackupWorkspaceSetting },
],
);
/**
* @generated from message slash.api.v2.AutoBackupWorkspaceSetting
*/
export const AutoBackupWorkspaceSetting = proto3.makeMessageType(
"slash.api.v2.AutoBackupWorkspaceSetting",
() => [
{ no: 1, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 2, name: "cron_expression", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "max_keep", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
],
);
/**
* @generated from message slash.api.v2.GetWorkspaceSettingRequest
*/
export const GetWorkspaceSettingRequest = proto3.makeMessageType(
"slash.api.v2.GetWorkspaceSettingRequest",
[],
);
/**
* @generated from message slash.api.v2.GetWorkspaceSettingResponse
*/
export const GetWorkspaceSettingResponse = proto3.makeMessageType(
"slash.api.v2.GetWorkspaceSettingResponse",
() => [
{ no: 1, name: "setting", kind: "message", T: WorkspaceSetting },
],
);
/**
* @generated from message slash.api.v2.UpdateWorkspaceSettingRequest
*/
export const UpdateWorkspaceSettingRequest = proto3.makeMessageType(
"slash.api.v2.UpdateWorkspaceSettingRequest",
() => [
{ no: 1, name: "setting", kind: "message", T: WorkspaceSetting },
{ no: 2, name: "update_mask", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
],
);
/**
* @generated from message slash.api.v2.UpdateWorkspaceSettingResponse
*/
export const UpdateWorkspaceSettingResponse = proto3.makeMessageType(
"slash.api.v2.UpdateWorkspaceSettingResponse",
() => [
{ no: 1, name: "setting", kind: "message", T: WorkspaceSetting },
],
);

View File

@ -16,9 +16,32 @@ export declare enum WorkspaceSettingKey {
WORKSPACE_SETTING_KEY_UNSPECIFIED = 0,
/**
* @generated from enum value: WORKSPACE_SETTING_AUTO_BACKUP = 1;
* The secret session key used to encrypt session data.
*
* @generated from enum value: WORKSPACE_SETTING_SECRET_SESSION = 1;
*/
WORKSPACE_SETTING_AUTO_BACKUP = 1,
WORKSPACE_SETTING_SECRET_SESSION = 1,
/**
* Whether to enable other users to sign up.
*
* @generated from enum value: WORKSAPCE_SETTING_ENABLE_SIGNUP = 2;
*/
WORKSAPCE_SETTING_ENABLE_SIGNUP = 2,
/**
* The relative path of the resource directory.
*
* @generated from enum value: WORKSPACE_SETTING_RESOURCE_RELATIVE_PATH = 3;
*/
WORKSPACE_SETTING_RESOURCE_RELATIVE_PATH = 3,
/**
* The auto backup setting.
*
* @generated from enum value: WORKSPACE_SETTING_AUTO_BACKUP = 4;
*/
WORKSPACE_SETTING_AUTO_BACKUP = 4,
}
/**
@ -35,7 +58,25 @@ export declare class WorkspaceSetting extends Message<WorkspaceSetting> {
*/
value: {
/**
* @generated from field: slash.store.AutoBackupWorkspaceSetting auto_backup = 2;
* @generated from field: string secret_session = 2;
*/
value: string;
case: "secretSession";
} | {
/**
* @generated from field: bool enable_signup = 3;
*/
value: boolean;
case: "enableSignup";
} | {
/**
* @generated from field: string resource_relative_path = 4;
*/
value: string;
case: "resourceRelativePath";
} | {
/**
* @generated from field: slash.store.AutoBackupWorkspaceSetting auto_backup = 5;
*/
value: AutoBackupWorkspaceSetting;
case: "autoBackup";

View File

@ -12,7 +12,10 @@ export const WorkspaceSettingKey = proto3.makeEnum(
"slash.store.WorkspaceSettingKey",
[
{no: 0, name: "WORKSPACE_SETTING_KEY_UNSPECIFIED"},
{no: 1, name: "WORKSPACE_SETTING_AUTO_BACKUP"},
{no: 1, name: "WORKSPACE_SETTING_SECRET_SESSION"},
{no: 2, name: "WORKSAPCE_SETTING_ENABLE_SIGNUP"},
{no: 3, name: "WORKSPACE_SETTING_RESOURCE_RELATIVE_PATH"},
{no: 4, name: "WORKSPACE_SETTING_AUTO_BACKUP"},
],
);
@ -23,7 +26,10 @@ export const WorkspaceSetting = proto3.makeMessageType(
"slash.store.WorkspaceSetting",
() => [
{ no: 1, name: "key", kind: "enum", T: proto3.getEnumType(WorkspaceSettingKey) },
{ no: 2, name: "auto_backup", kind: "message", T: AutoBackupWorkspaceSetting, oneof: "value" },
{ no: 2, name: "secret_session", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "value" },
{ no: 3, name: "enable_signup", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "value" },
{ no: 4, name: "resource_relative_path", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "value" },
{ no: 5, name: "auto_backup", kind: "message", T: AutoBackupWorkspaceSetting, oneof: "value" },
],
);

View File

@ -1,3 +1,4 @@
import { Divider } from "@mui/joy";
import PreferenceSection from "@/components/setting/PreferenceSection";
import AccessTokenSection from "../components/setting/AccessTokenSection";
import AccountSection from "../components/setting/AccountSection";
@ -16,6 +17,11 @@ const Setting: React.FC = () => {
<PreferenceSection />
{isAdmin && (
<>
<Divider />
<div>
<h2 className="text-2xl font-bold">Workspace setting</h2>
<p className="text-gray-500 text-sm">Manage your workspace.</p>
</div>
<MemberSection />
<WorkspaceSection />
</>

View File

@ -0,0 +1,194 @@
// @generated by protoc-gen-es v1.3.0
// @generated from file api/v2/workspace_setting_service.proto (package slash.api.v2, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
import { Message, proto3 } from "@bufbuild/protobuf";
/**
* @generated from message slash.api.v2.WorkspaceSetting
*/
export declare class WorkspaceSetting extends Message<WorkspaceSetting> {
/**
* Whether to enable other users to sign up.
*
* @generated from field: bool enable_signup = 1;
*/
enableSignup: boolean;
/**
* The relative path of the resource directory.
*
* @generated from field: string resource_relative_path = 2;
*/
resourceRelativePath: string;
/**
* The auto backup setting.
*
* @generated from field: slash.api.v2.AutoBackupWorkspaceSetting auto_backup = 3;
*/
autoBackup?: AutoBackupWorkspaceSetting;
constructor(data?: PartialMessage<WorkspaceSetting>);
static readonly runtime: typeof proto3;
static readonly typeName = "slash.api.v2.WorkspaceSetting";
static readonly fields: FieldList;
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): WorkspaceSetting;
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): WorkspaceSetting;
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): WorkspaceSetting;
static equals(a: WorkspaceSetting | PlainMessage<WorkspaceSetting> | undefined, b: WorkspaceSetting | PlainMessage<WorkspaceSetting> | undefined): boolean;
}
/**
* @generated from message slash.api.v2.AutoBackupWorkspaceSetting
*/
export declare class AutoBackupWorkspaceSetting extends Message<AutoBackupWorkspaceSetting> {
/**
* Whether auto backup is enabled.
*
* @generated from field: bool enabled = 1;
*/
enabled: boolean;
/**
* 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.
*
* @generated from field: string cron_expression = 2;
*/
cronExpression: string;
/**
* The maximum number of backups to keep.
*
* @generated from field: int32 max_keep = 3;
*/
maxKeep: number;
constructor(data?: PartialMessage<AutoBackupWorkspaceSetting>);
static readonly runtime: typeof proto3;
static readonly typeName = "slash.api.v2.AutoBackupWorkspaceSetting";
static readonly fields: FieldList;
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AutoBackupWorkspaceSetting;
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AutoBackupWorkspaceSetting;
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AutoBackupWorkspaceSetting;
static equals(a: AutoBackupWorkspaceSetting | PlainMessage<AutoBackupWorkspaceSetting> | undefined, b: AutoBackupWorkspaceSetting | PlainMessage<AutoBackupWorkspaceSetting> | undefined): boolean;
}
/**
* @generated from message slash.api.v2.GetWorkspaceSettingRequest
*/
export declare class GetWorkspaceSettingRequest extends Message<GetWorkspaceSettingRequest> {
constructor(data?: PartialMessage<GetWorkspaceSettingRequest>);
static readonly runtime: typeof proto3;
static readonly typeName = "slash.api.v2.GetWorkspaceSettingRequest";
static readonly fields: FieldList;
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetWorkspaceSettingRequest;
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetWorkspaceSettingRequest;
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetWorkspaceSettingRequest;
static equals(a: GetWorkspaceSettingRequest | PlainMessage<GetWorkspaceSettingRequest> | undefined, b: GetWorkspaceSettingRequest | PlainMessage<GetWorkspaceSettingRequest> | undefined): boolean;
}
/**
* @generated from message slash.api.v2.GetWorkspaceSettingResponse
*/
export declare class GetWorkspaceSettingResponse extends Message<GetWorkspaceSettingResponse> {
/**
* The user setting.
*
* @generated from field: slash.api.v2.WorkspaceSetting setting = 1;
*/
setting?: WorkspaceSetting;
constructor(data?: PartialMessage<GetWorkspaceSettingResponse>);
static readonly runtime: typeof proto3;
static readonly typeName = "slash.api.v2.GetWorkspaceSettingResponse";
static readonly fields: FieldList;
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetWorkspaceSettingResponse;
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetWorkspaceSettingResponse;
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetWorkspaceSettingResponse;
static equals(a: GetWorkspaceSettingResponse | PlainMessage<GetWorkspaceSettingResponse> | undefined, b: GetWorkspaceSettingResponse | PlainMessage<GetWorkspaceSettingResponse> | undefined): boolean;
}
/**
* @generated from message slash.api.v2.UpdateWorkspaceSettingRequest
*/
export declare class UpdateWorkspaceSettingRequest extends Message<UpdateWorkspaceSettingRequest> {
/**
* The user setting.
*
* @generated from field: slash.api.v2.WorkspaceSetting setting = 1;
*/
setting?: WorkspaceSetting;
/**
* The update mask.
*
* @generated from field: repeated string update_mask = 2;
*/
updateMask: string[];
constructor(data?: PartialMessage<UpdateWorkspaceSettingRequest>);
static readonly runtime: typeof proto3;
static readonly typeName = "slash.api.v2.UpdateWorkspaceSettingRequest";
static readonly fields: FieldList;
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateWorkspaceSettingRequest;
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateWorkspaceSettingRequest;
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateWorkspaceSettingRequest;
static equals(a: UpdateWorkspaceSettingRequest | PlainMessage<UpdateWorkspaceSettingRequest> | undefined, b: UpdateWorkspaceSettingRequest | PlainMessage<UpdateWorkspaceSettingRequest> | undefined): boolean;
}
/**
* @generated from message slash.api.v2.UpdateWorkspaceSettingResponse
*/
export declare class UpdateWorkspaceSettingResponse extends Message<UpdateWorkspaceSettingResponse> {
/**
* The user setting.
*
* @generated from field: slash.api.v2.WorkspaceSetting setting = 1;
*/
setting?: WorkspaceSetting;
constructor(data?: PartialMessage<UpdateWorkspaceSettingResponse>);
static readonly runtime: typeof proto3;
static readonly typeName = "slash.api.v2.UpdateWorkspaceSettingResponse";
static readonly fields: FieldList;
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): UpdateWorkspaceSettingResponse;
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): UpdateWorkspaceSettingResponse;
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): UpdateWorkspaceSettingResponse;
static equals(a: UpdateWorkspaceSettingResponse | PlainMessage<UpdateWorkspaceSettingResponse> | undefined, b: UpdateWorkspaceSettingResponse | PlainMessage<UpdateWorkspaceSettingResponse> | undefined): boolean;
}

View File

@ -0,0 +1,70 @@
// @generated by protoc-gen-es v1.3.0
// @generated from file api/v2/workspace_setting_service.proto (package slash.api.v2, syntax proto3)
/* eslint-disable */
// @ts-nocheck
import { proto3 } from "@bufbuild/protobuf";
/**
* @generated from message slash.api.v2.WorkspaceSetting
*/
export const WorkspaceSetting = proto3.makeMessageType(
"slash.api.v2.WorkspaceSetting",
() => [
{ no: 1, name: "enable_signup", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 2, name: "resource_relative_path", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "auto_backup", kind: "message", T: AutoBackupWorkspaceSetting },
],
);
/**
* @generated from message slash.api.v2.AutoBackupWorkspaceSetting
*/
export const AutoBackupWorkspaceSetting = proto3.makeMessageType(
"slash.api.v2.AutoBackupWorkspaceSetting",
() => [
{ no: 1, name: "enabled", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
{ no: 2, name: "cron_expression", kind: "scalar", T: 9 /* ScalarType.STRING */ },
{ no: 3, name: "max_keep", kind: "scalar", T: 5 /* ScalarType.INT32 */ },
],
);
/**
* @generated from message slash.api.v2.GetWorkspaceSettingRequest
*/
export const GetWorkspaceSettingRequest = proto3.makeMessageType(
"slash.api.v2.GetWorkspaceSettingRequest",
[],
);
/**
* @generated from message slash.api.v2.GetWorkspaceSettingResponse
*/
export const GetWorkspaceSettingResponse = proto3.makeMessageType(
"slash.api.v2.GetWorkspaceSettingResponse",
() => [
{ no: 1, name: "setting", kind: "message", T: WorkspaceSetting },
],
);
/**
* @generated from message slash.api.v2.UpdateWorkspaceSettingRequest
*/
export const UpdateWorkspaceSettingRequest = proto3.makeMessageType(
"slash.api.v2.UpdateWorkspaceSettingRequest",
() => [
{ no: 1, name: "setting", kind: "message", T: WorkspaceSetting },
{ no: 2, name: "update_mask", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
],
);
/**
* @generated from message slash.api.v2.UpdateWorkspaceSettingResponse
*/
export const UpdateWorkspaceSettingResponse = proto3.makeMessageType(
"slash.api.v2.UpdateWorkspaceSettingResponse",
() => [
{ no: 1, name: "setting", kind: "message", T: WorkspaceSetting },
],
);

View File

@ -16,9 +16,32 @@ export declare enum WorkspaceSettingKey {
WORKSPACE_SETTING_KEY_UNSPECIFIED = 0,
/**
* @generated from enum value: WORKSPACE_SETTING_AUTO_BACKUP = 1;
* The secret session key used to encrypt session data.
*
* @generated from enum value: WORKSPACE_SETTING_SECRET_SESSION = 1;
*/
WORKSPACE_SETTING_AUTO_BACKUP = 1,
WORKSPACE_SETTING_SECRET_SESSION = 1,
/**
* Whether to enable other users to sign up.
*
* @generated from enum value: WORKSAPCE_SETTING_ENABLE_SIGNUP = 2;
*/
WORKSAPCE_SETTING_ENABLE_SIGNUP = 2,
/**
* The relative path of the resource directory.
*
* @generated from enum value: WORKSPACE_SETTING_RESOURCE_RELATIVE_PATH = 3;
*/
WORKSPACE_SETTING_RESOURCE_RELATIVE_PATH = 3,
/**
* The auto backup setting.
*
* @generated from enum value: WORKSPACE_SETTING_AUTO_BACKUP = 4;
*/
WORKSPACE_SETTING_AUTO_BACKUP = 4,
}
/**
@ -35,7 +58,25 @@ export declare class WorkspaceSetting extends Message<WorkspaceSetting> {
*/
value: {
/**
* @generated from field: slash.store.AutoBackupWorkspaceSetting auto_backup = 2;
* @generated from field: string secret_session = 2;
*/
value: string;
case: "secretSession";
} | {
/**
* @generated from field: bool enable_signup = 3;
*/
value: boolean;
case: "enableSignup";
} | {
/**
* @generated from field: string resource_relative_path = 4;
*/
value: string;
case: "resourceRelativePath";
} | {
/**
* @generated from field: slash.store.AutoBackupWorkspaceSetting auto_backup = 5;
*/
value: AutoBackupWorkspaceSetting;
case: "autoBackup";

View File

@ -12,7 +12,10 @@ export const WorkspaceSettingKey = proto3.makeEnum(
"slash.store.WorkspaceSettingKey",
[
{no: 0, name: "WORKSPACE_SETTING_KEY_UNSPECIFIED"},
{no: 1, name: "WORKSPACE_SETTING_AUTO_BACKUP"},
{no: 1, name: "WORKSPACE_SETTING_SECRET_SESSION"},
{no: 2, name: "WORKSAPCE_SETTING_ENABLE_SIGNUP"},
{no: 3, name: "WORKSPACE_SETTING_RESOURCE_RELATIVE_PATH"},
{no: 4, name: "WORKSPACE_SETTING_AUTO_BACKUP"},
],
);
@ -23,7 +26,10 @@ export const WorkspaceSetting = proto3.makeMessageType(
"slash.store.WorkspaceSetting",
() => [
{ no: 1, name: "key", kind: "enum", T: proto3.getEnumType(WorkspaceSettingKey) },
{ no: 2, name: "auto_backup", kind: "message", T: AutoBackupWorkspaceSetting, oneof: "value" },
{ no: 2, name: "secret_session", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "value" },
{ no: 3, name: "enable_signup", kind: "scalar", T: 8 /* ScalarType.BOOL */, oneof: "value" },
{ no: 4, name: "resource_relative_path", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "value" },
{ no: 5, name: "auto_backup", kind: "message", T: AutoBackupWorkspaceSetting, oneof: "value" },
],
);

View 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;
}

View File

@ -58,6 +58,16 @@
- [UserSettingService](#slash-api-v2-UserSettingService)
- [api/v2/workspace_setting_service.proto](#api_v2_workspace_setting_service-proto)
- [AutoBackupWorkspaceSetting](#slash-api-v2-AutoBackupWorkspaceSetting)
- [GetWorkspaceSettingRequest](#slash-api-v2-GetWorkspaceSettingRequest)
- [GetWorkspaceSettingResponse](#slash-api-v2-GetWorkspaceSettingResponse)
- [UpdateWorkspaceSettingRequest](#slash-api-v2-UpdateWorkspaceSettingRequest)
- [UpdateWorkspaceSettingResponse](#slash-api-v2-UpdateWorkspaceSettingResponse)
- [WorkspaceSetting](#slash-api-v2-WorkspaceSetting)
- [WorkspaceSettingService](#slash-api-v2-WorkspaceSettingService)
- [Scalar Value Types](#scalar-value-types)
@ -734,6 +744,123 @@
<a name="api_v2_workspace_setting_service-proto"></a>
<p align="right"><a href="#top">Top</a></p>
## api/v2/workspace_setting_service.proto
<a name="slash-api-v2-AutoBackupWorkspaceSetting"></a>
### AutoBackupWorkspaceSetting
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| enabled | [bool](#bool) | | Whether auto backup is enabled. |
| cron_expression | [string](#string) | | The cron expression for auto backup. For example, &#34;0 0 0 * * *&#34; means backup at 00:00:00 every day. See https://en.wikipedia.org/wiki/Cron for more details. |
| max_keep | [int32](#int32) | | The maximum number of backups to keep. |
<a name="slash-api-v2-GetWorkspaceSettingRequest"></a>
### GetWorkspaceSettingRequest
<a name="slash-api-v2-GetWorkspaceSettingResponse"></a>
### GetWorkspaceSettingResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| setting | [WorkspaceSetting](#slash-api-v2-WorkspaceSetting) | | The user setting. |
<a name="slash-api-v2-UpdateWorkspaceSettingRequest"></a>
### UpdateWorkspaceSettingRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| setting | [WorkspaceSetting](#slash-api-v2-WorkspaceSetting) | | The user setting. |
| update_mask | [string](#string) | repeated | The update mask. |
<a name="slash-api-v2-UpdateWorkspaceSettingResponse"></a>
### UpdateWorkspaceSettingResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| setting | [WorkspaceSetting](#slash-api-v2-WorkspaceSetting) | | The user setting. |
<a name="slash-api-v2-WorkspaceSetting"></a>
### WorkspaceSetting
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| enable_signup | [bool](#bool) | | Whether to enable other users to sign up. |
| resource_relative_path | [string](#string) | | The relative path of the resource directory. |
| auto_backup | [AutoBackupWorkspaceSetting](#slash-api-v2-AutoBackupWorkspaceSetting) | | The auto backup setting. |
<a name="slash-api-v2-WorkspaceSettingService"></a>
### WorkspaceSettingService
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
| GetWorkspaceSetting | [GetWorkspaceSettingRequest](#slash-api-v2-GetWorkspaceSettingRequest) | [GetWorkspaceSettingResponse](#slash-api-v2-GetWorkspaceSettingResponse) | |
| UpdateWorkspaceSetting | [UpdateWorkspaceSettingRequest](#slash-api-v2-UpdateWorkspaceSettingRequest) | [UpdateWorkspaceSettingResponse](#slash-api-v2-UpdateWorkspaceSettingResponse) | |
## Scalar Value Types
| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |

View File

@ -0,0 +1,568 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.31.0
// protoc (unknown)
// source: api/v2/workspace_setting_service.proto
package apiv2
import (
_ "google.golang.org/genproto/googleapis/api/annotations"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type WorkspaceSetting struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Whether to enable other users to sign up.
EnableSignup bool `protobuf:"varint,1,opt,name=enable_signup,json=enableSignup,proto3" json:"enable_signup,omitempty"`
// The relative path of the resource directory.
ResourceRelativePath string `protobuf:"bytes,2,opt,name=resource_relative_path,json=resourceRelativePath,proto3" json:"resource_relative_path,omitempty"`
// The auto backup setting.
AutoBackup *AutoBackupWorkspaceSetting `protobuf:"bytes,3,opt,name=auto_backup,json=autoBackup,proto3" json:"auto_backup,omitempty"`
}
func (x *WorkspaceSetting) Reset() {
*x = WorkspaceSetting{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_workspace_setting_service_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *WorkspaceSetting) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*WorkspaceSetting) ProtoMessage() {}
func (x *WorkspaceSetting) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_workspace_setting_service_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use WorkspaceSetting.ProtoReflect.Descriptor instead.
func (*WorkspaceSetting) Descriptor() ([]byte, []int) {
return file_api_v2_workspace_setting_service_proto_rawDescGZIP(), []int{0}
}
func (x *WorkspaceSetting) GetEnableSignup() bool {
if x != nil {
return x.EnableSignup
}
return false
}
func (x *WorkspaceSetting) GetResourceRelativePath() string {
if x != nil {
return x.ResourceRelativePath
}
return ""
}
func (x *WorkspaceSetting) GetAutoBackup() *AutoBackupWorkspaceSetting {
if x != nil {
return x.AutoBackup
}
return nil
}
type AutoBackupWorkspaceSetting struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Whether auto backup is enabled.
Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
// 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.
CronExpression string `protobuf:"bytes,2,opt,name=cron_expression,json=cronExpression,proto3" json:"cron_expression,omitempty"`
// The maximum number of backups to keep.
MaxKeep int32 `protobuf:"varint,3,opt,name=max_keep,json=maxKeep,proto3" json:"max_keep,omitempty"`
}
func (x *AutoBackupWorkspaceSetting) Reset() {
*x = AutoBackupWorkspaceSetting{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_workspace_setting_service_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *AutoBackupWorkspaceSetting) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*AutoBackupWorkspaceSetting) ProtoMessage() {}
func (x *AutoBackupWorkspaceSetting) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_workspace_setting_service_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use AutoBackupWorkspaceSetting.ProtoReflect.Descriptor instead.
func (*AutoBackupWorkspaceSetting) Descriptor() ([]byte, []int) {
return file_api_v2_workspace_setting_service_proto_rawDescGZIP(), []int{1}
}
func (x *AutoBackupWorkspaceSetting) GetEnabled() bool {
if x != nil {
return x.Enabled
}
return false
}
func (x *AutoBackupWorkspaceSetting) GetCronExpression() string {
if x != nil {
return x.CronExpression
}
return ""
}
func (x *AutoBackupWorkspaceSetting) GetMaxKeep() int32 {
if x != nil {
return x.MaxKeep
}
return 0
}
type GetWorkspaceSettingRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
}
func (x *GetWorkspaceSettingRequest) Reset() {
*x = GetWorkspaceSettingRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_workspace_setting_service_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetWorkspaceSettingRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetWorkspaceSettingRequest) ProtoMessage() {}
func (x *GetWorkspaceSettingRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_workspace_setting_service_proto_msgTypes[2]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetWorkspaceSettingRequest.ProtoReflect.Descriptor instead.
func (*GetWorkspaceSettingRequest) Descriptor() ([]byte, []int) {
return file_api_v2_workspace_setting_service_proto_rawDescGZIP(), []int{2}
}
type GetWorkspaceSettingResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The user setting.
Setting *WorkspaceSetting `protobuf:"bytes,1,opt,name=setting,proto3" json:"setting,omitempty"`
}
func (x *GetWorkspaceSettingResponse) Reset() {
*x = GetWorkspaceSettingResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_workspace_setting_service_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GetWorkspaceSettingResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GetWorkspaceSettingResponse) ProtoMessage() {}
func (x *GetWorkspaceSettingResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_workspace_setting_service_proto_msgTypes[3]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use GetWorkspaceSettingResponse.ProtoReflect.Descriptor instead.
func (*GetWorkspaceSettingResponse) Descriptor() ([]byte, []int) {
return file_api_v2_workspace_setting_service_proto_rawDescGZIP(), []int{3}
}
func (x *GetWorkspaceSettingResponse) GetSetting() *WorkspaceSetting {
if x != nil {
return x.Setting
}
return nil
}
type UpdateWorkspaceSettingRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The user setting.
Setting *WorkspaceSetting `protobuf:"bytes,1,opt,name=setting,proto3" json:"setting,omitempty"`
// The update mask.
UpdateMask []string `protobuf:"bytes,2,rep,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"`
}
func (x *UpdateWorkspaceSettingRequest) Reset() {
*x = UpdateWorkspaceSettingRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_workspace_setting_service_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UpdateWorkspaceSettingRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdateWorkspaceSettingRequest) ProtoMessage() {}
func (x *UpdateWorkspaceSettingRequest) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_workspace_setting_service_proto_msgTypes[4]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UpdateWorkspaceSettingRequest.ProtoReflect.Descriptor instead.
func (*UpdateWorkspaceSettingRequest) Descriptor() ([]byte, []int) {
return file_api_v2_workspace_setting_service_proto_rawDescGZIP(), []int{4}
}
func (x *UpdateWorkspaceSettingRequest) GetSetting() *WorkspaceSetting {
if x != nil {
return x.Setting
}
return nil
}
func (x *UpdateWorkspaceSettingRequest) GetUpdateMask() []string {
if x != nil {
return x.UpdateMask
}
return nil
}
type UpdateWorkspaceSettingResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// The user setting.
Setting *WorkspaceSetting `protobuf:"bytes,1,opt,name=setting,proto3" json:"setting,omitempty"`
}
func (x *UpdateWorkspaceSettingResponse) Reset() {
*x = UpdateWorkspaceSettingResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_api_v2_workspace_setting_service_proto_msgTypes[5]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UpdateWorkspaceSettingResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UpdateWorkspaceSettingResponse) ProtoMessage() {}
func (x *UpdateWorkspaceSettingResponse) ProtoReflect() protoreflect.Message {
mi := &file_api_v2_workspace_setting_service_proto_msgTypes[5]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UpdateWorkspaceSettingResponse.ProtoReflect.Descriptor instead.
func (*UpdateWorkspaceSettingResponse) Descriptor() ([]byte, []int) {
return file_api_v2_workspace_setting_service_proto_rawDescGZIP(), []int{5}
}
func (x *UpdateWorkspaceSettingResponse) GetSetting() *WorkspaceSetting {
if x != nil {
return x.Setting
}
return nil
}
var File_api_v2_workspace_setting_service_proto protoreflect.FileDescriptor
var file_api_v2_workspace_setting_service_proto_rawDesc = []byte{
0x0a, 0x26, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61,
0x63, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69,
0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0c, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61,
0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69,
0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xb8, 0x01,
0x0a, 0x10, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69,
0x6e, 0x67, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x69, 0x67,
0x6e, 0x75, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x65, 0x6e, 0x61, 0x62, 0x6c,
0x65, 0x53, 0x69, 0x67, 0x6e, 0x75, 0x70, 0x12, 0x34, 0x0a, 0x16, 0x72, 0x65, 0x73, 0x6f, 0x75,
0x72, 0x63, 0x65, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x61, 0x74,
0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x49, 0x0a,
0x0b, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x03, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x28, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76,
0x32, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x57, 0x6f, 0x72, 0x6b,
0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x61, 0x75,
0x74, 0x6f, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x22, 0x7a, 0x0a, 0x1a, 0x41, 0x75, 0x74, 0x6f,
0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53,
0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65,
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
0x12, 0x27, 0x0a, 0x0f, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73,
0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x72, 0x6f, 0x6e, 0x45,
0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78,
0x5f, 0x6b, 0x65, 0x65, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x61, 0x78,
0x4b, 0x65, 0x65, 0x70, 0x22, 0x1c, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73,
0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x22, 0x57, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61,
0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x38, 0x0a, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76,
0x32, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69,
0x6e, 0x67, 0x52, 0x07, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x22, 0x7a, 0x0a, 0x1d, 0x55,
0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65,
0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x07,
0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e,
0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x6f, 0x72,
0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x73,
0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x1f, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x70, 0x64,
0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x5a, 0x0a, 0x1e, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,
0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x73, 0x65, 0x74,
0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6c, 0x61,
0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70,
0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x73, 0x65, 0x74, 0x74,
0x69, 0x6e, 0x67, 0x32, 0xc7, 0x02, 0x0a, 0x17, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,
0x8e, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65,
0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x28, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e,
0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70,
0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x1a, 0x29, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32,
0x2e, 0x47, 0x65, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74,
0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x22, 0x82, 0xd3,
0xe4, 0x93, 0x02, 0x1c, 0x12, 0x1a, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x77, 0x6f,
0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73,
0x12, 0x9a, 0x01, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73,
0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x2b, 0x2e, 0x73, 0x6c,
0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74,
0x65, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,
0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68,
0x2e, 0x61, 0x70, 0x69, 0x2e, 0x76, 0x32, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x57, 0x6f,
0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65,
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x3a, 0x01,
0x2a, 0x22, 0x1a, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73,
0x70, 0x61, 0x63, 0x65, 0x2f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x42, 0xb3, 0x01,
0x0a, 0x10, 0x63, 0x6f, 0x6d, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x61, 0x70, 0x69, 0x2e,
0x76, 0x32, 0x42, 0x1c, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74,
0x74, 0x69, 0x6e, 0x67, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f,
0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62,
0x6f, 0x6f, 0x6a, 0x61, 0x63, 0x6b, 0x2f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2f, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x32, 0x3b, 0x61, 0x70,
0x69, 0x76, 0x32, 0xa2, 0x02, 0x03, 0x53, 0x41, 0x58, 0xaa, 0x02, 0x0c, 0x53, 0x6c, 0x61, 0x73,
0x68, 0x2e, 0x41, 0x70, 0x69, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x0c, 0x53, 0x6c, 0x61, 0x73, 0x68,
0x5c, 0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0xe2, 0x02, 0x18, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x5c,
0x41, 0x70, 0x69, 0x5c, 0x56, 0x32, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
0x74, 0x61, 0xea, 0x02, 0x0e, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x3a, 0x3a, 0x41, 0x70, 0x69, 0x3a,
0x3a, 0x56, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_api_v2_workspace_setting_service_proto_rawDescOnce sync.Once
file_api_v2_workspace_setting_service_proto_rawDescData = file_api_v2_workspace_setting_service_proto_rawDesc
)
func file_api_v2_workspace_setting_service_proto_rawDescGZIP() []byte {
file_api_v2_workspace_setting_service_proto_rawDescOnce.Do(func() {
file_api_v2_workspace_setting_service_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_v2_workspace_setting_service_proto_rawDescData)
})
return file_api_v2_workspace_setting_service_proto_rawDescData
}
var file_api_v2_workspace_setting_service_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_api_v2_workspace_setting_service_proto_goTypes = []interface{}{
(*WorkspaceSetting)(nil), // 0: slash.api.v2.WorkspaceSetting
(*AutoBackupWorkspaceSetting)(nil), // 1: slash.api.v2.AutoBackupWorkspaceSetting
(*GetWorkspaceSettingRequest)(nil), // 2: slash.api.v2.GetWorkspaceSettingRequest
(*GetWorkspaceSettingResponse)(nil), // 3: slash.api.v2.GetWorkspaceSettingResponse
(*UpdateWorkspaceSettingRequest)(nil), // 4: slash.api.v2.UpdateWorkspaceSettingRequest
(*UpdateWorkspaceSettingResponse)(nil), // 5: slash.api.v2.UpdateWorkspaceSettingResponse
}
var file_api_v2_workspace_setting_service_proto_depIdxs = []int32{
1, // 0: slash.api.v2.WorkspaceSetting.auto_backup:type_name -> slash.api.v2.AutoBackupWorkspaceSetting
0, // 1: slash.api.v2.GetWorkspaceSettingResponse.setting:type_name -> slash.api.v2.WorkspaceSetting
0, // 2: slash.api.v2.UpdateWorkspaceSettingRequest.setting:type_name -> slash.api.v2.WorkspaceSetting
0, // 3: slash.api.v2.UpdateWorkspaceSettingResponse.setting:type_name -> slash.api.v2.WorkspaceSetting
2, // 4: slash.api.v2.WorkspaceSettingService.GetWorkspaceSetting:input_type -> slash.api.v2.GetWorkspaceSettingRequest
4, // 5: slash.api.v2.WorkspaceSettingService.UpdateWorkspaceSetting:input_type -> slash.api.v2.UpdateWorkspaceSettingRequest
3, // 6: slash.api.v2.WorkspaceSettingService.GetWorkspaceSetting:output_type -> slash.api.v2.GetWorkspaceSettingResponse
5, // 7: slash.api.v2.WorkspaceSettingService.UpdateWorkspaceSetting:output_type -> slash.api.v2.UpdateWorkspaceSettingResponse
6, // [6:8] is the sub-list for method output_type
4, // [4:6] is the sub-list for method input_type
4, // [4:4] is the sub-list for extension type_name
4, // [4:4] is the sub-list for extension extendee
0, // [0:4] is the sub-list for field type_name
}
func init() { file_api_v2_workspace_setting_service_proto_init() }
func file_api_v2_workspace_setting_service_proto_init() {
if File_api_v2_workspace_setting_service_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_api_v2_workspace_setting_service_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*WorkspaceSetting); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_v2_workspace_setting_service_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*AutoBackupWorkspaceSetting); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_v2_workspace_setting_service_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetWorkspaceSettingRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_v2_workspace_setting_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GetWorkspaceSettingResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_v2_workspace_setting_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdateWorkspaceSettingRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_v2_workspace_setting_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UpdateWorkspaceSettingResponse); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_api_v2_workspace_setting_service_proto_rawDesc,
NumEnums: 0,
NumMessages: 6,
NumExtensions: 0,
NumServices: 1,
},
GoTypes: file_api_v2_workspace_setting_service_proto_goTypes,
DependencyIndexes: file_api_v2_workspace_setting_service_proto_depIdxs,
MessageInfos: file_api_v2_workspace_setting_service_proto_msgTypes,
}.Build()
File_api_v2_workspace_setting_service_proto = out.File
file_api_v2_workspace_setting_service_proto_rawDesc = nil
file_api_v2_workspace_setting_service_proto_goTypes = nil
file_api_v2_workspace_setting_service_proto_depIdxs = nil
}

View File

@ -0,0 +1,240 @@
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
// source: api/v2/workspace_setting_service.proto
/*
Package apiv2 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
*/
package apiv2
import (
"context"
"io"
"net/http"
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime"
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/grpclog"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
)
// Suppress "imported and not used" errors
var _ codes.Code
var _ io.Reader
var _ status.Status
var _ = runtime.String
var _ = utilities.NewDoubleArray
var _ = metadata.Join
func request_WorkspaceSettingService_GetWorkspaceSetting_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceSettingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetWorkspaceSettingRequest
var metadata runtime.ServerMetadata
msg, err := client.GetWorkspaceSetting(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_WorkspaceSettingService_GetWorkspaceSetting_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceSettingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq GetWorkspaceSettingRequest
var metadata runtime.ServerMetadata
msg, err := server.GetWorkspaceSetting(ctx, &protoReq)
return msg, metadata, err
}
func request_WorkspaceSettingService_UpdateWorkspaceSetting_0(ctx context.Context, marshaler runtime.Marshaler, client WorkspaceSettingServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq UpdateWorkspaceSettingRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := client.UpdateWorkspaceSetting(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
return msg, metadata, err
}
func local_request_WorkspaceSettingService_UpdateWorkspaceSetting_0(ctx context.Context, marshaler runtime.Marshaler, server WorkspaceSettingServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
var protoReq UpdateWorkspaceSettingRequest
var metadata runtime.ServerMetadata
newReader, berr := utilities.IOReaderFactory(req.Body)
if berr != nil {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr)
}
if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF {
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
}
msg, err := server.UpdateWorkspaceSetting(ctx, &protoReq)
return msg, metadata, err
}
// RegisterWorkspaceSettingServiceHandlerServer registers the http handlers for service WorkspaceSettingService to "mux".
// UnaryRPC :call WorkspaceSettingServiceServer directly.
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterWorkspaceSettingServiceHandlerFromEndpoint instead.
func RegisterWorkspaceSettingServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WorkspaceSettingServiceServer) error {
mux.Handle("GET", pattern_WorkspaceSettingService_GetWorkspaceSetting_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/slash.api.v2.WorkspaceSettingService/GetWorkspaceSetting", runtime.WithHTTPPathPattern("/api/v2/workspace/settings"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_WorkspaceSettingService_GetWorkspaceSetting_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
forward_WorkspaceSettingService_GetWorkspaceSetting_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_WorkspaceSettingService_UpdateWorkspaceSetting_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
var stream runtime.ServerTransportStream
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/slash.api.v2.WorkspaceSettingService/UpdateWorkspaceSetting", runtime.WithHTTPPathPattern("/api/v2/workspace/settings"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := local_request_WorkspaceSettingService_UpdateWorkspaceSetting_0(annotatedContext, inboundMarshaler, server, req, pathParams)
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
forward_WorkspaceSettingService_UpdateWorkspaceSetting_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
// RegisterWorkspaceSettingServiceHandlerFromEndpoint is same as RegisterWorkspaceSettingServiceHandler but
// automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterWorkspaceSettingServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) {
conn, err := grpc.DialContext(ctx, endpoint, opts...)
if err != nil {
return err
}
defer func() {
if err != nil {
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
return
}
go func() {
<-ctx.Done()
if cerr := conn.Close(); cerr != nil {
grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr)
}
}()
}()
return RegisterWorkspaceSettingServiceHandler(ctx, mux, conn)
}
// RegisterWorkspaceSettingServiceHandler registers the http handlers for service WorkspaceSettingService to "mux".
// The handlers forward requests to the grpc endpoint over "conn".
func RegisterWorkspaceSettingServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error {
return RegisterWorkspaceSettingServiceHandlerClient(ctx, mux, NewWorkspaceSettingServiceClient(conn))
}
// RegisterWorkspaceSettingServiceHandlerClient registers the http handlers for service WorkspaceSettingService
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "WorkspaceSettingServiceClient".
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "WorkspaceSettingServiceClient"
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in
// "WorkspaceSettingServiceClient" to call the correct interceptors.
func RegisterWorkspaceSettingServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WorkspaceSettingServiceClient) error {
mux.Handle("GET", pattern_WorkspaceSettingService_GetWorkspaceSetting_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/slash.api.v2.WorkspaceSettingService/GetWorkspaceSetting", runtime.WithHTTPPathPattern("/api/v2/workspace/settings"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_WorkspaceSettingService_GetWorkspaceSetting_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
forward_WorkspaceSettingService_GetWorkspaceSetting_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
mux.Handle("POST", pattern_WorkspaceSettingService_UpdateWorkspaceSetting_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
ctx, cancel := context.WithCancel(req.Context())
defer cancel()
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
var err error
var annotatedContext context.Context
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/slash.api.v2.WorkspaceSettingService/UpdateWorkspaceSetting", runtime.WithHTTPPathPattern("/api/v2/workspace/settings"))
if err != nil {
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
return
}
resp, md, err := request_WorkspaceSettingService_UpdateWorkspaceSetting_0(annotatedContext, inboundMarshaler, client, req, pathParams)
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md)
if err != nil {
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err)
return
}
forward_WorkspaceSettingService_UpdateWorkspaceSetting_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
})
return nil
}
var (
pattern_WorkspaceSettingService_GetWorkspaceSetting_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v2", "workspace", "settings"}, ""))
pattern_WorkspaceSettingService_UpdateWorkspaceSetting_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"api", "v2", "workspace", "settings"}, ""))
)
var (
forward_WorkspaceSettingService_GetWorkspaceSetting_0 = runtime.ForwardResponseMessage
forward_WorkspaceSettingService_UpdateWorkspaceSetting_0 = runtime.ForwardResponseMessage
)

View File

@ -0,0 +1,147 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: api/v2/workspace_setting_service.proto
package apiv2
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
const (
WorkspaceSettingService_GetWorkspaceSetting_FullMethodName = "/slash.api.v2.WorkspaceSettingService/GetWorkspaceSetting"
WorkspaceSettingService_UpdateWorkspaceSetting_FullMethodName = "/slash.api.v2.WorkspaceSettingService/UpdateWorkspaceSetting"
)
// WorkspaceSettingServiceClient is the client API for WorkspaceSettingService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type WorkspaceSettingServiceClient interface {
GetWorkspaceSetting(ctx context.Context, in *GetWorkspaceSettingRequest, opts ...grpc.CallOption) (*GetWorkspaceSettingResponse, error)
UpdateWorkspaceSetting(ctx context.Context, in *UpdateWorkspaceSettingRequest, opts ...grpc.CallOption) (*UpdateWorkspaceSettingResponse, error)
}
type workspaceSettingServiceClient struct {
cc grpc.ClientConnInterface
}
func NewWorkspaceSettingServiceClient(cc grpc.ClientConnInterface) WorkspaceSettingServiceClient {
return &workspaceSettingServiceClient{cc}
}
func (c *workspaceSettingServiceClient) GetWorkspaceSetting(ctx context.Context, in *GetWorkspaceSettingRequest, opts ...grpc.CallOption) (*GetWorkspaceSettingResponse, error) {
out := new(GetWorkspaceSettingResponse)
err := c.cc.Invoke(ctx, WorkspaceSettingService_GetWorkspaceSetting_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workspaceSettingServiceClient) UpdateWorkspaceSetting(ctx context.Context, in *UpdateWorkspaceSettingRequest, opts ...grpc.CallOption) (*UpdateWorkspaceSettingResponse, error) {
out := new(UpdateWorkspaceSettingResponse)
err := c.cc.Invoke(ctx, WorkspaceSettingService_UpdateWorkspaceSetting_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// WorkspaceSettingServiceServer is the server API for WorkspaceSettingService service.
// All implementations must embed UnimplementedWorkspaceSettingServiceServer
// for forward compatibility
type WorkspaceSettingServiceServer interface {
GetWorkspaceSetting(context.Context, *GetWorkspaceSettingRequest) (*GetWorkspaceSettingResponse, error)
UpdateWorkspaceSetting(context.Context, *UpdateWorkspaceSettingRequest) (*UpdateWorkspaceSettingResponse, error)
mustEmbedUnimplementedWorkspaceSettingServiceServer()
}
// UnimplementedWorkspaceSettingServiceServer must be embedded to have forward compatible implementations.
type UnimplementedWorkspaceSettingServiceServer struct {
}
func (UnimplementedWorkspaceSettingServiceServer) GetWorkspaceSetting(context.Context, *GetWorkspaceSettingRequest) (*GetWorkspaceSettingResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetWorkspaceSetting not implemented")
}
func (UnimplementedWorkspaceSettingServiceServer) UpdateWorkspaceSetting(context.Context, *UpdateWorkspaceSettingRequest) (*UpdateWorkspaceSettingResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateWorkspaceSetting not implemented")
}
func (UnimplementedWorkspaceSettingServiceServer) mustEmbedUnimplementedWorkspaceSettingServiceServer() {
}
// UnsafeWorkspaceSettingServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to WorkspaceSettingServiceServer will
// result in compilation errors.
type UnsafeWorkspaceSettingServiceServer interface {
mustEmbedUnimplementedWorkspaceSettingServiceServer()
}
func RegisterWorkspaceSettingServiceServer(s grpc.ServiceRegistrar, srv WorkspaceSettingServiceServer) {
s.RegisterService(&WorkspaceSettingService_ServiceDesc, srv)
}
func _WorkspaceSettingService_GetWorkspaceSetting_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetWorkspaceSettingRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkspaceSettingServiceServer).GetWorkspaceSetting(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: WorkspaceSettingService_GetWorkspaceSetting_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkspaceSettingServiceServer).GetWorkspaceSetting(ctx, req.(*GetWorkspaceSettingRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkspaceSettingService_UpdateWorkspaceSetting_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateWorkspaceSettingRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkspaceSettingServiceServer).UpdateWorkspaceSetting(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: WorkspaceSettingService_UpdateWorkspaceSetting_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkspaceSettingServiceServer).UpdateWorkspaceSetting(ctx, req.(*UpdateWorkspaceSettingRequest))
}
return interceptor(ctx, in, info, handler)
}
// WorkspaceSettingService_ServiceDesc is the grpc.ServiceDesc for WorkspaceSettingService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var WorkspaceSettingService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "slash.api.v2.WorkspaceSettingService",
HandlerType: (*WorkspaceSettingServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetWorkspaceSetting",
Handler: _WorkspaceSettingService_GetWorkspaceSetting_Handler,
},
{
MethodName: "UpdateWorkspaceSetting",
Handler: _WorkspaceSettingService_UpdateWorkspaceSetting_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "api/v2/workspace_setting_service.proto",
}

View File

@ -306,6 +306,9 @@
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| key | [WorkspaceSettingKey](#slash-store-WorkspaceSettingKey) | | |
| secret_session | [string](#string) | | |
| enable_signup | [bool](#bool) | | |
| resource_relative_path | [string](#string) | | |
| auto_backup | [AutoBackupWorkspaceSetting](#slash-store-AutoBackupWorkspaceSetting) | | |
@ -323,7 +326,10 @@
| Name | Number | Description |
| ---- | ------ | ----------- |
| WORKSPACE_SETTING_KEY_UNSPECIFIED | 0 | |
| WORKSPACE_SETTING_AUTO_BACKUP | 1 | |
| WORKSPACE_SETTING_SECRET_SESSION | 1 | The secret session key used to encrypt session data. |
| WORKSAPCE_SETTING_ENABLE_SIGNUP | 2 | Whether to enable other users to sign up. |
| WORKSPACE_SETTING_RESOURCE_RELATIVE_PATH | 3 | The relative path of the resource directory. |
| WORKSPACE_SETTING_AUTO_BACKUP | 4 | The auto backup setting. |

View File

@ -24,18 +24,31 @@ type WorkspaceSettingKey int32
const (
WorkspaceSettingKey_WORKSPACE_SETTING_KEY_UNSPECIFIED WorkspaceSettingKey = 0
WorkspaceSettingKey_WORKSPACE_SETTING_AUTO_BACKUP WorkspaceSettingKey = 1
// The secret session key used to encrypt session data.
WorkspaceSettingKey_WORKSPACE_SETTING_SECRET_SESSION WorkspaceSettingKey = 1
// Whether to enable other users to sign up.
WorkspaceSettingKey_WORKSAPCE_SETTING_ENABLE_SIGNUP WorkspaceSettingKey = 2
// The relative path of the resource directory.
WorkspaceSettingKey_WORKSPACE_SETTING_RESOURCE_RELATIVE_PATH WorkspaceSettingKey = 3
// The auto backup setting.
WorkspaceSettingKey_WORKSPACE_SETTING_AUTO_BACKUP WorkspaceSettingKey = 4
)
// Enum value maps for WorkspaceSettingKey.
var (
WorkspaceSettingKey_name = map[int32]string{
0: "WORKSPACE_SETTING_KEY_UNSPECIFIED",
1: "WORKSPACE_SETTING_AUTO_BACKUP",
1: "WORKSPACE_SETTING_SECRET_SESSION",
2: "WORKSAPCE_SETTING_ENABLE_SIGNUP",
3: "WORKSPACE_SETTING_RESOURCE_RELATIVE_PATH",
4: "WORKSPACE_SETTING_AUTO_BACKUP",
}
WorkspaceSettingKey_value = map[string]int32{
"WORKSPACE_SETTING_KEY_UNSPECIFIED": 0,
"WORKSPACE_SETTING_AUTO_BACKUP": 1,
"WORKSPACE_SETTING_KEY_UNSPECIFIED": 0,
"WORKSPACE_SETTING_SECRET_SESSION": 1,
"WORKSAPCE_SETTING_ENABLE_SIGNUP": 2,
"WORKSPACE_SETTING_RESOURCE_RELATIVE_PATH": 3,
"WORKSPACE_SETTING_AUTO_BACKUP": 4,
}
)
@ -74,6 +87,9 @@ type WorkspaceSetting struct {
Key WorkspaceSettingKey `protobuf:"varint,1,opt,name=key,proto3,enum=slash.store.WorkspaceSettingKey" json:"key,omitempty"`
// Types that are assignable to Value:
//
// *WorkspaceSetting_SecretSession
// *WorkspaceSetting_EnableSignup
// *WorkspaceSetting_ResourceRelativePath
// *WorkspaceSetting_AutoBackup
Value isWorkspaceSetting_Value `protobuf_oneof:"value"`
}
@ -124,6 +140,27 @@ func (m *WorkspaceSetting) GetValue() isWorkspaceSetting_Value {
return nil
}
func (x *WorkspaceSetting) GetSecretSession() string {
if x, ok := x.GetValue().(*WorkspaceSetting_SecretSession); ok {
return x.SecretSession
}
return ""
}
func (x *WorkspaceSetting) GetEnableSignup() bool {
if x, ok := x.GetValue().(*WorkspaceSetting_EnableSignup); ok {
return x.EnableSignup
}
return false
}
func (x *WorkspaceSetting) GetResourceRelativePath() string {
if x, ok := x.GetValue().(*WorkspaceSetting_ResourceRelativePath); ok {
return x.ResourceRelativePath
}
return ""
}
func (x *WorkspaceSetting) GetAutoBackup() *AutoBackupWorkspaceSetting {
if x, ok := x.GetValue().(*WorkspaceSetting_AutoBackup); ok {
return x.AutoBackup
@ -135,10 +172,28 @@ type isWorkspaceSetting_Value interface {
isWorkspaceSetting_Value()
}
type WorkspaceSetting_AutoBackup struct {
AutoBackup *AutoBackupWorkspaceSetting `protobuf:"bytes,2,opt,name=auto_backup,json=autoBackup,proto3,oneof"`
type WorkspaceSetting_SecretSession struct {
SecretSession string `protobuf:"bytes,2,opt,name=secret_session,json=secretSession,proto3,oneof"`
}
type WorkspaceSetting_EnableSignup struct {
EnableSignup bool `protobuf:"varint,3,opt,name=enable_signup,json=enableSignup,proto3,oneof"`
}
type WorkspaceSetting_ResourceRelativePath struct {
ResourceRelativePath string `protobuf:"bytes,4,opt,name=resource_relative_path,json=resourceRelativePath,proto3,oneof"`
}
type WorkspaceSetting_AutoBackup struct {
AutoBackup *AutoBackupWorkspaceSetting `protobuf:"bytes,5,opt,name=auto_backup,json=autoBackup,proto3,oneof"`
}
func (*WorkspaceSetting_SecretSession) isWorkspaceSetting_Value() {}
func (*WorkspaceSetting_EnableSignup) isWorkspaceSetting_Value() {}
func (*WorkspaceSetting_ResourceRelativePath) isWorkspaceSetting_Value() {}
func (*WorkspaceSetting_AutoBackup) isWorkspaceSetting_Value() {}
type AutoBackupWorkspaceSetting struct {
@ -214,42 +269,58 @@ var File_store_workspace_setting_proto protoreflect.FileDescriptor
var file_store_workspace_setting_proto_rawDesc = []byte{
0x0a, 0x1d, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
0x65, 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
0x0b, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x22, 0x9b, 0x01, 0x0a,
0x0b, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x22, 0xa3, 0x02, 0x0a,
0x10, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,
0x67, 0x12, 0x32, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x20,
0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x57, 0x6f, 0x72,
0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79,
0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x4a, 0x0a, 0x0b, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x62, 0x61,
0x63, 0x6b, 0x75, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x73, 0x6c, 0x61,
0x73, 0x68, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x42, 0x61, 0x63,
0x6b, 0x75, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74,
0x69, 0x6e, 0x67, 0x48, 0x00, 0x52, 0x0a, 0x61, 0x75, 0x74, 0x6f, 0x42, 0x61, 0x63, 0x6b, 0x75,
0x70, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x7a, 0x0a, 0x1a, 0x41, 0x75,
0x74, 0x6f, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63,
0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62,
0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c,
0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x65,
0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x72, 0x6f,
0x6e, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x6d,
0x61, 0x78, 0x5f, 0x6b, 0x65, 0x65, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d,
0x61, 0x78, 0x4b, 0x65, 0x65, 0x70, 0x2a, 0x5f, 0x0a, 0x13, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70,
0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x12, 0x25, 0x0a,
0x21, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x49,
0x4e, 0x47, 0x5f, 0x4b, 0x45, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49,
0x45, 0x44, 0x10, 0x00, 0x12, 0x21, 0x0a, 0x1d, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43,
0x45, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x42,
0x41, 0x43, 0x4b, 0x55, 0x50, 0x10, 0x01, 0x42, 0x9f, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e,
0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x42, 0x15, 0x57, 0x6f, 0x72,
0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f,
0x74, 0x6f, 0x50, 0x01, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
0x2f, 0x62, 0x6f, 0x6f, 0x6a, 0x61, 0x63, 0x6b, 0x2f, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2f, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0xa2, 0x02,
0x03, 0x53, 0x53, 0x58, 0xaa, 0x02, 0x0b, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x53, 0x74, 0x6f,
0x72, 0x65, 0xca, 0x02, 0x0b, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x5c, 0x53, 0x74, 0x6f, 0x72, 0x65,
0xe2, 0x02, 0x17, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x5c, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x5c, 0x47,
0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, 0x53, 0x6c, 0x61,
0x73, 0x68, 0x3a, 0x3a, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x33,
0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x27, 0x0a, 0x0e, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x5f,
0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52,
0x0d, 0x73, 0x65, 0x63, 0x72, 0x65, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x25,
0x0a, 0x0d, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x75, 0x70, 0x18,
0x03, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x0c, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x53,
0x69, 0x67, 0x6e, 0x75, 0x70, 0x12, 0x36, 0x0a, 0x16, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x5f, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18,
0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x14, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
0x65, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x4a, 0x0a,
0x0b, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x18, 0x05, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x27, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65,
0x2e, 0x41, 0x75, 0x74, 0x6f, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x57, 0x6f, 0x72, 0x6b, 0x73,
0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x48, 0x00, 0x52, 0x0a, 0x61,
0x75, 0x74, 0x6f, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70, 0x42, 0x07, 0x0a, 0x05, 0x76, 0x61, 0x6c,
0x75, 0x65, 0x22, 0x7a, 0x0a, 0x1a, 0x41, 0x75, 0x74, 0x6f, 0x42, 0x61, 0x63, 0x6b, 0x75, 0x70,
0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,
0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
0x08, 0x52, 0x07, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x72,
0x6f, 0x6e, 0x5f, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20,
0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x72, 0x6f, 0x6e, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73,
0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x5f, 0x6b, 0x65, 0x65, 0x70, 0x18,
0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x4b, 0x65, 0x65, 0x70, 0x2a, 0xd8,
0x01, 0x0a, 0x13, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74,
0x69, 0x6e, 0x67, 0x4b, 0x65, 0x79, 0x12, 0x25, 0x0a, 0x21, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50,
0x41, 0x43, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x4b, 0x45, 0x59, 0x5f,
0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x24, 0x0a,
0x20, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x49,
0x4e, 0x47, 0x5f, 0x53, 0x45, 0x43, 0x52, 0x45, 0x54, 0x5f, 0x53, 0x45, 0x53, 0x53, 0x49, 0x4f,
0x4e, 0x10, 0x01, 0x12, 0x23, 0x0a, 0x1f, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x41, 0x50, 0x43, 0x45,
0x5f, 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x45, 0x4e, 0x41, 0x42, 0x4c, 0x45, 0x5f,
0x53, 0x49, 0x47, 0x4e, 0x55, 0x50, 0x10, 0x02, 0x12, 0x2c, 0x0a, 0x28, 0x57, 0x4f, 0x52, 0x4b,
0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x52, 0x45,
0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x52, 0x45, 0x4c, 0x41, 0x54, 0x49, 0x56, 0x45, 0x5f,
0x50, 0x41, 0x54, 0x48, 0x10, 0x03, 0x12, 0x21, 0x0a, 0x1d, 0x57, 0x4f, 0x52, 0x4b, 0x53, 0x50,
0x41, 0x43, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x41, 0x55, 0x54, 0x4f,
0x5f, 0x42, 0x41, 0x43, 0x4b, 0x55, 0x50, 0x10, 0x04, 0x42, 0x9f, 0x01, 0x0a, 0x0f, 0x63, 0x6f,
0x6d, 0x2e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x42, 0x15, 0x57,
0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x50,
0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
0x6f, 0x6d, 0x2f, 0x62, 0x6f, 0x6f, 0x6a, 0x61, 0x63, 0x6b, 0x2f, 0x73, 0x6c, 0x61, 0x73, 0x68,
0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65,
0xa2, 0x02, 0x03, 0x53, 0x53, 0x58, 0xaa, 0x02, 0x0b, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x2e, 0x53,
0x74, 0x6f, 0x72, 0x65, 0xca, 0x02, 0x0b, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x5c, 0x53, 0x74, 0x6f,
0x72, 0x65, 0xe2, 0x02, 0x17, 0x53, 0x6c, 0x61, 0x73, 0x68, 0x5c, 0x53, 0x74, 0x6f, 0x72, 0x65,
0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, 0x53,
0x6c, 0x61, 0x73, 0x68, 0x3a, 0x3a, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x33,
}
var (
@ -313,6 +384,9 @@ func file_store_workspace_setting_proto_init() {
}
}
file_store_workspace_setting_proto_msgTypes[0].OneofWrappers = []interface{}{
(*WorkspaceSetting_SecretSession)(nil),
(*WorkspaceSetting_EnableSignup)(nil),
(*WorkspaceSetting_ResourceRelativePath)(nil),
(*WorkspaceSetting_AutoBackup)(nil),
}
type x struct{}

View File

@ -8,14 +8,23 @@ message WorkspaceSetting {
WorkspaceSettingKey key = 1;
oneof value {
AutoBackupWorkspaceSetting auto_backup = 2;
string secret_session = 2;
bool enable_signup = 3;
string resource_relative_path = 4;
AutoBackupWorkspaceSetting auto_backup = 5;
}
}
enum WorkspaceSettingKey {
WORKSPACE_SETTING_KEY_UNSPECIFIED = 0;
WORKSPACE_SETTING_AUTO_BACKUP = 1;
// The secret session key used to encrypt session data.
WORKSPACE_SETTING_SECRET_SESSION = 1;
// Whether to enable other users to sign up.
WORKSAPCE_SETTING_ENABLE_SIGNUP = 2;
// The relative path of the resource directory.
WORKSPACE_SETTING_RESOURCE_RELATIVE_PATH = 3;
// The auto backup setting.
WORKSPACE_SETTING_AUTO_BACKUP = 4;
}
message AutoBackupWorkspaceSetting {