Documentation
¶
Index ¶
- type APIAccessLogFilterRequest
- type APIAccessLogListResponse
- type APIAccessLogResponse
- type APIAccessLogStatsResponse
- type APIAccessLogSummaryResponse
- type BatchCreateReadyResourceRequest
- type BatchReadyResourceRequest
- type BatchTransferInputData
- type BatchTransferOutputData
- type BatchTransferTaskConfig
- type CategoryResponse
- type ChangePasswordRequest
- type CksResponse
- type CleanupTaskConfig
- type CreateCategoryRequest
- type CreateCksRequest
- type CreatePanRequest
- type CreateReadyResourceRequest
- type CreateResourceRequest
- type CreateTagRequest
- type CreateUserRequest
- type DailySearchStatResponse
- type DataSyncTaskConfig
- type FileDeleteRequest
- type FileListRequest
- type FileListResponse
- type FileResponse
- type FileUpdateRequest
- type FileUploadRequest
- type FileUploadResponse
- type HotDramaListResponse
- type HotDramaRequest
- type HotDramaResponse
- type HotKeywordResponse
- type LoginRequest
- type LoginResponse
- type PanResponse
- type ReadyResourceRequest
- type ReadyResourceResponse
- type RegisterRequest
- type ResourceResponse
- type SearchRequest
- type SearchResponse
- type SearchStatRequest
- type SearchStatResponse
- type SearchStatsResponse
- type SearchTrendResponse
- type Stats
- type SystemConfigItem
- type SystemConfigListResponse
- type SystemConfigRequest
- type SystemConfigResponse
- type TagResponse
- type TaskConfig
- type TaskItemData
- type TelegramBotConfigRequest
- type TelegramBotConfigResponse
- type TelegramChannelRequest
- type TelegramChannelResponse
- type TelegramChannelUpdateRequest
- type UpdateCategoryRequest
- type UpdateCksRequest
- type UpdatePanRequest
- type UpdateResourceRequest
- type UpdateTagRequest
- type UpdateUserRequest
- type UserResponse
- type ValidateTelegramApiKeyRequest
- type ValidateTelegramApiKeyResponse
- type WechatBotConfigRequest
- type WechatBotConfigResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIAccessLogFilterRequest ¶ added in v1.3.1
type APIAccessLogFilterRequest struct {
StartDate string `json:"start_date,omitempty"`
EndDate string `json:"end_date,omitempty"`
Endpoint string `json:"endpoint,omitempty"`
IP string `json:"ip,omitempty"`
Page int `json:"page,omitempty" default:"1"`
PageSize int `json:"page_size,omitempty" default:"20"`
}
APIAccessLogFilterRequest API访问日志过滤请求
type APIAccessLogListResponse ¶ added in v1.3.1
type APIAccessLogListResponse struct {
Data []APIAccessLogResponse `json:"data"`
Total int64 `json:"total"`
}
APIAccessLogListResponse API访问日志列表响应
type APIAccessLogResponse ¶ added in v1.3.1
type APIAccessLogResponse struct {
ID uint `json:"id"`
IP string `json:"ip"`
UserAgent string `json:"user_agent"`
Endpoint string `json:"endpoint"`
Method string `json:"method"`
RequestParams string `json:"request_params"`
ResponseStatus int `json:"response_status"`
ResponseData string `json:"response_data"`
ProcessCount int `json:"process_count"`
ErrorMessage string `json:"error_message"`
ProcessingTime int64 `json:"processing_time"`
CreatedAt time.Time `json:"created_at"`
}
APIAccessLogResponse API访问日志响应
type APIAccessLogStatsResponse ¶ added in v1.3.1
type APIAccessLogStatsResponse struct {
Endpoint string `json:"endpoint"`
Method string `json:"method"`
RequestCount int64 `json:"request_count"`
ErrorCount int64 `json:"error_count"`
AvgProcessTime int64 `json:"avg_process_time"`
LastAccess time.Time `json:"last_access"`
}
APIAccessLogStatsResponse 按端点统计响应
type APIAccessLogSummaryResponse ¶ added in v1.3.1
type APIAccessLogSummaryResponse struct {
TotalRequests int64 `json:"total_requests"`
TodayRequests int64 `json:"today_requests"`
WeekRequests int64 `json:"week_requests"`
MonthRequests int64 `json:"month_requests"`
ErrorRequests int64 `json:"error_requests"`
UniqueIPs int64 `json:"unique_ips"`
}
APIAccessLogSummaryResponse API访问日志汇总响应
type BatchCreateReadyResourceRequest ¶
type BatchCreateReadyResourceRequest struct {
Resources []CreateReadyResourceRequest `json:"resources" binding:"required"`
}
BatchCreateReadyResourceRequest 批量创建待处理资源请求
type BatchReadyResourceRequest ¶
type BatchReadyResourceRequest struct {
Resources []ReadyResourceRequest `json:"resources" validate:"required"`
}
BatchReadyResourceRequest 批量待处理资源请求
type BatchTransferInputData ¶ added in v1.2.0
type BatchTransferInputData struct {
Title string `json:"title"` // 资源标题
URL string `json:"url"` // 资源链接
CategoryID *uint `json:"category_id"` // 分类ID
TagIDs []uint `json:"tag_ids"` // 标签ID列表
}
BatchTransferInputData 批量转存任务的输入数据
func (BatchTransferInputData) GetDisplayName ¶ added in v1.2.0
func (data BatchTransferInputData) GetDisplayName() string
GetDisplayName 实现TaskItemData接口
func (BatchTransferInputData) Validate ¶ added in v1.2.0
func (data BatchTransferInputData) Validate() error
Validate 验证批量转存输入数据
type BatchTransferOutputData ¶ added in v1.2.0
type BatchTransferOutputData struct {
ResourceID uint `json:"resource_id"` // 创建的资源ID
SaveURL string `json:"save_url"` // 转存后的链接
PlatformID uint `json:"platform_id"` // 平台ID
}
BatchTransferOutputData 批量转存任务的输出数据
func (BatchTransferOutputData) GetDisplayName ¶ added in v1.2.0
func (data BatchTransferOutputData) GetDisplayName() string
GetDisplayName 实现TaskItemData接口
func (BatchTransferOutputData) Validate ¶ added in v1.2.0
func (data BatchTransferOutputData) Validate() error
Validate 验证批量转存输出数据
type BatchTransferTaskConfig ¶ added in v1.2.0
type BatchTransferTaskConfig struct {
CategoryID *uint `json:"category_id"` // 默认分类ID
TagIDs []uint `json:"tag_ids"` // 默认标签ID列表
}
BatchTransferTaskConfig 批量转存任务配置
func (BatchTransferTaskConfig) Validate ¶ added in v1.2.0
func (config BatchTransferTaskConfig) Validate() error
Validate 验证批量转存任务配置
type CategoryResponse ¶
type CategoryResponse struct {
ID uint `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
ResourceCount int64 `json:"resource_count"`
TagNames []string `json:"tag_names"`
}
CategoryResponse 分类响应
type ChangePasswordRequest ¶
type ChangePasswordRequest struct {
NewPassword string `json:"new_password" binding:"required,min=6"`
}
ChangePasswordRequest 修改密码请求
type CksResponse ¶
type CksResponse struct {
ID uint `json:"id"`
PanID uint `json:"pan_id"`
Idx int `json:"idx"`
Ck string `json:"ck"`
IsValid bool `json:"is_valid"`
Space int64 `json:"space"`
LeftSpace int64 `json:"left_space"`
UsedSpace int64 `json:"used_space"`
Username string `json:"username"`
VipStatus bool `json:"vip_status"`
ServiceType string `json:"service_type"`
Remark string `json:"remark"`
Pan *PanResponse `json:"pan,omitempty"`
}
CksResponse Cookie响应
type CleanupTaskConfig ¶ added in v1.2.0
type CleanupTaskConfig struct {
RetentionDays int `json:"retention_days"` // 保留天数
CleanupType string `json:"cleanup_type"` // 清理类型
}
CleanupTaskConfig 清理任务配置(示例)
func (CleanupTaskConfig) Validate ¶ added in v1.2.0
func (config CleanupTaskConfig) Validate() error
Validate 验证清理任务配置
type CreateCategoryRequest ¶
type CreateCategoryRequest struct {
Name string `json:"name" binding:"required"`
Description string `json:"description"`
}
CreateCategoryRequest 创建分类请求
type CreateCksRequest ¶
type CreateCksRequest struct {
PanID uint `json:"pan_id" binding:"required"`
Idx int `json:"idx"`
Ck string `json:"ck"`
IsValid bool `json:"is_valid"`
Space int64 `json:"space"`
LeftSpace int64 `json:"left_space"`
UsedSpace int64 `json:"used_space"`
Username string `json:"username"`
VipStatus bool `json:"vip_status"`
ServiceType string `json:"service_type"`
Remark string `json:"remark"`
}
CreateCksRequest 创建cookie请求
type CreatePanRequest ¶
type CreatePanRequest struct {
Name string `json:"name" binding:"required"`
Key int `json:"key"`
Icon string `json:"icon"`
Remark string `json:"remark"`
}
CreatePanRequest 创建平台请求
type CreateReadyResourceRequest ¶
type CreateReadyResourceRequest struct {
Title *string `json:"title"`
Description string `json:"description"`
URL []string `json:"url" binding:"required"`
Category string `json:"category"`
Tags string `json:"tags"`
Img string `json:"img"`
Source string `json:"source"`
Extra string `json:"extra"`
IP *string `json:"ip"`
Key string `json:"key"`
}
CreateReadyResourceRequest 创建待处理资源请求
type CreateResourceRequest ¶
type CreateResourceRequest struct {
Title string `json:"title" binding:"required"`
Description string `json:"description"`
URL string `json:"url"`
PanID *uint `json:"pan_id"`
SaveURL string `json:"save_url"`
FileSize string `json:"file_size"`
CategoryID *uint `json:"category_id"`
IsValid bool `json:"is_valid"`
IsPublic bool `json:"is_public"`
TagIDs []uint `json:"tag_ids"`
Cover string `json:"cover"`
Author string `json:"author"`
ErrorMsg string `json:"error_msg"`
}
CreateResourceRequest 创建资源请求
type CreateTagRequest ¶
type CreateTagRequest struct {
Name string `json:"name" binding:"required"`
Description string `json:"description"`
CategoryID *uint `json:"category_id"`
}
CreateTagRequest 创建标签请求
type CreateUserRequest ¶
type CreateUserRequest struct {
Username string `json:"username" binding:"required"`
Password string `json:"password" binding:"required"`
Email string `json:"email" binding:"required,email"`
Role string `json:"role"`
IsActive bool `json:"is_active"`
}
CreateUserRequest 创建用户请求
type DailySearchStatResponse ¶
type DailySearchStatResponse struct {
Date time.Time `json:"date"`
TotalSearches int `json:"total_searches"`
UniqueKeywords int `json:"unique_keywords"`
}
DailySearchStatResponse 每日搜索统计响应
type DataSyncTaskConfig ¶ added in v1.2.0
type DataSyncTaskConfig struct {
SourceType string `json:"source_type"` // 数据源类型
TargetType string `json:"target_type"` // 目标类型
SyncMode string `json:"sync_mode"` // 同步模式
}
DataSyncTaskConfig 数据同步任务配置(示例)
func (DataSyncTaskConfig) Validate ¶ added in v1.2.0
func (config DataSyncTaskConfig) Validate() error
Validate 验证数据同步任务配置
type FileDeleteRequest ¶ added in v1.2.3
type FileDeleteRequest struct {
IDs []uint `json:"ids" binding:"required"`
}
FileDeleteRequest 文件删除请求
type FileListRequest ¶ added in v1.2.3
type FileListRequest struct {
Page int `json:"page" form:"page"`
PageSize int `json:"page_size" form:"page_size"`
Search string `json:"search" form:"search"`
FileType string `json:"file_type" form:"file_type"`
Status string `json:"status" form:"status"`
UserID uint `json:"user_id" form:"user_id"`
}
FileListRequest 文件列表请求
type FileListResponse ¶ added in v1.2.3
type FileListResponse struct {
Files []FileResponse `json:"files"`
Total int64 `json:"total"`
Page int `json:"page"`
Size int `json:"size"`
}
FileListResponse 文件列表响应
type FileResponse ¶ added in v1.2.3
type FileResponse struct {
ID uint `json:"id"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
// 文件信息
OriginalName string `json:"original_name"`
FileName string `json:"file_name"`
FilePath string `json:"file_path"`
FileSize int64 `json:"file_size"`
FileType string `json:"file_type"`
MimeType string `json:"mime_type"`
FileHash string `json:"file_hash"`
// 访问信息
AccessURL string `json:"access_url"`
// 用户信息
UserID uint `json:"user_id"`
User string `json:"user"` // 用户名
// 状态信息
Status string `json:"status"`
IsPublic bool `json:"is_public"`
IsDeleted bool `json:"is_deleted"`
}
FileResponse 文件响应
type FileUpdateRequest ¶ added in v1.2.3
type FileUpdateRequest struct {
ID uint `json:"id" binding:"required"`
IsPublic *bool `json:"is_public"`
Status string `json:"status"`
}
FileUpdateRequest 文件更新请求
type FileUploadRequest ¶ added in v1.2.3
type FileUploadRequest struct {
IsPublic bool `json:"is_public" form:"is_public"` // 是否公开
FileHash string `json:"file_hash" form:"file_hash"` // 文件哈希值
}
FileUploadRequest 文件上传请求
type FileUploadResponse ¶ added in v1.2.3
type FileUploadResponse struct {
File FileResponse `json:"file"`
Message string `json:"message"`
Success bool `json:"success"`
IsDuplicate bool `json:"is_duplicate"` // 是否为重复文件
}
FileUploadResponse 文件上传响应
type HotDramaListResponse ¶
type HotDramaListResponse struct {
Total int `json:"total"`
Items []HotDramaResponse `json:"items"`
}
HotDramaListResponse 热播剧列表响应
type HotDramaRequest ¶
type HotDramaRequest struct {
Title string `json:"title" validate:"required"`
CardSubtitle string `json:"card_subtitle"`
EpisodesInfo string `json:"episodes_info"`
IsNew bool `json:"is_new"`
Rating float64 `json:"rating"`
RatingCount int `json:"rating_count"`
Year string `json:"year"`
Region string `json:"region"`
Genres string `json:"genres"`
Directors string `json:"directors"`
Actors string `json:"actors"`
PosterURL string `json:"poster_url"`
Category string `json:"category"`
SubType string `json:"sub_type"`
Rank int `json:"rank"`
Source string `json:"source"`
DoubanID string `json:"douban_id"`
DoubanURI string `json:"douban_uri"`
}
HotDramaRequest 热播剧请求
type HotDramaResponse ¶
type HotDramaResponse struct {
ID uint `json:"id"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
Title string `json:"title"`
CardSubtitle string `json:"card_subtitle"`
EpisodesInfo string `json:"episodes_info"`
IsNew bool `json:"is_new"`
Rating float64 `json:"rating"`
RatingCount int `json:"rating_count"`
Year string `json:"year"`
Region string `json:"region"`
Genres string `json:"genres"`
Directors string `json:"directors"`
Actors string `json:"actors"`
PosterURL string `json:"poster_url"`
Category string `json:"category"`
SubType string `json:"sub_type"`
Rank int `json:"rank"`
Source string `json:"source"`
DoubanID string `json:"douban_id"`
DoubanURI string `json:"douban_uri"`
}
HotDramaResponse 热播剧响应
type HotKeywordResponse ¶
type HotKeywordResponse struct {
Keyword string `json:"keyword"`
Count int `json:"count"`
Rank int `json:"rank"`
}
HotKeywordResponse 热门关键词响应
type LoginRequest ¶
type LoginRequest struct {
Username string `json:"username" binding:"required"`
Password string `json:"password" binding:"required"`
}
LoginRequest 登录请求
type LoginResponse ¶
type LoginResponse struct {
Token string `json:"token"`
User UserResponse `json:"user"`
}
LoginResponse 登录响应
type PanResponse ¶
type PanResponse struct {
ID uint `json:"id"`
Name string `json:"name"`
Key int `json:"key"`
Icon string `json:"icon"`
Remark string `json:"remark"`
}
PanResponse 平台响应
type ReadyResourceRequest ¶
type ReadyResourceRequest struct {
Title string `json:"title" validate:"required" example:"示例资源标题"`
Description string `json:"description" example:"这是一个示例资源描述"`
Url []string `json:"url" validate:"required" example:"https://example.com/resource"`
Category string `json:"category" example:"示例分类"`
Tags string `json:"tags" example:"标签1,标签2"`
Img string `json:"img" example:"https://example.com/image.jpg"`
Source string `json:"source" example:"数据来源"`
Extra string `json:"extra" example:"额外信息"`
ErrorMsg string `json:"error_msg" example:"错误信息"`
}
ReadyResourceRequest 待处理资源请求
type ReadyResourceResponse ¶
type ReadyResourceResponse struct {
ID uint `json:"id"`
Title *string `json:"title"`
Description string `json:"description"`
URL string `json:"url"`
Category string `json:"category"`
Tags string `json:"tags"`
Img string `json:"img"`
Source string `json:"source"`
Extra string `json:"extra"`
Key string `json:"key"`
ErrorMsg string `json:"error_msg"`
CreateTime time.Time `json:"create_time"`
IP *string `json:"ip"`
DeletedAt *time.Time `json:"deleted_at,omitempty"`
IsDeleted bool `json:"is_deleted"`
}
ReadyResourceResponse 待处理资源响应
type RegisterRequest ¶
type RegisterRequest struct {
Username string `json:"username" binding:"required"`
Password string `json:"password" binding:"required"`
Email string `json:"email" binding:"required,email"`
}
RegisterRequest 注册请求
type ResourceResponse ¶
type ResourceResponse struct {
ID uint `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
URL string `json:"url"`
PanID *uint `json:"pan_id"`
SaveURL string `json:"save_url"`
FileSize string `json:"file_size"`
CategoryID *uint `json:"category_id"`
CategoryName string `json:"category_name"`
ViewCount int `json:"view_count"`
IsValid bool `json:"is_valid"`
IsPublic bool `json:"is_public"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Tags []TagResponse `json:"tags"`
Cover string `json:"cover"`
Author string `json:"author"`
ErrorMsg string `json:"error_msg"`
SyncedToMeilisearch bool `json:"synced_to_meilisearch"`
SyncedAt *time.Time `json:"synced_at"`
// 高亮字段
TitleHighlight string `json:"title_highlight,omitempty"`
DescriptionHighlight string `json:"description_highlight,omitempty"`
CategoryHighlight string `json:"category_highlight,omitempty"`
TagsHighlight []string `json:"tags_highlight,omitempty"`
// 违禁词相关字段
HasForbiddenWords bool `json:"has_forbidden_words"`
ForbiddenWords []string `json:"forbidden_words"`
}
ResourceResponse 资源响应
type SearchRequest ¶
type SearchRequest struct {
Query string `json:"query"`
CategoryID *uint `json:"category_id"`
Page int `json:"page"`
Limit int `json:"limit"`
}
SearchRequest 搜索请求
type SearchResponse ¶
type SearchResponse struct {
Resources []ResourceResponse `json:"resources"`
Total int64 `json:"total"`
Page int `json:"page"`
Limit int `json:"limit"`
}
SearchResponse 搜索响应
type SearchStatRequest ¶
type SearchStatRequest struct {
Keyword string `json:"keyword" binding:"required"`
}
SearchStatRequest 搜索统计请求
type SearchStatResponse ¶
type SearchStatResponse struct {
ID uint `json:"id"`
Keyword string `json:"keyword"`
Count int `json:"count"`
Date time.Time `json:"date"`
CreatedAt time.Time `json:"created_at"`
}
SearchStatResponse 搜索统计响应
type SearchStatsResponse ¶
type SearchStatsResponse struct {
TodaySearches int `json:"today_searches"`
WeekSearches int `json:"week_searches"`
MonthSearches int `json:"month_searches"`
HotKeywords []HotKeywordResponse `json:"hot_keywords"`
DailyStats []DailySearchStatResponse `json:"daily_stats"`
SearchTrend SearchTrendResponse `json:"search_trend"`
}
SearchStatsResponse 搜索统计总览响应
type SearchTrendResponse ¶
SearchTrendResponse 搜索趋势响应
type Stats ¶
type Stats struct {
TotalResources int64 `json:"total_resources"`
TotalCategories int64 `json:"total_categories"`
TotalTags int64 `json:"total_tags"`
TotalViews int64 `json:"total_views"`
}
Stats 统计信息
type SystemConfigItem ¶ added in v1.0.10
type SystemConfigItem struct {
Key string `json:"key"`
Value string `json:"value"`
Type string `json:"type"`
}
SystemConfigItem 单个配置项
type SystemConfigListResponse ¶ added in v1.0.10
type SystemConfigListResponse struct {
Configs []SystemConfigItem `json:"configs"`
}
SystemConfigListResponse 配置列表响应
type SystemConfigRequest ¶
type SystemConfigRequest struct {
// SEO 配置
SiteTitle *string `json:"site_title,omitempty"`
SiteDescription *string `json:"site_description,omitempty"`
Keywords *string `json:"keywords,omitempty"`
Author *string `json:"author,omitempty"`
Copyright *string `json:"copyright,omitempty"`
SiteLogo *string `json:"site_logo,omitempty"`
// 自动处理配置组
AutoProcessReadyResources *bool `json:"auto_process_ready_resources,omitempty"` // 自动处理待处理资源
AutoProcessInterval *int `json:"auto_process_interval,omitempty"` // 自动处理间隔(分钟)
AutoTransferEnabled *bool `json:"auto_transfer_enabled,omitempty"` // 开启自动转存
AutoTransferLimitDays *int `json:"auto_transfer_limit_days,omitempty"` // 自动转存限制天数(0表示不限制)
AutoTransferMinSpace *int `json:"auto_transfer_min_space,omitempty"` // 最小存储空间(GB)
AutoFetchHotDramaEnabled *bool `json:"auto_fetch_hot_drama_enabled,omitempty"` // 自动拉取热播剧名字
// API配置
ApiToken *string `json:"api_token,omitempty"` // 公开API访问令牌
// 违禁词配置
ForbiddenWords *string `json:"forbidden_words,omitempty"` // 违禁词列表,用逗号分隔
// 广告配置
AdKeywords *string `json:"ad_keywords,omitempty"` // 广告关键词列表,用逗号分隔
AutoInsertAd *string `json:"auto_insert_ad,omitempty"` // 自动插入广告内容
// 其他配置
PageSize *int `json:"page_size,omitempty"`
MaintenanceMode *bool `json:"maintenance_mode,omitempty"`
EnableRegister *bool `json:"enable_register,omitempty"` // 开启注册功能
// 三方统计配置
ThirdPartyStatsCode *string `json:"third_party_stats_code,omitempty"` // 三方统计代码
// Meilisearch配置
MeilisearchEnabled *bool `json:"meilisearch_enabled,omitempty"`
MeilisearchHost *string `json:"meilisearch_host,omitempty"`
MeilisearchPort *string `json:"meilisearch_port,omitempty"`
MeilisearchMasterKey *string `json:"meilisearch_master_key,omitempty"`
MeilisearchIndexName *string `json:"meilisearch_index_name,omitempty"`
// 界面配置
EnableAnnouncements *bool `json:"enable_announcements,omitempty"`
Announcements *[]map[string]interface{} `json:"announcements,omitempty"`
EnableFloatButtons *bool `json:"enable_float_buttons,omitempty"`
WechatSearchImage *string `json:"wechat_search_image,omitempty"`
TelegramQrImage *string `json:"telegram_qr_image,omitempty"`
QrCodeStyle *string `json:"qr_code_style,omitempty"`
}
SystemConfigRequest 系统配置请求
type SystemConfigResponse ¶
type SystemConfigResponse struct {
ID uint `json:"id"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
// SEO 配置
SiteTitle string `json:"site_title"`
SiteDescription string `json:"site_description"`
Keywords string `json:"keywords"`
Author string `json:"author"`
Copyright string `json:"copyright"`
SiteLogo string `json:"site_logo"`
// 自动处理配置组
AutoProcessReadyResources bool `json:"auto_process_ready_resources"` // 自动处理待处理资源
AutoProcessInterval int `json:"auto_process_interval"` // 自动处理间隔(分钟)
AutoTransferEnabled bool `json:"auto_transfer_enabled"` // 开启自动转存
AutoTransferLimitDays int `json:"auto_transfer_limit_days"` // 自动转存限制天数(0表示不限制)
AutoTransferMinSpace int `json:"auto_transfer_min_space"` // 最小存储空间(GB)
AutoFetchHotDramaEnabled bool `json:"auto_fetch_hot_drama_enabled"` // 自动拉取热播剧名字
// API配置
ApiToken string `json:"api_token"` // 公开API访问令牌
// 违禁词配置
ForbiddenWords string `json:"forbidden_words"` // 违禁词列表,用逗号分隔
// 广告配置
AdKeywords string `json:"ad_keywords"` // 广告关键词列表,用逗号分隔
AutoInsertAd string `json:"auto_insert_ad"` // 自动插入广告内容
// 其他配置
PageSize int `json:"page_size"`
MaintenanceMode bool `json:"maintenance_mode"`
EnableRegister bool `json:"enable_register"` // 开启注册功能
// 三方统计配置
ThirdPartyStatsCode string `json:"third_party_stats_code"` // 三方统计代码
// Meilisearch配置
MeilisearchEnabled bool `json:"meilisearch_enabled"`
MeilisearchHost string `json:"meilisearch_host"`
MeilisearchPort string `json:"meilisearch_port"`
MeilisearchMasterKey string `json:"meilisearch_master_key"`
MeilisearchIndexName string `json:"meilisearch_index_name"`
// 界面配置
EnableAnnouncements bool `json:"enable_announcements"`
Announcements string `json:"announcements"`
EnableFloatButtons bool `json:"enable_float_buttons"`
WechatSearchImage string `json:"wechat_search_image"`
TelegramQrImage string `json:"telegram_qr_image"`
QrCodeStyle string `json:"qr_code_style"`
}
SystemConfigResponse 系统配置响应
type TagResponse ¶
type TagResponse struct {
ID uint `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
CategoryID *uint `json:"category_id"`
CategoryName string `json:"category_name"`
ResourceCount int64 `json:"resource_count"`
}
TagResponse 标签响应
type TaskConfig ¶ added in v1.2.0
type TaskConfig interface {
// Validate 验证配置有效性
Validate() error
}
TaskConfig 通用任务配置接口
type TaskItemData ¶ added in v1.2.0
type TaskItemData interface {
// GetDisplayName 获取显示名称(用于前端显示)
GetDisplayName() string
// Validate 验证数据有效性
Validate() error
}
TaskItemData 通用任务项数据接口
type TelegramBotConfigRequest ¶ added in v1.3.0
type TelegramBotConfigRequest struct {
BotEnabled *bool `json:"bot_enabled"`
BotApiKey *string `json:"bot_api_key"`
AutoReplyEnabled *bool `json:"auto_reply_enabled"`
AutoReplyTemplate *string `json:"auto_reply_template"`
AutoDeleteEnabled *bool `json:"auto_delete_enabled"`
AutoDeleteInterval *int `json:"auto_delete_interval"`
ProxyEnabled *bool `json:"proxy_enabled"`
ProxyType *string `json:"proxy_type"`
ProxyHost *string `json:"proxy_host"`
ProxyPort *int `json:"proxy_port"`
ProxyUsername *string `json:"proxy_username"`
ProxyPassword *string `json:"proxy_password"`
}
TelegramBotConfigRequest Telegram 机器人配置请求
type TelegramBotConfigResponse ¶ added in v1.3.0
type TelegramBotConfigResponse struct {
BotEnabled bool `json:"bot_enabled"`
BotApiKey string `json:"bot_api_key"`
AutoReplyEnabled bool `json:"auto_reply_enabled"`
AutoReplyTemplate string `json:"auto_reply_template"`
AutoDeleteEnabled bool `json:"auto_delete_enabled"`
AutoDeleteInterval int `json:"auto_delete_interval"`
ProxyEnabled bool `json:"proxy_enabled"`
ProxyType string `json:"proxy_type"`
ProxyHost string `json:"proxy_host"`
ProxyPort int `json:"proxy_port"`
ProxyUsername string `json:"proxy_username"`
ProxyPassword string `json:"proxy_password"`
}
TelegramBotConfigResponse Telegram 机器人配置响应
type TelegramChannelRequest ¶ added in v1.3.0
type TelegramChannelRequest struct {
ChatID int64 `json:"chat_id" binding:"required"`
ChatName string `json:"chat_name" binding:"required"`
ChatType string `json:"chat_type" binding:"required"` // channel 或 group
PushEnabled bool `json:"push_enabled"`
PushFrequency int `json:"push_frequency"`
PushStartTime string `json:"push_start_time"`
PushEndTime string `json:"push_end_time"`
ContentCategories string `json:"content_categories"`
ContentTags string `json:"content_tags"`
IsActive bool `json:"is_active"`
ResourceStrategy string `json:"resource_strategy"`
TimeLimit string `json:"time_limit"`
}
TelegramChannelRequest 创建 Telegram 频道/群组请求
type TelegramChannelResponse ¶ added in v1.3.0
type TelegramChannelResponse struct {
ID uint `json:"id"`
ChatID int64 `json:"chat_id"`
ChatName string `json:"chat_name"`
ChatType string `json:"chat_type"`
PushEnabled bool `json:"push_enabled"`
PushFrequency int `json:"push_frequency"`
PushStartTime string `json:"push_start_time"`
PushEndTime string `json:"push_end_time"`
ContentCategories string `json:"content_categories"`
ContentTags string `json:"content_tags"`
IsActive bool `json:"is_active"`
ResourceStrategy string `json:"resource_strategy"`
TimeLimit string `json:"time_limit"`
LastPushAt *time.Time `json:"last_push_at"`
RegisteredBy string `json:"registered_by"`
RegisteredAt time.Time `json:"registered_at"`
}
TelegramChannelResponse Telegram 频道/群组响应
type TelegramChannelUpdateRequest ¶ added in v1.3.0
type TelegramChannelUpdateRequest struct {
ChatID int64 `json:"chat_id"` // 可选,用于验证
ChatName string `json:"chat_name" binding:"required"`
ChatType string `json:"chat_type" binding:"required"` // channel 或 group
PushEnabled bool `json:"push_enabled"`
PushFrequency int `json:"push_frequency"`
PushStartTime string `json:"push_start_time"`
PushEndTime string `json:"push_end_time"`
ContentCategories string `json:"content_categories"`
ContentTags string `json:"content_tags"`
IsActive bool `json:"is_active"`
ResourceStrategy string `json:"resource_strategy"`
TimeLimit string `json:"time_limit"`
}
TelegramChannelUpdateRequest 更新 Telegram 频道/群组请求(ChatID可选)
type UpdateCategoryRequest ¶
type UpdateCategoryRequest struct {
Name string `json:"name"`
Description string `json:"description"`
}
UpdateCategoryRequest 更新分类请求
type UpdateCksRequest ¶
type UpdateCksRequest struct {
PanID uint `json:"pan_id"`
Idx int `json:"idx"`
Ck string `json:"ck"`
IsValid bool `json:"is_valid"`
Space int64 `json:"space"`
LeftSpace int64 `json:"left_space"`
UsedSpace int64 `json:"used_space"`
Username string `json:"username"`
VipStatus bool `json:"vip_status"`
ServiceType string `json:"service_type"`
Remark string `json:"remark"`
}
UpdateCksRequest 更新cookie请求
type UpdatePanRequest ¶
type UpdatePanRequest struct {
Name string `json:"name"`
Key int `json:"key"`
Icon string `json:"icon"`
Remark string `json:"remark"`
}
UpdatePanRequest 更新平台请求
type UpdateResourceRequest ¶
type UpdateResourceRequest struct {
Title string `json:"title"`
Description string `json:"description"`
URL string `json:"url"`
PanID *uint `json:"pan_id"`
SaveURL string `json:"save_url"`
FileSize string `json:"file_size"`
CategoryID *uint `json:"category_id"`
IsValid bool `json:"is_valid"`
IsPublic bool `json:"is_public"`
TagIDs []uint `json:"tag_ids"`
Cover string `json:"cover"`
Author string `json:"author"`
ErrorMsg string `json:"error_msg"`
}
UpdateResourceRequest 更新资源请求
type UpdateTagRequest ¶
type UpdateTagRequest struct {
Name string `json:"name"`
Description string `json:"description"`
CategoryID *uint `json:"category_id"`
}
UpdateTagRequest 更新标签请求
type UpdateUserRequest ¶
type UpdateUserRequest struct {
Username string `json:"username"`
Email string `json:"email"`
Role string `json:"role"`
IsActive bool `json:"is_active"`
}
UpdateUserRequest 更新用户请求
type UserResponse ¶
type UserResponse struct {
ID uint `json:"id"`
Username string `json:"username"`
Email string `json:"email"`
Role string `json:"role"`
IsActive bool `json:"is_active"`
LastLogin *time.Time `json:"last_login"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
UserResponse 用户响应
type ValidateTelegramApiKeyRequest ¶ added in v1.3.0
type ValidateTelegramApiKeyRequest struct {
ApiKey string `json:"api_key" binding:"required"`
ProxyEnabled bool `json:"proxy_enabled"`
ProxyType string `json:"proxy_type"`
ProxyHost string `json:"proxy_host"`
ProxyPort int `json:"proxy_port"`
ProxyUsername string `json:"proxy_username"`
ProxyPassword string `json:"proxy_password"`
}
ValidateTelegramApiKeyRequest 验证 Telegram API Key 请求
type ValidateTelegramApiKeyResponse ¶ added in v1.3.0
type ValidateTelegramApiKeyResponse struct {
Valid bool `json:"valid"`
Error string `json:"error,omitempty"`
BotInfo map[string]interface{} `json:"bot_info,omitempty"`
}
ValidateTelegramApiKeyResponse 验证 Telegram API Key 响应
type WechatBotConfigRequest ¶ added in v1.3.3
type WechatBotConfigRequest struct {
Enabled bool `json:"enabled"`
AppID string `json:"app_id"`
AppSecret string `json:"app_secret"`
Token string `json:"token"`
EncodingAesKey string `json:"encoding_aes_key"`
WelcomeMessage string `json:"welcome_message"`
AutoReplyEnabled bool `json:"auto_reply_enabled"`
SearchLimit int `json:"search_limit"`
}
WechatBotConfigRequest 微信公众号机器人配置请求
type WechatBotConfigResponse ¶ added in v1.3.3
type WechatBotConfigResponse struct {
Enabled bool `json:"enabled"`
AppID string `json:"app_id"`
AppSecret string `json:"app_secret"`
Token string `json:"token"`
EncodingAesKey string `json:"encoding_aes_key"`
WelcomeMessage string `json:"welcome_message"`
AutoReplyEnabled bool `json:"auto_reply_enabled"`
SearchLimit int `json:"search_limit"`
}
WechatBotConfigResponse 微信公众号机器人配置响应