Documentation
¶
Index ¶
- func ClearUserPublicProfileCache()
- func CloseUpdateUserLastActiveTime() error
- func CreateUser(username, password, email string, needValid bool) (*users.EntityComplete, error)
- func FirstUserInit(adminUser *users.EntityComplete)
- func GenerateGooseNickname() string
- func GetUserCard(userID uint64) (*vo.UserCard, bool)
- func GetUserHoverCard(userID uint64) (*vo.UserHoverCard, bool)
- func GetUserRoleId(userID uint64) (uint64, bool)
- func GetUserShow(userID uint64) *vo.UserInfoShow
- func GetWelcomeArticleContent() string
- func InvalidateUserPublicProfileCache(userID uint64)
- func RefreshUserCaches(userEntity *users.EntityComplete)
- func SaveUser(userEntity *users.EntityComplete) error
- func UpdateUserActivity(userID uint64)
- func UpdateUserActivityAt(userID uint64, activeTime time.Time)
- type UserInfo
- type UserPublicInfo
- type UserPublicProfile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClearUserPublicProfileCache ¶ added in v0.2.15
func ClearUserPublicProfileCache()
func CloseUpdateUserLastActiveTime ¶ added in v0.0.7
func CloseUpdateUserLastActiveTime() error
CloseUpdateUserLastActiveTime stops the global activity cache and flushes current activity.
func CreateUser ¶ added in v0.0.9
func CreateUser(username, password, email string, needValid bool) (*users.EntityComplete, error)
func FirstUserInit ¶
func FirstUserInit(adminUser *users.EntityComplete)
func GenerateGooseNickname ¶ added in v0.0.9
func GenerateGooseNickname() string
GenerateGooseNickname creates a compact random default nickname.
func GetUserHoverCard ¶ added in v0.2.15
func GetUserHoverCard(userID uint64) (*vo.UserHoverCard, bool)
func GetUserRoleId ¶ added in v0.2.15
func GetUserShow ¶ added in v0.2.15
func GetUserShow(userID uint64) *vo.UserInfoShow
func GetWelcomeArticleContent ¶ added in v0.2.15
func GetWelcomeArticleContent() string
func InvalidateUserPublicProfileCache ¶ added in v0.2.15
func InvalidateUserPublicProfileCache(userID uint64)
func RefreshUserCaches ¶ added in v0.2.15
func RefreshUserCaches(userEntity *users.EntityComplete)
func SaveUser ¶ added in v0.2.11
func SaveUser(userEntity *users.EntityComplete) error
func UpdateUserActivity ¶ added in v0.0.7
func UpdateUserActivity(userID uint64)
UpdateUserActivity queues a global user activity update.
func UpdateUserActivityAt ¶ added in v0.2.9
Types ¶
type UserInfo ¶ added in v0.2.15
type UserInfo struct {
Id uint64
Username string
Email string
IsFrozen int8
IsActivated int8
ActivatedAt *time.Time
Nickname string
RoleId uint64
Prestige int64
AvatarUrl string
Bio string
Signature string
WebsiteName string
Website string
ExternalInformation users.ExternalInformation
CreatedAt time.Time
UpdatedAt time.Time
}
UserInfo is the sanitized user snapshot cached by userservice. It intentionally excludes password hashes and model-only deletion metadata.
func GetUserInfo ¶ added in v0.2.15
type UserPublicInfo ¶ added in v0.2.15
type UserPublicInfo struct {
Id uint64
Username string
Nickname string
RoleId uint64
AvatarUrl string
Bio string
Signature string
WebsiteName string
Website string
ExternalInformation users.ExternalInformation
CreatedAt time.Time
}
UserPublicInfo contains only fields needed by public display surfaces.
type UserPublicProfile ¶ added in v0.2.15
type UserPublicProfile struct {
User UserPublicInfo
Stats userStatistics.Entity
Badges []badgeservice.UserBadge
}
func GetUserPublicProfile ¶ added in v0.2.15
func GetUserPublicProfile(userID uint64) (UserPublicProfile, bool)
Click to show internal directories.
Click to hide internal directories.