Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
71c39ed5
Commit
71c39ed5
authored
Apr 10, 2024
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update workspace setting definition
parent
c93b1efb
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
550 additions
and
101 deletions
+550
-101
README.md
proto/gen/store/README.md
+54
-1
workspace_setting.pb.go
proto/gen/store/workspace_setting.pb.go
+357
-76
workspace_setting.proto
proto/store/workspace_setting.proto
+33
-2
workspace_setting.go
store/db/mysql/workspace_setting.go
+35
-6
workspace_setting.go
store/db/postgres/workspace_setting.go
+35
-6
workspace_setting.go
store/db/sqlite/workspace_setting.go
+36
-10
No files found.
proto/gen/store/README.md
View file @
71c39ed5
...
@@ -40,8 +40,11 @@
...
@@ -40,8 +40,11 @@
-
[
WorkspaceGeneralSetting
](
#memos-store-WorkspaceGeneralSetting
)
-
[
WorkspaceGeneralSetting
](
#memos-store-WorkspaceGeneralSetting
)
-
[
WorkspaceMemoRelatedSetting
](
#memos-store-WorkspaceMemoRelatedSetting
)
-
[
WorkspaceMemoRelatedSetting
](
#memos-store-WorkspaceMemoRelatedSetting
)
-
[
WorkspaceSetting
](
#memos-store-WorkspaceSetting
)
-
[
WorkspaceSetting
](
#memos-store-WorkspaceSetting
)
-
[
WorkspaceStorageSetting
](
#memos-store-WorkspaceStorageSetting
)
-
[
WorkspaceTelegramIntegrationSetting
](
#memos-store-WorkspaceTelegramIntegrationSetting
)
-
[
WorkspaceSettingKey
](
#memos-store-WorkspaceSettingKey
)
-
[
WorkspaceSettingKey
](
#memos-store-WorkspaceSettingKey
)
-
[
WorkspaceStorageSetting.StorageType
](
#memos-store-WorkspaceStorageSetting-StorageType
)
-
[
Scalar Value Types
](
#scalar-value-types
)
-
[
Scalar Value Types
](
#scalar-value-types
)
...
@@ -484,7 +487,41 @@
...
@@ -484,7 +487,41 @@
| ----- | ---- | ----- | ----------- |
| ----- | ---- | ----- | ----------- |
| key |
[
WorkspaceSettingKey
](
#memos-store-WorkspaceSettingKey
)
| | |
| key |
[
WorkspaceSettingKey
](
#memos-store-WorkspaceSettingKey
)
| | |
| general_setting |
[
WorkspaceGeneralSetting
](
#memos-store-WorkspaceGeneralSetting
)
| | |
| general_setting |
[
WorkspaceGeneralSetting
](
#memos-store-WorkspaceGeneralSetting
)
| | |
| storage_setting |
[
WorkspaceStorageSetting
](
#memos-store-WorkspaceStorageSetting
)
| | |
| memo_related_setting |
[
WorkspaceMemoRelatedSetting
](
#memos-store-WorkspaceMemoRelatedSetting
)
| | |
| memo_related_setting |
[
WorkspaceMemoRelatedSetting
](
#memos-store-WorkspaceMemoRelatedSetting
)
| | |
| telegram_integration_setting |
[
WorkspaceTelegramIntegrationSetting
](
#memos-store-WorkspaceTelegramIntegrationSetting
)
| | |
<a
name=
"memos-store-WorkspaceStorageSetting"
></a>
### WorkspaceStorageSetting
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| storage_type |
[
WorkspaceStorageSetting.StorageType
](
#memos-store-WorkspaceStorageSetting-StorageType
)
| | storage_type is the storage type. |
| local_storage_path |
[
string
](
#string
)
| | The local storage path for STORAGE_TYPE_LOCAL. e.g. assets/{timestamp}_{filename} |
| upload_size_limit_mb |
[
int64
](
#int64
)
| | The max upload size in megabytes. |
<a
name=
"memos-store-WorkspaceTelegramIntegrationSetting"
></a>
### WorkspaceTelegramIntegrationSetting
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| telegram_bot_token |
[
string
](
#string
)
| | telegram_bot_token is the telegram bot token. |
...
@@ -502,7 +539,23 @@
...
@@ -502,7 +539,23 @@
| ---- | ------ | ----------- |
| ---- | ------ | ----------- |
| WORKSPACE_SETTING_KEY_UNSPECIFIED | 0 | |
| WORKSPACE_SETTING_KEY_UNSPECIFIED | 0 | |
| WORKSPACE_SETTING_GENERAL | 1 | WORKSPACE_SETTING_GENERAL is the key for general settings. |
| WORKSPACE_SETTING_GENERAL | 1 | WORKSPACE_SETTING_GENERAL is the key for general settings. |
| WORKSPACE_SETTING_MEMO_RELATED | 2 | WORKSPACE_SETTING_MEMO_RELATED is the key for memo related settings. |
| WORKSPACE_SETTING_STORAGE | 2 | WORKSPACE_SETTING_STORAGE is the key for storage settings. |
| WORKSPACE_SETTING_MEMO_RELATED | 3 | WORKSPACE_SETTING_MEMO_RELATED is the key for memo related settings. |
| WORKSPACE_SETTING_TELEGRAM_INTEGRATION | 4 | WORKSPACE_SETTING_TELEGRAM_INTEGRATION is the key for telegram integration settings. |
<a
name=
"memos-store-WorkspaceStorageSetting-StorageType"
></a>
### WorkspaceStorageSetting.StorageType
| Name | Number | Description |
| ---- | ------ | ----------- |
| STORAGE_TYPE_UNSPECIFIED | 0 | |
| STORAGE_TYPE_DATABASE | 1 | STORAGE_TYPE_DATABASE is the database storage type. |
| STORAGE_TYPE_LOCAL | 2 | STORAGE_TYPE_LOCAL is the local storage type. |
| STORAGE_TYPE_EXTERNAL | 3 | STORAGE_TYPE_EXTERNAL is the external storage type. |
...
...
proto/gen/store/workspace_setting.pb.go
View file @
71c39ed5
...
@@ -26,8 +26,12 @@ const (
...
@@ -26,8 +26,12 @@ const (
WorkspaceSettingKey_WORKSPACE_SETTING_KEY_UNSPECIFIED
WorkspaceSettingKey
=
0
WorkspaceSettingKey_WORKSPACE_SETTING_KEY_UNSPECIFIED
WorkspaceSettingKey
=
0
// WORKSPACE_SETTING_GENERAL is the key for general settings.
// WORKSPACE_SETTING_GENERAL is the key for general settings.
WorkspaceSettingKey_WORKSPACE_SETTING_GENERAL
WorkspaceSettingKey
=
1
WorkspaceSettingKey_WORKSPACE_SETTING_GENERAL
WorkspaceSettingKey
=
1
// WORKSPACE_SETTING_STORAGE is the key for storage settings.
WorkspaceSettingKey_WORKSPACE_SETTING_STORAGE
WorkspaceSettingKey
=
2
// WORKSPACE_SETTING_MEMO_RELATED is the key for memo related settings.
// WORKSPACE_SETTING_MEMO_RELATED is the key for memo related settings.
WorkspaceSettingKey_WORKSPACE_SETTING_MEMO_RELATED
WorkspaceSettingKey
=
2
WorkspaceSettingKey_WORKSPACE_SETTING_MEMO_RELATED
WorkspaceSettingKey
=
3
// WORKSPACE_SETTING_TELEGRAM_INTEGRATION is the key for telegram integration settings.
WorkspaceSettingKey_WORKSPACE_SETTING_TELEGRAM_INTEGRATION
WorkspaceSettingKey
=
4
)
)
// Enum value maps for WorkspaceSettingKey.
// Enum value maps for WorkspaceSettingKey.
...
@@ -35,12 +39,16 @@ var (
...
@@ -35,12 +39,16 @@ var (
WorkspaceSettingKey_name
=
map
[
int32
]
string
{
WorkspaceSettingKey_name
=
map
[
int32
]
string
{
0
:
"WORKSPACE_SETTING_KEY_UNSPECIFIED"
,
0
:
"WORKSPACE_SETTING_KEY_UNSPECIFIED"
,
1
:
"WORKSPACE_SETTING_GENERAL"
,
1
:
"WORKSPACE_SETTING_GENERAL"
,
2
:
"WORKSPACE_SETTING_MEMO_RELATED"
,
2
:
"WORKSPACE_SETTING_STORAGE"
,
3
:
"WORKSPACE_SETTING_MEMO_RELATED"
,
4
:
"WORKSPACE_SETTING_TELEGRAM_INTEGRATION"
,
}
}
WorkspaceSettingKey_value
=
map
[
string
]
int32
{
WorkspaceSettingKey_value
=
map
[
string
]
int32
{
"WORKSPACE_SETTING_KEY_UNSPECIFIED"
:
0
,
"WORKSPACE_SETTING_KEY_UNSPECIFIED"
:
0
,
"WORKSPACE_SETTING_GENERAL"
:
1
,
"WORKSPACE_SETTING_GENERAL"
:
1
,
"WORKSPACE_SETTING_MEMO_RELATED"
:
2
,
"WORKSPACE_SETTING_STORAGE"
:
2
,
"WORKSPACE_SETTING_MEMO_RELATED"
:
3
,
"WORKSPACE_SETTING_TELEGRAM_INTEGRATION"
:
4
,
}
}
)
)
...
@@ -71,6 +79,61 @@ func (WorkspaceSettingKey) EnumDescriptor() ([]byte, []int) {
...
@@ -71,6 +79,61 @@ func (WorkspaceSettingKey) EnumDescriptor() ([]byte, []int) {
return
file_store_workspace_setting_proto_rawDescGZIP
(),
[]
int
{
0
}
return
file_store_workspace_setting_proto_rawDescGZIP
(),
[]
int
{
0
}
}
}
type
WorkspaceStorageSetting_StorageType
int32
const
(
WorkspaceStorageSetting_STORAGE_TYPE_UNSPECIFIED
WorkspaceStorageSetting_StorageType
=
0
// STORAGE_TYPE_DATABASE is the database storage type.
WorkspaceStorageSetting_STORAGE_TYPE_DATABASE
WorkspaceStorageSetting_StorageType
=
1
// STORAGE_TYPE_LOCAL is the local storage type.
WorkspaceStorageSetting_STORAGE_TYPE_LOCAL
WorkspaceStorageSetting_StorageType
=
2
// STORAGE_TYPE_EXTERNAL is the external storage type.
WorkspaceStorageSetting_STORAGE_TYPE_EXTERNAL
WorkspaceStorageSetting_StorageType
=
3
)
// Enum value maps for WorkspaceStorageSetting_StorageType.
var
(
WorkspaceStorageSetting_StorageType_name
=
map
[
int32
]
string
{
0
:
"STORAGE_TYPE_UNSPECIFIED"
,
1
:
"STORAGE_TYPE_DATABASE"
,
2
:
"STORAGE_TYPE_LOCAL"
,
3
:
"STORAGE_TYPE_EXTERNAL"
,
}
WorkspaceStorageSetting_StorageType_value
=
map
[
string
]
int32
{
"STORAGE_TYPE_UNSPECIFIED"
:
0
,
"STORAGE_TYPE_DATABASE"
:
1
,
"STORAGE_TYPE_LOCAL"
:
2
,
"STORAGE_TYPE_EXTERNAL"
:
3
,
}
)
func
(
x
WorkspaceStorageSetting_StorageType
)
Enum
()
*
WorkspaceStorageSetting_StorageType
{
p
:=
new
(
WorkspaceStorageSetting_StorageType
)
*
p
=
x
return
p
}
func
(
x
WorkspaceStorageSetting_StorageType
)
String
()
string
{
return
protoimpl
.
X
.
EnumStringOf
(
x
.
Descriptor
(),
protoreflect
.
EnumNumber
(
x
))
}
func
(
WorkspaceStorageSetting_StorageType
)
Descriptor
()
protoreflect
.
EnumDescriptor
{
return
file_store_workspace_setting_proto_enumTypes
[
1
]
.
Descriptor
()
}
func
(
WorkspaceStorageSetting_StorageType
)
Type
()
protoreflect
.
EnumType
{
return
&
file_store_workspace_setting_proto_enumTypes
[
1
]
}
func
(
x
WorkspaceStorageSetting_StorageType
)
Number
()
protoreflect
.
EnumNumber
{
return
protoreflect
.
EnumNumber
(
x
)
}
// Deprecated: Use WorkspaceStorageSetting_StorageType.Descriptor instead.
func
(
WorkspaceStorageSetting_StorageType
)
EnumDescriptor
()
([]
byte
,
[]
int
)
{
return
file_store_workspace_setting_proto_rawDescGZIP
(),
[]
int
{
2
,
0
}
}
type
WorkspaceSetting
struct
{
type
WorkspaceSetting
struct
{
state
protoimpl
.
MessageState
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
sizeCache
protoimpl
.
SizeCache
...
@@ -80,7 +143,9 @@ type WorkspaceSetting struct {
...
@@ -80,7 +143,9 @@ type WorkspaceSetting struct {
// Types that are assignable to Value:
// Types that are assignable to Value:
//
//
// *WorkspaceSetting_GeneralSetting
// *WorkspaceSetting_GeneralSetting
// *WorkspaceSetting_StorageSetting
// *WorkspaceSetting_MemoRelatedSetting
// *WorkspaceSetting_MemoRelatedSetting
// *WorkspaceSetting_TelegramIntegrationSetting
Value
isWorkspaceSetting_Value
`protobuf_oneof:"value"`
Value
isWorkspaceSetting_Value
`protobuf_oneof:"value"`
}
}
...
@@ -137,6 +202,13 @@ func (x *WorkspaceSetting) GetGeneralSetting() *WorkspaceGeneralSetting {
...
@@ -137,6 +202,13 @@ func (x *WorkspaceSetting) GetGeneralSetting() *WorkspaceGeneralSetting {
return
nil
return
nil
}
}
func
(
x
*
WorkspaceSetting
)
GetStorageSetting
()
*
WorkspaceStorageSetting
{
if
x
,
ok
:=
x
.
GetValue
()
.
(
*
WorkspaceSetting_StorageSetting
);
ok
{
return
x
.
StorageSetting
}
return
nil
}
func
(
x
*
WorkspaceSetting
)
GetMemoRelatedSetting
()
*
WorkspaceMemoRelatedSetting
{
func
(
x
*
WorkspaceSetting
)
GetMemoRelatedSetting
()
*
WorkspaceMemoRelatedSetting
{
if
x
,
ok
:=
x
.
GetValue
()
.
(
*
WorkspaceSetting_MemoRelatedSetting
);
ok
{
if
x
,
ok
:=
x
.
GetValue
()
.
(
*
WorkspaceSetting_MemoRelatedSetting
);
ok
{
return
x
.
MemoRelatedSetting
return
x
.
MemoRelatedSetting
...
@@ -144,6 +216,13 @@ func (x *WorkspaceSetting) GetMemoRelatedSetting() *WorkspaceMemoRelatedSetting
...
@@ -144,6 +216,13 @@ func (x *WorkspaceSetting) GetMemoRelatedSetting() *WorkspaceMemoRelatedSetting
return
nil
return
nil
}
}
func
(
x
*
WorkspaceSetting
)
GetTelegramIntegrationSetting
()
*
WorkspaceTelegramIntegrationSetting
{
if
x
,
ok
:=
x
.
GetValue
()
.
(
*
WorkspaceSetting_TelegramIntegrationSetting
);
ok
{
return
x
.
TelegramIntegrationSetting
}
return
nil
}
type
isWorkspaceSetting_Value
interface
{
type
isWorkspaceSetting_Value
interface
{
isWorkspaceSetting_Value
()
isWorkspaceSetting_Value
()
}
}
...
@@ -152,14 +231,26 @@ type WorkspaceSetting_GeneralSetting struct {
...
@@ -152,14 +231,26 @@ type WorkspaceSetting_GeneralSetting struct {
GeneralSetting
*
WorkspaceGeneralSetting
`protobuf:"bytes,2,opt,name=general_setting,json=generalSetting,proto3,oneof"`
GeneralSetting
*
WorkspaceGeneralSetting
`protobuf:"bytes,2,opt,name=general_setting,json=generalSetting,proto3,oneof"`
}
}
type
WorkspaceSetting_StorageSetting
struct
{
StorageSetting
*
WorkspaceStorageSetting
`protobuf:"bytes,3,opt,name=storage_setting,json=storageSetting,proto3,oneof"`
}
type
WorkspaceSetting_MemoRelatedSetting
struct
{
type
WorkspaceSetting_MemoRelatedSetting
struct
{
MemoRelatedSetting
*
WorkspaceMemoRelatedSetting
`protobuf:"bytes,3,opt,name=memo_related_setting,json=memoRelatedSetting,proto3,oneof"`
MemoRelatedSetting
*
WorkspaceMemoRelatedSetting
`protobuf:"bytes,4,opt,name=memo_related_setting,json=memoRelatedSetting,proto3,oneof"`
}
type
WorkspaceSetting_TelegramIntegrationSetting
struct
{
TelegramIntegrationSetting
*
WorkspaceTelegramIntegrationSetting
`protobuf:"bytes,5,opt,name=telegram_integration_setting,json=telegramIntegrationSetting,proto3,oneof"`
}
}
func
(
*
WorkspaceSetting_GeneralSetting
)
isWorkspaceSetting_Value
()
{}
func
(
*
WorkspaceSetting_GeneralSetting
)
isWorkspaceSetting_Value
()
{}
func
(
*
WorkspaceSetting_StorageSetting
)
isWorkspaceSetting_Value
()
{}
func
(
*
WorkspaceSetting_MemoRelatedSetting
)
isWorkspaceSetting_Value
()
{}
func
(
*
WorkspaceSetting_MemoRelatedSetting
)
isWorkspaceSetting_Value
()
{}
func
(
*
WorkspaceSetting_TelegramIntegrationSetting
)
isWorkspaceSetting_Value
()
{}
type
WorkspaceGeneralSetting
struct
{
type
WorkspaceGeneralSetting
struct
{
state
protoimpl
.
MessageState
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
sizeCache
protoimpl
.
SizeCache
...
@@ -244,6 +335,73 @@ func (x *WorkspaceGeneralSetting) GetAdditionalStyle() string {
...
@@ -244,6 +335,73 @@ func (x *WorkspaceGeneralSetting) GetAdditionalStyle() string {
return
""
return
""
}
}
type
WorkspaceStorageSetting
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
// storage_type is the storage type.
StorageType
WorkspaceStorageSetting_StorageType
`protobuf:"varint,1,opt,name=storage_type,json=storageType,proto3,enum=memos.store.WorkspaceStorageSetting_StorageType" json:"storage_type,omitempty"`
// The local storage path for STORAGE_TYPE_LOCAL.
// e.g. assets/{timestamp}_{filename}
LocalStoragePath
string
`protobuf:"bytes,2,opt,name=local_storage_path,json=localStoragePath,proto3" json:"local_storage_path,omitempty"`
// The max upload size in megabytes.
UploadSizeLimitMb
int64
`protobuf:"varint,3,opt,name=upload_size_limit_mb,json=uploadSizeLimitMb,proto3" json:"upload_size_limit_mb,omitempty"`
}
func
(
x
*
WorkspaceStorageSetting
)
Reset
()
{
*
x
=
WorkspaceStorageSetting
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_store_workspace_setting_proto_msgTypes
[
2
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
WorkspaceStorageSetting
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
WorkspaceStorageSetting
)
ProtoMessage
()
{}
func
(
x
*
WorkspaceStorageSetting
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_store_workspace_setting_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 WorkspaceStorageSetting.ProtoReflect.Descriptor instead.
func
(
*
WorkspaceStorageSetting
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_store_workspace_setting_proto_rawDescGZIP
(),
[]
int
{
2
}
}
func
(
x
*
WorkspaceStorageSetting
)
GetStorageType
()
WorkspaceStorageSetting_StorageType
{
if
x
!=
nil
{
return
x
.
StorageType
}
return
WorkspaceStorageSetting_STORAGE_TYPE_UNSPECIFIED
}
func
(
x
*
WorkspaceStorageSetting
)
GetLocalStoragePath
()
string
{
if
x
!=
nil
{
return
x
.
LocalStoragePath
}
return
""
}
func
(
x
*
WorkspaceStorageSetting
)
GetUploadSizeLimitMb
()
int64
{
if
x
!=
nil
{
return
x
.
UploadSizeLimitMb
}
return
0
}
type
WorkspaceMemoRelatedSetting
struct
{
type
WorkspaceMemoRelatedSetting
struct
{
state
protoimpl
.
MessageState
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
sizeCache
protoimpl
.
SizeCache
...
@@ -258,7 +416,7 @@ type WorkspaceMemoRelatedSetting struct {
...
@@ -258,7 +416,7 @@ type WorkspaceMemoRelatedSetting struct {
func
(
x
*
WorkspaceMemoRelatedSetting
)
Reset
()
{
func
(
x
*
WorkspaceMemoRelatedSetting
)
Reset
()
{
*
x
=
WorkspaceMemoRelatedSetting
{}
*
x
=
WorkspaceMemoRelatedSetting
{}
if
protoimpl
.
UnsafeEnabled
{
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_store_workspace_setting_proto_msgTypes
[
2
]
mi
:=
&
file_store_workspace_setting_proto_msgTypes
[
3
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
ms
.
StoreMessageInfo
(
mi
)
}
}
...
@@ -271,7 +429,7 @@ func (x *WorkspaceMemoRelatedSetting) String() string {
...
@@ -271,7 +429,7 @@ func (x *WorkspaceMemoRelatedSetting) String() string {
func
(
*
WorkspaceMemoRelatedSetting
)
ProtoMessage
()
{}
func
(
*
WorkspaceMemoRelatedSetting
)
ProtoMessage
()
{}
func
(
x
*
WorkspaceMemoRelatedSetting
)
ProtoReflect
()
protoreflect
.
Message
{
func
(
x
*
WorkspaceMemoRelatedSetting
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_store_workspace_setting_proto_msgTypes
[
2
]
mi
:=
&
file_store_workspace_setting_proto_msgTypes
[
3
]
if
protoimpl
.
UnsafeEnabled
&&
x
!=
nil
{
if
protoimpl
.
UnsafeEnabled
&&
x
!=
nil
{
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
if
ms
.
LoadMessageInfo
()
==
nil
{
if
ms
.
LoadMessageInfo
()
==
nil
{
...
@@ -284,7 +442,7 @@ func (x *WorkspaceMemoRelatedSetting) ProtoReflect() protoreflect.Message {
...
@@ -284,7 +442,7 @@ func (x *WorkspaceMemoRelatedSetting) ProtoReflect() protoreflect.Message {
// Deprecated: Use WorkspaceMemoRelatedSetting.ProtoReflect.Descriptor instead.
// Deprecated: Use WorkspaceMemoRelatedSetting.ProtoReflect.Descriptor instead.
func
(
*
WorkspaceMemoRelatedSetting
)
Descriptor
()
([]
byte
,
[]
int
)
{
func
(
*
WorkspaceMemoRelatedSetting
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_store_workspace_setting_proto_rawDescGZIP
(),
[]
int
{
2
}
return
file_store_workspace_setting_proto_rawDescGZIP
(),
[]
int
{
3
}
}
}
func
(
x
*
WorkspaceMemoRelatedSetting
)
GetDisallowPublicVisible
()
bool
{
func
(
x
*
WorkspaceMemoRelatedSetting
)
GetDisallowPublicVisible
()
bool
{
...
@@ -301,12 +459,60 @@ func (x *WorkspaceMemoRelatedSetting) GetDisplayWithUpdateTime() bool {
...
@@ -301,12 +459,60 @@ func (x *WorkspaceMemoRelatedSetting) GetDisplayWithUpdateTime() bool {
return
false
return
false
}
}
type
WorkspaceTelegramIntegrationSetting
struct
{
state
protoimpl
.
MessageState
sizeCache
protoimpl
.
SizeCache
unknownFields
protoimpl
.
UnknownFields
// telegram_bot_token is the telegram bot token.
TelegramBotToken
string
`protobuf:"bytes,1,opt,name=telegram_bot_token,json=telegramBotToken,proto3" json:"telegram_bot_token,omitempty"`
}
func
(
x
*
WorkspaceTelegramIntegrationSetting
)
Reset
()
{
*
x
=
WorkspaceTelegramIntegrationSetting
{}
if
protoimpl
.
UnsafeEnabled
{
mi
:=
&
file_store_workspace_setting_proto_msgTypes
[
4
]
ms
:=
protoimpl
.
X
.
MessageStateOf
(
protoimpl
.
Pointer
(
x
))
ms
.
StoreMessageInfo
(
mi
)
}
}
func
(
x
*
WorkspaceTelegramIntegrationSetting
)
String
()
string
{
return
protoimpl
.
X
.
MessageStringOf
(
x
)
}
func
(
*
WorkspaceTelegramIntegrationSetting
)
ProtoMessage
()
{}
func
(
x
*
WorkspaceTelegramIntegrationSetting
)
ProtoReflect
()
protoreflect
.
Message
{
mi
:=
&
file_store_workspace_setting_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 WorkspaceTelegramIntegrationSetting.ProtoReflect.Descriptor instead.
func
(
*
WorkspaceTelegramIntegrationSetting
)
Descriptor
()
([]
byte
,
[]
int
)
{
return
file_store_workspace_setting_proto_rawDescGZIP
(),
[]
int
{
4
}
}
func
(
x
*
WorkspaceTelegramIntegrationSetting
)
GetTelegramBotToken
()
string
{
if
x
!=
nil
{
return
x
.
TelegramBotToken
}
return
""
}
var
File_store_workspace_setting_proto
protoreflect
.
FileDescriptor
var
File_store_workspace_setting_proto
protoreflect
.
FileDescriptor
var
file_store_workspace_setting_proto_rawDesc
=
[]
byte
{
var
file_store_workspace_setting_proto_rawDesc
=
[]
byte
{
0x0a
,
0x1d
,
0x73
,
0x74
,
0x6f
,
0x72
,
0x65
,
0x2f
,
0x77
,
0x6f
,
0x72
,
0x6b
,
0x73
,
0x70
,
0x61
,
0x63
,
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
,
0x65
,
0x5f
,
0x73
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x2e
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x12
,
0x0b
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x73
,
0x74
,
0x6f
,
0x72
,
0x65
,
0x22
,
0x
fe
,
0x01
,
0x0a
,
0x0b
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x73
,
0x74
,
0x6f
,
0x72
,
0x65
,
0x22
,
0x
c5
,
0x03
,
0x0a
,
0x10
,
0x57
,
0x6f
,
0x72
,
0x6b
,
0x73
,
0x70
,
0x61
,
0x63
,
0x65
,
0x53
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
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
,
0x67
,
0x12
,
0x32
,
0x0a
,
0x03
,
0x6b
,
0x65
,
0x79
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x0e
,
0x32
,
0x20
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x73
,
0x74
,
0x6f
,
0x72
,
0x65
,
0x2e
,
0x57
,
0x6f
,
0x72
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x73
,
0x74
,
0x6f
,
0x72
,
0x65
,
0x2e
,
0x57
,
0x6f
,
0x72
,
...
@@ -316,57 +522,100 @@ var file_store_workspace_setting_proto_rawDesc = []byte{
...
@@ -316,57 +522,100 @@ var file_store_workspace_setting_proto_rawDesc = []byte{
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x73
,
0x74
,
0x6f
,
0x72
,
0x65
,
0x2e
,
0x57
,
0x6f
,
0x72
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x73
,
0x74
,
0x6f
,
0x72
,
0x65
,
0x2e
,
0x57
,
0x6f
,
0x72
,
0x6b
,
0x73
,
0x70
,
0x61
,
0x63
,
0x65
,
0x47
,
0x65
,
0x6e
,
0x65
,
0x72
,
0x61
,
0x6c
,
0x53
,
0x65
,
0x74
,
0x6b
,
0x73
,
0x70
,
0x61
,
0x63
,
0x65
,
0x47
,
0x65
,
0x6e
,
0x65
,
0x72
,
0x61
,
0x6c
,
0x53
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x48
,
0x00
,
0x52
,
0x0e
,
0x67
,
0x65
,
0x6e
,
0x65
,
0x72
,
0x61
,
0x6c
,
0x53
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x48
,
0x00
,
0x52
,
0x0e
,
0x67
,
0x65
,
0x6e
,
0x65
,
0x72
,
0x61
,
0x6c
,
0x53
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x12
,
0x5c
,
0x0a
,
0x14
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x5f
,
0x72
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x12
,
0x4f
,
0x0a
,
0x0f
,
0x73
,
0x74
,
0x6f
,
0x72
,
0x61
,
0x67
,
0x65
,
0x6c
,
0x61
,
0x74
,
0x65
,
0x64
,
0x5f
,
0x73
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x18
,
0x03
,
0x65
,
0x5f
,
0x73
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x0b
,
0x32
,
0x20
,
0x01
,
0x28
,
0x0b
,
0x32
,
0x28
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x73
,
0x74
,
0x6f
,
0x24
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x73
,
0x74
,
0x6f
,
0x72
,
0x65
,
0x2e
,
0x57
,
0x6f
,
0x72
,
0x65
,
0x2e
,
0x57
,
0x6f
,
0x72
,
0x6b
,
0x73
,
0x70
,
0x61
,
0x63
,
0x65
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x72
,
0x6b
,
0x73
,
0x70
,
0x61
,
0x63
,
0x65
,
0x53
,
0x74
,
0x6f
,
0x72
,
0x61
,
0x67
,
0x65
,
0x53
,
0x65
,
0x52
,
0x65
,
0x6c
,
0x61
,
0x74
,
0x65
,
0x64
,
0x53
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x48
,
0x00
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x48
,
0x00
,
0x52
,
0x0e
,
0x73
,
0x74
,
0x6f
,
0x72
,
0x61
,
0x67
,
0x65
,
0x52
,
0x12
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x52
,
0x65
,
0x6c
,
0x61
,
0x74
,
0x65
,
0x64
,
0x53
,
0x65
,
0x74
,
0x53
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x12
,
0x5c
,
0x0a
,
0x14
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x5f
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x42
,
0x07
,
0x0a
,
0x05
,
0x76
,
0x61
,
0x6c
,
0x75
,
0x65
,
0x22
,
0xf5
,
0x01
,
0x72
,
0x65
,
0x6c
,
0x61
,
0x74
,
0x65
,
0x64
,
0x5f
,
0x73
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x18
,
0x0a
,
0x17
,
0x57
,
0x6f
,
0x72
,
0x6b
,
0x73
,
0x70
,
0x61
,
0x63
,
0x65
,
0x47
,
0x65
,
0x6e
,
0x65
,
0x72
,
0x04
,
0x20
,
0x01
,
0x28
,
0x0b
,
0x32
,
0x28
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x73
,
0x74
,
0x61
,
0x6c
,
0x53
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x12
,
0x21
,
0x0a
,
0x0c
,
0x69
,
0x6e
,
0x73
,
0x6f
,
0x72
,
0x65
,
0x2e
,
0x57
,
0x6f
,
0x72
,
0x6b
,
0x73
,
0x70
,
0x61
,
0x63
,
0x65
,
0x4d
,
0x65
,
0x6d
,
0x74
,
0x61
,
0x6e
,
0x63
,
0x65
,
0x5f
,
0x75
,
0x72
,
0x6c
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x6f
,
0x52
,
0x65
,
0x6c
,
0x61
,
0x74
,
0x65
,
0x64
,
0x53
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x48
,
0x0b
,
0x69
,
0x6e
,
0x73
,
0x74
,
0x61
,
0x6e
,
0x63
,
0x65
,
0x55
,
0x72
,
0x6c
,
0x12
,
0x27
,
0x0a
,
0x0f
,
0x00
,
0x52
,
0x12
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x52
,
0x65
,
0x6c
,
0x61
,
0x74
,
0x65
,
0x64
,
0x53
,
0x65
,
0x64
,
0x69
,
0x73
,
0x61
,
0x6c
,
0x6c
,
0x6f
,
0x77
,
0x5f
,
0x73
,
0x69
,
0x67
,
0x6e
,
0x75
,
0x70
,
0x18
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x12
,
0x74
,
0x0a
,
0x1c
,
0x74
,
0x65
,
0x6c
,
0x65
,
0x67
,
0x72
,
0x61
,
0x02
,
0x20
,
0x01
,
0x28
,
0x08
,
0x52
,
0x0e
,
0x64
,
0x69
,
0x73
,
0x61
,
0x6c
,
0x6c
,
0x6f
,
0x77
,
0x53
,
0x6d
,
0x5f
,
0x69
,
0x6e
,
0x74
,
0x65
,
0x67
,
0x72
,
0x61
,
0x74
,
0x69
,
0x6f
,
0x6e
,
0x5f
,
0x73
,
0x65
,
0x69
,
0x67
,
0x6e
,
0x75
,
0x70
,
0x12
,
0x36
,
0x0a
,
0x17
,
0x64
,
0x69
,
0x73
,
0x61
,
0x6c
,
0x6c
,
0x6f
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x18
,
0x05
,
0x20
,
0x01
,
0x28
,
0x0b
,
0x32
,
0x30
,
0x2e
,
0x6d
,
0x65
,
0x77
,
0x5f
,
0x70
,
0x61
,
0x73
,
0x73
,
0x77
,
0x6f
,
0x72
,
0x64
,
0x5f
,
0x6c
,
0x6f
,
0x67
,
0x69
,
0x6e
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x73
,
0x74
,
0x6f
,
0x72
,
0x65
,
0x2e
,
0x57
,
0x6f
,
0x72
,
0x6b
,
0x73
,
0x70
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x08
,
0x52
,
0x15
,
0x64
,
0x69
,
0x73
,
0x61
,
0x6c
,
0x6c
,
0x6f
,
0x77
,
0x61
,
0x63
,
0x65
,
0x54
,
0x65
,
0x6c
,
0x65
,
0x67
,
0x72
,
0x61
,
0x6d
,
0x49
,
0x6e
,
0x74
,
0x65
,
0x67
,
0x50
,
0x61
,
0x73
,
0x73
,
0x77
,
0x6f
,
0x72
,
0x64
,
0x4c
,
0x6f
,
0x67
,
0x69
,
0x6e
,
0x12
,
0x2b
,
0x0a
,
0x72
,
0x61
,
0x74
,
0x69
,
0x6f
,
0x6e
,
0x53
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x48
,
0x00
,
0x52
,
0x11
,
0x61
,
0x64
,
0x64
,
0x69
,
0x74
,
0x69
,
0x6f
,
0x6e
,
0x61
,
0x6c
,
0x5f
,
0x73
,
0x63
,
0x72
,
0x69
,
0x1a
,
0x74
,
0x65
,
0x6c
,
0x65
,
0x67
,
0x72
,
0x61
,
0x6d
,
0x49
,
0x6e
,
0x74
,
0x65
,
0x67
,
0x72
,
0x61
,
0x70
,
0x74
,
0x18
,
0x05
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x10
,
0x61
,
0x64
,
0x64
,
0x69
,
0x74
,
0x69
,
0x74
,
0x69
,
0x6f
,
0x6e
,
0x53
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x42
,
0x07
,
0x0a
,
0x05
,
0x76
,
0x6f
,
0x6e
,
0x61
,
0x6c
,
0x53
,
0x63
,
0x72
,
0x69
,
0x70
,
0x74
,
0x12
,
0x29
,
0x0a
,
0x10
,
0x61
,
0x64
,
0x61
,
0x6c
,
0x75
,
0x65
,
0x22
,
0xf5
,
0x01
,
0x0a
,
0x17
,
0x57
,
0x6f
,
0x72
,
0x6b
,
0x73
,
0x70
,
0x61
,
0x64
,
0x69
,
0x74
,
0x69
,
0x6f
,
0x6e
,
0x61
,
0x6c
,
0x5f
,
0x73
,
0x74
,
0x79
,
0x6c
,
0x65
,
0x18
,
0x06
,
0x63
,
0x65
,
0x47
,
0x65
,
0x6e
,
0x65
,
0x72
,
0x61
,
0x6c
,
0x53
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x0f
,
0x61
,
0x64
,
0x64
,
0x69
,
0x74
,
0x69
,
0x6f
,
0x6e
,
0x61
,
0x6c
,
0x12
,
0x21
,
0x0a
,
0x0c
,
0x69
,
0x6e
,
0x73
,
0x74
,
0x61
,
0x6e
,
0x63
,
0x65
,
0x5f
,
0x75
,
0x72
,
0x6c
,
0x53
,
0x74
,
0x79
,
0x6c
,
0x65
,
0x22
,
0x8e
,
0x01
,
0x0a
,
0x1b
,
0x57
,
0x6f
,
0x72
,
0x6b
,
0x73
,
0x70
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x0b
,
0x69
,
0x6e
,
0x73
,
0x74
,
0x61
,
0x6e
,
0x63
,
0x65
,
0x61
,
0x63
,
0x65
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x52
,
0x65
,
0x6c
,
0x61
,
0x74
,
0x65
,
0x64
,
0x53
,
0x65
,
0x55
,
0x72
,
0x6c
,
0x12
,
0x27
,
0x0a
,
0x0f
,
0x64
,
0x69
,
0x73
,
0x61
,
0x6c
,
0x6c
,
0x6f
,
0x77
,
0x5f
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x12
,
0x36
,
0x0a
,
0x17
,
0x64
,
0x69
,
0x73
,
0x61
,
0x6c
,
0x6c
,
0x6f
,
0x73
,
0x69
,
0x67
,
0x6e
,
0x75
,
0x70
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x08
,
0x52
,
0x0e
,
0x64
,
0x69
,
0x77
,
0x5f
,
0x70
,
0x75
,
0x62
,
0x6c
,
0x69
,
0x63
,
0x5f
,
0x76
,
0x69
,
0x73
,
0x69
,
0x62
,
0x6c
,
0x65
,
0x73
,
0x61
,
0x6c
,
0x6c
,
0x6f
,
0x77
,
0x53
,
0x69
,
0x67
,
0x6e
,
0x75
,
0x70
,
0x12
,
0x36
,
0x0a
,
0x17
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x08
,
0x52
,
0x15
,
0x64
,
0x69
,
0x73
,
0x61
,
0x6c
,
0x6c
,
0x6f
,
0x77
,
0x64
,
0x69
,
0x73
,
0x61
,
0x6c
,
0x6c
,
0x6f
,
0x77
,
0x5f
,
0x70
,
0x61
,
0x73
,
0x73
,
0x77
,
0x6f
,
0x72
,
0x50
,
0x75
,
0x62
,
0x6c
,
0x69
,
0x63
,
0x56
,
0x69
,
0x73
,
0x69
,
0x62
,
0x6c
,
0x65
,
0x12
,
0x37
,
0x0a
,
0x64
,
0x5f
,
0x6c
,
0x6f
,
0x67
,
0x69
,
0x6e
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x08
,
0x52
,
0x15
,
0x64
,
0x18
,
0x64
,
0x69
,
0x73
,
0x70
,
0x6c
,
0x61
,
0x79
,
0x5f
,
0x77
,
0x69
,
0x74
,
0x68
,
0x5f
,
0x75
,
0x70
,
0x69
,
0x73
,
0x61
,
0x6c
,
0x6c
,
0x6f
,
0x77
,
0x50
,
0x61
,
0x73
,
0x73
,
0x77
,
0x6f
,
0x72
,
0x64
,
0x4c
,
0x64
,
0x61
,
0x74
,
0x65
,
0x5f
,
0x74
,
0x69
,
0x6d
,
0x65
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x08
,
0x52
,
0x6f
,
0x67
,
0x69
,
0x6e
,
0x12
,
0x2b
,
0x0a
,
0x11
,
0x61
,
0x64
,
0x64
,
0x69
,
0x74
,
0x69
,
0x6f
,
0x6e
,
0x15
,
0x64
,
0x69
,
0x73
,
0x70
,
0x6c
,
0x61
,
0x79
,
0x57
,
0x69
,
0x74
,
0x68
,
0x55
,
0x70
,
0x64
,
0x61
,
0x61
,
0x6c
,
0x5f
,
0x73
,
0x63
,
0x72
,
0x69
,
0x70
,
0x74
,
0x18
,
0x05
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x74
,
0x65
,
0x54
,
0x69
,
0x6d
,
0x65
,
0x2a
,
0x7f
,
0x0a
,
0x13
,
0x57
,
0x6f
,
0x72
,
0x6b
,
0x73
,
0x70
,
0x10
,
0x61
,
0x64
,
0x64
,
0x69
,
0x74
,
0x69
,
0x6f
,
0x6e
,
0x61
,
0x6c
,
0x53
,
0x63
,
0x72
,
0x69
,
0x70
,
0x61
,
0x63
,
0x65
,
0x53
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x4b
,
0x65
,
0x79
,
0x12
,
0x25
,
0x0a
,
0x74
,
0x12
,
0x29
,
0x0a
,
0x10
,
0x61
,
0x64
,
0x64
,
0x69
,
0x74
,
0x69
,
0x6f
,
0x6e
,
0x61
,
0x6c
,
0x5f
,
0x21
,
0x57
,
0x4f
,
0x52
,
0x4b
,
0x53
,
0x50
,
0x41
,
0x43
,
0x45
,
0x5f
,
0x53
,
0x45
,
0x54
,
0x54
,
0x49
,
0x73
,
0x74
,
0x79
,
0x6c
,
0x65
,
0x18
,
0x06
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x0f
,
0x61
,
0x64
,
0x64
,
0x4e
,
0x47
,
0x5f
,
0x4b
,
0x45
,
0x59
,
0x5f
,
0x55
,
0x4e
,
0x53
,
0x50
,
0x45
,
0x43
,
0x49
,
0x46
,
0x49
,
0x69
,
0x74
,
0x69
,
0x6f
,
0x6e
,
0x61
,
0x6c
,
0x53
,
0x74
,
0x79
,
0x6c
,
0x65
,
0x22
,
0xc8
,
0x02
,
0x0a
,
0x45
,
0x44
,
0x10
,
0x00
,
0x12
,
0x1d
,
0x0a
,
0x19
,
0x57
,
0x4f
,
0x52
,
0x4b
,
0x53
,
0x50
,
0x41
,
0x43
,
0x17
,
0x57
,
0x6f
,
0x72
,
0x6b
,
0x73
,
0x70
,
0x61
,
0x63
,
0x65
,
0x53
,
0x74
,
0x6f
,
0x72
,
0x61
,
0x67
,
0x45
,
0x5f
,
0x53
,
0x45
,
0x54
,
0x54
,
0x49
,
0x4e
,
0x47
,
0x5f
,
0x47
,
0x45
,
0x4e
,
0x45
,
0x52
,
0x41
,
0x65
,
0x53
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x12
,
0x53
,
0x0a
,
0x0c
,
0x73
,
0x74
,
0x6f
,
0x72
,
0x4c
,
0x10
,
0x01
,
0x12
,
0x22
,
0x0a
,
0x1e
,
0x57
,
0x4f
,
0x52
,
0x4b
,
0x53
,
0x50
,
0x41
,
0x43
,
0x45
,
0x61
,
0x67
,
0x65
,
0x5f
,
0x74
,
0x79
,
0x70
,
0x65
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x0e
,
0x32
,
0x30
,
0x5f
,
0x53
,
0x45
,
0x54
,
0x54
,
0x49
,
0x4e
,
0x47
,
0x5f
,
0x4d
,
0x45
,
0x4d
,
0x4f
,
0x5f
,
0x52
,
0x45
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x73
,
0x74
,
0x6f
,
0x72
,
0x65
,
0x2e
,
0x57
,
0x6f
,
0x72
,
0x4c
,
0x41
,
0x54
,
0x45
,
0x44
,
0x10
,
0x02
,
0x42
,
0xa0
,
0x01
,
0x0a
,
0x0f
,
0x63
,
0x6f
,
0x6d
,
0x2e
,
0x6b
,
0x73
,
0x70
,
0x61
,
0x63
,
0x65
,
0x53
,
0x74
,
0x6f
,
0x72
,
0x61
,
0x67
,
0x65
,
0x53
,
0x65
,
0x74
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x73
,
0x74
,
0x6f
,
0x72
,
0x65
,
0x42
,
0x15
,
0x57
,
0x6f
,
0x72
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x2e
,
0x53
,
0x74
,
0x6f
,
0x72
,
0x61
,
0x67
,
0x65
,
0x54
,
0x79
,
0x70
,
0x65
,
0x6b
,
0x73
,
0x70
,
0x61
,
0x63
,
0x65
,
0x53
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x50
,
0x72
,
0x6f
,
0x52
,
0x0b
,
0x73
,
0x74
,
0x6f
,
0x72
,
0x61
,
0x67
,
0x65
,
0x54
,
0x79
,
0x70
,
0x65
,
0x12
,
0x2c
,
0x0a
,
0x74
,
0x6f
,
0x50
,
0x01
,
0x5a
,
0x29
,
0x67
,
0x69
,
0x74
,
0x68
,
0x75
,
0x62
,
0x2e
,
0x63
,
0x6f
,
0x6d
,
0x12
,
0x6c
,
0x6f
,
0x63
,
0x61
,
0x6c
,
0x5f
,
0x73
,
0x74
,
0x6f
,
0x72
,
0x61
,
0x67
,
0x65
,
0x5f
,
0x70
,
0x2f
,
0x75
,
0x73
,
0x65
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2f
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2f
,
0x61
,
0x74
,
0x68
,
0x18
,
0x02
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x10
,
0x6c
,
0x6f
,
0x63
,
0x61
,
0x6c
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x2f
,
0x67
,
0x65
,
0x6e
,
0x2f
,
0x73
,
0x74
,
0x6f
,
0x72
,
0x65
,
0xa2
,
0x53
,
0x74
,
0x6f
,
0x72
,
0x61
,
0x67
,
0x65
,
0x50
,
0x61
,
0x74
,
0x68
,
0x12
,
0x2f
,
0x0a
,
0x14
,
0x75
,
0x02
,
0x03
,
0x4d
,
0x53
,
0x58
,
0xaa
,
0x02
,
0x0b
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x53
,
0x74
,
0x70
,
0x6c
,
0x6f
,
0x61
,
0x64
,
0x5f
,
0x73
,
0x69
,
0x7a
,
0x65
,
0x5f
,
0x6c
,
0x69
,
0x6d
,
0x69
,
0x74
,
0x6f
,
0x72
,
0x65
,
0xca
,
0x02
,
0x0b
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x5c
,
0x53
,
0x74
,
0x6f
,
0x72
,
0x5f
,
0x6d
,
0x62
,
0x18
,
0x03
,
0x20
,
0x01
,
0x28
,
0x03
,
0x52
,
0x11
,
0x75
,
0x70
,
0x6c
,
0x6f
,
0x61
,
0x65
,
0xe2
,
0x02
,
0x17
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x5c
,
0x53
,
0x74
,
0x6f
,
0x72
,
0x65
,
0x5c
,
0x64
,
0x53
,
0x69
,
0x7a
,
0x65
,
0x4c
,
0x69
,
0x6d
,
0x69
,
0x74
,
0x4d
,
0x62
,
0x22
,
0x79
,
0x0a
,
0x0b
,
0x47
,
0x50
,
0x42
,
0x4d
,
0x65
,
0x74
,
0x61
,
0x64
,
0x61
,
0x74
,
0x61
,
0xea
,
0x02
,
0x0c
,
0x4d
,
0x65
,
0x53
,
0x74
,
0x6f
,
0x72
,
0x61
,
0x67
,
0x65
,
0x54
,
0x79
,
0x70
,
0x65
,
0x12
,
0x1c
,
0x0a
,
0x18
,
0x53
,
0x6d
,
0x6f
,
0x73
,
0x3a
,
0x3a
,
0x53
,
0x74
,
0x6f
,
0x72
,
0x65
,
0x62
,
0x06
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x54
,
0x4f
,
0x52
,
0x41
,
0x47
,
0x45
,
0x5f
,
0x54
,
0x59
,
0x50
,
0x45
,
0x5f
,
0x55
,
0x4e
,
0x53
,
0x50
,
0x6f
,
0x33
,
0x45
,
0x43
,
0x49
,
0x46
,
0x49
,
0x45
,
0x44
,
0x10
,
0x00
,
0x12
,
0x19
,
0x0a
,
0x15
,
0x53
,
0x54
,
0x4f
,
0x52
,
0x41
,
0x47
,
0x45
,
0x5f
,
0x54
,
0x59
,
0x50
,
0x45
,
0x5f
,
0x44
,
0x41
,
0x54
,
0x41
,
0x42
,
0x41
,
0x53
,
0x45
,
0x10
,
0x01
,
0x12
,
0x16
,
0x0a
,
0x12
,
0x53
,
0x54
,
0x4f
,
0x52
,
0x41
,
0x47
,
0x45
,
0x5f
,
0x54
,
0x59
,
0x50
,
0x45
,
0x5f
,
0x4c
,
0x4f
,
0x43
,
0x41
,
0x4c
,
0x10
,
0x02
,
0x12
,
0x19
,
0x0a
,
0x15
,
0x53
,
0x54
,
0x4f
,
0x52
,
0x41
,
0x47
,
0x45
,
0x5f
,
0x54
,
0x59
,
0x50
,
0x45
,
0x5f
,
0x45
,
0x58
,
0x54
,
0x45
,
0x52
,
0x4e
,
0x41
,
0x4c
,
0x10
,
0x03
,
0x22
,
0x8e
,
0x01
,
0x0a
,
0x1b
,
0x57
,
0x6f
,
0x72
,
0x6b
,
0x73
,
0x70
,
0x61
,
0x63
,
0x65
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x52
,
0x65
,
0x6c
,
0x61
,
0x74
,
0x65
,
0x64
,
0x53
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x12
,
0x36
,
0x0a
,
0x17
,
0x64
,
0x69
,
0x73
,
0x61
,
0x6c
,
0x6c
,
0x6f
,
0x77
,
0x5f
,
0x70
,
0x75
,
0x62
,
0x6c
,
0x69
,
0x63
,
0x5f
,
0x76
,
0x69
,
0x73
,
0x69
,
0x62
,
0x6c
,
0x65
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x08
,
0x52
,
0x15
,
0x64
,
0x69
,
0x73
,
0x61
,
0x6c
,
0x6c
,
0x6f
,
0x77
,
0x50
,
0x75
,
0x62
,
0x6c
,
0x69
,
0x63
,
0x56
,
0x69
,
0x73
,
0x69
,
0x62
,
0x6c
,
0x65
,
0x12
,
0x37
,
0x0a
,
0x18
,
0x64
,
0x69
,
0x73
,
0x70
,
0x6c
,
0x61
,
0x79
,
0x5f
,
0x77
,
0x69
,
0x74
,
0x68
,
0x5f
,
0x75
,
0x70
,
0x64
,
0x61
,
0x74
,
0x65
,
0x5f
,
0x74
,
0x69
,
0x6d
,
0x65
,
0x18
,
0x02
,
0x20
,
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
,
0x22
,
0x53
,
0x0a
,
0x23
,
0x57
,
0x6f
,
0x72
,
0x6b
,
0x73
,
0x70
,
0x61
,
0x63
,
0x65
,
0x54
,
0x65
,
0x6c
,
0x65
,
0x67
,
0x72
,
0x61
,
0x6d
,
0x49
,
0x6e
,
0x74
,
0x65
,
0x67
,
0x72
,
0x61
,
0x74
,
0x69
,
0x6f
,
0x6e
,
0x53
,
0x65
,
0x74
,
0x74
,
0x69
,
0x6e
,
0x67
,
0x12
,
0x2c
,
0x0a
,
0x12
,
0x74
,
0x65
,
0x6c
,
0x65
,
0x67
,
0x72
,
0x61
,
0x6d
,
0x5f
,
0x62
,
0x6f
,
0x74
,
0x5f
,
0x74
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x18
,
0x01
,
0x20
,
0x01
,
0x28
,
0x09
,
0x52
,
0x10
,
0x74
,
0x65
,
0x6c
,
0x65
,
0x67
,
0x72
,
0x61
,
0x6d
,
0x42
,
0x6f
,
0x74
,
0x54
,
0x6f
,
0x6b
,
0x65
,
0x6e
,
0x2a
,
0xca
,
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
,
0x1d
,
0x0a
,
0x19
,
0x57
,
0x4f
,
0x52
,
0x4b
,
0x53
,
0x50
,
0x41
,
0x43
,
0x45
,
0x5f
,
0x53
,
0x45
,
0x54
,
0x54
,
0x49
,
0x4e
,
0x47
,
0x5f
,
0x47
,
0x45
,
0x4e
,
0x45
,
0x52
,
0x41
,
0x4c
,
0x10
,
0x01
,
0x12
,
0x1d
,
0x0a
,
0x19
,
0x57
,
0x4f
,
0x52
,
0x4b
,
0x53
,
0x50
,
0x41
,
0x43
,
0x45
,
0x5f
,
0x53
,
0x45
,
0x54
,
0x54
,
0x49
,
0x4e
,
0x47
,
0x5f
,
0x53
,
0x54
,
0x4f
,
0x52
,
0x41
,
0x47
,
0x45
,
0x10
,
0x02
,
0x12
,
0x22
,
0x0a
,
0x1e
,
0x57
,
0x4f
,
0x52
,
0x4b
,
0x53
,
0x50
,
0x41
,
0x43
,
0x45
,
0x5f
,
0x53
,
0x45
,
0x54
,
0x54
,
0x49
,
0x4e
,
0x47
,
0x5f
,
0x4d
,
0x45
,
0x4d
,
0x4f
,
0x5f
,
0x52
,
0x45
,
0x4c
,
0x41
,
0x54
,
0x45
,
0x44
,
0x10
,
0x03
,
0x12
,
0x2a
,
0x0a
,
0x26
,
0x57
,
0x4f
,
0x52
,
0x4b
,
0x53
,
0x50
,
0x41
,
0x43
,
0x45
,
0x5f
,
0x53
,
0x45
,
0x54
,
0x54
,
0x49
,
0x4e
,
0x47
,
0x5f
,
0x54
,
0x45
,
0x4c
,
0x45
,
0x47
,
0x52
,
0x41
,
0x4d
,
0x5f
,
0x49
,
0x4e
,
0x54
,
0x45
,
0x47
,
0x52
,
0x41
,
0x54
,
0x49
,
0x4f
,
0x4e
,
0x10
,
0x04
,
0x42
,
0xa0
,
0x01
,
0x0a
,
0x0f
,
0x63
,
0x6f
,
0x6d
,
0x2e
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
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
,
0x29
,
0x67
,
0x69
,
0x74
,
0x68
,
0x75
,
0x62
,
0x2e
,
0x63
,
0x6f
,
0x6d
,
0x2f
,
0x75
,
0x73
,
0x65
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2f
,
0x6d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2f
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x2f
,
0x67
,
0x65
,
0x6e
,
0x2f
,
0x73
,
0x74
,
0x6f
,
0x72
,
0x65
,
0xa2
,
0x02
,
0x03
,
0x4d
,
0x53
,
0x58
,
0xaa
,
0x02
,
0x0b
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x2e
,
0x53
,
0x74
,
0x6f
,
0x72
,
0x65
,
0xca
,
0x02
,
0x0b
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x5c
,
0x53
,
0x74
,
0x6f
,
0x72
,
0x65
,
0xe2
,
0x02
,
0x17
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x5c
,
0x53
,
0x74
,
0x6f
,
0x72
,
0x65
,
0x5c
,
0x47
,
0x50
,
0x42
,
0x4d
,
0x65
,
0x74
,
0x61
,
0x64
,
0x61
,
0x74
,
0x61
,
0xea
,
0x02
,
0x0c
,
0x4d
,
0x65
,
0x6d
,
0x6f
,
0x73
,
0x3a
,
0x3a
,
0x53
,
0x74
,
0x6f
,
0x72
,
0x65
,
0x62
,
0x06
,
0x70
,
0x72
,
0x6f
,
0x74
,
0x6f
,
0x33
,
}
}
var
(
var
(
...
@@ -381,23 +630,29 @@ func file_store_workspace_setting_proto_rawDescGZIP() []byte {
...
@@ -381,23 +630,29 @@ func file_store_workspace_setting_proto_rawDescGZIP() []byte {
return
file_store_workspace_setting_proto_rawDescData
return
file_store_workspace_setting_proto_rawDescData
}
}
var
file_store_workspace_setting_proto_enumTypes
=
make
([]
protoimpl
.
EnumInfo
,
1
)
var
file_store_workspace_setting_proto_enumTypes
=
make
([]
protoimpl
.
EnumInfo
,
2
)
var
file_store_workspace_setting_proto_msgTypes
=
make
([]
protoimpl
.
MessageInfo
,
3
)
var
file_store_workspace_setting_proto_msgTypes
=
make
([]
protoimpl
.
MessageInfo
,
5
)
var
file_store_workspace_setting_proto_goTypes
=
[]
interface
{}{
var
file_store_workspace_setting_proto_goTypes
=
[]
interface
{}{
(
WorkspaceSettingKey
)(
0
),
// 0: memos.store.WorkspaceSettingKey
(
WorkspaceSettingKey
)(
0
),
// 0: memos.store.WorkspaceSettingKey
(
*
WorkspaceSetting
)(
nil
),
// 1: memos.store.WorkspaceSetting
(
WorkspaceStorageSetting_StorageType
)(
0
),
// 1: memos.store.WorkspaceStorageSetting.StorageType
(
*
WorkspaceGeneralSetting
)(
nil
),
// 2: memos.store.WorkspaceGeneralSetting
(
*
WorkspaceSetting
)(
nil
),
// 2: memos.store.WorkspaceSetting
(
*
WorkspaceMemoRelatedSetting
)(
nil
),
// 3: memos.store.WorkspaceMemoRelatedSetting
(
*
WorkspaceGeneralSetting
)(
nil
),
// 3: memos.store.WorkspaceGeneralSetting
(
*
WorkspaceStorageSetting
)(
nil
),
// 4: memos.store.WorkspaceStorageSetting
(
*
WorkspaceMemoRelatedSetting
)(
nil
),
// 5: memos.store.WorkspaceMemoRelatedSetting
(
*
WorkspaceTelegramIntegrationSetting
)(
nil
),
// 6: memos.store.WorkspaceTelegramIntegrationSetting
}
}
var
file_store_workspace_setting_proto_depIdxs
=
[]
int32
{
var
file_store_workspace_setting_proto_depIdxs
=
[]
int32
{
0
,
// 0: memos.store.WorkspaceSetting.key:type_name -> memos.store.WorkspaceSettingKey
0
,
// 0: memos.store.WorkspaceSetting.key:type_name -> memos.store.WorkspaceSettingKey
2
,
// 1: memos.store.WorkspaceSetting.general_setting:type_name -> memos.store.WorkspaceGeneralSetting
3
,
// 1: memos.store.WorkspaceSetting.general_setting:type_name -> memos.store.WorkspaceGeneralSetting
3
,
// 2: memos.store.WorkspaceSetting.memo_related_setting:type_name -> memos.store.WorkspaceMemoRelatedSetting
4
,
// 2: memos.store.WorkspaceSetting.storage_setting:type_name -> memos.store.WorkspaceStorageSetting
3
,
// [3:3] is the sub-list for method output_type
5
,
// 3: memos.store.WorkspaceSetting.memo_related_setting:type_name -> memos.store.WorkspaceMemoRelatedSetting
3
,
// [3:3] is the sub-list for method input_type
6
,
// 4: memos.store.WorkspaceSetting.telegram_integration_setting:type_name -> memos.store.WorkspaceTelegramIntegrationSetting
3
,
// [3:3] is the sub-list for extension type_name
1
,
// 5: memos.store.WorkspaceStorageSetting.storage_type:type_name -> memos.store.WorkspaceStorageSetting.StorageType
3
,
// [3:3] is the sub-list for extension extendee
6
,
// [6:6] is the sub-list for method output_type
0
,
// [0:3] is the sub-list for field type_name
6
,
// [6:6] is the sub-list for method input_type
6
,
// [6:6] is the sub-list for extension type_name
6
,
// [6:6] is the sub-list for extension extendee
0
,
// [0:6] is the sub-list for field type_name
}
}
func
init
()
{
file_store_workspace_setting_proto_init
()
}
func
init
()
{
file_store_workspace_setting_proto_init
()
}
...
@@ -431,6 +686,18 @@ func file_store_workspace_setting_proto_init() {
...
@@ -431,6 +686,18 @@ func file_store_workspace_setting_proto_init() {
}
}
}
}
file_store_workspace_setting_proto_msgTypes
[
2
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
file_store_workspace_setting_proto_msgTypes
[
2
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
WorkspaceStorageSetting
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
file_store_workspace_setting_proto_msgTypes
[
3
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
WorkspaceMemoRelatedSetting
);
i
{
switch
v
:=
v
.
(
*
WorkspaceMemoRelatedSetting
);
i
{
case
0
:
case
0
:
return
&
v
.
state
return
&
v
.
state
...
@@ -442,18 +709,32 @@ func file_store_workspace_setting_proto_init() {
...
@@ -442,18 +709,32 @@ func file_store_workspace_setting_proto_init() {
return
nil
return
nil
}
}
}
}
file_store_workspace_setting_proto_msgTypes
[
4
]
.
Exporter
=
func
(
v
interface
{},
i
int
)
interface
{}
{
switch
v
:=
v
.
(
*
WorkspaceTelegramIntegrationSetting
);
i
{
case
0
:
return
&
v
.
state
case
1
:
return
&
v
.
sizeCache
case
2
:
return
&
v
.
unknownFields
default
:
return
nil
}
}
}
}
file_store_workspace_setting_proto_msgTypes
[
0
]
.
OneofWrappers
=
[]
interface
{}{
file_store_workspace_setting_proto_msgTypes
[
0
]
.
OneofWrappers
=
[]
interface
{}{
(
*
WorkspaceSetting_GeneralSetting
)(
nil
),
(
*
WorkspaceSetting_GeneralSetting
)(
nil
),
(
*
WorkspaceSetting_StorageSetting
)(
nil
),
(
*
WorkspaceSetting_MemoRelatedSetting
)(
nil
),
(
*
WorkspaceSetting_MemoRelatedSetting
)(
nil
),
(
*
WorkspaceSetting_TelegramIntegrationSetting
)(
nil
),
}
}
type
x
struct
{}
type
x
struct
{}
out
:=
protoimpl
.
TypeBuilder
{
out
:=
protoimpl
.
TypeBuilder
{
File
:
protoimpl
.
DescBuilder
{
File
:
protoimpl
.
DescBuilder
{
GoPackagePath
:
reflect
.
TypeOf
(
x
{})
.
PkgPath
(),
GoPackagePath
:
reflect
.
TypeOf
(
x
{})
.
PkgPath
(),
RawDescriptor
:
file_store_workspace_setting_proto_rawDesc
,
RawDescriptor
:
file_store_workspace_setting_proto_rawDesc
,
NumEnums
:
1
,
NumEnums
:
2
,
NumMessages
:
3
,
NumMessages
:
5
,
NumExtensions
:
0
,
NumExtensions
:
0
,
NumServices
:
0
,
NumServices
:
0
,
},
},
...
...
proto/store/workspace_setting.proto
View file @
71c39ed5
...
@@ -8,15 +8,21 @@ enum WorkspaceSettingKey {
...
@@ -8,15 +8,21 @@ enum WorkspaceSettingKey {
WORKSPACE_SETTING_KEY_UNSPECIFIED
=
0
;
WORKSPACE_SETTING_KEY_UNSPECIFIED
=
0
;
// WORKSPACE_SETTING_GENERAL is the key for general settings.
// WORKSPACE_SETTING_GENERAL is the key for general settings.
WORKSPACE_SETTING_GENERAL
=
1
;
WORKSPACE_SETTING_GENERAL
=
1
;
// WORKSPACE_SETTING_STORAGE is the key for storage settings.
WORKSPACE_SETTING_STORAGE
=
2
;
// WORKSPACE_SETTING_MEMO_RELATED is the key for memo related settings.
// WORKSPACE_SETTING_MEMO_RELATED is the key for memo related settings.
WORKSPACE_SETTING_MEMO_RELATED
=
2
;
WORKSPACE_SETTING_MEMO_RELATED
=
3
;
// WORKSPACE_SETTING_TELEGRAM_INTEGRATION is the key for telegram integration settings.
WORKSPACE_SETTING_TELEGRAM_INTEGRATION
=
4
;
}
}
message
WorkspaceSetting
{
message
WorkspaceSetting
{
WorkspaceSettingKey
key
=
1
;
WorkspaceSettingKey
key
=
1
;
oneof
value
{
oneof
value
{
WorkspaceGeneralSetting
general_setting
=
2
;
WorkspaceGeneralSetting
general_setting
=
2
;
WorkspaceMemoRelatedSetting
memo_related_setting
=
3
;
WorkspaceStorageSetting
storage_setting
=
3
;
WorkspaceMemoRelatedSetting
memo_related_setting
=
4
;
WorkspaceTelegramIntegrationSetting
telegram_integration_setting
=
5
;
}
}
}
}
...
@@ -33,9 +39,34 @@ message WorkspaceGeneralSetting {
...
@@ -33,9 +39,34 @@ message WorkspaceGeneralSetting {
string
additional_style
=
6
;
string
additional_style
=
6
;
}
}
message
WorkspaceStorageSetting
{
// storage_type is the storage type.
StorageType
storage_type
=
1
;
// The local storage path for STORAGE_TYPE_LOCAL.
// e.g. assets/{timestamp}_{filename}
string
local_storage_path
=
2
;
// The max upload size in megabytes.
int64
upload_size_limit_mb
=
3
;
enum
StorageType
{
STORAGE_TYPE_UNSPECIFIED
=
0
;
// STORAGE_TYPE_DATABASE is the database storage type.
STORAGE_TYPE_DATABASE
=
1
;
// STORAGE_TYPE_LOCAL is the local storage type.
STORAGE_TYPE_LOCAL
=
2
;
// STORAGE_TYPE_EXTERNAL is the external storage type.
STORAGE_TYPE_EXTERNAL
=
3
;
}
}
message
WorkspaceMemoRelatedSetting
{
message
WorkspaceMemoRelatedSetting
{
// disallow_public_share disallows set memo as public visible.
// disallow_public_share disallows set memo as public visible.
bool
disallow_public_visible
=
1
;
bool
disallow_public_visible
=
1
;
// display_with_update_time orders and displays memo with update time.
// display_with_update_time orders and displays memo with update time.
bool
display_with_update_time
=
2
;
bool
display_with_update_time
=
2
;
}
}
message
WorkspaceTelegramIntegrationSetting
{
// telegram_bot_token is the telegram bot token.
string
telegram_bot_token
=
1
;
}
store/db/mysql/workspace_setting.go
View file @
71c39ed5
...
@@ -2,8 +2,10 @@ package mysql
...
@@ -2,8 +2,10 @@ package mysql
import
(
import
(
"context"
"context"
"fmt"
"strings"
"strings"
"github.com/pkg/errors"
"google.golang.org/protobuf/encoding/protojson"
"google.golang.org/protobuf/encoding/protojson"
storepb
"github.com/usememos/memos/proto/gen/store"
storepb
"github.com/usememos/memos/proto/gen/store"
...
@@ -72,14 +74,23 @@ func (d *DB) UpsertWorkspaceSettingV1(ctx context.Context, upsert *storepb.Works
...
@@ -72,14 +74,23 @@ func (d *DB) UpsertWorkspaceSettingV1(ctx context.Context, upsert *storepb.Works
INSERT INTO system_setting (name, value, description)
INSERT INTO system_setting (name, value, description)
VALUES (?, ?, '')
VALUES (?, ?, '')
ON DUPLICATE KEY UPDATE value = ?`
ON DUPLICATE KEY UPDATE value = ?`
var
valueString
string
var
valueBytes
[]
byte
var
err
error
if
upsert
.
Key
==
storepb
.
WorkspaceSettingKey_WORKSPACE_SETTING_GENERAL
{
if
upsert
.
Key
==
storepb
.
WorkspaceSettingKey_WORKSPACE_SETTING_GENERAL
{
valueBytes
,
err
:=
protojson
.
Marshal
(
upsert
.
GetGeneralSetting
())
valueBytes
,
err
=
protojson
.
Marshal
(
upsert
.
GetGeneralSetting
())
if
err
!=
nil
{
}
else
if
upsert
.
Key
==
storepb
.
WorkspaceSettingKey_WORKSPACE_SETTING_STORAGE
{
return
nil
,
err
valueBytes
,
err
=
protojson
.
Marshal
(
upsert
.
GetStorageSetting
())
}
}
else
if
upsert
.
Key
==
storepb
.
WorkspaceSettingKey_WORKSPACE_SETTING_MEMO_RELATED
{
valueString
=
string
(
valueBytes
)
valueBytes
,
err
=
protojson
.
Marshal
(
upsert
.
GetMemoRelatedSetting
())
}
else
if
upsert
.
Key
==
storepb
.
WorkspaceSettingKey_WORKSPACE_SETTING_TELEGRAM_INTEGRATION
{
valueBytes
,
err
=
protojson
.
Marshal
(
upsert
.
GetTelegramIntegrationSetting
())
}
else
{
return
nil
,
errors
.
New
(
fmt
.
Sprintf
(
"unsupported workspace setting key: %s"
,
upsert
.
Key
.
String
()))
}
}
if
err
!=
nil
{
return
nil
,
errors
.
Wrap
(
err
,
"failed to marshal workspace setting value"
)
}
valueString
:=
string
(
valueBytes
)
if
_
,
err
:=
d
.
db
.
ExecContext
(
ctx
,
stmt
,
upsert
.
Key
.
String
(),
valueString
,
valueString
);
err
!=
nil
{
if
_
,
err
:=
d
.
db
.
ExecContext
(
ctx
,
stmt
,
upsert
.
Key
.
String
(),
valueString
,
valueString
);
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
...
@@ -117,6 +128,24 @@ func (d *DB) ListWorkspaceSettingsV1(ctx context.Context, find *store.FindWorksp
...
@@ -117,6 +128,24 @@ func (d *DB) ListWorkspaceSettingsV1(ctx context.Context, find *store.FindWorksp
return
nil
,
err
return
nil
,
err
}
}
workspaceSetting
.
Value
=
&
storepb
.
WorkspaceSetting_GeneralSetting
{
GeneralSetting
:
generalSetting
}
workspaceSetting
.
Value
=
&
storepb
.
WorkspaceSetting_GeneralSetting
{
GeneralSetting
:
generalSetting
}
}
else
if
workspaceSetting
.
Key
==
storepb
.
WorkspaceSettingKey_WORKSPACE_SETTING_STORAGE
{
storageSetting
:=
&
storepb
.
WorkspaceStorageSetting
{}
if
err
:=
protojson
.
Unmarshal
([]
byte
(
valueString
),
storageSetting
);
err
!=
nil
{
return
nil
,
err
}
workspaceSetting
.
Value
=
&
storepb
.
WorkspaceSetting_StorageSetting
{
StorageSetting
:
storageSetting
}
}
else
if
workspaceSetting
.
Key
==
storepb
.
WorkspaceSettingKey_WORKSPACE_SETTING_MEMO_RELATED
{
memoRelatedSetting
:=
&
storepb
.
WorkspaceMemoRelatedSetting
{}
if
err
:=
protojson
.
Unmarshal
([]
byte
(
valueString
),
memoRelatedSetting
);
err
!=
nil
{
return
nil
,
err
}
workspaceSetting
.
Value
=
&
storepb
.
WorkspaceSetting_MemoRelatedSetting
{
MemoRelatedSetting
:
memoRelatedSetting
}
}
else
if
workspaceSetting
.
Key
==
storepb
.
WorkspaceSettingKey_WORKSPACE_SETTING_TELEGRAM_INTEGRATION
{
telegramIntegrationSetting
:=
&
storepb
.
WorkspaceTelegramIntegrationSetting
{}
if
err
:=
protojson
.
Unmarshal
([]
byte
(
valueString
),
telegramIntegrationSetting
);
err
!=
nil
{
return
nil
,
err
}
workspaceSetting
.
Value
=
&
storepb
.
WorkspaceSetting_TelegramIntegrationSetting
{
TelegramIntegrationSetting
:
telegramIntegrationSetting
}
}
else
{
}
else
{
// Skip unknown workspace setting key.
// Skip unknown workspace setting key.
continue
continue
...
...
store/db/postgres/workspace_setting.go
View file @
71c39ed5
...
@@ -2,8 +2,10 @@ package postgres
...
@@ -2,8 +2,10 @@ package postgres
import
(
import
(
"context"
"context"
"fmt"
"strings"
"strings"
"github.com/pkg/errors"
"google.golang.org/protobuf/encoding/protojson"
"google.golang.org/protobuf/encoding/protojson"
storepb
"github.com/usememos/memos/proto/gen/store"
storepb
"github.com/usememos/memos/proto/gen/store"
...
@@ -82,14 +84,23 @@ func (d *DB) UpsertWorkspaceSettingV1(ctx context.Context, upsert *storepb.Works
...
@@ -82,14 +84,23 @@ func (d *DB) UpsertWorkspaceSettingV1(ctx context.Context, upsert *storepb.Works
VALUES ($1, $2, '')
VALUES ($1, $2, '')
ON CONFLICT(name) DO UPDATE
ON CONFLICT(name) DO UPDATE
SET value = EXCLUDED.value`
SET value = EXCLUDED.value`
var
valueString
string
var
valueBytes
[]
byte
var
err
error
if
upsert
.
Key
==
storepb
.
WorkspaceSettingKey_WORKSPACE_SETTING_GENERAL
{
if
upsert
.
Key
==
storepb
.
WorkspaceSettingKey_WORKSPACE_SETTING_GENERAL
{
valueBytes
,
err
:=
protojson
.
Marshal
(
upsert
.
GetGeneralSetting
())
valueBytes
,
err
=
protojson
.
Marshal
(
upsert
.
GetGeneralSetting
())
if
err
!=
nil
{
}
else
if
upsert
.
Key
==
storepb
.
WorkspaceSettingKey_WORKSPACE_SETTING_STORAGE
{
return
nil
,
err
valueBytes
,
err
=
protojson
.
Marshal
(
upsert
.
GetStorageSetting
())
}
}
else
if
upsert
.
Key
==
storepb
.
WorkspaceSettingKey_WORKSPACE_SETTING_MEMO_RELATED
{
valueString
=
string
(
valueBytes
)
valueBytes
,
err
=
protojson
.
Marshal
(
upsert
.
GetMemoRelatedSetting
())
}
else
if
upsert
.
Key
==
storepb
.
WorkspaceSettingKey_WORKSPACE_SETTING_TELEGRAM_INTEGRATION
{
valueBytes
,
err
=
protojson
.
Marshal
(
upsert
.
GetTelegramIntegrationSetting
())
}
else
{
return
nil
,
errors
.
New
(
fmt
.
Sprintf
(
"unsupported workspace setting key: %s"
,
upsert
.
Key
.
String
()))
}
}
if
err
!=
nil
{
return
nil
,
errors
.
Wrap
(
err
,
"failed to marshal workspace setting value"
)
}
valueString
:=
string
(
valueBytes
)
if
_
,
err
:=
d
.
db
.
ExecContext
(
ctx
,
stmt
,
upsert
.
Key
.
String
(),
valueString
);
err
!=
nil
{
if
_
,
err
:=
d
.
db
.
ExecContext
(
ctx
,
stmt
,
upsert
.
Key
.
String
(),
valueString
);
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
...
@@ -127,6 +138,24 @@ func (d *DB) ListWorkspaceSettingsV1(ctx context.Context, find *store.FindWorksp
...
@@ -127,6 +138,24 @@ func (d *DB) ListWorkspaceSettingsV1(ctx context.Context, find *store.FindWorksp
return
nil
,
err
return
nil
,
err
}
}
workspaceSetting
.
Value
=
&
storepb
.
WorkspaceSetting_GeneralSetting
{
GeneralSetting
:
generalSetting
}
workspaceSetting
.
Value
=
&
storepb
.
WorkspaceSetting_GeneralSetting
{
GeneralSetting
:
generalSetting
}
}
else
if
workspaceSetting
.
Key
==
storepb
.
WorkspaceSettingKey_WORKSPACE_SETTING_STORAGE
{
storageSetting
:=
&
storepb
.
WorkspaceStorageSetting
{}
if
err
:=
protojson
.
Unmarshal
([]
byte
(
valueString
),
storageSetting
);
err
!=
nil
{
return
nil
,
err
}
workspaceSetting
.
Value
=
&
storepb
.
WorkspaceSetting_StorageSetting
{
StorageSetting
:
storageSetting
}
}
else
if
workspaceSetting
.
Key
==
storepb
.
WorkspaceSettingKey_WORKSPACE_SETTING_MEMO_RELATED
{
memoRelatedSetting
:=
&
storepb
.
WorkspaceMemoRelatedSetting
{}
if
err
:=
protojson
.
Unmarshal
([]
byte
(
valueString
),
memoRelatedSetting
);
err
!=
nil
{
return
nil
,
err
}
workspaceSetting
.
Value
=
&
storepb
.
WorkspaceSetting_MemoRelatedSetting
{
MemoRelatedSetting
:
memoRelatedSetting
}
}
else
if
workspaceSetting
.
Key
==
storepb
.
WorkspaceSettingKey_WORKSPACE_SETTING_TELEGRAM_INTEGRATION
{
telegramIntegrationSetting
:=
&
storepb
.
WorkspaceTelegramIntegrationSetting
{}
if
err
:=
protojson
.
Unmarshal
([]
byte
(
valueString
),
telegramIntegrationSetting
);
err
!=
nil
{
return
nil
,
err
}
workspaceSetting
.
Value
=
&
storepb
.
WorkspaceSetting_TelegramIntegrationSetting
{
TelegramIntegrationSetting
:
telegramIntegrationSetting
}
}
else
{
}
else
{
// Skip unknown workspace setting key.
// Skip unknown workspace setting key.
continue
continue
...
...
store/db/sqlite/workspace_setting.go
View file @
71c39ed5
...
@@ -2,8 +2,10 @@ package sqlite
...
@@ -2,8 +2,10 @@ package sqlite
import
(
import
(
"context"
"context"
"fmt"
"strings"
"strings"
"github.com/pkg/errors"
"google.golang.org/protobuf/encoding/protojson"
"google.golang.org/protobuf/encoding/protojson"
storepb
"github.com/usememos/memos/proto/gen/store"
storepb
"github.com/usememos/memos/proto/gen/store"
...
@@ -82,14 +84,23 @@ func (d *DB) UpsertWorkspaceSettingV1(ctx context.Context, upsert *storepb.Works
...
@@ -82,14 +84,23 @@ func (d *DB) UpsertWorkspaceSettingV1(ctx context.Context, upsert *storepb.Works
VALUES (?, ?)
VALUES (?, ?)
ON CONFLICT(name) DO UPDATE
ON CONFLICT(name) DO UPDATE
SET value = EXCLUDED.value`
SET value = EXCLUDED.value`
var
valueString
string
var
valueBytes
[]
byte
var
err
error
if
upsert
.
Key
==
storepb
.
WorkspaceSettingKey_WORKSPACE_SETTING_GENERAL
{
if
upsert
.
Key
==
storepb
.
WorkspaceSettingKey_WORKSPACE_SETTING_GENERAL
{
valueBytes
,
err
:=
protojson
.
Marshal
(
upsert
.
GetGeneralSetting
())
valueBytes
,
err
=
protojson
.
Marshal
(
upsert
.
GetGeneralSetting
())
if
err
!=
nil
{
}
else
if
upsert
.
Key
==
storepb
.
WorkspaceSettingKey_WORKSPACE_SETTING_STORAGE
{
return
nil
,
err
valueBytes
,
err
=
protojson
.
Marshal
(
upsert
.
GetStorageSetting
())
}
}
else
if
upsert
.
Key
==
storepb
.
WorkspaceSettingKey_WORKSPACE_SETTING_MEMO_RELATED
{
valueString
=
string
(
valueBytes
)
valueBytes
,
err
=
protojson
.
Marshal
(
upsert
.
GetMemoRelatedSetting
())
}
else
if
upsert
.
Key
==
storepb
.
WorkspaceSettingKey_WORKSPACE_SETTING_TELEGRAM_INTEGRATION
{
valueBytes
,
err
=
protojson
.
Marshal
(
upsert
.
GetTelegramIntegrationSetting
())
}
else
{
return
nil
,
errors
.
New
(
fmt
.
Sprintf
(
"unsupported workspace setting key: %s"
,
upsert
.
Key
.
String
()))
}
if
err
!=
nil
{
return
nil
,
errors
.
Wrap
(
err
,
"failed to marshal workspace setting value"
)
}
}
valueString
:=
string
(
valueBytes
)
if
_
,
err
:=
d
.
db
.
ExecContext
(
ctx
,
stmt
,
upsert
.
Key
.
String
(),
valueString
);
err
!=
nil
{
if
_
,
err
:=
d
.
db
.
ExecContext
(
ctx
,
stmt
,
upsert
.
Key
.
String
(),
valueString
);
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
...
@@ -113,10 +124,7 @@ func (d *DB) ListWorkspaceSettingsV1(ctx context.Context, find *store.FindWorksp
...
@@ -113,10 +124,7 @@ func (d *DB) ListWorkspaceSettingsV1(ctx context.Context, find *store.FindWorksp
for
rows
.
Next
()
{
for
rows
.
Next
()
{
workspaceSetting
:=
&
storepb
.
WorkspaceSetting
{}
workspaceSetting
:=
&
storepb
.
WorkspaceSetting
{}
var
keyString
,
valueString
string
var
keyString
,
valueString
string
if
err
:=
rows
.
Scan
(
if
err
:=
rows
.
Scan
(
&
keyString
,
&
valueString
);
err
!=
nil
{
&
keyString
,
&
valueString
,
);
err
!=
nil
{
return
nil
,
err
return
nil
,
err
}
}
workspaceSetting
.
Key
=
storepb
.
WorkspaceSettingKey
(
storepb
.
WorkspaceSettingKey_value
[
keyString
])
workspaceSetting
.
Key
=
storepb
.
WorkspaceSettingKey
(
storepb
.
WorkspaceSettingKey_value
[
keyString
])
...
@@ -126,6 +134,24 @@ func (d *DB) ListWorkspaceSettingsV1(ctx context.Context, find *store.FindWorksp
...
@@ -126,6 +134,24 @@ func (d *DB) ListWorkspaceSettingsV1(ctx context.Context, find *store.FindWorksp
return
nil
,
err
return
nil
,
err
}
}
workspaceSetting
.
Value
=
&
storepb
.
WorkspaceSetting_GeneralSetting
{
GeneralSetting
:
generalSetting
}
workspaceSetting
.
Value
=
&
storepb
.
WorkspaceSetting_GeneralSetting
{
GeneralSetting
:
generalSetting
}
}
else
if
workspaceSetting
.
Key
==
storepb
.
WorkspaceSettingKey_WORKSPACE_SETTING_STORAGE
{
storageSetting
:=
&
storepb
.
WorkspaceStorageSetting
{}
if
err
:=
protojson
.
Unmarshal
([]
byte
(
valueString
),
storageSetting
);
err
!=
nil
{
return
nil
,
err
}
workspaceSetting
.
Value
=
&
storepb
.
WorkspaceSetting_StorageSetting
{
StorageSetting
:
storageSetting
}
}
else
if
workspaceSetting
.
Key
==
storepb
.
WorkspaceSettingKey_WORKSPACE_SETTING_MEMO_RELATED
{
memoRelatedSetting
:=
&
storepb
.
WorkspaceMemoRelatedSetting
{}
if
err
:=
protojson
.
Unmarshal
([]
byte
(
valueString
),
memoRelatedSetting
);
err
!=
nil
{
return
nil
,
err
}
workspaceSetting
.
Value
=
&
storepb
.
WorkspaceSetting_MemoRelatedSetting
{
MemoRelatedSetting
:
memoRelatedSetting
}
}
else
if
workspaceSetting
.
Key
==
storepb
.
WorkspaceSettingKey_WORKSPACE_SETTING_TELEGRAM_INTEGRATION
{
telegramIntegrationSetting
:=
&
storepb
.
WorkspaceTelegramIntegrationSetting
{}
if
err
:=
protojson
.
Unmarshal
([]
byte
(
valueString
),
telegramIntegrationSetting
);
err
!=
nil
{
return
nil
,
err
}
workspaceSetting
.
Value
=
&
storepb
.
WorkspaceSetting_TelegramIntegrationSetting
{
TelegramIntegrationSetting
:
telegramIntegrationSetting
}
}
else
{
}
else
{
// Skip unknown workspace setting key.
// Skip unknown workspace setting key.
continue
continue
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment