api

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Failed

func Failed(c *gin.Context, code int, message string, data ...any)

返回错误信息

func GetBranches

func GetBranches(c *gin.Context)

获取所有分支

func GetComments

func GetComments(c *gin.Context)

获取所有评论

func GetPosts

func GetPosts(c *gin.Context)

获取 begin 与 end 时间范围内的所有博文

func GetToken

func GetToken(c *gin.Context)

获取注册所需 Token

func GetUser

func GetUser(c *gin.Context) *user.User

读取用户

func IsAdministrator

func IsAdministrator(c *gin.Context)

func IsSubmitter

func IsSubmitter(c *gin.Context)

func List

func List(c *gin.Context)

查看资源目录

func Me

func Me(c *gin.Context)

获取自身信息

func Online

func Online(c *gin.Context)

获取当前在线状态

func Ping

func Ping(c *gin.Context)

func Register

func Register(c *gin.Context)

新建用户

func SetConfig

func SetConfig(c *configs.Config) *configs.Config

func Submit

func Submit(c *gin.Context)

提交博文

func Succeed

func Succeed(c *gin.Context, data ...any)

返回成功数据

func Update

func Update(c *gin.Context)

主动更新主页

func Version

func Version(c *gin.Context)

当前版本号

Types

This section is empty.

Jump to

Keyboard shortcuts

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