Documentation
¶
Index ¶
- Variables
- func Abort(c *gin.Context, key any, data ...any)
- func Cors(c *gin.Context)
- func Shell(s string, dir ...string) ([]string, error)
- func Succeed(c *gin.Context, data ...any)
- func Ternary[K comparable, T any](expr K, value K, a, b T) T
- func User(c *gin.Context) *model.User
- type Admin
- func (Admin) GetClear(c *gin.Context)
- func (Admin) GetClose(c *gin.Context)
- func (Admin) GetExec_8cmd(c *gin.Context)
- func (Admin) GetLog(c *gin.Context)
- func (Admin) GetPermission_1uid_1permission(c *gin.Context)
- func (Admin) GetReboot(c *gin.Context)
- func (Admin) GetUsers(c *gin.Context)
- func (Admin) Use(c *gin.Context)
- type Api
- type Response
- type Submitter
- func (Submitter) GetMe(c *gin.Context)
- func (Submitter) GetModify(c *gin.Context)
- func (Submitter) GetPing(c *gin.Context)
- func (Submitter) GetRemove(c *gin.Context)
- func (Submitter) GetTests(c *gin.Context)
- func (Submitter) GetUpdate(c *gin.Context)
- func (Submitter) PostAdd(c *gin.Context)
- func (Submitter) PostSubmit(c *gin.Context)
- func (Submitter) PostTest(c *gin.Context)
- func (Submitter) Use(c *gin.Context)
- type Visitor
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoRepost = `Form key "repost" not found. A "null" value must be pass in if there is no repost.`
View Source
var ErrOddParameter = errors.New("only an even number of arguments can be passed in")
Functions ¶
func Ternary ¶
func Ternary[K comparable, T any](expr K, value K, a, b T) T
Types ¶
type Admin ¶ added in v0.14.0
type Admin int
func (Admin) GetExec_8cmd ¶
func (Admin) GetPermission_1uid_1permission ¶
type Api ¶ added in v0.14.0
func (Api) StaticFSPublic ¶
func (Api) StaticFSPublic() (string, http.FileSystem)
func (Api) Use ¶
func (Api) Use(r *gin.RouterGroup)
type Response ¶
type Response struct {
Code int `json:"code"`
Message string `json:"message,omitempty"`
Data any `json:"data"`
}
func (*Response) WriteContentType ¶
func (r *Response) WriteContentType(w http.ResponseWriter)
Click to show internal directories.
Click to hide internal directories.