memos/proto/store/workspace_setting.proto

104 lines
3.1 KiB
Protocol Buffer
Raw Permalink Normal View History

2024-01-06 14:46:21 +03:00
syntax = "proto3";
package memos.store;
option go_package = "gen/store";
enum WorkspaceSettingKey {
WORKSPACE_SETTING_KEY_UNSPECIFIED = 0;
2024-05-13 15:03:04 +03:00
// BASIC is the key for basic settings.
BASIC = 1;
// GENERAL is the key for general settings.
GENERAL = 2;
// STORAGE is the key for storage settings.
STORAGE = 3;
// MEMO_RELATED is the key for memo related settings.
MEMO_RELATED = 4;
2024-01-06 14:46:21 +03:00
}
message WorkspaceSetting {
WorkspaceSettingKey key = 1;
oneof value {
WorkspaceBasicSetting basic_setting = 2;
WorkspaceGeneralSetting general_setting = 3;
WorkspaceStorageSetting storage_setting = 4;
WorkspaceMemoRelatedSetting memo_related_setting = 5;
}
}
message WorkspaceBasicSetting {
2024-04-29 03:00:37 +03:00
string secret_key = 1;
}
message WorkspaceGeneralSetting {
2024-08-29 03:28:11 +03:00
// disallow_user_registration disallows user registration.
bool disallow_user_registration = 1;
// disallow_password_auth disallows password authentication.
bool disallow_password_auth = 2;
// additional_script is the additional script.
2024-08-28 18:46:06 +03:00
string additional_script = 3;
// additional_style is the additional style.
2024-08-28 18:46:06 +03:00
string additional_style = 4;
// custom_profile is the custom profile.
2024-08-28 18:46:06 +03:00
WorkspaceCustomProfile custom_profile = 5;
2024-08-18 18:18:45 +03:00
// week_start_day_offset is the week start day offset from Sunday.
// 0: Sunday, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday
// Default is Sunday.
2024-08-28 18:46:06 +03:00
int32 week_start_day_offset = 6;
}
message WorkspaceCustomProfile {
string title = 1;
string description = 2;
string logo_url = 3;
string locale = 4;
string appearance = 5;
2024-01-06 14:46:21 +03:00
}
2024-04-10 15:05:17 +03:00
message WorkspaceStorageSetting {
enum StorageType {
STORAGE_TYPE_UNSPECIFIED = 0;
// STORAGE_TYPE_DATABASE is the database storage type.
2024-05-13 15:03:04 +03:00
DATABASE = 1;
// STORAGE_TYPE_LOCAL is the local storage type.
2024-05-13 15:03:04 +03:00
LOCAL = 2;
2024-04-28 16:36:22 +03:00
// STORAGE_TYPE_S3 is the S3 storage type.
2024-05-13 15:03:04 +03:00
S3 = 3;
2024-04-28 16:36:22 +03:00
}
// storage_type is the storage type.
StorageType storage_type = 1;
// The template of file path.
// e.g. assets/{timestamp}_{filename}
string filepath_template = 2;
// The max upload size in megabytes.
int64 upload_size_limit_mb = 3;
// The S3 config.
2024-05-17 03:50:02 +03:00
StorageS3Config s3_config = 4;
}
// Reference: https://developers.cloudflare.com/r2/examples/aws/aws-sdk-go/
message StorageS3Config {
string access_key_id = 1;
string access_key_secret = 2;
string endpoint = 3;
string region = 4;
string bucket = 5;
}
2024-04-10 15:05:17 +03:00
message WorkspaceMemoRelatedSetting {
// disallow_public_visibility disallows set memo as public visibility.
bool disallow_public_visibility = 1;
2024-04-10 15:05:17 +03:00
// display_with_update_time orders and displays memo with update time.
bool display_with_update_time = 2;
2024-05-06 14:12:30 +03:00
// content_length_limit is the limit of content length. Unit is byte.
int32 content_length_limit = 3;
2024-05-29 18:17:53 +03:00
// enable_auto_compact enables auto compact for large content.
bool enable_auto_compact = 4;
// enable_double_click_edit enables editing on double click.
bool enable_double_click_edit = 5;
// enable_link_preview enables links preview.
bool enable_link_preview = 6;
2024-08-19 04:13:44 +03:00
// enable_comment enables comment.
bool enable_comment = 7;
2024-04-10 15:05:17 +03:00
}