store

package
v0.17.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 19, 2023 License: MIT Imports: 4 Imported by: 8

README

Protocol Documentation

Table of Contents

Top

store/activity.proto

ActivityMemoCommentPayload
Field Type Label Description
memo_id int32
related_memo_id int32

ActivityPayload
Field Type Label Description
memo_comment ActivityMemoCommentPayload
version_update ActivityVersionUpdatePayload

ActivityVersionUpdatePayload
Field Type Label Description
version string

Top

store/common.proto

Top

store/inbox.proto

InboxMessage
Field Type Label Description
type InboxMessage.Type
activity_id int32 optional

InboxMessage.Type
Name Number Description
TYPE_UNSPECIFIED 0
TYPE_MEMO_COMMENT 1
TYPE_VERSION_UPDATE 2

Top

store/system_setting.proto

BackupConfig
Field Type Label Description
enabled bool enabled indicates whether backup is enabled.
cron string cron is the cron expression for backup. See https://godoc.org/github.com/robfig/cron#hdr-CRON_Expression_Format
max_keep int32 max_keep is the maximum number of backups to keep.

SystemSettingKey
Name Number Description
SYSTEM_SETTING_KEY_UNSPECIFIED 0
BACKUP_CONFIG 1 BackupConfig is the key for auto-backup configuration.

Top

store/user_setting.proto

AccessTokensUserSetting
Field Type Label Description
access_tokens AccessTokensUserSetting.AccessToken repeated

AccessTokensUserSetting.AccessToken
Field Type Label Description
access_token string The access token is a JWT token. Including expiration time, issuer, etc.
description string A description for the access token.

UserSetting
Field Type Label Description
user_id int32
key UserSettingKey
access_tokens AccessTokensUserSetting

UserSettingKey
Name Number Description
USER_SETTING_KEY_UNSPECIFIED 0
USER_SETTING_ACCESS_TOKENS 1 Access tokens for the user.

Scalar Value Types

.proto Type Notes C++ Java Python Go C# PHP Ruby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InboxMessage_Type_name = map[int32]string{
		0: "TYPE_UNSPECIFIED",
		1: "TYPE_MEMO_COMMENT",
		2: "TYPE_VERSION_UPDATE",
	}
	InboxMessage_Type_value = map[string]int32{
		"TYPE_UNSPECIFIED":    0,
		"TYPE_MEMO_COMMENT":   1,
		"TYPE_VERSION_UPDATE": 2,
	}
)

Enum value maps for InboxMessage_Type.

View Source
var (
	SystemSettingKey_name = map[int32]string{
		0: "SYSTEM_SETTING_KEY_UNSPECIFIED",
		1: "BACKUP_CONFIG",
	}
	SystemSettingKey_value = map[string]int32{
		"SYSTEM_SETTING_KEY_UNSPECIFIED": 0,
		"BACKUP_CONFIG":                  1,
	}
)

Enum value maps for SystemSettingKey.

View Source
var (
	UserSettingKey_name = map[int32]string{
		0: "USER_SETTING_KEY_UNSPECIFIED",
		1: "USER_SETTING_ACCESS_TOKENS",
	}
	UserSettingKey_value = map[string]int32{
		"USER_SETTING_KEY_UNSPECIFIED": 0,
		"USER_SETTING_ACCESS_TOKENS":   1,
	}
)

Enum value maps for UserSettingKey.

View Source
var File_store_activity_proto protoreflect.FileDescriptor
View Source
var File_store_common_proto protoreflect.FileDescriptor
View Source
var File_store_inbox_proto protoreflect.FileDescriptor
View Source
var File_store_system_setting_proto protoreflect.FileDescriptor
View Source
var File_store_user_setting_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type AccessTokensUserSetting

type AccessTokensUserSetting struct {
	AccessTokens []*AccessTokensUserSetting_AccessToken `protobuf:"bytes,1,rep,name=access_tokens,json=accessTokens,proto3" json:"access_tokens,omitempty"`
	// contains filtered or unexported fields
}

func (*AccessTokensUserSetting) Descriptor deprecated

func (*AccessTokensUserSetting) Descriptor() ([]byte, []int)

