package router import ( "github.com/gin-gonic/gin" "wireguard-ui/http/api" "wireguard-ui/http/middleware" ) // ClientApi // @description: 登陆相关API // @param r func ClientApi(r *gin.RouterGroup) { client := r.Group("client", middleware.Authorization(), middleware.RequestLog()) { client.POST("", api.Client().Save) // 新增/编辑客户端 client.DELETE("/:id", api.Client().Delete) // 删除客户端 client.GET("/list", api.Client().List) // 客户端列表 client.POST("/generate-keys", api.Client().GenerateKeys) // 生成客户端密钥 client.POST("/generate-ip", api.Client().GenerateIP) // 生成客户端IP client.GET("/download/:id/:type", api.Client().Download) // 下载客户端配置文件 } }