Repository: usememos/memos
File: proto/api/v1/workspace_setting_service.proto (Protocol Buffers)

Code before:
  string description = 2;
  string logo_url = 3;
  string locale = 4;
  string appearance = 5;
}

message WorkspaceStorageSetting {
  enum StorageType {
    STORAGE_TYPE_UNSPECIFIED = 0;
    // DATABASE is the database storage type.
    DATABASE = 1;
    // LOCAL is the local storage type.
    LOCAL = 2;
    // S3 is the S3 storage type.
    S3 = 3;
  }
  // 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;
  // Reference: https://developers.cloudflare.com/r2/examples/aws/aws-sdk-go/
  message S3Config {
    enum S3URLStyle {
      VIRTUAL_HOST = 0;
      PATH = 1;
    }

    string access_key_id = 1;
    string access_key_secret = 2;
    string endpoint = 3;
    string region = 4;
    string bucket = 5;
    S3URLStyle url_style = 6;
  }
  // The S3 config.
  S3Config s3_config = 4;
}

message WorkspaceMemoRelatedSetting {
  // disallow_public_visibility disallows set memo as public visibility.
  bool disallow_public_visibility = 1;
  // display_with_update_time orders and displays memo with update time.
  bool display_with_update_time = 2;
  // content_length_limit is the limit of content length. Unit is byte.
  int32 content_length_limit = 3;
  // enable_auto_compact enables auto compact for large content.
  bool enable_auto_compact = 4;
  // enable_double_click_edit enables editing on double click.

Review comment (suggestion):
Since it's already in the `S3Config`, so we can remove the `S3` prefix.

```suggestion
    enum URLStyle {
```

Code after:
  string description = 2;
  string logo_url = 3;
  string locale = 4;
  string appearance = 5;
}

message WorkspaceStorageSetting {
  enum StorageType {
    STORAGE_TYPE_UNSPECIFIED = 0;
    // DATABASE is the database storage type.
    DATABASE = 1;
    // LOCAL is the local storage type.
    LOCAL = 2;
    // S3 is the S3 storage type.
    S3 = 3;
  }
  // 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;
  // Reference: https://developers.cloudflare.com/r2/examples/aws/aws-sdk-go/
  message S3Config {
    string access_key_id = 1;
    string access_key_secret = 2;
    string endpoint = 3;
    string region = 4;
    string bucket = 5;
    bool use_path_style = 6;
  }
  // The S3 config.
  S3Config s3_config = 4;
}

message WorkspaceMemoRelatedSetting {
  // disallow_public_visibility disallows set memo as public visibility.
  bool disallow_public_visibility = 1;
  // display_with_update_time orders and displays memo with update time.
  bool display_with_update_time = 2;
  // content_length_limit is the limit of content length. Unit is byte.
  int32 content_length_limit = 3;
  // 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;
  // enable_comment enables comment.
  bool enable_comment = 7;