Initial commit

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-15 13:57:10 +08:00
co-authored by Claude Opus 5
commit 8679200f41
1897 changed files with 257900 additions and 0 deletions
+59
View File
@@ -0,0 +1,59 @@
package synccdnctrl
import (
"91porn-server/common"
"91porn-server/common/stderr"
"91porn-server/models/l/synccdnmod"
"github.com/gin-gonic/gin"
)
// SyncCdn doc
// @Summary
// @Description 同步m3u8到cdn节点
// @Tags WEB-uploaddown
// @Accept mpfd,json
// @Produce json,html
// @Param token formData string true "调用此接口的token""
// @Param pageSize formData integer true "视频来源"
// @Success 200 {string} json "{"msg": "操作成功"}"
// @Failure 400 {string} json "{"msg": "操作失败"}"
// @Router /web/admin/vid/syncCdn [post]
func SyncCdn(ctx *gin.Context) {
param := synccdnmod.SyncReq{}
if err := ctx.ShouldBind(&param); err != nil {
common.ServeJSON(ctx, stderr.ErrParamError, nil)
return
}
if param.Token != "NS@33E7r4GUW0Op3" {
common.ServeJSON(ctx, stderr.ErrNoToken, nil)
return
}
//code, data := synccdnser.SyncCdn()
common.ServeJSON(ctx, stderr.Failure, "")
}
// SyncWithOptions doc
// @Summary
// @Description SyncWithOptions 预热cdn
// @Tags WEB-uploaddown
// @Accept mpfd,json
// @Produce json,html
// @Param cdn formData string true "cdn名字"
// @Param token formData string true "调用此接口的token""
// @Success 200 {string} json "{"msg": "操作成功"}"
// @Failure 400 {string} json "{"msg": "操作失败"}"
// @Router /web/admin/vid/SyncWithOptions [post]
func SyncWithOptions(ctx *gin.Context) {
param := synccdnmod.SyncReq{}
if err := ctx.ShouldBind(&param); err != nil {
common.ServeJSON(ctx, stderr.ErrParamError, nil)
return
}
if param.Token != "seFMthomcQegB513" {
common.ServeJSON(ctx, stderr.ErrNoToken, nil)
return
}
//code, data := synccdnser.SyncWithOptions(param.Cdn, param.FilePath)
common.ServeJSON(ctx, stderr.Failure, "")
}