Add classification annotations

This commit is contained in:
2025-10-27 23:12:15 +08:00
parent 3990ec01c6
commit 5aacb88c22
44 changed files with 2769 additions and 2241 deletions

View File

@@ -13,9 +13,17 @@ import (
"github.com/sirupsen/logrus"
)
// ============================================================================
// 全局变量
// ============================================================================
// 创建基础控制器实例
var apiBaseController = controllers.NewBaseController()
// ============================================================================
// 页面处理器
// ============================================================================
// APIFragmentHandler 接口列表页面片段处理器
func APIFragmentHandler(c *gin.Context) {
c.HTML(http.StatusOK, "apis.html", gin.H{
@@ -23,6 +31,10 @@ func APIFragmentHandler(c *gin.Context) {
})
}
// ============================================================================
// API处理器
// ============================================================================
// APIListHandler 接口列表API处理器
func APIListHandler(c *gin.Context) {
// 获取分页参数
@@ -142,6 +154,10 @@ func APIListHandler(c *gin.Context) {
c.JSON(http.StatusOK, response)
}
// ============================================================================
// 辅助函数
// ============================================================================
// getAPIStatusName 获取API状态名称
func getAPIStatusName(status int) string {
switch status {
@@ -238,7 +254,7 @@ func APIGetTypesHandler(c *gin.Context) {
validTypes := []int{
models.APITypeGetBulletin, models.APITypeGetUpdateUrl, models.APITypeCheckAppVersion, models.APITypeGetCardInfo,
models.APITypeSingleLogin,
models.APITypeUserLogin, models.APITypeUserRegin, models.APITypeUserRecharge, models.APITypeCardRegin,
models.APITypeUserLogin, models.APITypeUserRegin, models.APITypeUserRecharge,
models.APITypeLogOut,
models.APITypeGetExpired, models.APITypeCheckUserStatus, models.APITypeGetAppData, models.APITypeGetVariable,
models.APITypeUpdatePwd, models.APITypeMacChangeBind, models.APITypeIPChangeBind,