Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArticleJSONLD ¶ added in v0.1.1
type ArticleJSONLD struct {
Context string `json:"@context"`
Type string `json:"@type"`
Headline string `json:"headline"`
Author Person `json:"author"`
Publisher Organization `json:"publisher"`
DatePublished string `json:"datePublished"`
URL string `json:"url"`
InteractionStatistic InteractionCounter `json:"interactionStatistic"`
}
ArticleJSONLD is the structured data payload embedded on article detail pages.
type ArticlesSimpleVo ¶ added in v0.1.1
type ArticlesSimpleVo struct {
Id uint64 `json:"id"`
Title string `json:"title,omitempty"`
Description string `json:"description,omitempty"`
Content string `json:"content,omitempty"`
CreateTime string `json:"createTime,omitempty"`
LastUpdateTime string `json:"lastUpdateTime,omitempty"`
Username string `json:"username,omitempty"`
AuthorId uint64 `json:"authorId,omitempty"`
ViewCount uint64 `json:"viewCount"`
CommentCount uint64 `json:"commentCount"`
Type int8 `json:"type,omitempty"`
TypeStr string `json:"typeStr,omitempty"`
Categories []string `json:"categories,omitempty"`
CategoriesId []uint64 `json:"categoriesId,omitempty"`
AvatarUrl string `json:"avatarUrl,omitempty"`
Posters []PosterVo `json:"posters,omitempty"`
}
ArticlesSimpleVo is the compact article payload used by list views and feed-like responses.
type ChatItemVo ¶ added in v0.1.1
type ChatItemVo struct {
Id uint64 `json:"id"` // user_chat_config id
PeerId uint64 `json:"peerId"`
PeerUsername string `json:"peerUsername"`
PeerAvatar string `json:"peerAvatar"`
LastMsg string `json:"lastMsg"`
LastMsgTime string `json:"lastMsgTime"`
UnreadCount uint `json:"unreadCount"`
ConvId uint64 `json:"convId"`
}
ChatItemVo summarizes one conversation in the messages list.
type InteractionCounter ¶ added in v0.1.1
type InteractionCounter struct {
Type string `json:"@type"`
InteractionType string `json:"interactionType"`
UserInteractionCount uint64 `json:"userInteractionCount"`
}
InteractionCounter represents schema.org interaction statistics for an article.
type MessageVo ¶ added in v0.1.1
type MessageVo struct {
Id uint64 `json:"id"`
SenderId uint64 `json:"senderId"`
Content string `json:"content"`
MsgType int8 `json:"msgType"`
IsRead int `json:"isRead"`
CreatedAt string `json:"createdAt"`
IsSelf bool `json:"isSelf"`
}
MessageVo represents one chat message decorated for the current viewer.
type Organization ¶ added in v0.1.1
type Organization struct {
Type string `json:"@type"`
Name string `json:"name"`
URL string `json:"url,omitempty"`
}
Organization represents a schema.org Organization node in JSON-LD output.
type Person ¶ added in v0.1.1
type Person struct {
Type string `json:"@type"`
Name string `json:"name"`
URL string `json:"url,omitempty"`
}
Person represents a schema.org Person node in JSON-LD output.
type PosterVo ¶ added in v0.1.1
type PosterVo struct {
Id uint64 `json:"id"`
Username string `json:"username"`
AvatarUrl string `json:"avatarUrl"`
}
PosterVo is a lightweight user summary attached to compact article responses.
type RegReq ¶ added in v0.0.9
type RegReq struct {
Email string `json:"email" validate:"required,email"`
Username string `json:"userName" validate:"required"`
Password string `json:"passWord" validate:"required"`
InvitationCode string `json:"invitationCode,omitempty"`
CaptchaId string `json:"captchaId" validate:"required"`
CaptchaCode string `json:"captchaCode" validate:"required"`
}
RegReq is the user registration request payload.
type SiteStats ¶ added in v0.0.9
type SiteStats struct {
UserCount uint64 `json:"userCount"`
UserMonthCount int64 `json:"userMonthCount"`
ArticleCount uint64 `json:"articleCount"`
ArticleMonthCount int64 `json:"articleMonthCount"`
Reply uint64 `json:"reply"`
LinksCount int `json:"linksCount"`
}
SiteStats contains site-wide counters shown in shared page components.
type UserCard ¶ added in v0.1.1
type UserCard struct {
UserId uint64 `json:"userId"`
Username string `json:"username"`
Nickname string `json:"nickname"`
AvatarUrl string `json:"avatarUrl"`
Bio string `json:"bio"`
Signature string `json:"signature"`
IsAdmin bool `json:"isAdmin"`
ArticleCount uint `json:"articleCount"`
ReplyCount uint `json:"replyCount"`
LikeReceivedCount uint `json:"likeReceivedCount"`
LikeGivenCount uint `json:"likeGivenCount"`
FollowerCount uint `json:"followerCount"`
FollowingCount uint `json:"followingCount"`
CollectionCount uint `json:"collectionCount"`
IsOnline bool `json:"isOnline"`
IsFollowing bool `json:"isFollowing"`
ExternalInfo users.ExternalInformation `json:"externalInformation"`
IsSelf bool `json:"isSelf"`
LastActiveTime time.Time `json:"lastActiveTime"`
CreatedAt time.Time `json:"createdAt"`
}
UserCard is the compact public profile payload used by profile cards.
type UserDetailedVo ¶ added in v0.1.1
type UserDetailedVo struct {
Id uint64 `json:"id"`
Username string `json:"username"`
Email string `json:"email"`
Nickname string `json:"nickname"`
AvatarUrl string `json:"avatarUrl"`
Bio string `json:"bio"`
Signature string `json:"signature"`
WebsiteName string `json:"websiteName"`
Website string `json:"website"`
ExternalInformation users.ExternalInformation `json:"externalInformation"`
Prestige int64 `json:"prestige"`
CreatedAt time.Time `json:"createdAt"`
}
UserDetailedVo is the editable profile payload used by account settings.
type UserHoverCard ¶ added in v0.2.1
type UserHoverCard struct {
UserId uint64 `json:"userId"`
Username string `json:"username"`
Nickname string `json:"nickname"`
AvatarUrl string `json:"avatarUrl"`
Bio string `json:"bio"`
Signature string `json:"signature"`
IsAdmin bool `json:"isAdmin"`
ArticleCount uint `json:"articleCount"`
ReplyCount uint `json:"replyCount"`
LikeReceivedCount uint `json:"likeReceivedCount"`
FollowerCount uint `json:"followerCount"`
IsOnline bool `json:"isOnline"`
IsFollowing bool `json:"isFollowing"`
LastActiveTime time.Time `json:"lastActiveTime"`
CreatedAt time.Time `json:"createdAt"`
}
UserHoverCard is the minimal public profile payload used by hover cards.
type UserInfoShow ¶
type UserInfoShow struct {
UserId uint64 `json:"userId,omitempty"`
Username string `json:"username"`
Email string `json:"email"`
Nickname string `json:"nickname"`
Bio string `json:"bio"`
Signature string `json:"Signature"`
Prestige int64 `json:"prestige"`
AvatarUrl string `json:"avatarUrl"`
UserPoint int64 `json:"userPoint"`
CreateTime time.Time `json:"createTime"`
IsAdmin bool `json:"isAdmin"`
ExternalInformation users.ExternalInformation `json:"externalInformation"`
}
UserInfoShow is the authenticated user summary exposed to pages and APIs.