controllers

package
v0.2.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 28, 2026 License: MIT Imports: 43 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActivateAccount

func ActivateAccount(c *gin.Context)

ActivateAccount 激活处理函数

func BookmarkArticle added in v0.0.9

func FollowUser added in v0.0.3

func GetOAuthBindings added in v0.0.9

func GetOAuthBindings(req component.BetterRequest[null]) component.Response

GetOAuthBindings 获取用户的OAuth绑定状态

func GetSiteStatistics

func GetSiteStatistics() component.Response

func LikeArticle added in v0.0.2

func Login

func Login(c *gin.Context)

Login 处理登录请求

func LoginPublicKey added in v0.2.1

func LoginPublicKey(c *gin.Context)

func Logout

func Logout(c *gin.Context)

func NotFound

func NotFound(c *gin.Context)

func ProviderCallback added in v0.0.9

func ProviderCallback(c *gin.Context)

ProviderCallback 处理OAuth登录/绑定回调(根据登录状态自动判断)

func ProviderLogin added in v0.0.9

func ProviderLogin(c *gin.Context)

ProviderLogin 开始OAuth登录/绑定流程(根据登录状态自动判断)

func Register

func Register(c *gin.Context)

Register 注册

func RenderRobotsTxt

func RenderRobotsTxt(c *gin.Context)

RenderRobotsTxt renders robots.txt.

func RenderRss added in v0.2.1

func RenderRss(c *gin.Context)

func RenderSitemapXml

func RenderSitemapXml(c *gin.Context)

RenderSitemapXml renders sitemap.xml.

func UnbindOAuth added in v0.0.9

func UnbindOAuth(req component.BetterRequest[null]) component.Response

UnbindOAuth 解绑OAuth账户

func UpdateArticleStatus added in v0.2.8

func UpdateArticleStatus(req component.BetterRequest[ArticleStatusReq]) component.Response

func UpdateReply added in v0.2.8

func WriteArticles

WriteArticles 创建或更新文章。

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 ArticleReplyId struct {
	ArticleId uint64 `json:"articleId"`
	Content   string `json:"content"`
	ReplyId   uint64 `json:"replyId"`
}

type ArticleStatusReq added in v0.2.8

type ArticleStatusReq struct {
	Id            uint64 `json:"id" validate:"required"`
	ArticleStatus int8   `json:"articleStatus" validate:"oneof=0 1"`
}

type BookmarkArticleReq added in v0.0.9

type BookmarkArticleReq struct {
	Id     uint64 `json:"id"`
	Action int    `json:"action" validate:"min=1,max=2"` // 1 收藏,2 取消
}

type DeleteReplyId

type DeleteReplyId struct {
	ReplyId uint64 `json:"replyId"`
}

type FollowUserReq added in v0.0.3

type FollowUserReq struct {
	Id     uint64 `json:"id"`
	Action int    `json:"action" validate:"min=1,max=2"` // 1 关注,2 取消
}

type ForumInfo added in v0.0.4

type ForumInfo struct {
	Title        string
	Desc         string
	Independence bool
}

func GetGooseForumInfo added in v0.0.4

func GetGooseForumInfo() ForumInfo

type LikeArticleReq added in v0.0.2

type LikeArticleReq struct {
	Id     uint64 `json:"id"`
	Action int    `json:"action" validate:"min=1,max=2"` // 1 点赞,2 取消
}

type LoginReq

type LoginReq struct {
	Username          string `json:"username" validate:"required"` // 可以是用户名或邮箱
	EncryptedPassword string `json:"encryptedPassword" validate:"required"`
	CaptchaId         string `json:"captchaId"`
	CaptchaCode       string `json:"captchaCode"`
}

type SitemapURL added in v0.0.9

type SitemapURL struct {
	Loc      string
	Lastmod  string
	Priority float64
}

type UpdateReplyReq added in v0.2.8

type UpdateReplyReq struct {
	ReplyId uint64 `json:"replyId"`
	Content string `json:"content"`
}

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 WriteArticleReq struct {
	Id            int64    `json:"id"`
	Content       string   `json:"content" validate:"required"`
	Title         string   `json:"title" validate:"required"`
	Type          int8     `json:"type"`
	CategoryId    []uint64 `json:"categoryId" validate:"min=1,max=3"`
	ArticleStatus int8     `json:"articleStatus" validate:"oneof=0 1"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL