api

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const VERSION = "v0.13.1"

Variables

This section is empty.

Functions

func AddJob added in v0.5.0

func AddJob(c *gin.Context)

新增任务

func CheckFiles added in v0.6.0

func CheckFiles(c *gin.Context)

func Clear added in v0.11.0

func Clear(c *gin.Context)

func Close added in v0.6.0

func Close(c *gin.Context)

func Cmd added in v0.4.6

func Cmd(c *gin.Context)

func Cors added in v0.7.0

func Cors(c *gin.Context)

func CutString added in v0.7.0

func CutString(s []byte) []string

换行分割字符串

func Error added in v0.10.0

func Error(c *gin.Context, code int, err error, failed ...any) bool

根据是否有错误判断返回

func Failed

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

返回错误信息

func Final added in v0.9.0

func Final(c *gin.Context, code int, err error, failed []any, succeed ...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 ModifyListening added in v0.5.0

func ModifyListening(c *gin.Context)

更新监听列表

func Online

func Online(c *gin.Context)

获取当前在线状态

func Ping

func Ping(c *gin.Context)

更新在线时间

func ReadLog added in v0.7.0

func ReadLog(c *gin.Context)

读取日志

func Reboot added in v0.11.0

func Reboot(c *gin.Context)

func Register

func Register(c *gin.Context)

新建用户

func RemoveJobs added in v0.5.0

func RemoveJobs(c *gin.Context)

移除任务

func SetZero added in v0.9.0

func SetZero[T comparable](a *T, b ...T)

设置值类型对象默认值

func Shell added in v0.10.0

func Shell(s string, dir ...string) ([]string, error)

func Submit

func Submit(c *gin.Context)

提交博文

func Succeed

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

返回成功数据

func TestJob added in v0.13.0

func TestJob(c *gin.Context)

测试单个任务

func TestJobs added in v0.12.0

func TestJobs(c *gin.Context)

测试任务

func Update

func Update(c *gin.Context)

主动更新主页

func UpdatePermission added in v0.5.1

func UpdatePermission(c *gin.Context)

func Users added in v0.5.1

func Users(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