From 776664105ab77adda4caefb15c80bd735bad521a Mon Sep 17 00:00:00 2001 From: Steven Date: Mon, 6 May 2024 19:12:30 +0800 Subject: [PATCH] chore: tweak content length limit --- docs/apidocs.swagger.yaml | 6 +++--- proto/api/v1/workspace_setting_service.proto | 4 ++-- proto/gen/api/v1/workspace_setting_service.pb.go | 8 ++++---- proto/gen/store/workspace_setting.pb.go | 8 ++++---- proto/store/workspace_setting.proto | 4 ++-- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/apidocs.swagger.yaml b/docs/apidocs.swagger.yaml index 5d541e4d..eb257492 100644 --- a/docs/apidocs.swagger.yaml +++ b/docs/apidocs.swagger.yaml @@ -2097,9 +2097,9 @@ definitions: type: boolean description: display_with_update_time orders and displays memo with update time. contentLengthLimit: - type: string - format: int64 - description: content_length_limit is the limit of content length. + type: integer + format: int32 + description: content_length_limit is the limit of content length. Unit is byte. apiv1WorkspaceSetting: type: object properties: diff --git a/proto/api/v1/workspace_setting_service.proto b/proto/api/v1/workspace_setting_service.proto index f079844c..87dade36 100644 --- a/proto/api/v1/workspace_setting_service.proto +++ b/proto/api/v1/workspace_setting_service.proto @@ -96,8 +96,8 @@ message WorkspaceMemoRelatedSetting { bool disallow_public_visible = 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. - int64 content_length_limit = 3; + // content_length_limit is the limit of content length. Unit is byte. + int32 content_length_limit = 3; } message ListWorkspaceSettingsRequest {} diff --git a/proto/gen/api/v1/workspace_setting_service.pb.go b/proto/gen/api/v1/workspace_setting_service.pb.go index e81987fb..2651e926 100644 --- a/proto/gen/api/v1/workspace_setting_service.pb.go +++ b/proto/gen/api/v1/workspace_setting_service.pb.go @@ -438,8 +438,8 @@ type WorkspaceMemoRelatedSetting struct { DisallowPublicVisible bool `protobuf:"varint,1,opt,name=disallow_public_visible,json=disallowPublicVisible,proto3" json:"disallow_public_visible,omitempty"` // display_with_update_time orders and displays memo with update time. DisplayWithUpdateTime bool `protobuf:"varint,2,opt,name=display_with_update_time,json=displayWithUpdateTime,proto3" json:"display_with_update_time,omitempty"` - // content_length_limit is the limit of content length. - ContentLengthLimit int64 `protobuf:"varint,3,opt,name=content_length_limit,json=contentLengthLimit,proto3" json:"content_length_limit,omitempty"` + // content_length_limit is the limit of content length. Unit is byte. + ContentLengthLimit int32 `protobuf:"varint,3,opt,name=content_length_limit,json=contentLengthLimit,proto3" json:"content_length_limit,omitempty"` } func (x *WorkspaceMemoRelatedSetting) Reset() { @@ -488,7 +488,7 @@ func (x *WorkspaceMemoRelatedSetting) GetDisplayWithUpdateTime() bool { return false } -func (x *WorkspaceMemoRelatedSetting) GetContentLengthLimit() int64 { +func (x *WorkspaceMemoRelatedSetting) GetContentLengthLimit() int32 { if x != nil { return x.ContentLengthLimit } @@ -865,7 +865,7 @@ var file_api_v1_workspace_setting_service_proto_rawDesc = []byte{ 0x01, 0x28, 0x08, 0x52, 0x15, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x57, 0x69, 0x74, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x5f, 0x6c, 0x69, 0x6d, - 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, + 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x22, 0x1e, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x6f, 0x72, 0x6b, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5b, 0x0a, 0x1d, diff --git a/proto/gen/store/workspace_setting.pb.go b/proto/gen/store/workspace_setting.pb.go index b9698108..dfc59bbd 100644 --- a/proto/gen/store/workspace_setting.pb.go +++ b/proto/gen/store/workspace_setting.pb.go @@ -555,8 +555,8 @@ type WorkspaceMemoRelatedSetting struct { DisallowPublicVisible bool `protobuf:"varint,1,opt,name=disallow_public_visible,json=disallowPublicVisible,proto3" json:"disallow_public_visible,omitempty"` // display_with_update_time orders and displays memo with update time. DisplayWithUpdateTime bool `protobuf:"varint,2,opt,name=display_with_update_time,json=displayWithUpdateTime,proto3" json:"display_with_update_time,omitempty"` - // content_length_limit is the limit of content length. - ContentLengthLimit int64 `protobuf:"varint,3,opt,name=content_length_limit,json=contentLengthLimit,proto3" json:"content_length_limit,omitempty"` + // content_length_limit is the limit of content length. Unit is byte. + ContentLengthLimit int32 `protobuf:"varint,3,opt,name=content_length_limit,json=contentLengthLimit,proto3" json:"content_length_limit,omitempty"` } func (x *WorkspaceMemoRelatedSetting) Reset() { @@ -605,7 +605,7 @@ func (x *WorkspaceMemoRelatedSetting) GetDisplayWithUpdateTime() bool { return false } -func (x *WorkspaceMemoRelatedSetting) GetContentLengthLimit() int64 { +func (x *WorkspaceMemoRelatedSetting) GetContentLengthLimit() int32 { if x != nil { return x.ContentLengthLimit } @@ -804,7 +804,7 @@ var file_store_workspace_setting_proto_rawDesc = []byte{ 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x57, 0x69, 0x74, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x6e, 0x67, + 0x01, 0x28, 0x05, 0x52, 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x2a, 0xbb, 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, diff --git a/proto/store/workspace_setting.proto b/proto/store/workspace_setting.proto index 2525946c..887b86e4 100644 --- a/proto/store/workspace_setting.proto +++ b/proto/store/workspace_setting.proto @@ -87,6 +87,6 @@ message WorkspaceMemoRelatedSetting { bool disallow_public_visible = 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. - int64 content_length_limit = 3; + // content_length_limit is the limit of content length. Unit is byte. + int32 content_length_limit = 3; }