Documentation
¶
Index ¶
- func ActivateAccount(c *gin.Context)
- func ArticleReply(req component.BetterRequest[ArticleReplyId]) component.Response
- func BookmarkArticle(req component.BetterRequest[BookmarkArticleReq]) component.Response
- func DeleteArticle(req component.BetterRequest[DeleteArticleReq]) component.Response
- func DeleteReply(req component.BetterRequest[DeleteReplyId]) component.Response
- func FollowUser(req component.BetterRequest[FollowUserReq]) component.Response
- func GetArticlesEnum() component.Response
- func GetOAuthBindings(req component.BetterRequest[null]) component.Response
- func GetSiteStatistics() component.Response
- func GetUserArticles(req component.BetterRequest[GetUserArticlesRequest]) component.Response
- func GetUserBookmarkedArticles(req component.BetterRequest[GetUserBookmarkedArticlesRequest]) component.Response
- func LikeArticle(req component.BetterRequest[LikeArticleReq]) component.Response
- func Login(c *gin.Context)
- func LoginPublicKey(c *gin.Context)
- func Logout(c *gin.Context)
- func NotFound(c *gin.Context)
- func ProviderCallback(c *gin.Context)
- func ProviderLogin(c *gin.Context)
- func Register(c *gin.Context)
- func RenderRobotsTxt(c *gin.Context)
- func RenderRss(c *gin.Context)
- func RenderSitemapXml(c *gin.Context)
- func SearchArticles(req component.BetterRequest[SearchArticlesRequest]) component.Response
- func UnbindOAuth(req component.BetterRequest[null]) component.Response
- func WriteArticles(req component.BetterRequest[WriteArticleReq]) component.Response
- func WriteArticlesOrigin(req component.BetterRequest[WriteArticlesOriginReq]) component.Response
- type ActivateAccountData
- type ArticleReplyId
- type BookmarkArticleReq
- type DeleteArticleReq
- type DeleteReplyId
- type FollowUserReq
- type ForumInfo
- type GetArticlesDetailRequest
- type GetArticlesPageRequest
- type GetUserArticlesRequest
- type GetUserBookmarkedArticlesRequest
- type LikeArticleReq
- type LoginReq
- type ReplyVo
- type SearchArticlesRequest
- type SitemapURL
- type UserData
- type WriteArticleReq
- type WriteArticlesOriginReq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArticleReply ¶
func ArticleReply(req component.BetterRequest[ArticleReplyId]) component.Response
func BookmarkArticle ¶ added in v0.0.9
func BookmarkArticle(req component.BetterRequest[BookmarkArticleReq]) component.Response
func DeleteArticle ¶ added in v0.1.1
func DeleteArticle(req component.BetterRequest[DeleteArticleReq]) component.Response
func DeleteReply ¶
func DeleteReply(req component.BetterRequest[DeleteReplyId]) component.Response
func FollowUser ¶ added in v0.0.3
func FollowUser(req component.BetterRequest[FollowUserReq]) component.Response
func GetArticlesEnum ¶
func GetOAuthBindings ¶ added in v0.0.9
func GetOAuthBindings(req component.BetterRequest[null]) component.Response
GetOAuthBindings 获取用户的OAuth绑定状态
func GetSiteStatistics ¶
func GetUserArticles ¶
func GetUserArticles(req component.BetterRequest[GetUserArticlesRequest]) component.Response
GetUserArticles 获取用户文章列表
func GetUserBookmarkedArticles ¶ added in v0.0.9
func GetUserBookmarkedArticles(req component.BetterRequest[GetUserBookmarkedArticlesRequest]) component.Response
GetUserBookmarkedArticles 获取用户收藏文章列表
func LikeArticle ¶ added in v0.0.2
func LikeArticle(req component.BetterRequest[LikeArticleReq]) component.Response
func LoginPublicKey ¶ added in v0.2.1
func ProviderCallback ¶ added in v0.0.9
ProviderCallback 处理OAuth登录/绑定回调(根据登录状态自动判断)
func ProviderLogin ¶ added in v0.0.9
ProviderLogin 开始OAuth登录/绑定流程(根据登录状态自动判断)
func SearchArticles ¶ added in v0.0.8
func SearchArticles(req component.BetterRequest[SearchArticlesRequest]) component.Response
SearchArticles 搜索文章接口 通过名字和类别查询文章,先查Meilisearch索引,再查文章表获取具体数据
func UnbindOAuth ¶ added in v0.0.9
func UnbindOAuth(req component.BetterRequest[null]) component.Response
UnbindOAuth 解绑OAuth账户
func WriteArticles ¶
func WriteArticles(req component.BetterRequest[WriteArticleReq]) component.Response
WriteArticles 创建或更新文章。
func WriteArticlesOrigin ¶
func WriteArticlesOrigin(req component.BetterRequest[WriteArticlesOriginReq]) component.Response
WriteArticlesOrigin 返回当前用户可编辑文章的原始内容。
Types ¶
type ActivateAccountData ¶ added in v0.1.1
type ActivateAccountData struct {
Title string
Status string
Message string
Success bool
Description string
}
ActivateAccountData 激活页面数据
type ArticleReplyId ¶
type BookmarkArticleReq ¶ added in v0.0.9
type DeleteArticleReq ¶ added in v0.1.1
type DeleteArticleReq struct {
Id uint64 `json:"id"`
}
type DeleteReplyId ¶
type DeleteReplyId struct {
ReplyId uint64 `json:"replyId"`
}
type FollowUserReq ¶ added in v0.0.3
type ForumInfo ¶ added in v0.0.4
func GetGooseForumInfo ¶ added in v0.0.4
func GetGooseForumInfo() ForumInfo
type GetArticlesPageRequest ¶
type GetUserArticlesRequest ¶
GetUserArticlesRequest 用户文章列表请求。
type GetUserBookmarkedArticlesRequest ¶ added in v0.0.9
type GetUserBookmarkedArticlesRequest struct {
Page int `json:"page"`
PageSize int `json:"pageSize"`
}
GetUserBookmarkedArticlesRequest 用户收藏文章列表请求。
type LikeArticleReq ¶ added in v0.0.2
type ReplyVo ¶ added in v0.1.1
type ReplyVo struct {
Id uint64 `json:"id"`
ArticleId uint64 `json:"articleId"`
UserId uint64 `json:"userId"`
UserAvatarUrl string `json:"userAvatarUrl"`
Username string `json:"username"`
Content string `json:"content"`
CreateTime string `json:"createTime"`
ReplyToId uint64 `json:"replyToId,omitempty"`
ReplyToUsername string `json:"replyToUsername,omitempty"`
ReplyToUserId uint64 `json:"replyToUserId,omitempty"`
IsOwnReply bool `json:"isOwnReply"`
}
type SearchArticlesRequest ¶ added in v0.0.8
type SearchArticlesRequest struct {
Query string `json:"query" form:"query" validate:"required,min=1,max=100"` // 搜索关键词
Categories []uint64 `json:"categories" form:"categories"` // 分类ID列表
Page int `json:"page" form:"page"` // 页码,从1开始
PageSize int `json:"pageSize" form:"pageSize"` // 每页数量
}
SearchArticlesRequest 搜索文章请求结构
type SitemapURL ¶ added in v0.0.9
type UserData ¶ added in v0.1.1
type UserData struct {
Articles []*vo.ArticlesSimpleVo
UserDetail *vo.UserCard
FollowingList []*users.EntityComplete
FollowerList []*users.EntityComplete
Activities []*userActivities.Entity
MyFollowingIds []uint64
IsOwnProfile bool
}
type WriteArticleReq ¶
type WriteArticlesOriginReq ¶
type WriteArticlesOriginReq struct {
Id int64 `json:"id"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.