Documentation ¶
Index ¶
- type Category
- type CategoryName
- type Comment
- type CommentReply
- type CommentStatus
- type CommentWithReplies
- type Config
- type DetailPostVO
- type Email
- type EmailConfig
- type ExtraPost
- type Friend
- type FriendStatus
- type FriendVO
- type IndexConfig
- type IndexConfigVO
- type LatestComment
- type Menu
- type MenuVO
- type MessageTemplate
- type NoticeConfig
- type NoticeConfigVO
- type Post
- type PostInfo4Comment
- type PostRequest
- type PostStatus
- type PostsQueryCondition
- type PrimaryPost
- type SearchCategoryVO
- type SummaryPostVO
- type SwitchConfig
- type Tags
- type TagsVO
- type UserInfo4Comment
- type UserInfo4Reply
- type VisitHistory
- type WebMasterConfig
- type WebMasterConfigVO
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CategoryName ¶
type CategoryName string
type Comment ¶
type Comment struct { Id string // 文章信息 PostInfo PostInfo4Comment // 评论的内容 Content string // 用户信息 UserInfo UserInfo4Comment CreateTime int64 }
type CommentReply ¶
type CommentReply struct { ReplyId string // 回复内容 Content string // 被回复的回复 Id ReplyToId string // 用户信息 UserInfo UserInfo4Reply // 被回复用户的信息 RepliedUserInfo UserInfo4Reply Status CommentStatus CreateTime int64 }
type CommentStatus ¶
type CommentStatus uint
const ( // CommentStatusPending 审核中 CommentStatusPending CommentStatus = iota // CommentStatusApproved 审核通过 CommentStatusApproved // CommentStatusRejected 审核不通过 CommentStatusRejected )
type CommentWithReplies ¶
type CommentWithReplies struct { Comment Replies []CommentReply }
type DetailPostVO ¶
type DetailPostVO struct { PrimaryPost ExtraPost IsLiked bool `json:"is_liked"` }
type EmailConfig ¶
type FriendStatus ¶
type FriendStatus uint
const ( // FriendStatusPending 审核中 FriendStatusPending FriendStatus = iota // FriendStatusShowing 展示 FriendStatusShowing // FriendStatusHiding 隐藏 FriendStatusHiding )
type IndexConfig ¶
type IndexConfig struct { WebMasterConfig WebMasterConfig NoticeConfig NoticeConfig }
type IndexConfigVO ¶
type IndexConfigVO struct { WebMasterConfig WebMasterConfigVO `json:"web_master_config"` NoticeConfigVO NoticeConfigVO `json:"notice_config"` }
IndexConfigVO 首页信息
type LatestComment ¶
type LatestComment struct { PostInfo4Comment Name string Content string CreateTime int64 }
type Menu ¶
type Menu struct { CategoryName `json:"name"` Route string `json:"route"` }
type MessageTemplate ¶
type NoticeConfig ¶
type NoticeConfig struct { Content string `bson:"content" json:"content"` Enabled bool `bson:"enabled" json:"enabled"` }
NoticeConfig 公告配置
type NoticeConfigVO ¶
type NoticeConfigVO struct {
Content string `json:"content"`
}
type Post ¶
type Post struct { PrimaryPost ExtraPost IsCommentAllowed bool `json:"is_comment_allowed"` Likes []string `json:"-"` }
type PostInfo4Comment ¶
type PostRequest ¶
type PostRequest struct { api.PageRequest Category *string `form:"category"` Tags []string `form:"tags"` }
type PostStatus ¶
type PostStatus uint
const ( // PostStatusDraft 草稿 PostStatusDraft PostStatus = iota // PostStatusPunished 已发布 PostStatusPunished // PostStatusDeleted 已删除 PostStatusDeleted )
type PostsQueryCondition ¶
type PrimaryPost ¶
type PrimaryPost struct { Sug string `json:"sug"` Author string `json:"author"` Title string `json:"title"` Summary string `json:"summary"` CoverImg string `json:"cover_img"` Category string `json:"category"` Tags []string `json:"tags"` LikeCount int `json:"like_count"` CommentCount int `json:"comment_count"` VisitCount int `json:"visit_count"` Priority int `json:"priority"` CreateTime int64 `json:"create_time"` }
type SearchCategoryVO ¶
type SearchCategoryVO struct { CategoryName `json:"name"` Tags `json:"tags"` }
type SummaryPostVO ¶
type SummaryPostVO struct {
PrimaryPost
}
type SwitchConfig ¶
type SwitchConfig struct {
Status bool `bson:"status" json:"status"`
}
type UserInfo4Comment ¶
type UserInfo4Reply ¶
type UserInfo4Reply UserInfo4Comment
type VisitHistory ¶
type WebMasterConfig ¶
type WebMasterConfig struct { Name string `bson:"name" json:"name"` PostCount uint `bson:"postCount" json:"postCount"` CategoryCount uint `bson:"categoryCount" json:"categoryCount"` WebsiteViews uint `bson:"websiteViews" json:"websiteViews"` WebsiteLiveTime int64 `bson:"websiteLiveTime" json:"websiteLiveTime"` Profile string `bson:"profile" json:"profile"` Picture string `bson:"picture" json:"picture"` WebsiteIcon string `bson:"websiteIcon" json:"websiteIcon"` Domain string `bson:"domain" json:"domain"` Records []string `bson:"records" json:"records"` }
WebMasterConfig 站长信息
type WebMasterConfigVO ¶
type WebMasterConfigVO struct { Name string `json:"name"` PostCount uint `json:"post_count"` CategoryCount uint `json:"category_count"` WebsiteViews uint `json:"website_views"` WebsiteLiveTime int64 `json:"website_live_time"` Profile string `json:"profile"` Picture string `json:"picture"` WebsiteIcon string `json:"website_icon"` Domain string `json:"domain"` Records []string `json:"records"` }
Click to show internal directories.
Click to hide internal directories.