Documentation ¶
Index ¶
- type ActionLink
- type ArticleResponse
- type ArticleSimpleResponse
- type CommentResponse
- type CreateArticleForm
- type CreateCommentForm
- type CreateTopicForm
- type FavoriteResponse
- type ImageDTO
- type ImageInfo
- type LoginMethod
- type MessageResponse
- type ModuleConfig
- type NodeResponse
- type ScoreConfig
- type SearchTopicResponse
- type SysConfigResponse
- type TagResponse
- type TopicResponse
- type UserDetail
- type UserInfo
- type UserProfile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActionLink ¶
站点导航
type ArticleResponse ¶
type ArticleResponse struct { ArticleSimpleResponse Content string `json:"content"` }
type ArticleSimpleResponse ¶
type ArticleSimpleResponse struct { ArticleId int64 `json:"articleId"` User *UserInfo `json:"user"` Tags *[]TagResponse `json:"tags"` Title string `json:"title"` Summary string `json:"summary"` Cover *ImageInfo `json:"cover"` SourceUrl string `json:"sourceUrl"` ViewCount int64 `json:"viewCount"` CommentCount int64 `json:"commentCount"` LikeCount int64 `json:"likeCount"` CreateTime int64 `json:"createTime"` Status int `json:"status"` Favorited bool `json:"favorited"` }
type CommentResponse ¶
type CommentResponse struct { CommentId int64 `json:"commentId"` User *UserInfo `json:"user"` EntityType string `json:"entityType"` EntityId int64 `json:"entityId"` ContentType string `json:"contentType"` Content string `json:"content"` ImageList []ImageInfo `json:"imageList"` LikeCount int64 `json:"likeCount"` CommentCount int64 `json:"commentCount"` Liked bool `json:"liked"` QuoteId int64 `json:"quoteId"` Quote *CommentResponse `json:"quote"` Replies *web.CursorResult `json:"replies"` IpLocation string `json:"ipLocation"` Status int `json:"status"` CreateTime int64 `json:"createTime"` }
CommentResponse 评论返回数据
type CreateArticleForm ¶
type CreateArticleForm struct { Title string Summary string Content string ContentType string Cover *ImageDTO Tags []string SourceUrl string }
func GetCreateArticleForm ¶
func GetCreateArticleForm(ctx iris.Context) CreateArticleForm
type CreateCommentForm ¶
type CreateCommentForm struct { EntityType string `form:"entityType"` EntityId int64 `form:"entityId"` Content string `form:"content"` ImageList []ImageDTO `form:"imageList"` QuoteId int64 `form:"quoteId"` UserAgent string `form:"userAgent"` Ip string `form:"ip"` }
CreateCommentForm 发表评论
func GetCreateCommentForm ¶
func GetCreateCommentForm(ctx iris.Context) CreateCommentForm
type CreateTopicForm ¶
type CreateTopicForm struct { Type constants.TopicType CaptchaId string CaptchaCode string NodeId int64 Title string Content string HideContent string Tags []string ImageList []ImageDTO UserAgent string Ip string }
func GetCreateTopicForm ¶
func GetCreateTopicForm(ctx iris.Context) CreateTopicForm
type FavoriteResponse ¶
type FavoriteResponse struct { FavoriteId int64 `json:"favoriteId"` EntityType string `json:"entityType"` EntityId int64 `json:"entityId"` Deleted bool `json:"deleted"` Title string `json:"title"` Content string `json:"content"` User *UserInfo `json:"user"` Url string `json:"url"` CreateTime int64 `json:"createTime"` }
收藏返回数据
type ImageDTO ¶
type ImageDTO struct {
Url string `json:"url"`
}
func GetImageDTO ¶
func GetImageList ¶
type LoginMethod ¶
type MessageResponse ¶
type MessageResponse struct { MessageId int64 `json:"messageId"` From *UserInfo `json:"from"` // 消息发送人 UserId int64 `json:"userId"` // 消息接收人编号 Title string `json:"title"` // 标题 Content string `json:"content"` // 消息内容 QuoteContent string `json:"quoteContent"` Type int `json:"type"` DetailUrl string `json:"detailUrl"` // 消息详情url ExtraData string `json:"extraData"` Status int `json:"status"` CreateTime int64 `json:"createTime"` }
消息
type NodeResponse ¶
type ScoreConfig ¶
type ScoreConfig struct { PostTopicScore int `json:"postTopicScore"` // 发帖获得积分 PostCommentScore int `json:"postCommentScore"` // 跟帖获得积分 CheckInScore int `json:"checkInScore"` // 签到积分 }
积分配置
type SearchTopicResponse ¶
type SearchTopicResponse struct { TopicId int64 `json:"topicId"` User *UserInfo `json:"user"` Node *NodeResponse `json:"node"` Tags *[]TagResponse `json:"tags"` Title string `json:"title"` Summary string `json:"summary"` CreateTime int64 `json:"createTime"` }
type SysConfigResponse ¶
type SysConfigResponse struct { SiteTitle string `json:"siteTitle"` SiteDescription string `json:"siteDescription"` SiteKeywords []string `json:"siteKeywords"` SiteNotification string `json:"siteNotification"` RecommendTags []string `json:"recommendTags"` UrlRedirect bool `json:"urlRedirect"` ScoreConfig ScoreConfig `json:"scoreConfig"` DefaultNodeId int64 `json:"defaultNodeId"` ArticlePending bool `json:"articlePending"` TopicCaptcha bool `json:"topicCaptcha"` UserObserveSeconds int `json:"userObserveSeconds"` TokenExpireDays int `json:"tokenExpireDays"` LoginMethod LoginMethod `json:"loginMethod"` CreateTopicEmailVerified bool `json:"createTopicEmailVerified"` CreateArticleEmailVerified bool `json:"createArticleEmailVerified"` CreateCommentEmailVerified bool `json:"createCommentEmailVerified"` EnableHideContent bool `json:"enableHideContent"` Modules []ModuleConfig `json:"modules"` EmailWhitelist []string `json:"emailWhitelist"` // 邮箱白名单 }
SysConfigResponse
配置返回结构体
type TagResponse ¶
type TopicResponse ¶
type TopicResponse struct { TopicId int64 `json:"topicId"` Type constants.TopicType `json:"type"` User *UserInfo `json:"user"` Node *NodeResponse `json:"node"` Tags *[]TagResponse `json:"tags"` Title string `json:"title"` Summary string `json:"summary"` Content string `json:"content"` ImageList []ImageInfo `json:"imageList"` LastCommentTime int64 `json:"lastCommentTime"` ViewCount int64 `json:"viewCount"` CommentCount int64 `json:"commentCount"` LikeCount int64 `json:"likeCount"` Liked bool `json:"liked"` CreateTime int64 `json:"createTime"` Recommend bool `json:"recommend"` RecommendTime int64 `json:"recommendTime"` Sticky bool `json:"sticky"` StickyTime int64 `json:"stickyTime"` Status int `json:"status"` Favorited bool `json:"favorited"` IpLocation string `json:"ipLocation"` }
帖子列表返回实体
type UserDetail ¶
type UserDetail struct { UserInfo Username string `json:"username"` BackgroundImage string `json:"backgroundImage"` SmallBackgroundImage string `json:"smallBackgroundImage"` HomePage string `json:"homePage"` Status int `json:"status"` }
UserDetail 用户详细信息
type UserInfo ¶
type UserInfo struct { Id int64 `json:"id"` Nickname string `json:"nickname"` Avatar string `json:"avatar"` SmallAvatar string `json:"smallAvatar"` Gender constants.Gender `json:"gender"` Birthday *time.Time `json:"birthday"` TopicCount int `json:"topicCount"` // 话题数量 CommentCount int `json:"commentCount"` // 跟帖数量 FansCount int `json:"fansCount"` // 粉丝数量 FollowCount int `json:"followCount"` // 关注数量 Score int `json:"score"` // 积分 Description string `json:"description"` CreateTime int64 `json:"createTime"` Forbidden bool `json:"forbidden"` // 是否禁言 Followed bool `json:"followed"` // 是否关注 }
UserInfo 用户简单信息
type UserProfile ¶
type UserProfile struct { UserDetail Roles []string `json:"roles"` PasswordSet bool `json:"passwordSet"` // 密码已设置 Email string `json:"email"` EmailVerified bool `json:"emailVerified"` }
UserProfile 用户个人信息
Click to show internal directories.
Click to hide internal directories.