Documentation
¶
Index ¶
- Constants
- type CreateMemoRequest
- type CreateSessionRequest
- type CreateUserRequest
- type CustomProfile
- type FindMemoFilter
- type FindSessionFilter
- type FindSystemSettingFilter
- type FindUserFilter
- type GeneralSetting
- type GetMemoRequest
- type ListMemosRequest
- type Memo
- type MemoPayload
- type MemoPayloadLocation
- type MemoPayloadProperty
- type MemoRelatedSetting
- type Reaction
- type RelationType
- type ResStorageType
- type Resource
- type Role
- type RowStatus
- type Session
- type StorageSetting
- type SystemSetting
- type SystemSettingValue
- type UpdateUserRequest
- type User
- type Visibility
Constants ¶
View Source
const ( TableMemo = "memo" TableResource = "resource" TableReaction = "reaction" TableUser = "user" TableUserSetting = "user_setting" TableSession = "session" TableSystemSetting = "system_setting" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateMemoRequest ¶
type CreateMemoRequest struct {
ParentID int64
RelationType RelationType
CreatorID int64
Content string
Payload MemoPayload `gorm:"serializer:json"`
}
type CreateSessionRequest ¶
type CreateUserRequest ¶
type CustomProfile ¶
type FindMemoFilter ¶
type FindSessionFilter ¶
type FindSystemSettingFilter ¶
type FindSystemSettingFilter struct {
db.BaseFilter
Name db.F[string]
}
type FindUserFilter ¶
type GeneralSetting ¶
type GeneralSetting struct {
// theme is the name of the selected theme.
// This references a CSS file in the web/public/themes/ directory.
Theme string
// disallow_user_registration disallows user registration.
DisallowUserRegistration bool
// disallow_password_auth disallows password authentication.
DisallowPasswordAuth bool
// additional_script is the additional script.
AdditionalScript string
// additional_style is the additional style.
AdditionalStyle string
// custom_profile is the custom profile.
CustomProfile *CustomProfile
// week_start_day_offset is the week start day offset from Sunday.
// 0: Sunday, 1: Monday, 2: Tuesday, 3: Wednesday, 4: Thursday, 5: Friday, 6: Saturday
// Default is Sunday.
WeekStartDayOffset int
// disallow_change_username disallows changing username.
DisallowChangeUsername bool
// disallow_change_nickname disallows changing nickname.
DisallowChangeNickname bool
}
type GetMemoRequest ¶
type ListMemosRequest ¶
type ListMemosRequest struct {
Status RowStatus
VisibilityList []Visibility
ExcludeContent bool
ExcludeComments bool
}
type Memo ¶
type Memo struct {
db.Model
UID string
ParentID int64
RelationType RelationType
CreatorID int64
Content string
Payload MemoPayload `gorm:"serializer:json"`
Tags []string `gorm:"serializer:json"`
Pinned bool
Visibility Visibility
Status string
}
Memo 笔记
type MemoPayload ¶
type MemoPayload struct {
Property *MemoPayloadProperty `json:"property"`
Location *MemoPayloadLocation `json:"location"`
Tags []string `json:"tags"`
}
type MemoPayloadLocation ¶
type MemoPayloadProperty ¶
type MemoRelatedSetting ¶
type MemoRelatedSetting struct {
// disallow_public_visibility disallows set memo as public visibility.
DisallowPublicVisibility bool
// display_with_update_time orders and displays memo with update time.
DisplayWithUpdateTime bool
// content_length_limit is the limit of content length. Unit is byte.
ContentLengthLimit int
// enable_double_click_edit enables editing on double click.
EnableDoubleClickEdit bool
// enable_link_preview enables links preview.
EnableLinkPreview bool
// reactions is the list of reactions.
Reactions []string
// disable_markdown_shortcuts disallow the registration of markdown shortcuts.
DisableMarkdownShortcuts bool
// enable_blur_nsfw_content enables blurring of content marked as not safe for work (NSFW).
EnableBlurNsfwContent bool
// nsfw_tags is the list of tags that mark content as NSFW for blurring.
NsfwTags []string
}
type RelationType ¶
type RelationType string
const ( RelationReference RelationType = "REFERENCE" RelationComment RelationType = "COMMENT" )
type ResStorageType ¶
type ResStorageType string
const ( ResStorageTypeLocal ResStorageType = "LOCAL" ResourceStorageTypeS3 ResStorageType = "S3" ResourceStorageTypeExternal ResStorageType = "EXTERNAL" )
type Resource ¶
type StorageSetting ¶
type StorageSetting struct {
}
type SystemSetting ¶
type SystemSetting struct {
Name string
Value SystemSettingValue `gorm:"serializer:json"`
Description string
}
func (SystemSetting) TableName ¶
func (SystemSetting) TableName() string
type SystemSettingValue ¶
type SystemSettingValue struct {
*GeneralSetting
*StorageSetting
*MemoRelatedSetting
}
type UpdateUserRequest ¶
type User ¶
type Visibility ¶
type Visibility string
Visibility is the type of a visibility.
const ( // Public is the PUBLIC visibility. Public Visibility = "PUBLIC" // Protected is the PROTECTED visibility. Protected Visibility = "PROTECTED" // Private is the PRIVATE visibility. Private Visibility = "PRIVATE" )
func (Visibility) String ¶
func (v Visibility) String() string
Click to show internal directories.
Click to hide internal directories.