Documentation
¶
Index ¶
- func BatchCreateReadyResources(c *gin.Context)
- func BatchDeleteResources(c *gin.Context)
- func ChangePassword(c *gin.Context)
- func CheckResourceExists(c *gin.Context)
- func CheckUpdate(c *gin.Context)
- func ClearReadyResources(c *gin.Context)
- func CreateCategory(c *gin.Context)
- func CreateCks(c *gin.Context)
- func CreateHotDrama(c *gin.Context)
- func CreatePan(c *gin.Context)
- func CreateReadyResource(c *gin.Context)
- func CreateReadyResourcesFromText(c *gin.Context)
- func CreateResource(c *gin.Context)
- func CreateTag(c *gin.Context)
- func CreateUser(c *gin.Context)
- func DeleteCategory(c *gin.Context)
- func DeleteCks(c *gin.Context)
- func DeleteHotDrama(c *gin.Context)
- func DeletePan(c *gin.Context)
- func DeleteReadyResource(c *gin.Context)
- func DeleteResource(c *gin.Context)
- func DeleteTag(c *gin.Context)
- func DeleteUser(c *gin.Context)
- func ErrorResponse(c *gin.Context, message string, code int)
- func FetchHotDramaNames(c *gin.Context)
- func GetCategories(c *gin.Context)
- func GetCks(c *gin.Context)
- func GetCksByID(c *gin.Context)
- func GetCksByIDGlobal(c *gin.Context)
- func GetDailyStats(c *gin.Context)
- func GetFullVersionInfo(c *gin.Context)
- func GetHotDramaByID(c *gin.Context)
- func GetHotDramaList(c *gin.Context)
- func GetHotKeywords(c *gin.Context)
- func GetKeywordTrend(c *gin.Context)
- func GetPan(c *gin.Context)
- func GetPans(c *gin.Context)
- func GetPerformanceStats(c *gin.Context)
- func GetProfile(c *gin.Context)
- func GetPublicSystemConfig(c *gin.Context)
- func GetReadyResources(c *gin.Context)
- func GetResourceByID(c *gin.Context)
- func GetResources(c *gin.Context)
- func GetSchedulerStatus(c *gin.Context)
- func GetSearchStats(c *gin.Context)
- func GetSearchStatsSummary(c *gin.Context)
- func GetSearchTrend(c *gin.Context)
- func GetStats(c *gin.Context)
- func GetSystemConfig(c *gin.Context)
- func GetSystemInfo(c *gin.Context)
- func GetTagByID(c *gin.Context)
- func GetTagByIDGlobal(c *gin.Context)
- func GetTags(c *gin.Context)
- func GetTagsByCategory(c *gin.Context)
- func GetTagsGlobal(c *gin.Context)
- func GetUsers(c *gin.Context)
- func GetVersion(c *gin.Context)
- func GetVersionString(c *gin.Context)
- func IncrementResourceViewCount(c *gin.Context)
- func ListResponse(c *gin.Context, data interface{}, total int64)
- func Login(c *gin.Context)
- func PageResponse(c *gin.Context, data interface{}, total int64, page, limit int)
- func RecordSearch(c *gin.Context)
- func RefreshCapacity(c *gin.Context)
- func Register(c *gin.Context)
- func SearchResources(c *gin.Context)
- func SetRepositoryManager(rm *repo.RepositoryManager)
- func StartAutoTransferScheduler(c *gin.Context)
- func StartHotDramaScheduler(c *gin.Context)
- func StartReadyResourceScheduler(c *gin.Context)
- func StopAutoTransferScheduler(c *gin.Context)
- func StopHotDramaScheduler(c *gin.Context)
- func StopReadyResourceScheduler(c *gin.Context)
- func SuccessResponse(c *gin.Context, data interface{})
- func TriggerAutoTransferScheduler(c *gin.Context)
- func TriggerHotDramaScheduler(c *gin.Context)
- func TriggerReadyResourceScheduler(c *gin.Context)
- func UpdateCategory(c *gin.Context)
- func UpdateCks(c *gin.Context)
- func UpdateHotDrama(c *gin.Context)
- func UpdatePan(c *gin.Context)
- func UpdateResource(c *gin.Context)
- func UpdateSystemConfig(c *gin.Context)
- func UpdateTag(c *gin.Context)
- func UpdateUser(c *gin.Context)
- type HotDramaHandler
- type PublicAPIHandler
- type Response
- type SystemConfigHandler
- type VersionResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BatchCreateReadyResources ¶
BatchCreateReadyResources 批量创建待处理资源
func BatchDeleteResources ¶ added in v1.0.8
BatchDeleteResources 批量删除资源
func CheckResourceExists ¶
CheckResourceExists 检查资源是否存在(测试FindExists函数)
func CreateReadyResourcesFromText ¶
CreateReadyResourcesFromText 从文本创建待处理资源
func ErrorResponse ¶
ErrorResponse 错误响应
func GetCksByIDGlobal ¶
GetCksByID 根据ID获取Cookie详情(使用全局repoManager)
func GetHotDramaByID ¶
GetHotDramaByID 根据ID获取热播剧详情(使用全局repoManager)
func GetHotDramaList ¶
GetHotDramaList 获取热播剧列表(使用全局repoManager)
func GetKeywordTrend ¶
GetKeywordTrend 获取关键词趋势(使用全局repoManager)
func GetPublicSystemConfig ¶ added in v1.0.8
新增:公开获取系统配置(不含api_token)
func GetSearchStatsSummary ¶ added in v1.0.8
GetSearchStatsSummary 获取搜索统计汇总
func GetTagByIDGlobal ¶
GetTagByID 根据ID获取标签详情(使用全局repoManager)
func IncrementResourceViewCount ¶ added in v1.0.8
增加资源浏览次数
func ListResponse ¶
ListResponse 列表响应
func PageResponse ¶
PageResponse 分页响应
func SetRepositoryManager ¶
func SetRepositoryManager(rm *repo.RepositoryManager)
SetRepositoryManager 设置Repository管理器
func TriggerReadyResourceScheduler ¶
手动触发待处理资源自动处理任务
func UpdateSystemConfig ¶
UpdateSystemConfig 更新系统配置(使用全局repoManager)
Types ¶
type HotDramaHandler ¶
type HotDramaHandler struct {
// contains filtered or unexported fields
}
HotDramaHandler 热播剧处理器
func NewHotDramaHandler ¶
func NewHotDramaHandler(hotDramaRepo repo.HotDramaRepository) *HotDramaHandler
NewHotDramaHandler 创建热播剧处理器
func (*HotDramaHandler) GetHotDramaByID ¶
func (h *HotDramaHandler) GetHotDramaByID(c *gin.Context)
GetHotDramaByID 根据ID获取热播剧详情
func (*HotDramaHandler) GetHotDramaList ¶
func (h *HotDramaHandler) GetHotDramaList(c *gin.Context)
GetHotDramaList 获取热播剧列表
type PublicAPIHandler ¶
type PublicAPIHandler struct{}
PublicAPIHandler 公开API处理器
func NewPublicAPIHandler ¶
func NewPublicAPIHandler() *PublicAPIHandler
NewPublicAPIHandler 创建公开API处理器
func (*PublicAPIHandler) AddBatchResources ¶
func (h *PublicAPIHandler) AddBatchResources(c *gin.Context)
AddBatchResources godoc @Summary 批量添加资源 @Description 通过公开API批量添加多个资源到待处理列表 @Tags PublicAPI @Accept json @Produce json @Param X-API-Token header string true "API访问令牌" @Param data body dto.BatchReadyResourceRequest true "批量资源信息" @Success 200 {object} map[string]interface{} "批量添加成功" @Failure 400 {object} map[string]interface{} "请求参数错误" @Failure 401 {object} map[string]interface{} "认证失败" @Failure 500 {object} map[string]interface{} "服务器内部错误" @Router /api/public/resources/batch-add [post]
func (*PublicAPIHandler) AddSingleResource ¶
func (h *PublicAPIHandler) AddSingleResource(c *gin.Context)
AddSingleResource godoc @Summary 单个添加资源 @Description 通过公开API添加单个资源到待处理列表 @Tags PublicAPI @Accept json @Produce json @Param X-API-Token header string true "API访问令牌" @Param data body dto.ReadyResourceRequest true "资源信息" @Success 200 {object} map[string]interface{} "添加成功" @Failure 400 {object} map[string]interface{} "请求参数错误" @Failure 401 {object} map[string]interface{} "认证失败" @Failure 500 {object} map[string]interface{} "服务器内部错误" @Router /api/public/resources/add [post]
func (*PublicAPIHandler) GetHotDramas ¶
func (h *PublicAPIHandler) GetHotDramas(c *gin.Context)
GetHotDramas godoc @Summary 获取热门剧列表 @Description 获取热门剧列表,支持分页 @Tags PublicAPI @Accept json @Produce json @Param X-API-Token header string true "API访问令牌" @Param page query int false "页码" default(1) @Param page_size query int false "每页数量" default(20) maximum(100) @Success 200 {object} map[string]interface{} "获取成功" @Failure 401 {object} map[string]interface{} "认证失败" @Failure 500 {object} map[string]interface{} "服务器内部错误" @Router /api/public/hot-dramas [get]
func (*PublicAPIHandler) SearchResources ¶
func (h *PublicAPIHandler) SearchResources(c *gin.Context)
SearchResources godoc @Summary 资源搜索 @Description 搜索资源,支持关键词、标签、分类过滤 @Tags PublicAPI @Accept json @Produce json @Param X-API-Token header string true "API访问令牌" @Param keyword query string false "搜索关键词" @Param tag query string false "标签过滤" @Param category query string false "分类过滤" @Param page query int false "页码" default(1) @Param page_size query int false "每页数量" default(20) maximum(100) @Success 200 {object} map[string]interface{} "搜索成功" @Failure 401 {object} map[string]interface{} "认证失败" @Failure 500 {object} map[string]interface{} "服务器内部错误" @Router /api/public/resources/search [get]
type Response ¶
type Response struct {
Success bool `json:"success"`
Message string `json:"message"`
Data interface{} `json:"data"`
Code int `json:"code"`
}
Response 统一响应格式
type SystemConfigHandler ¶
type SystemConfigHandler struct {
// contains filtered or unexported fields
}
SystemConfigHandler 系统配置处理器
func NewSystemConfigHandler ¶
func NewSystemConfigHandler(systemConfigRepo repo.SystemConfigRepository) *SystemConfigHandler
NewSystemConfigHandler 创建系统配置处理器
func (*SystemConfigHandler) GetConfig ¶
func (h *SystemConfigHandler) GetConfig(c *gin.Context)
GetConfig 获取系统配置
func (*SystemConfigHandler) UpdateConfig ¶
func (h *SystemConfigHandler) UpdateConfig(c *gin.Context)
UpdateConfig 更新系统配置