mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
refactor: move tags from property to payload (#4229)
* refactor: move tags from property to payload * chore: fix tests * chore: drop memo tags * chore: update --------- Co-authored-by: Steven <stevenlgtm@gmail.com>
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.35.2
|
||||
// protoc-gen-go v1.36.0
|
||||
// protoc (unknown)
|
||||
// source: api/v1/workspace_setting_service.proto
|
||||
|
||||
@ -77,19 +77,18 @@ func (WorkspaceStorageSetting_StorageType) EnumDescriptor() ([]byte, []int) {
|
||||
}
|
||||
|
||||
type WorkspaceSetting struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// name is the name of the setting.
|
||||
// Format: settings/{setting}
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
// Types that are assignable to Value:
|
||||
// Types that are valid to be assigned to Value:
|
||||
//
|
||||
// *WorkspaceSetting_GeneralSetting
|
||||
// *WorkspaceSetting_StorageSetting
|
||||
// *WorkspaceSetting_MemoRelatedSetting
|
||||
Value isWorkspaceSetting_Value `protobuf_oneof:"value"`
|
||||
Value isWorkspaceSetting_Value `protobuf_oneof:"value"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *WorkspaceSetting) Reset() {
|
||||
@ -129,30 +128,36 @@ func (x *WorkspaceSetting) GetName() string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *WorkspaceSetting) GetValue() isWorkspaceSetting_Value {
|
||||
if m != nil {
|
||||
return m.Value
|
||||
func (x *WorkspaceSetting) GetValue() isWorkspaceSetting_Value {
|
||||
if x != nil {
|
||||
return x.Value
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *WorkspaceSetting) GetGeneralSetting() *WorkspaceGeneralSetting {
|
||||
if x, ok := x.GetValue().(*WorkspaceSetting_GeneralSetting); ok {
|
||||
return x.GeneralSetting
|
||||
if x != nil {
|
||||
if x, ok := x.Value.(*WorkspaceSetting_GeneralSetting); ok {
|
||||
return x.GeneralSetting
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *WorkspaceSetting) GetStorageSetting() *WorkspaceStorageSetting {
|
||||
if x, ok := x.GetValue().(*WorkspaceSetting_StorageSetting); ok {
|
||||
return x.StorageSetting
|
||||
if x != nil {
|
||||
if x, ok := x.Value.(*WorkspaceSetting_StorageSetting); ok {
|
||||
return x.StorageSetting
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *WorkspaceSetting) GetMemoRelatedSetting() *WorkspaceMemoRelatedSetting {
|
||||
if x, ok := x.GetValue().(*WorkspaceSetting_MemoRelatedSetting); ok {
|
||||
return x.MemoRelatedSetting
|
||||
if x != nil {
|
||||
if x, ok := x.Value.(*WorkspaceSetting_MemoRelatedSetting); ok {
|
||||
return x.MemoRelatedSetting
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@ -180,10 +185,7 @@ func (*WorkspaceSetting_StorageSetting) isWorkspaceSetting_Value() {}
|
||||
func (*WorkspaceSetting_MemoRelatedSetting) isWorkspaceSetting_Value() {}
|
||||
|
||||
type WorkspaceGeneralSetting struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// disallow_user_registration disallows user registration.
|
||||
DisallowUserRegistration bool `protobuf:"varint,1,opt,name=disallow_user_registration,json=disallowUserRegistration,proto3" json:"disallow_user_registration,omitempty"`
|
||||
// disallow_password_auth disallows password authentication.
|
||||
@ -202,6 +204,8 @@ type WorkspaceGeneralSetting struct {
|
||||
DisallowChangeUsername bool `protobuf:"varint,7,opt,name=disallow_change_username,json=disallowChangeUsername,proto3" json:"disallow_change_username,omitempty"`
|
||||
// disallow_change_nickname disallows changing nickname.
|
||||
DisallowChangeNickname bool `protobuf:"varint,8,opt,name=disallow_change_nickname,json=disallowChangeNickname,proto3" json:"disallow_change_nickname,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *WorkspaceGeneralSetting) Reset() {
|
||||
@ -291,15 +295,14 @@ func (x *WorkspaceGeneralSetting) GetDisallowChangeNickname() bool {
|
||||
}
|
||||
|
||||
type WorkspaceCustomProfile struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
|
||||
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
|
||||
LogoUrl string `protobuf:"bytes,3,opt,name=logo_url,json=logoUrl,proto3" json:"logo_url,omitempty"`
|
||||
Locale string `protobuf:"bytes,4,opt,name=locale,proto3" json:"locale,omitempty"`
|
||||
Appearance string `protobuf:"bytes,5,opt,name=appearance,proto3" json:"appearance,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
|
||||
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
|
||||
LogoUrl string `protobuf:"bytes,3,opt,name=logo_url,json=logoUrl,proto3" json:"logo_url,omitempty"`
|
||||
Locale string `protobuf:"bytes,4,opt,name=locale,proto3" json:"locale,omitempty"`
|
||||
Appearance string `protobuf:"bytes,5,opt,name=appearance,proto3" json:"appearance,omitempty"`
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *WorkspaceCustomProfile) Reset() {
|
||||
@ -368,10 +371,7 @@ func (x *WorkspaceCustomProfile) GetAppearance() string {
|
||||
}
|
||||
|
||||
type WorkspaceStorageSetting struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// storage_type is the storage type.
|
||||
StorageType WorkspaceStorageSetting_StorageType `protobuf:"varint,1,opt,name=storage_type,json=storageType,proto3,enum=memos.api.v1.WorkspaceStorageSetting_StorageType" json:"storage_type,omitempty"`
|
||||
// The template of file path.
|
||||
@ -380,7 +380,9 @@ type WorkspaceStorageSetting struct {
|
||||
// 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"`
|
||||
// The S3 config.
|
||||
S3Config *WorkspaceStorageSetting_S3Config `protobuf:"bytes,4,opt,name=s3_config,json=s3Config,proto3" json:"s3_config,omitempty"`
|
||||
S3Config *WorkspaceStorageSetting_S3Config `protobuf:"bytes,4,opt,name=s3_config,json=s3Config,proto3" json:"s3_config,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *WorkspaceStorageSetting) Reset() {
|
||||
@ -442,10 +444,7 @@ func (x *WorkspaceStorageSetting) GetS3Config() *WorkspaceStorageSetting_S3Confi
|
||||
}
|
||||
|
||||
type WorkspaceMemoRelatedSetting struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// disallow_public_visibility disallows set memo as public visibility.
|
||||
DisallowPublicVisibility bool `protobuf:"varint,1,opt,name=disallow_public_visibility,json=disallowPublicVisibility,proto3" json:"disallow_public_visibility,omitempty"`
|
||||
// display_with_update_time orders and displays memo with update time.
|
||||
@ -468,6 +467,8 @@ type WorkspaceMemoRelatedSetting struct {
|
||||
Reactions []string `protobuf:"bytes,10,rep,name=reactions,proto3" json:"reactions,omitempty"`
|
||||
// disable_markdown_shortcuts disallow the registration of markdown shortcuts.
|
||||
DisableMarkdownShortcuts bool `protobuf:"varint,11,opt,name=disable_markdown_shortcuts,json=disableMarkdownShortcuts,proto3" json:"disable_markdown_shortcuts,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *WorkspaceMemoRelatedSetting) Reset() {
|
||||
@ -578,13 +579,12 @@ func (x *WorkspaceMemoRelatedSetting) GetDisableMarkdownShortcuts() bool {
|
||||
}
|
||||
|
||||
type GetWorkspaceSettingRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// The resource name of the workspace setting.
|
||||
// Format: settings/{setting}
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *GetWorkspaceSettingRequest) Reset() {
|
||||
@ -625,12 +625,11 @@ func (x *GetWorkspaceSettingRequest) GetName() string {
|
||||
}
|
||||
|
||||
type SetWorkspaceSettingRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
// setting is the setting to update.
|
||||
Setting *WorkspaceSetting `protobuf:"bytes,1,opt,name=setting,proto3" json:"setting,omitempty"`
|
||||
Setting *WorkspaceSetting `protobuf:"bytes,1,opt,name=setting,proto3" json:"setting,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *SetWorkspaceSettingRequest) Reset() {
|
||||
@ -672,15 +671,14 @@ func (x *SetWorkspaceSettingRequest) GetSetting() *WorkspaceSetting {
|
||||
|
||||
// Reference: https://developers.cloudflare.com/r2/examples/aws/aws-sdk-go/
|
||||
type WorkspaceStorageSetting_S3Config struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
AccessKeyId string `protobuf:"bytes,1,opt,name=access_key_id,json=accessKeyId,proto3" json:"access_key_id,omitempty"`
|
||||
AccessKeySecret string `protobuf:"bytes,2,opt,name=access_key_secret,json=accessKeySecret,proto3" json:"access_key_secret,omitempty"`
|
||||
Endpoint string `protobuf:"bytes,3,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
|
||||
Region string `protobuf:"bytes,4,opt,name=region,proto3" json:"region,omitempty"`
|
||||
Bucket string `protobuf:"bytes,5,opt,name=bucket,proto3" json:"bucket,omitempty"`
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
AccessKeyId string `protobuf:"bytes,1,opt,name=access_key_id,json=accessKeyId,proto3" json:"access_key_id,omitempty"`
|
||||
AccessKeySecret string `protobuf:"bytes,2,opt,name=access_key_secret,json=accessKeySecret,proto3" json:"access_key_secret,omitempty"`
|
||||
Endpoint string `protobuf:"bytes,3,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
|
||||
Region string `protobuf:"bytes,4,opt,name=region,proto3" json:"region,omitempty"`
|
||||
Bucket string `protobuf:"bytes,5,opt,name=bucket,proto3" json:"bucket,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
sizeCache protoimpl.SizeCache
|
||||
}
|
||||
|
||||
func (x *WorkspaceStorageSetting_S3Config) Reset() {
|
||||
|
Reference in New Issue
Block a user