Documentation ¶
Index ¶
- Variables
- func CheckPermission(p, n model.Permission) error
- func GetClear_public(ctx *gin.Context) (data any, err group.Error)
- func GetClear_root(ctx *gin.Context) (data any, err group.Error)
- func GetDownload_users(ctx *gin.Context) (any, group.Error)
- func GetEngine() (*gin.Engine, error)
- func GetExec(ctx *gin.Context) (any, group.Error)
- func GetGet_users(ctx *gin.Context) (any, group.Error)
- func GetList(ctx *gin.Context) (any, group.Error)
- func GetLog(ctx *gin.Context) (any, group.Error)
- func GetMe(ctx *gin.Context) (any, group.Error)
- func GetModify_follow(ctx *gin.Context) (any, group.Error)
- func GetOnline(ctx *gin.Context) (any, group.Error)
- func GetPing(ctx *gin.Context) (any, group.Error)
- func GetRegister(ctx *gin.Context) (any, group.Error)
- func GetRemove_job(ctx *gin.Context) (any, group.Error)
- func GetRestart(ctx *gin.Context) (any, group.Error)
- func GetSet_permission(ctx *gin.Context) (any, group.Error)
- func GetToken(ctx *gin.Context) (any, group.Error)
- func GetUpdate(ctx *gin.Context) (any, group.Error)
- func GetVersion(ctx *gin.Context) (any, group.Error)
- func IsAdmin(ctx *gin.Context)
- func PostAdd_job(ctx *gin.Context) (any, group.Error)
- func PostSubmit(ctx *gin.Context) (any, group.Error)
- func PostTest_job(ctx *gin.Context) (any, group.Error)
- func SetUser(ctx *gin.Context)
- func WrapError(data any, err error) (any, group.Error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoAuthCode = errors.New("webhook/api: no authentication code") ErrAuth = errors.New("webhook/api: authentication failure") )
View Source
var Admin = group.Group{ Path: "admin", Middlewares: gin.HandlersChain{IsAdmin}, Handlers: group.Chain{ GetExec, GetGet_users, GetSet_permission, GetLog, GetRestart, GetClear_public, GetClear_root, GetUpdate, GetDownload_users, }, }
View Source
var Api = group.Group{ Middlewares: gin.HandlersChain{group.CORS}, Customize: func(r gin.IRouter) { r.StaticFS("/public", request.DefaultDownloadSystem(config.Global.Path.FullPath.Public)) }, Groups: []group.Group{Visitor, { Middlewares: gin.HandlersChain{SetUser}, Groups: []group.Group{Submitter, Admin}, }}, }
View Source
var CmdList string
View Source
var ErrAppoint1 = errors.New("webhook/api: only the owner can appoint the administrator")
View Source
var ErrAppoint2 = errors.New("webhook/api: only the administrator can appoint others")
View Source
var ErrHasOwner = errors.New("webhook/api: there can only be one owner")
View Source
var (
ErrNoAdmin = errors.New("webhook/api: no administrator permission")
)
View Source
var ErrNoRepost = group.NewError(1, `Form key "repost" not found. A "null" value must be pass in if there is no repost.`)
View Source
var Submitter = group.Group{ Path: "submitter", Handlers: group.Chain{ GetMe, GetPing, GetRemove_job, GetModify_follow, PostSubmit, PostAdd_job, PostTest_job, }, }
View Source
var Visitor = group.Group{ Handlers: group.Chain{ GetVersion, GetList, GetOnline, GetToken, GetRegister, }, }
Functions ¶
func CheckPermission ¶ added in v0.14.0
func CheckPermission(p, n model.Permission) error
func GetClear_public ¶ added in v0.14.0
func GetClear_root ¶ added in v0.14.0
func GetDownload_users ¶ added in v0.14.0
func GetModify_follow ¶ added in v0.14.0
更新监听列表
func GetSet_permission ¶ added in v0.14.0
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.