Deprecated: Use AccessTokensUserSetting.ProtoReflect.Descriptor instead.

func (*AccessTokensUserSetting) GetAccessTokens

func (*AccessTokensUserSetting) ProtoMessage

func (*AccessTokensUserSetting) ProtoMessage()

func (*AccessTokensUserSetting) ProtoReflect

func (x *AccessTokensUserSetting) ProtoReflect() protoreflect.Message

func (*AccessTokensUserSetting) Reset

func (x *AccessTokensUserSetting) Reset()

func (*AccessTokensUserSetting) String

func (x *AccessTokensUserSetting) String() string

type AccessTokensUserSetting_AccessToken

type AccessTokensUserSetting_AccessToken struct {

	// The access token is a JWT token.
	// Including expiration time, issuer, etc.
	AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"`
	// A description for the access token.
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

func (*AccessTokensUserSetting_AccessToken) Descriptor deprecated

func (*AccessTokensUserSetting_AccessToken) Descriptor() ([]byte, []int)

Deprecated: Use AccessTokensUserSetting_AccessToken.ProtoReflect.Descriptor instead.

func (*AccessTokensUserSetting_AccessToken) GetAccessToken

func (x *AccessTokensUserSetting_AccessToken) GetAccessToken() string

func (*AccessTokensUserSetting_AccessToken) GetDescription

func (x *AccessTokensUserSetting_AccessToken) GetDescription() string

func (*AccessTokensUserSetting_AccessToken) ProtoMessage

func (*AccessTokensUserSetting_AccessToken) ProtoMessage()

func (*AccessTokensUserSetting_AccessToken) ProtoReflect

func (*AccessTokensUserSetting_AccessToken) Reset

func (*AccessTokensUserSetting_AccessToken) String

type ActivityMemoCommentPayload added in v0.17.0

type ActivityMemoCommentPayload struct {
	MemoId        int32 `protobuf:"varint,1,opt,name=memo_id,json=memoId,proto3" json:"memo_id,omitempty"`
	RelatedMemoId int32 `protobuf:"varint,2,opt,name=related_memo_id,json=relatedMemoId,proto3" json:"related_memo_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ActivityMemoCommentPayload) Descriptor deprecated added in v0.17.0

func (*ActivityMemoCommentPayload) Descriptor() ([]byte, []int)

Deprecated: Use ActivityMemoCommentPayload.ProtoReflect.Descriptor instead.

func (*ActivityMemoCommentPayload) GetMemoId added in v0.17.0

func (x *ActivityMemoCommentPayload) GetMemoId() int32

func (*ActivityMemoCommentPayload) GetRelatedMemoId added in v0.17.0

func (x *ActivityMemoCommentPayload) GetRelatedMemoId() int32

func (*ActivityMemoCommentPayload) ProtoMessage added in v0.17.0

func (*ActivityMemoCommentPayload) ProtoMessage()

func (*ActivityMemoCommentPayload) ProtoReflect added in v0.17.0

func (*ActivityMemoCommentPayload) Reset added in v0.17.0

func (x *ActivityMemoCommentPayload) Reset()

func (*ActivityMemoCommentPayload) String added in v0.17.0

func (x *ActivityMemoCommentPayload) String() string

type ActivityPayload added in v0.17.0

type ActivityPayload struct {
	MemoComment   *ActivityMemoCommentPayload   `protobuf:"bytes,1,opt,name=memo_comment,json=memoComment,proto3" json:"memo_comment,omitempty"`
	VersionUpdate *ActivityVersionUpdatePayload `protobuf:"bytes,2,opt,name=version_update,json=versionUpdate,proto3" json:"version_update,omitempty"`
	// contains filtered or unexported fields
}

func (*ActivityPayload) Descriptor deprecated added in v0.17.0

func (*ActivityPayload) Descriptor() ([]byte, []int)

Deprecated: Use ActivityPayload.ProtoReflect.Descriptor instead.

func (*ActivityPayload) GetMemoComment added in v0.17.0

func (x *ActivityPayload) GetMemoComment() *ActivityMemoCommentPayload

func (*ActivityPayload) GetVersionUpdate added in v0.17.1

func (x *ActivityPayload) GetVersionUpdate() *ActivityVersionUpdatePayload

func (*ActivityPayload) ProtoMessage added in v0.17.0

func (*ActivityPayload) ProtoMessage()

func (*ActivityPayload) ProtoReflect added in v0.17.0

func (x *ActivityPayload) ProtoReflect() protoreflect.Message

func (*ActivityPayload) Reset added in v0.17.0

func (x *ActivityPayload) Reset()

func (*ActivityPayload) String added in v0.17.0

func (x *ActivityPayload) String() string

type ActivityVersionUpdatePayload added in v0.17.1

type ActivityVersionUpdatePayload struct {
	Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
	// contains filtered or unexported fields
}

func (*ActivityVersionUpdatePayload) Descriptor deprecated added in v0.17.1

func (*ActivityVersionUpdatePayload) Descriptor() ([]byte, []int)

Deprecated: Use ActivityVersionUpdatePayload.ProtoReflect.Descriptor instead.

func (*ActivityVersionUpdatePayload) GetVersion added in v0.17.1

func (x *ActivityVersionUpdatePayload) GetVersion() string

func (*ActivityVersionUpdatePayload) ProtoMessage added in v0.17.1

func (*ActivityVersionUpdatePayload) ProtoMessage()

func (*ActivityVersionUpdatePayload) ProtoReflect added in v0.17.1

func (*ActivityVersionUpdatePayload) Reset added in v0.17.1

func (x *ActivityVersionUpdatePayload) Reset()

func (*ActivityVersionUpdatePayload) String added in v0.17.1

type BackupConfig

type BackupConfig struct {

	// enabled indicates whether backup is enabled.
	Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"`
	// cron is the cron expression for backup. See https://godoc.org/github.com/robfig/cron#hdr-CRON_Expression_Format
	Cron string `protobuf:"bytes,2,opt,name=cron,proto3" json:"cron,omitempty"`
	// max_keep is the maximum number of backups to keep.
	MaxKeep int32 `protobuf:"varint,3,opt,name=max_keep,json=maxKeep,proto3" json:"max_keep,omitempty"`
	// contains filtered or unexported fields
}

func (*BackupConfig) Descriptor deprecated

func (*BackupConfig) Descriptor() ([]byte, []int)

Deprecated: Use BackupConfig.ProtoReflect.Descriptor instead.

func (*BackupConfig) GetCron

func (x *BackupConfig) GetCron() string

func (*BackupConfig) GetEnabled

func (x *BackupConfig) GetEnabled() bool

func (*BackupConfig) GetMaxKeep

func (x *BackupConfig) GetMaxKeep() int32

func (*BackupConfig) ProtoMessage

func (*BackupConfig) ProtoMessage()

func (*BackupConfig) ProtoReflect

func (x *BackupConfig) ProtoReflect() protoreflect.Message

func (*BackupConfig) Reset

func (x *BackupConfig) Reset()

func (*BackupConfig) String

func (x *BackupConfig) String() string

type InboxMessage added in v0.17.0

type InboxMessage struct {
	Type       InboxMessage_Type `protobuf:"varint,1,opt,name=type,proto3,enum=memos.store.InboxMessage_Type" json:"type,omitempty"`
	ActivityId *int32            `protobuf:"varint,2,opt,name=activity_id,json=activityId,proto3,oneof" json:"activity_id,omitempty"`
	// contains filtered or unexported fields
}

func (*InboxMessage) Descriptor deprecated added in v0.17.0

func (*InboxMessage) Descriptor() ([]byte, []int)

Deprecated: Use InboxMessage.ProtoReflect.Descriptor instead.

func (*InboxMessage) GetActivityId added in v0.17.0

func (x *InboxMessage) GetActivityId() int32

func (*InboxMessage) GetType added in v0.17.0

func (x *InboxMessage) GetType() InboxMessage_Type

func (*InboxMessage) ProtoMessage added in v0.17.0

func (*InboxMessage) ProtoMessage()

func (*InboxMessage) ProtoReflect added in v0.17.0

func (x *InboxMessage) ProtoReflect() protoreflect.Message

func (*InboxMessage) Reset added in v0.17.0

func (x *InboxMessage) Reset()

func (*InboxMessage) String added in v0.17.0

func (x *InboxMessage) String() string

type InboxMessage_Type added in v0.17.0

type InboxMessage_Type int32
const (
	InboxMessage_TYPE_UNSPECIFIED    InboxMessage_Type = 0
	InboxMessage_TYPE_MEMO_COMMENT   InboxMessage_Type = 1
	InboxMessage_TYPE_VERSION_UPDATE InboxMessage_Type = 2
)

func (InboxMessage_Type) Descriptor added in v0.17.0

func (InboxMessage_Type) Enum added in v0.17.0

func (InboxMessage_Type) EnumDescriptor deprecated added in v0.17.0

func (InboxMessage_Type) EnumDescriptor() ([]byte, []int)

Deprecated: Use InboxMessage_Type.Descriptor instead.

func (InboxMessage_Type) Number added in v0.17.0

func (InboxMessage_Type) String added in v0.17.0

func (x InboxMessage_Type) String() string

func (InboxMessage_Type) Type added in v0.17.0

type SystemSettingKey

type SystemSettingKey int32
const (
	SystemSettingKey_SYSTEM_SETTING_KEY_UNSPECIFIED SystemSettingKey = 0
	// BackupConfig is the key for auto-backup configuration.
	SystemSettingKey_BACKUP_CONFIG SystemSettingKey = 1
)

func (SystemSettingKey) Descriptor

func (SystemSettingKey) Enum

func (SystemSettingKey) EnumDescriptor deprecated

func (SystemSettingKey) EnumDescriptor() ([]byte, []int)

Deprecated: Use SystemSettingKey.Descriptor instead.

func (SystemSettingKey) Number

func (SystemSettingKey) String

func (x SystemSettingKey) String() string

func (SystemSettingKey) Type

type UserSetting

type UserSetting struct {
	UserId int32          `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	Key    UserSettingKey `protobuf:"varint,2,opt,name=key,proto3,enum=memos.store.UserSettingKey" json:"key,omitempty"`
	// Types that are assignable to Value:
	//
	//	*UserSetting_AccessTokens
	Value isUserSetting_Value `protobuf_oneof:"value"`
	// contains filtered or unexported fields
}

func (*UserSetting) Descriptor deprecated

func (*UserSetting) Descriptor() ([]byte, []int)

Deprecated: Use UserSetting.ProtoReflect.Descriptor instead.

func (*UserSetting) GetAccessTokens

func (x *UserSetting) GetAccessTokens() *AccessTokensUserSetting

func (*UserSetting) GetKey

func (x *UserSetting) GetKey() UserSettingKey

func (*UserSetting) GetUserId

func (x *UserSetting) GetUserId() int32

func (*UserSetting) GetValue

func (m *UserSetting) GetValue() isUserSetting_Value

func (*UserSetting) ProtoMessage

func (*UserSetting) ProtoMessage()

func (*UserSetting) ProtoReflect

func (x *UserSetting) ProtoReflect() protoreflect.Message

func (*UserSetting) Reset

func (x *UserSetting) Reset()

func (*UserSetting) String

func (x *UserSetting) String() string

type UserSettingKey

type UserSettingKey int32
const (
	UserSettingKey_USER_SETTING_KEY_UNSPECIFIED UserSettingKey = 0
	// Access tokens for the user.
	UserSettingKey_USER_SETTING_ACCESS_TOKENS UserSettingKey = 1
)

func (UserSettingKey) Descriptor

func (UserSettingKey) Enum

func (x UserSettingKey) Enum() *UserSettingKey

func (UserSettingKey) EnumDescriptor deprecated

func (UserSettingKey) EnumDescriptor() ([]byte, []int)

Deprecated: Use UserSettingKey.Descriptor instead.

func (UserSettingKey) Number

func (UserSettingKey) String

func (x UserSettingKey) String() string

func (UserSettingKey) Type

type UserSetting_AccessTokens

type UserSetting_AccessTokens struct {
	AccessTokens *AccessTokensUserSetting `protobuf:"bytes,3,opt,name=access_tokens,json=accessTokens,proto3,oneof"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL