web

package
v1.0.0-rc.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2026 License: MIT Imports: 73 Imported by: 0

Documentation

Overview

Package web provides HTTP server and API handlers

Index

Constants

View Source
const (

	// AppRemoteAPILevel 是 App API 的兼容级别:不兼容的改动才加一,App 遇到不认识的级别时提示升级
	AppRemoteAPILevel = 1
)

Variables

This section is empty.

Functions

func AddDeprecatedEndpoint added in v0.2.0

func AddDeprecatedEndpoint(path, replacement, version, message string)

AddDeprecatedEndpoint registers a deprecated endpoint This can be called during initialization to mark endpoints as deprecated

func GetAllSiteCategories added in v0.2.0

func GetAllSiteCategories() map[string]SiteCategoriesConfig

GetAllSiteCategories 获取所有站点的分类配置

func GetDeprecatedEndpoints added in v0.2.0

func GetDeprecatedEndpoints() map[string]DeprecatedEndpoint

GetDeprecatedEndpoints returns all deprecated endpoints

func GetSearchOrchestrator added in v0.2.0

func GetSearchOrchestrator() *v2.CachedSearchOrchestrator

GetSearchOrchestrator returns the global search orchestrator

func GetSiteRegistry added in v0.2.0

func GetSiteRegistry() *v2.SiteRegistry

GetSiteRegistry returns the global site registry

func GetUserInfoService added in v0.2.0

func GetUserInfoService() *v2.UserInfoService

GetUserInfoService returns the global user info service

func InitSearchOrchestrator added in v0.2.0

func InitSearchOrchestrator(orchestrator *v2.CachedSearchOrchestrator)

InitSearchOrchestrator initializes the global search orchestrator

func InitSiteRegistry added in v0.2.0

func InitSiteRegistry(registry *v2.SiteRegistry)

InitSiteRegistry initializes the global site registry

func InitUserInfoService added in v0.2.0

func InitUserInfoService(service *v2.UserInfoService)

InitUserInfoService initializes the global user info service

func IsDeprecated added in v0.2.0

func IsDeprecated(path string) bool

IsDeprecated checks if an endpoint is deprecated

func ListSupportedSites added in v0.2.0

func ListSupportedSites() []string

ListSupportedSites 列出支持分类筛选的站点

func RefreshSiteRegistrations added in v0.2.0

func RefreshSiteRegistrations(store interface {
	ListSites() (map[models.SiteGroup]models.SiteConfig, error)
},
) error

RefreshSiteRegistrations refreshes site registrations based on current enabled sites This should be called when site configurations change

func RegisterChatOpsRoutes added in v0.31.0

func RegisterChatOpsRoutes(mux *http.ServeMux, deps *ChatOpsDeps, requireAuth func(http.Handler) http.Handler)

Types

type AddDownloaderTorrentRequest added in v0.18.0

type AddDownloaderTorrentRequest struct {
	DownloaderIDs []uint `json:"downloader_ids"`
	SourceURL     string `json:"source_url"`
	MagnetLink    string `json:"magnet_link"`
	TorrentBase64 string `json:"torrent_base64"`
	SavePath      string `json:"save_path"`
	Category      string `json:"category"`
	Tags          string `json:"tags"`
	AddPaused     bool   `json:"add_paused"`
}

type AddDownloaderTorrentResponse added in v0.18.0

type AddDownloaderTorrentResponse struct {
	SuccessCount int                          `json:"success_count"`
	FailedCount  int                          `json:"failed_count"`
	Results      []AddDownloaderTorrentResult `json:"results"`
}

type AddDownloaderTorrentResult added in v0.18.0

type AddDownloaderTorrentResult struct {
	DownloaderID   uint   `json:"downloader_id"`
	DownloaderName string `json:"downloader_name"`
	Success        bool   `json:"success"`
	TaskID         string `json:"task_id,omitempty"`
	Hash           string `json:"hash,omitempty"`
	Message        string `json:"message,omitempty"`
}

type AggregatedStatsResponse added in v0.2.0

type AggregatedStatsResponse struct {
	TotalUploaded   int64              `json:"totalUploaded"`
	TotalDownloaded int64              `json:"totalDownloaded"`
	AverageRatio    float64            `json:"averageRatio"`
	TotalSeeding    int                `json:"totalSeeding"`
	TotalLeeching   int                `json:"totalLeeching"`
	TotalBonus      float64            `json:"totalBonus"`
	SiteCount       int                `json:"siteCount"`
	LastUpdate      int64              `json:"lastUpdate"`
	PerSiteStats    []UserInfoResponse `json:"perSiteStats"`
	// Extended aggregated fields
	TotalBonusPerHour   float64 `json:"totalBonusPerHour,omitempty"`
	TotalSeedingBonus   float64 `json:"totalSeedingBonus,omitempty"`
	TotalUnreadMessages int     `json:"totalUnreadMessages,omitempty"`
	TotalSeederSize     int64   `json:"totalSeederSize,omitempty"`
	TotalLeecherSize    int64   `json:"totalLeecherSize,omitempty"`
}

AggregatedStatsResponse represents aggregated stats API response

type AllSiteLevelsResponse added in v0.2.0

type AllSiteLevelsResponse struct {
	Sites map[string]SiteLevelsResponse `json:"sites"`
}

AllSiteLevelsResponse represents the response for all sites' level requirements

type AppBrushStat

type AppBrushStat struct {
	Uploaded   int64 `json:"uploaded"`
	Downloaded int64 `json:"downloaded"`
	Added      int   `json:"added"`
	Removed    int   `json:"removed"`
}

AppBrushStat 是一段时间的刷流收益。

type AppBrushTask

type AppBrushTask struct {
	ID          uint         `json:"id"`
	Name        string       `json:"name"`
	Enabled     bool         `json:"enabled"`
	Site        string       `json:"site"`
	SiteEnabled bool         `json:"site_enabled"`
	Downloader  string       `json:"downloader"`
	Active      int          `json:"active"`
	Downloading int          `json:"downloading"`
	ActiveSize  int64        `json:"active_size"`
	Today       AppBrushStat `json:"today"`
	Total       AppBrushStat `json:"total"`
}

AppBrushTask 是 GET /brush/tasks 的一项。

type AppDelta

type AppDelta struct {
	From       string         `json:"from"`
	To         string         `json:"to"`
	Uploaded   int64          `json:"uploaded"`
	Downloaded int64          `json:"downloaded"`
	Bonus      float64        `json:"bonus"`
	Sites      []AppSiteDelta `json:"sites"`
	Error      string         `json:"error,omitempty"`
}

AppDelta 是一段时间里的增量(站点数据历史,M2)。Error 不为空时增量没算出来,数字都是 0,不代表这段时间没有流量。

type AppDownloader

type AppDownloader struct {
	ID      uint   `json:"id"`
	Name    string `json:"name"`
	Type    string `json:"type"`
	Default bool   `json:"default"`
	// Reachable 是这一次读到了状态或剩余空间;读不到时 Error 写明原因
	Reachable     bool   `json:"reachable"`
	Error         string `json:"error,omitempty"`
	Version       string `json:"version,omitempty"`
	UploadSpeed   int64  `json:"upload_speed"`
	DownloadSpeed int64  `json:"download_speed"`
	// Uploaded、Downloaded 是下载器自己记的累计量
	Uploaded   int64 `json:"uploaded"`
	Downloaded int64 `json:"downloaded"`
	FreeSpace  int64 `json:"free_space"`
}

AppDownloader 是 GET /downloaders 的一项:启用的下载器与它现在的传输状态。不含地址、账号与密码。

type AppDownloaderFailure

type AppDownloaderFailure struct {
	DownloaderID uint   `json:"downloader_id"`
	Downloader   string `json:"downloader"`
	Error        string `json:"error"`
}

AppDownloaderFailure 是一台没取到种子的下载器。

type AppDownloaderList

type AppDownloaderList struct {
	Items []AppDownloader `json:"items"`
}

AppDownloaderList 是 GET /downloaders。

type AppEpisode

type AppEpisode struct {
	Number  int    `json:"number"`
	Name    string `json:"name,omitempty"`
	AirDate string `json:"air_date,omitempty"`
	State   string `json:"state"`
}

AppEpisode 是剧集一集的情况:library、downloading、missing 或 upcoming。

type AppExploreItem

type AppExploreItem struct {
	ID             int     `json:"id"`
	MediaType      string  `json:"media_type"`
	Title          string  `json:"title"`
	OriginalTitle  string  `json:"original_title,omitempty"`
	Year           int     `json:"year,omitempty"`
	Overview       string  `json:"overview,omitempty"`
	PosterPath     string  `json:"poster_path,omitempty"`
	VoteAverage    float64 `json:"vote_average,omitempty"`
	InLibrary      bool    `json:"in_library"`
	Subscribed     bool    `json:"subscribed"`
	SubscriptionID uint    `json:"subscription_id,omitempty"`
}

AppExploreItem 是 TMDB 的一个条目,标上已入库、已订阅。

type AppExplorePage

type AppExplorePage struct {
	Items      []AppExploreItem `json:"items"`
	Page       int              `json:"page"`
	TotalPages int              `json:"total_pages"`
}

AppExplorePage 是 GET /explore 的回应。

type AppMediaHistory

type AppMediaHistory struct {
	ID          uint   `json:"id"`
	MediaType   string `json:"media_type"`
	TMDBID      int    `json:"tmdb_id"`
	Title       string `json:"title"`
	Year        int    `json:"year,omitempty"`
	Season      int    `json:"season,omitempty"`
	Episode     int    `json:"episode,omitempty"`
	EpisodeEnd  int    `json:"episode_end,omitempty"`
	TorrentName string `json:"torrent_name"`
	Library     string `json:"library,omitempty"`
	TargetPath  string `json:"target_path,omitempty"`
	Mode        string `json:"mode"`
	Size        int64  `json:"size"`
	Status      string `json:"status"`
	Message     string `json:"message,omitempty"`
	CreatedAt   int64  `json:"created_at"`
}

AppMediaHistory 是 GET /media/history 的一项。

type AppMeta

type AppMeta struct {
	Name           string        `json:"name"`
	Version        string        `json:"version"`
	RemoteAPILevel int           `json:"remote_api_level"`
	Features       []string      `json:"features"`
	Principal      AppPrincipalV `json:"principal"`
}

AppMeta 是 GET /meta 的回应。

type AppOverview

type AppOverview struct {
	Totals    AppTotals `json:"totals"`
	Today     AppDelta  `json:"today"`
	UpdatedAt int64     `json:"updated_at"`
}

AppOverview 是 GET /overview:已启用站点的合计与今天的增量。

type AppPage

type AppPage[T any] struct {
	Items    []T `json:"items"`
	Total    int `json:"total"`
	Page     int `json:"page"`
	PageSize int `json:"page_size"`
}

AppPage 是分页的回应。

type AppPrincipalV

type AppPrincipalV struct {
	Kind   string   `json:"kind"`
	Name   string   `json:"name,omitempty"`
	Scopes []string `json:"scopes"`
}

AppPrincipalV 是调用者自己的主体(App 用来判断能不能显示写操作)。

type AppProgress

type AppProgress struct {
	Total       int   `json:"total"`
	Aired       int   `json:"aired"`
	InLibrary   int   `json:"in_library"`
	Downloading int   `json:"downloading"`
	Missing     []int `json:"missing"`
}

AppProgress 是订阅的进度。

type AppPushRequest

type AppPushRequest struct {
	Site         string `json:"site"`
	TorrentID    string `json:"torrent_id"`
	DownloaderID uint   `json:"downloader_id"`
	Title        string `json:"title"`
	Category     string `json:"category"`
	Tags         string `json:"tags"`
	SavePath     string `json:"save_path"`
}

AppPushRequest 是 POST /push:服务端经站点下载种子文件,再经推送闸门(磁盘空间、站点做种容量)放进下载器。 DownloaderID 为 0 时用默认下载器。

type AppPushResult

type AppPushResult struct {
	Success      bool   `json:"success"`
	Skipped      bool   `json:"skipped"`
	Message      string `json:"message,omitempty"`
	InfoHash     string `json:"info_hash,omitempty"`
	DownloaderID uint   `json:"downloader_id"`
	Downloader   string `json:"downloader"`
}

AppPushResult 是 POST /push 的回应。Skipped 为真时下载器里已经有这个种子。

type AppSearchError

type AppSearchError struct {
	Site  string `json:"site"`
	Error string `json:"error"`
}

AppSearchError 是一个站点的搜索错误。

type AppSearchItem

type AppSearchItem struct {
	Site          string   `json:"site"`
	TorrentID     string   `json:"torrent_id"`
	Title         string   `json:"title"`
	Subtitle      string   `json:"subtitle,omitempty"`
	InfoHash      string   `json:"info_hash,omitempty"`
	Size          int64    `json:"size"`
	Seeders       int      `json:"seeders"`
	Leechers      int      `json:"leechers"`
	Snatched      int      `json:"snatched,omitempty"`
	UploadedAt    int64    `json:"uploaded_at,omitempty"`
	Category      string   `json:"category,omitempty"`
	Tags          []string `json:"tags,omitempty"`
	Discount      string   `json:"discount,omitempty"`
	DiscountEndAt int64    `json:"discount_end_at,omitempty"`
	Free          bool     `json:"free"`
	HasHR         bool     `json:"has_hr"`
	IMDbID        string   `json:"imdb_id,omitempty"`
	DoubanID      string   `json:"douban_id,omitempty"`
}

AppSearchItem 是一个搜索结果:只有站点与种子编号,不含详情、下载与磁力链接;推送用 POST /push。

type AppSearchRequest

type AppSearchRequest struct {
	Keyword    string   `json:"keyword"`
	Sites      []string `json:"sites"`
	Category   string   `json:"category"`
	FreeOnly   bool     `json:"free_only"`
	MinSeeders int      `json:"min_seeders"`
}

AppSearchRequest 是 POST /search:多站搜索。Sites 为空时搜所有启用的站点。

type AppSearchResult

type AppSearchResult struct {
	Items      []AppSearchItem  `json:"items"`
	Total      int              `json:"total"`
	Sites      map[string]int   `json:"sites"`
	Errors     []AppSearchError `json:"errors"`
	DurationMs int64            `json:"duration_ms"`
}

AppSearchResult 是 POST /search 的回应。

type AppSite

type AppSite struct {
	Name        string            `json:"name"`
	DisplayName string            `json:"display_name"`
	Enabled     bool              `json:"enabled"`
	Login       AppSiteLogin      `json:"login"`
	Attendance  AppSiteAttendance `json:"attendance"`
	User        *AppSiteUser      `json:"user,omitempty"`
}

AppSite 是 GET /sites 的一项:站点、登录状态、今天的签到与站点上的用户数据。不含 Cookie、API key、passkey 与站点地址。

type AppSiteAttendance

type AppSiteAttendance struct {
	Supported     bool   `json:"supported"`
	Enabled       bool   `json:"enabled"`
	Day           string `json:"day"`
	Status        string `json:"status,omitempty"`
	Message       string `json:"message,omitempty"`
	LastAttemptAt *int64 `json:"last_attempt_at,omitempty"`
}

AppSiteAttendance 是今天的签到。

type AppSiteDelta

type AppSiteDelta struct {
	Site       string  `json:"site"`
	Uploaded   int64   `json:"uploaded"`
	Downloaded int64   `json:"downloaded"`
	Bonus      float64 `json:"bonus"`
}

AppSiteDelta 是一个站点的增量。

type AppSiteList

type AppSiteList struct {
	Items     []AppSite `json:"items"`
	UserError string    `json:"user_error,omitempty"`
}

AppSiteList 是 GET /sites 的回应。UserError 不为空时站点上的用户数据没读到,各项都没有 user,不代表从没同步过。

type AppSiteLogin

type AppSiteLogin struct {
	Tier            string `json:"tier"`
	DaysRemaining   int    `json:"days_remaining"`
	LastActiveAt    *int64 `json:"last_active_at,omitempty"`
	LastProbeAt     *int64 `json:"last_probe_at,omitempty"`
	LastProbeStatus string `json:"last_probe_status,omitempty"`
}

AppSiteLogin 是登录状态:Tier 是提醒档位(none、30d、14d、7d、3d、banned-imminent,没有访问记录时是 unknown), DaysRemaining 是离封号阈值还有几天。

type AppSiteUser

type AppSiteUser struct {
	Username       string  `json:"username"`
	Level          string  `json:"level,omitempty"`
	Uploaded       int64   `json:"uploaded"`
	Downloaded     int64   `json:"downloaded"`
	Ratio          float64 `json:"ratio"`
	Bonus          float64 `json:"bonus"`
	BonusPerHour   float64 `json:"bonus_per_hour,omitempty"`
	Seeding        int     `json:"seeding"`
	Leeching       int     `json:"leeching"`
	SeedingSize    int64   `json:"seeding_size,omitempty"`
	UnreadMessages int     `json:"unread_messages"`
	HnRUnsatisfied int     `json:"hnr_unsatisfied,omitempty"`
	UpdatedAt      int64   `json:"updated_at"`
}

AppSiteUser 是站点上的用户数据。

type AppSubscription

type AppSubscription struct {
	ID            uint        `json:"id"`
	MediaType     string      `json:"media_type"`
	TMDBID        int         `json:"tmdb_id"`
	Season        int         `json:"season"`
	Title         string      `json:"title"`
	OriginalTitle string      `json:"original_title,omitempty"`
	Year          int         `json:"year,omitempty"`
	PosterPath    string      `json:"poster_path,omitempty"`
	Status        string      `json:"status"`
	Upgrade       bool        `json:"upgrade"`
	Source        string      `json:"source"`
	TotalEpisodes int         `json:"total_episodes,omitempty"`
	Progress      AppProgress `json:"progress"`
	Message       string      `json:"message,omitempty"`
	LastSearchAt  *int64      `json:"last_search_at,omitempty"`
	NextSearchAt  *int64      `json:"next_search_at,omitempty"`
	CreatedAt     int64       `json:"created_at"`
}

AppSubscription 是一个订阅。

type AppSubscriptionCreate

type AppSubscriptionCreate struct {
	MediaType string `json:"media_type"`
	TMDBID    int    `json:"tmdb_id"`
	Season    int    `json:"season"`
	ProfileID uint   `json:"profile_id"`
	Upgrade   bool   `json:"upgrade"`
}

AppSubscriptionCreate 是 POST /subscriptions:订阅一部电影或剧集的一季(Season 为 0 时订最新一季)。 ProfileID 为 0 时用设置里的默认质量档案。

type AppSubscriptionDetail

type AppSubscriptionDetail struct {
	AppSubscription
	Episodes []AppEpisode             `json:"episodes"`
	Torrents []AppSubscriptionTorrent `json:"torrents"`
}

AppSubscriptionDetail 是 GET /subscriptions/{id}:订阅、每一集与下载过的种子。

type AppSubscriptionStatus

type AppSubscriptionStatus struct {
	Status string `json:"status"`
}

AppSubscriptionStatus 是 POST /subscriptions/{id}/status:active 开始(或接着)找,paused 暂停。

type AppSubscriptionTorrent

type AppSubscriptionTorrent struct {
	Site       string `json:"site"`
	TorrentID  string `json:"torrent_id"`
	Title      string `json:"title"`
	Status     string `json:"status"`
	Episode    int    `json:"episode,omitempty"`
	EpisodeEnd int    `json:"episode_end,omitempty"`
	Complete   bool   `json:"complete"`
	Size       int64  `json:"size"`
	Message    string `json:"message,omitempty"`
	CreatedAt  int64  `json:"created_at"`
}

AppSubscriptionTorrent 是订阅下载过的一个种子。

type AppTask

type AppTask struct {
	ID          uint    `json:"id"`
	Site        string  `json:"site"`
	TorrentID   string  `json:"torrent_id"`
	Title       string  `json:"title"`
	Size        int64   `json:"size"`
	Category    string  `json:"category,omitempty"`
	Tags        string  `json:"tags,omitempty"`
	Free        bool    `json:"free"`
	FreeLevel   string  `json:"free_level,omitempty"`
	FreeEndAt   *int64  `json:"free_end_at,omitempty"`
	HasHR       bool    `json:"has_hr"`
	Pushed      bool    `json:"pushed"`
	PushedAt    *int64  `json:"pushed_at,omitempty"`
	Downloader  string  `json:"downloader,omitempty"`
	Progress    float64 `json:"progress"`
	Completed   bool    `json:"completed"`
	CompletedAt *int64  `json:"completed_at,omitempty"`
	Source      string  `json:"source,omitempty"`
	Error       string  `json:"error,omitempty"`
	CreatedAt   int64   `json:"created_at"`
}

AppTask 是 GET /tasks 的一项:RSS 推送记录。不含下载地址;错误信息去掉了地址里的查询串。

type AppTorrent

type AppTorrent struct {
	DownloaderID  uint    `json:"downloader_id"`
	Downloader    string  `json:"downloader"`
	TaskID        string  `json:"task_id"`
	InfoHash      string  `json:"info_hash"`
	Title         string  `json:"title"`
	Progress      float64 `json:"progress"`
	Size          int64   `json:"size"`
	State         string  `json:"state"`
	Ratio         float64 `json:"ratio"`
	Seeds         int     `json:"seeds"`
	Peers         int     `json:"peers"`
	UploadSpeed   int64   `json:"upload_speed"`
	DownloadSpeed int64   `json:"download_speed"`
	ETA           int64   `json:"eta"`
	AddedAt       int64   `json:"added_at"`
	CompletedAt   int64   `json:"completed_at"`
	Category      string  `json:"category,omitempty"`
	Tags          string  `json:"tags,omitempty"`
	SavePath      string  `json:"save_path,omitempty"`
}

AppTorrent 是下载器里的一个种子。

type AppTorrentActionResult

type AppTorrentActionResult struct {
	DownloaderID uint   `json:"downloader_id"`
	TaskID       string `json:"task_id"`
	Success      bool   `json:"success"`
	Message      string `json:"message,omitempty"`
}

AppTorrentActionResult 是一个种子的结果。

type AppTorrentActionsRequest

type AppTorrentActionsRequest struct {
	Action  string                `json:"action"`
	Targets []TorrentActionTarget `json:"targets"`
}

AppTorrentActionsRequest 是 POST /torrents/actions:对一批种子暂停、继续、删除(只删种子)或连数据删除。

type AppTorrentActionsResult

type AppTorrentActionsResult struct {
	Succeeded int                      `json:"succeeded"`
	Failed    int                      `json:"failed"`
	Results   []AppTorrentActionResult `json:"results"`
}

AppTorrentActionsResult 是 POST /torrents/actions 的回应。

type AppTorrentPage

type AppTorrentPage struct {
	Items    []AppTorrent           `json:"items"`
	Total    int                    `json:"total"`
	Page     int                    `json:"page"`
	PageSize int                    `json:"page_size"`
	Failures []AppDownloaderFailure `json:"failures"`
}

AppTorrentPage 是 GET /torrents 的回应:Failures 不为空时列表不完整(有下载器没取到)。

type AppTotals

type AppTotals struct {
	Uploaded       int64   `json:"uploaded"`
	Downloaded     int64   `json:"downloaded"`
	Ratio          float64 `json:"ratio"`
	Seeding        int     `json:"seeding"`
	Leeching       int     `json:"leeching"`
	Bonus          float64 `json:"bonus"`
	BonusPerHour   float64 `json:"bonus_per_hour"`
	SeedingSize    int64   `json:"seeding_size"`
	SiteCount      int     `json:"site_count"`
	UnreadMessages int     `json:"unread_messages"`
}

AppTotals 是已启用站点的合计。

type ApplyDownloaderToSitesRequest added in v0.6.0

type ApplyDownloaderToSitesRequest struct {
	SiteIDs []uint `json:"site_ids"`
}

type ApplyDownloaderToSitesResponse added in v0.6.0

type ApplyDownloaderToSitesResponse struct {
	UpdatedCount int `json:"updated_count"`
}

type ArchiveTorrentResponse added in v0.3.0

type ArchiveTorrentResponse struct {
	ID                uint       `json:"id"`
	OriginalID        uint       `json:"original_id"`
	SiteName          string     `json:"site_name"`
	Title             string     `json:"title"`
	TorrentHash       *string    `json:"torrent_hash,omitempty"`
	IsFree            bool       `json:"is_free"`
	FreeEndTime       *time.Time `json:"free_end_time,omitempty"`
	IsCompleted       bool       `json:"is_completed"`
	Progress          float64    `json:"progress"`
	IsPausedBySystem  bool       `json:"is_paused_by_system"`
	PauseReason       string     `json:"pause_reason,omitempty"`
	DownloaderName    string     `json:"downloader_name,omitempty"`
	OriginalCreatedAt time.Time  `json:"original_created_at"`
	ArchivedAt        time.Time  `json:"archived_at"`
}

ArchiveTorrentResponse 归档种子响应结构

type AttendanceSettingsDTO

type AttendanceSettingsDTO struct {
	WindowStart string `json:"window_start"`
	WindowEnd   string `json:"window_end"`
}

AttendanceSettingsDTO 是签到时间窗(HH:MM,进程时区)。

type BatchDownloadItem added in v0.2.0

type BatchDownloadItem struct {
	SiteID    string `json:"siteId"`
	TorrentID string `json:"torrentId"`
	Title     string `json:"title"`
}

BatchDownloadItem represents a single torrent in batch download request

type BatchDownloadRequest added in v0.2.0

type BatchDownloadRequest struct {
	Torrents []BatchDownloadItem `json:"torrents"`
}

BatchDownloadRequest represents a request for batch torrent download

type BatchTorrentActionRequest added in v0.18.0

type BatchTorrentActionRequest struct {
	Action   string                `json:"action"`
	Targets  []TorrentActionTarget `json:"targets"`
	SavePath string                `json:"save_path"`
}

type BatchTorrentActionResponse added in v0.18.0

type BatchTorrentActionResponse struct {
	SuccessCount int                        `json:"success_count"`
	FailedCount  int                        `json:"failed_count"`
	Results      []BatchTorrentActionResult `json:"results"`
}

type BatchTorrentActionResult added in v0.18.0

type BatchTorrentActionResult struct {
	DownloaderID   uint   `json:"downloader_id"`
	DownloaderName string `json:"downloader_name"`
	TaskID         string `json:"task_id"`
	Success        bool   `json:"success"`
	Message        string `json:"message,omitempty"`
}

type BatchTorrentPushRequest added in v0.2.0

type BatchTorrentPushRequest struct {
	Torrents      []TorrentPushItem `json:"torrents"`
	DownloaderIDs []uint            `json:"downloaderIds"`
	SavePath      string            `json:"savePath,omitempty"`
	Category      string            `json:"category,omitempty"`
	Tags          string            `json:"tags,omitempty"`
	AutoStart     *bool             `json:"autoStart,omitempty"`
}

BatchTorrentPushRequest 批量种子推送请求

type BatchTorrentPushResponse added in v0.2.0

type BatchTorrentPushResponse struct {
	Success      bool                         `json:"success"`
	TotalCount   int                          `json:"totalCount"`
	SuccessCount int                          `json:"successCount"`
	SkippedCount int                          `json:"skippedCount"` // 跳过的数量(种子已存在)
	FailedCount  int                          `json:"failedCount"`
	Results      []BatchTorrentPushResultItem `json:"results"`
}

BatchTorrentPushResponse 批量推送响应

type BatchTorrentPushResultItem added in v0.2.0

type BatchTorrentPushResultItem struct {
	TorrentTitle string                  `json:"torrentTitle"`
	SourceSite   string                  `json:"sourceSite"`
	Success      bool                    `json:"success"`
	Skipped      bool                    `json:"skipped,omitempty"` // 所有下载器都跳过时为true
	Message      string                  `json:"message,omitempty"`
	Results      []TorrentPushResultItem `json:"results,omitempty"`
}

BatchTorrentPushResultItem 批量推送单项结果

type BrushRunResponse

type BrushRunResponse struct {
	Result scheduler.BrushRunResult `json:"result"`
	Error  string                   `json:"error,omitempty"`
}

BrushRunResponse 是「立即运行」的结果;Error 不为空表示这一轮没跑完(站点或下载器出错)。

type BrushStatView

type BrushStatView struct {
	Uploaded   int64 `json:"uploaded"`
	Downloaded int64 `json:"downloaded"`
	Added      int   `json:"added"`
	Removed    int   `json:"removed"`
}

BrushStatView 是一段时间的收益。

type BrushStatsResponse

type BrushStatsResponse struct {
	Days   int                     `json:"days"`
	From   string                  `json:"from"`
	To     string                  `json:"to"`
	Dates  []string                `json:"dates"`
	Tasks  []BrushStatsTask        `json:"tasks"`
	Totals []BrushStatsSeriesPoint `json:"totals"`
}

BrushStatsResponse 是最近若干天各任务与合计的每日收益(按进程时区分天)。

type BrushStatsSeriesPoint

type BrushStatsSeriesPoint struct {
	Date string `json:"date"`
	BrushStatView
}

BrushStatsSeriesPoint 是某天的收益。

type BrushStatsTask

type BrushStatsTask struct {
	TaskID uint                    `json:"task_id"`
	Name   string                  `json:"name"`
	Series []BrushStatsSeriesPoint `json:"series"`
}

BrushStatsTask 是一个任务最近若干天每天的收益。

type BrushTaskRequest

type BrushTaskRequest struct {
	Name                        string  `json:"name"`
	Enabled                     bool    `json:"enabled"`
	SiteName                    string  `json:"site_name"`
	DownloaderID                uint    `json:"downloader_id"`
	SavePath                    string  `json:"save_path"`
	Category                    string  `json:"category"`
	Tags                        string  `json:"tags"`
	IntervalMin                 int     `json:"interval_min"`
	Discounts                   string  `json:"discounts"`
	MinFreeRemainMin            int     `json:"min_free_remain_min"`
	MinSizeGB                   float64 `json:"min_size_gb"`
	MaxSizeGB                   float64 `json:"max_size_gb"`
	MaxSeeders                  int     `json:"max_seeders"`
	MinLeechers                 int     `json:"min_leechers"`
	MaxPublishAgeMin            int     `json:"max_publish_age_min"`
	ExcludeHR                   bool    `json:"exclude_hr"`
	IncludeKeywords             string  `json:"include_keywords"`
	ExcludeKeywords             string  `json:"exclude_keywords"`
	MaxDownloading              int     `json:"max_downloading"`
	MaxTotalSizeGB              float64 `json:"max_total_size_gb"`
	MaxDailyDownloadGB          float64 `json:"max_daily_download_gb"`
	RemoveSeedTimeH             float64 `json:"remove_seed_time_h"`
	RemoveRatio                 float64 `json:"remove_ratio"`
	RemoveLowSpeedKBs           float64 `json:"remove_low_speed_kbs"`
	RemoveLowSpeedWindowMin     int     `json:"remove_low_speed_window_min"`
	RemoveInactiveH             float64 `json:"remove_inactive_h"`
	RemoveFreeExpiredIncomplete bool    `json:"remove_free_expired_incomplete"`
	RemoveWithData              bool    `json:"remove_with_data"`
}

BrushTaskRequest 是新建 / 修改刷流任务的请求体;字段含义见 models.BrushTask。

type BrushTaskView

type BrushTaskView struct {
	models.BrushTask
	DownloaderName   string        `json:"downloader_name"`
	SiteEnabled      bool          `json:"site_enabled"`
	ActiveCount      int           `json:"active_count"`
	DownloadingCount int           `json:"downloading_count"`
	ActiveSizeBytes  int64         `json:"active_size_bytes"`
	Today            BrushStatView `json:"today"`
	Total            BrushStatView `json:"total"`
}

BrushTaskView 是任务列表 / 详情里的一项:配置加上当前状态与收益。

type ChatOpsDeps added in v0.31.0

type ChatOpsDeps struct {
	NotificationSvc app.NotificationService
	BindingSvc      app.BindingService
	AuditSvc        app.AuditService
}

type DeletePausedRequest added in v0.3.0

type DeletePausedRequest struct {
	IDs        []uint `json:"ids"`         // 指定删除的种子 ID 列表(为空则删除全部)
	RemoveData bool   `json:"remove_data"` // 是否同时删除数据文件
}

DeletePausedRequest 删除暂停种子请求

type DeletePausedResponse added in v0.3.0

type DeletePausedResponse struct {
	Success      int      `json:"success"`       // 成功删除数量
	Failed       int      `json:"failed"`        // 失败数量
	FailedIDs    []uint   `json:"failed_ids"`    // 失败的种子 ID
	FailedErrors []string `json:"failed_errors"` // 失败原因
}

DeletePausedResponse 删除暂停种子响应

type DeleteTasksRequest added in v0.21.0

type DeleteTasksRequest struct {
	IDs []uint `json:"ids"` // 任务 ID 列表
}

DeleteTasksRequest 批量删除任务请求

type DeleteTasksResponse added in v0.21.0

type DeleteTasksResponse struct {
	Success      int      `json:"success"`       // 成功删除数量
	Failed       int      `json:"failed"`        // 失败数量
	FailedIDs    []uint   `json:"failed_ids"`    // 失败的任务 ID
	FailedErrors []string `json:"failed_errors"` // 失败原因
}

DeleteTasksResponse 批量删除任务响应

type DeprecatedEndpoint added in v0.2.0

type DeprecatedEndpoint struct {
	Path        string // The deprecated endpoint path
	Replacement string // The new endpoint to use
	Version     string // Version when it will be removed
	Message     string // Custom deprecation message
}

DeprecatedEndpoint represents a deprecated API endpoint

type DownloaderCapabilitiesResponse added in v0.18.0

type DownloaderCapabilitiesResponse struct {
	Items []DownloaderCapability `json:"items"`
}

type DownloaderCapability added in v0.18.0

type DownloaderCapability struct {
	DownloaderID      uint   `json:"downloader_id"`
	DownloaderName    string `json:"downloader_name"`
	DownloaderType    string `json:"downloader_type"`
	CanPause          bool   `json:"can_pause"`
	CanResume         bool   `json:"can_resume"`
	CanDelete         bool   `json:"can_delete"`
	CanDeleteWithData bool   `json:"can_delete_with_data"`
	CanSetLocation    bool   `json:"can_set_location"`
	CanAddTorrent     bool   `json:"can_add_torrent"`
	CanRecheck        bool   `json:"can_recheck"`
	CanViewFiles      bool   `json:"can_view_files"`
	CanViewTrackers   bool   `json:"can_view_trackers"`
	// CanExportTorrent 表示能把种子导出成 .torrent(qBittorrent 4.5 起;实际版本在调用时再核对)。
	CanExportTorrent bool `json:"can_export_torrent"`
	// CanEditTrackers 表示能修改种子的 tracker 地址(qBittorrent 与 Transmission 都支持)。
	CanEditTrackers bool `json:"can_edit_trackers"`
}

type DownloaderDirectoryRequest added in v0.2.0

type DownloaderDirectoryRequest struct {
	Path      string `json:"path"`
	Alias     string `json:"alias"`
	IsDefault bool   `json:"is_default"`
}

DownloaderDirectoryRequest 下载器目录请求结构

type DownloaderDirectoryResponse added in v0.2.0

type DownloaderDirectoryResponse struct {
	ID           uint   `json:"id"`
	DownloaderID uint   `json:"downloader_id"`
	Path         string `json:"path"`
	Alias        string `json:"alias"`
	IsDefault    bool   `json:"is_default"`
}

DownloaderDirectoryResponse 下载器目录响应结构

type DownloaderFailure added in v0.48.0

type DownloaderFailure struct {
	DownloaderID   uint   `json:"downloader_id"`
	DownloaderName string `json:"downloader_name"`
	Error          string `json:"error"`
}

DownloaderFailure 记录一台没能取到数据的下载器。

为什么要有它:这个接口会聚合多台下载器,以前某一台连不上就静默 continue, 然后照样返回 200 —— 前端看到的是一份「少了一台下载器的种子」的完整列表, 既没法提示用户,也无从判断数字为什么不对。设计文档 §5 的 partial 态 (「14 个站点里 12 个成功时,页面既不该整体报错也不该假装正常」)就是为这种情形定的, 而要表达它,响应里必须带上失败信息。

type DownloaderRequest added in v0.2.0

type DownloaderRequest struct {
	Name        string `json:"name"`
	Type        string `json:"type"` // qbittorrent, transmission
	URL         string `json:"url"`
	Username    string `json:"username"`
	Password    string `json:"password"`
	IsDefault   bool   `json:"is_default"`
	Enabled     bool   `json:"enabled"`
	AutoStart   bool   `json:"auto_start"` // 推送种子后自动开始下载
	ExtraConfig string `json:"extra_config,omitempty"`
}

DownloaderRequest 下载器请求结构

type DownloaderResponse added in v0.2.0

type DownloaderResponse struct {
	ID          uint   `json:"id"`
	Name        string `json:"name"`
	Type        string `json:"type"`
	URL         string `json:"url"`
	Username    string `json:"username"`
	IsDefault   bool   `json:"is_default"`
	Enabled     bool   `json:"enabled"`
	AutoStart   bool   `json:"auto_start"` // 推送种子后自动开始下载
	ExtraConfig string `json:"extra_config,omitempty"`
}

DownloaderResponse 下载器响应结构

type DownloaderTorrentItem added in v0.18.0

type DownloaderTorrentItem struct {
	DownloaderID   uint    `json:"downloader_id"`
	DownloaderName string  `json:"downloader_name"`
	DownloaderType string  `json:"downloader_type"`
	TaskID         string  `json:"task_id"`
	InfoHash       string  `json:"info_hash"`
	Title          string  `json:"title"`
	Progress       float64 `json:"progress"`
	Seeds          int     `json:"seeds"`
	Connections    int     `json:"connections"`
	Size           int64   `json:"size"`
	AddedAt        int64   `json:"added_at"`
	CompletedAt    int64   `json:"completed_at"`
	Ratio          float64 `json:"ratio"`
	State          string  `json:"state"`
	SavePath       string  `json:"save_path"`
	Category       string  `json:"category"`
	Tags           string  `json:"tags"`
	UploadSpeed    int64   `json:"upload_speed"`
	DownloadSpeed  int64   `json:"download_speed"`
	ETA            int64   `json:"eta"`
}

type DownloaderTorrentMetaResponse added in v0.18.0

type DownloaderTorrentMetaResponse struct {
	Categories []string `json:"categories"`
	Tags       []string `json:"tags"`
}

type DownloaderTorrentsResponse added in v0.18.0

type DownloaderTorrentsResponse struct {
	Items    []DownloaderTorrentItem `json:"items"`
	Total    int                     `json:"total"`
	Page     int                     `json:"page"`
	PageSize int                     `json:"page_size"`
	// Failures 为空表示所有已启用的下载器都取到了数据。非空即 partial:
	// Items 里的数据是真的,但不完整。
	Failures []DownloaderFailure `json:"failures,omitempty"`
}

type DownloaderTransferStatItem added in v0.18.0

type DownloaderTransferStatItem struct {
	DownloaderID      uint   `json:"downloader_id"`
	DownloaderName    string `json:"downloader_name"`
	DownloaderType    string `json:"downloader_type"`
	UploadSpeed       int64  `json:"upload_speed"`
	DownloadSpeed     int64  `json:"download_speed"`
	Uploaded          int64  `json:"uploaded"`
	Downloaded        int64  `json:"downloaded"`
	SessionUploaded   int64  `json:"session_uploaded"`
	SessionDownloaded int64  `json:"session_downloaded"`
	FreeSpace         int64  `json:"free_space"`
	// Reachable 表示这一轮是否真的从这台下载器取到了数据(状态或剩余空间任一成功)。
	//
	// 为什么必须显式给出:本条目**只要能取到实例就会被追加**,取数失败时各字段留零值。
	// 于是「出现在 downloaders 里」只证明实例构造成功,不证明客户端连得上 ——
	// acquireDownloader 可能命中缓存实例,Transmission 的实现在普通 RPC 网络失败后
	// 也不会清掉缓存的 healthy 标志。前端曾据此显示「已连接」,那是会说谎的。
	Reachable bool `json:"reachable"`
	// Error 是这一轮失败的原因(取到数据时为空)。给人看的诊断,不参与聚合。
	Error string `json:"error,omitempty"`
	// ClientVersion 是下载器自报的版本(画板 41 状态栏那格的第三段)。
	//
	// 取不到就留空:它是背景信息,不该让这个接口因为多问一句版本而变慢或失败。
	// 值在 Server 上按「id + URL」缓存,所以每台只在第一次连上时问一次。
	ClientVersion string `json:"client_version,omitempty"`
}

type DownloaderTransferStatsResponse added in v0.18.0

type DownloaderTransferStatsResponse struct {
	TotalUploadSpeed       int64                        `json:"total_upload_speed"`
	TotalDownloadSpeed     int64                        `json:"total_download_speed"`
	TotalUploaded          int64                        `json:"total_uploaded"`
	TotalDownloaded        int64                        `json:"total_downloaded"`
	TotalSessionUploaded   int64                        `json:"total_session_uploaded"`
	TotalSessionDownloaded int64                        `json:"total_session_downloaded"`
	TotalFreeSpace         int64                        `json:"total_free_space"`
	Downloaders            []DownloaderTransferStatItem `json:"downloaders"`
}

type DynamicSiteRequest added in v0.2.0

type DynamicSiteRequest struct {
	Name         string `json:"name"`
	DisplayName  string `json:"display_name"`
	BaseURL      string `json:"base_url"`
	AuthMethod   string `json:"auth_method"`
	Cookie       string `json:"cookie,omitempty"`
	APIKey       string `json:"api_key,omitempty"`
	APIURL       string `json:"api_url,omitempty"`
	Passkey      string `json:"passkey,omitempty"`
	DownloaderID *uint  `json:"downloader_id,omitempty"`
	ParserConfig string `json:"parser_config,omitempty"`
}

DynamicSiteRequest 动态站点请求

type DynamicSiteResponse added in v0.2.0

type DynamicSiteResponse struct {
	ID                uint   `json:"id"`
	Name              string `json:"name"`
	DisplayName       string `json:"display_name"`
	BaseURL           string `json:"base_url"`
	Enabled           bool   `json:"enabled"`
	AuthMethod        string `json:"auth_method"`
	DownloaderID      *uint  `json:"downloader_id,omitempty"`
	IsBuiltin         bool   `json:"is_builtin"`
	Unavailable       bool   `json:"unavailable,omitempty"`
	UnavailableReason string `json:"unavailable_reason,omitempty"`
}

DynamicSiteResponse 动态站点响应

type FaviconService added in v0.2.0

type FaviconService struct {
	// contains filtered or unexported fields
}

FaviconService 管理站点图标缓存(数据库存储)

func (*FaviconService) GetFavicon added in v0.2.0

func (fs *FaviconService) GetFavicon(siteID string) (*models.FaviconCache, error)

GetFavicon 从数据库获取图标

type FilterRuleRequest added in v0.2.0

type FilterRuleRequest struct {
	Name        string `json:"name"`
	Pattern     string `json:"pattern"`
	PatternType string `json:"pattern_type"` // keyword, wildcard, regex
	MatchField  string `json:"match_field"`  // title, tag, both
	RequireFree bool   `json:"require_free"`
	MinSizeGB   int    `json:"min_size_gb"`
	MaxSizeGB   int    `json:"max_size_gb"`
	Enabled     bool   `json:"enabled"`
	SiteID      *uint  `json:"site_id"`
	RSSID       *uint  `json:"rss_id"`
	Priority    int    `json:"priority"`
}

FilterRuleRequest 过滤规则请求结构

type FilterRuleResponse added in v0.2.0

type FilterRuleResponse struct {
	ID          uint   `json:"id"`
	Name        string `json:"name"`
	Pattern     string `json:"pattern"`
	PatternType string `json:"pattern_type"`
	MatchField  string `json:"match_field"`
	RequireFree bool   `json:"require_free"`
	MinSizeGB   int    `json:"min_size_gb"`
	MaxSizeGB   int    `json:"max_size_gb"`
	Enabled     bool   `json:"enabled"`
	SiteID      *uint  `json:"site_id"`
	RSSID       *uint  `json:"rss_id"`
	Priority    int    `json:"priority"`
	CreatedAt   string `json:"created_at"`
	UpdatedAt   string `json:"updated_at"`
}

FilterRuleResponse 过滤规则响应结构

type FilterRuleTestMatch added in v0.2.0

type FilterRuleTestMatch struct {
	Title    string  `json:"title"`
	Tag      string  `json:"tag"`
	IsFree   bool    `json:"is_free"`  // 是否免费
	SizeGB   float64 `json:"size_gb"`  // 种子大小(GB)
	Decision string  `json:"decision"` // 完整决策结果: downloaded / skipped
	Reason   string  `json:"reason"`   // 跳过原因(如果有)
	Source   string  `json:"source"`   // 下载通道: filter_rule / free_download / ""
}

FilterRuleTestMatch 单个匹配结果

type FilterRuleTestRequest added in v0.2.0

type FilterRuleTestRequest struct {
	Pattern     string  `json:"pattern"`
	PatternType string  `json:"pattern_type"`
	MatchField  string  `json:"match_field"`  // title, tag, both
	RequireFree bool    `json:"require_free"` // 是否仅匹配免费种子
	MinSizeGB   int     `json:"min_size_gb"`
	MaxSizeGB   int     `json:"max_size_gb"`
	TestSizeGB  float64 `json:"test_size_gb"` // 模拟种子大小,用于完整决策测试
	TestIsFree  *bool   `json:"test_is_free"` // 覆盖 is_free 状态(nil=使用真实值)
	GlobalSize  int     `json:"global_size"`  // 模拟全局大小上限
	FilterMode  string  `json:"filter_mode"`  // 模拟 FilterMode
	SiteID      *uint   `json:"site_id"`
	RSSID       *uint   `json:"rss_id"`
	Limit       int     `json:"limit"` // 最多返回多少条匹配结果
}

FilterRuleTestRequest 过滤规则测试请求

type FilterRuleTestResponse added in v0.2.0

type FilterRuleTestResponse struct {
	MatchCount int                   `json:"match_count"`
	TotalCount int                   `json:"total_count"` // 总种子数
	Matches    []FilterRuleTestMatch `json:"matches"`     // 匹配的种子详情
}

FilterRuleTestResponse 过滤规则测试响应

type FreeTorrentBatchRequest added in v0.2.0

type FreeTorrentBatchRequest struct {
	ArchiveType string `json:"archiveType"` // "tar.gz" or "zip"
}

FreeTorrentBatchRequest represents a batch download request

type FreeTorrentBatchResponse added in v0.2.0

type FreeTorrentBatchResponse struct {
	ArchivePath  string                `json:"archivePath"`
	ArchiveType  string                `json:"archiveType"`
	TorrentCount int                   `json:"torrentCount"`
	TotalSize    int64                 `json:"totalSize"`
	Manifest     []TorrentManifestItem `json:"manifest"`
}

FreeTorrentBatchResponse represents a batch download response

type HealthCheckResponse added in v0.2.0

type HealthCheckResponse struct {
	Name      string `json:"name"`
	IsHealthy bool   `json:"is_healthy"`
	Message   string `json:"message,omitempty"`
}

HealthCheckResponse 健康检查响应

type LogLevelRequest added in v0.2.0

type LogLevelRequest struct {
	Level string `json:"level"` // debug, info, warn, error
}

LogLevelRequest 日志级别请求

type LogLevelResponse added in v0.2.0

type LogLevelResponse struct {
	Level   string   `json:"level"`
	Levels  []string `json:"levels"` // 可用的日志级别列表
	Message string   `json:"message,omitempty"`
}

LogLevelResponse 日志级别响应

type MultiSiteSearchRequest added in v0.2.0

type MultiSiteSearchRequest struct {
	Keyword      string                      `json:"keyword"`
	Category     string                      `json:"category,omitempty"`
	FreeOnly     bool                        `json:"freeOnly,omitempty"`
	Sites        []string                    `json:"sites,omitempty"`
	MinSeeders   int                         `json:"minSeeders,omitempty"`
	MaxSizeBytes int64                       `json:"maxSizeBytes,omitempty"`
	MinSizeBytes int64                       `json:"minSizeBytes,omitempty"`
	Page         int                         `json:"page,omitempty"`
	PageSize     int                         `json:"pageSize,omitempty"`
	TimeoutSecs  int                         `json:"timeoutSecs,omitempty"`
	SortBy       string                      `json:"sortBy,omitempty"`     // 排序字段
	OrderDesc    bool                        `json:"orderDesc,omitempty"`  // 降序排列
	SiteParams   map[string]SiteSearchParams `json:"siteParams,omitempty"` // 每个站点的特定搜索参数
}

MultiSiteSearchRequest represents a multi-site search request

type MultiSiteSearchResponse added in v0.2.0

type MultiSiteSearchResponse struct {
	Items        []TorrentItemResponse `json:"items"`
	TotalResults int                   `json:"totalResults"`
	SiteResults  map[string]int        `json:"siteResults"`
	Errors       []SearchErrorResponse `json:"errors,omitempty"`
	DurationMs   int64                 `json:"durationMs"`
}

MultiSiteSearchResponse represents a multi-site search response

type PausedTorrentResponse added in v0.3.0

type PausedTorrentResponse struct {
	ID               uint       `json:"id"`
	SiteName         string     `json:"site_name"`
	Title            string     `json:"title"`
	TorrentHash      *string    `json:"torrent_hash,omitempty"`
	Progress         float64    `json:"progress"`
	TorrentSize      int64      `json:"torrent_size"`
	DownloaderName   string     `json:"downloader_name"`
	DownloaderTaskID string     `json:"downloader_task_id"`
	PausedAt         *time.Time `json:"paused_at"`
	PauseReason      string     `json:"pause_reason"`
	FreeEndTime      *time.Time `json:"free_end_time,omitempty"`
	CreatedAt        time.Time  `json:"created_at"`
}

PausedTorrentResponse 暂停种子响应结构

type QbitCompatView

type QbitCompatView struct {
	// ListenAddr 是监听地址;Listening 为假时兼容入口没开(启动时没给 --qbit-compat-addr)
	ListenAddr   string `json:"listen_addr"`
	Listening    bool   `json:"listening"`
	DownloaderID uint   `json:"downloader_id"`
	FullControl  bool   `json:"full_control"`
	// Downloader 是实际用的那台下载器的名字(没指定时是默认下载器);没有可用的下载器时是空的
	Downloader string `json:"downloader"`
	// CompatTorrents 是经兼容入口加进实际用的那台下载器、还没经它删掉的种子数
	CompatTorrents int64 `json:"compat_torrents"`
}

QbitCompatView 是 qB 兼容入口页看到的设置与状态。

type RSSFilterAssociationRequest added in v0.2.0

type RSSFilterAssociationRequest struct {
	FilterRuleIDs []uint `json:"filter_rule_ids"`
}

RSSFilterAssociationRequest RSS-Filter 关联请求结构

type RSSFilterAssociationResponse added in v0.2.0

type RSSFilterAssociationResponse struct {
	RSSID         uint                 `json:"rss_id"`
	FilterRuleIDs []uint               `json:"filter_rule_ids"`
	FilterRules   []FilterRuleResponse `json:"filter_rules"`
}

RSSFilterAssociationResponse RSS-Filter 关联响应结构

type ReseedSettingsView

type ReseedSettingsView struct {
	reseed.Settings
	Running bool `json:"running"`
}

ReseedSettingsView 是设置加上「是否正在运行」。

type ResumeTorrentResponse added in v0.3.0

type ResumeTorrentResponse struct {
	Success bool   `json:"success"`
	Message string `json:"message,omitempty"`
}

ResumeTorrentResponse 恢复种子响应

type SearchErrorResponse added in v0.2.0

type SearchErrorResponse struct {
	Site  string `json:"site"`
	Error string `json:"error"`
}

SearchErrorResponse represents a search error in API response

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(store *core.ConfigStore, mgr *scheduler.Manager) *Server

func (*Server) QbitCompatAddr

func (s *Server) QbitCompatAddr() string

QbitCompatAddr 是 qB 兼容入口的监听地址;没开时是空的。

func (*Server) Serve

func (s *Server) Serve(addr string) error

func (*Server) SetAPITokens

func (s *Server) SetAPITokens(store *apitoken.Store, audit appAuditRecorder)

SetAPITokens 接上令牌库与写操作的审计(cmd 在启动时调用)。

func (*Server) SetChatOpsDeps added in v0.31.0

func (s *Server) SetChatOpsDeps(deps *ChatOpsDeps)

func (*Server) SetMediaService

func (s *Server) SetMediaService(svc *recognize.Service)

SetMediaService 接上媒体识别服务(cmd 里建好后调用)。

func (*Server) SetOrganizeService

func (s *Server) SetOrganizeService(svc *organize.Service)

SetOrganizeService 接上整理入库服务(cmd 里建好后调用)。

func (*Server) SetQAHook added in v0.31.0

func (s *Server) SetQAHook(fn func(*http.ServeMux))

SetQAHook installs a callback invoked once during Serve, after all production routes are registered. Used by the qa build tag (cmd/web_qa.go) to attach /test/* test injection endpoints. No-op in production builds.

func (*Server) SetQbitCompat

func (s *Server) SetQbitCompat(qc *qbitcompat.Server)

SetQbitCompat 接上 qB 兼容入口(cmd 在开了监听时调用),设置页用它显示监听地址。

func (*Server) SetSubscribeService

func (s *Server) SetSubscribeService(svc *subscribe.Service)

SetSubscribeService 接上订阅服务(cmd 里建好后调用)。

func (*Server) Shutdown added in v0.31.0

func (s *Server) Shutdown(ctx context.Context) error

Shutdown gracefully stops the underlying http.Server so Serve returns. Safe to call before Serve (the later Serve returns without listening) and concurrent with Serve.

type SiteAttendanceResponse

type SiteAttendanceResponse struct {
	SiteName          string `json:"site_name"`
	SiteEnabled       bool   `json:"site_enabled"`
	AttendanceEnabled bool   `json:"attendance_enabled"`
	Supported         bool   `json:"supported"`
	UnsupportedReason string `json:"unsupported_reason,omitempty"`
	Day               string `json:"day"`
	Status            string `json:"status"`
	Attempts          int    `json:"attempts"`
	Message           string `json:"message,omitempty"`
	LastError         string `json:"last_error,omitempty"`
	ScheduledAt       *int64 `json:"scheduled_at,omitempty"`
	NextAttemptAt     *int64 `json:"next_attempt_at,omitempty"`
	LastAttemptAt     *int64 `json:"last_attempt_at,omitempty"`
}

SiteAttendanceResponse 是一个站点的每日签到状态:能否签到、开关,以及当天的结果(没有记录时 Status 为空)。

type SiteCategoriesConfig added in v0.2.0

type SiteCategoriesConfig struct {
	SiteID     string         `json:"site_id"`
	SiteName   string         `json:"site_name"`
	Categories []SiteCategory `json:"categories"`
}

SiteCategoriesConfig 站点分类配置集合

func GetSiteCategories added in v0.2.0

func GetSiteCategories(siteID string) *SiteCategoriesConfig

GetSiteCategories 获取指定站点的分类配置

type SiteCategory added in v0.2.0

type SiteCategory struct {
	Name    string               `json:"name"`
	Key     string               `json:"key"`
	Options []SiteCategoryOption `json:"options"`
	Cross   bool                 `json:"cross"` // 是否支持多选
	Notes   string               `json:"notes,omitempty"`
}

SiteCategory 站点分类配置

type SiteCategoryOption added in v0.2.0

type SiteCategoryOption struct {
	Value any    `json:"value"`
	Name  string `json:"name"`
}

SiteCategoryOption 分类选项

type SiteConfigResponse added in v0.6.0

type SiteConfigResponse struct {
	Enabled            *bool              `json:"enabled"`
	AuthMethod         string             `json:"auth_method"`
	Cookie             string             `json:"cookie,omitempty"`
	CookieEncrypted    string             `json:"cookie_encrypted,omitempty"`
	HasCookie          bool               `json:"has_cookie"`
	CookieFieldVisible bool               `json:"cookie_field_visible"`
	APIKey             string             `json:"api_key"`
	APIUrl             string             `json:"api_url"`
	Passkey            string             `json:"passkey"`
	UploadLimitKBs     int                `json:"upload_limit_kbs"`
	DownloadLimitKBs   int                `json:"download_limit_kbs"`
	SeedingCapacityGB  float64            `json:"seeding_capacity_gb"`
	RSS                []models.RSSConfig `json:"rss"`
	URLs               []string           `json:"urls,omitempty"`
	WebURL             string             `json:"web_url,omitempty"`
	Unavailable        bool               `json:"unavailable,omitempty"`
	UnavailableReason  string             `json:"unavailable_reason,omitempty"`
	IsBuiltin          bool               `json:"is_builtin"`
}

type SiteDownloaderSummaryItem added in v0.6.0

type SiteDownloaderSummaryItem struct {
	SiteID         uint    `json:"site_id"`
	SiteName       string  `json:"site_name"`
	DisplayName    string  `json:"display_name"`
	DownloaderID   *uint   `json:"downloader_id"`
	DownloaderName *string `json:"downloader_name"`
}

type SiteDownloaderSummaryResponse added in v0.6.0

type SiteDownloaderSummaryResponse struct {
	Sites []SiteDownloaderSummaryItem `json:"sites"`
}

type SiteFaviconInfo added in v0.2.0

type SiteFaviconInfo struct {
	SiteID      string `json:"site_id"`
	SiteName    string `json:"site_name"`
	FaviconURL  string `json:"favicon_url,omitempty"`
	CacheURL    string `json:"cache_url,omitempty"`
	HasCache    bool   `json:"has_cache"`
	LastFetched int64  `json:"last_fetched,omitempty"`
}

SiteFaviconInfo 站点图标信息

type SiteLevelsResponse added in v0.2.0

type SiteLevelsResponse struct {
	SiteID   string                    `json:"siteId"`
	SiteName string                    `json:"siteName"`
	Levels   []v2.SiteLevelRequirement `json:"levels"`
}

SiteLevelsResponse represents the response for site level requirements API

type SiteLoginConfigUpdateRequest added in v0.35.0

type SiteLoginConfigUpdateRequest struct {
	BanThresholdDays       *int    `json:"ban_threshold_days,omitempty"`
	RemindBeforeDays       *int    `json:"remind_before_days,omitempty"`
	ReminderCron           *string `json:"reminder_cron,omitempty"`
	NotificationChannelIDs *[]uint `json:"notification_channel_ids,omitempty"`
	ProbeMode              *string `json:"probe_mode,omitempty"`
}

SiteLoginConfigUpdateRequest is the payload for PUT /api/sites/{name}/login-state/config. All fields are optional; only non-nil pointers are applied so that callers can update one field at a time.

type SiteLoginStateResponse added in v0.35.0

type SiteLoginStateResponse struct {
	SiteName                 string `json:"site_name"`
	DisplayName              string `json:"display_name,omitempty"`
	BaseURL                  string `json:"base_url,omitempty"`
	Enabled                  bool   `json:"enabled"`
	LastLoginAt              *int64 `json:"last_login_at,omitempty"`
	LastAccessAt             *int64 `json:"last_access_at,omitempty"`
	LastVisitAt              *int64 `json:"last_visit_at,omitempty"`
	EffectiveLastActiveAt    *int64 `json:"effective_last_active_at,omitempty"`
	EffectiveSource          string `json:"effective_source"`
	LastProbeAt              *int64 `json:"last_probe_at,omitempty"`
	NextProbeAt              *int64 `json:"next_probe_at,omitempty"`
	LastSuccessAt            *int64 `json:"last_success_at,omitempty"`
	FirstFailureAt           *int64 `json:"first_failure_at,omitempty"`
	AccessStaleSince         *int64 `json:"access_stale_since,omitempty"`
	LastProbeStatus          string `json:"last_probe_status,omitempty"`
	LastProbeError           string `json:"last_probe_error,omitempty"`
	ConsecutiveProbeFailures int    `json:"consecutive_probe_failures"`
	BanThresholdDays         int    `json:"ban_threshold_days"`
	RemindBeforeDays         int    `json:"remind_before_days"`
	ReminderCron             string `json:"reminder_cron"`
	NotificationChannelIDs   []uint `json:"notification_channel_ids"`
	LastReminderTier         string `json:"last_reminder_tier"`
	LastReminderSentAt       *int64 `json:"last_reminder_sent_at,omitempty"`
	DaysRemaining            int    `json:"days_remaining"`
	Tier                     string `json:"tier"`
	ProbeMode                string `json:"probe_mode"`
}

SiteLoginStateResponse is the API representation of a site_login_state row. Cookie / CookieEncrypted MUST never appear here — the row is enriched with computed fields (effective_last_active, days_remaining, tier) at read time.

type SiteSearchParams added in v0.2.0

type SiteSearchParams struct {
	Cat        any `json:"cat,omitempty"`        // 类别
	Medium     any `json:"medium,omitempty"`     // 媒介
	Codec      any `json:"codec,omitempty"`      // 编码
	AudioCodec any `json:"audiocodec,omitempty"` // 音频编码
	Standard   any `json:"standard,omitempty"`   // 分辨率
	Team       any `json:"team,omitempty"`       // 制作组
	Source     any `json:"source,omitempty"`     // 地区(某些站点)
	Incldead   any `json:"incldead,omitempty"`   // 断种/活种
	Spstate    any `json:"spstate,omitempty"`    // 促销状态
}

SiteSearchParams represents site-specific search parameters

type SiteValidationRequest added in v0.2.0

type SiteValidationRequest struct {
	Name       string `json:"name"`
	BaseURL    string `json:"base_url"`
	AuthMethod string `json:"auth_method"` // cookie, api_key, cookie_and_api_key, passkey
	Cookie     string `json:"cookie,omitempty"`
	APIKey     string `json:"api_key,omitempty"`
	APIURL     string `json:"api_url,omitempty"`
	Passkey    string `json:"passkey,omitempty"`
}

SiteValidationRequest 站点验证请求

type SiteValidationResponse added in v0.2.0

type SiteValidationResponse struct {
	Valid bool `json:"valid"`
	// Verified 表示是否真的连接站点验证过凭证。目前只检查必填字段,恒为 false:
	// 动态站点不在 site/v2 的定义注册表里,建不出驱动去发身份请求。
	Verified     bool     `json:"verified"`
	Message      string   `json:"message"`
	FreeTorrents []string `json:"free_torrents,omitempty"` // 免费种子预览
}

SiteValidationResponse 站点验证响应

type SiteVisitReportRequest added in v0.35.0

type SiteVisitReportRequest struct {
	SiteName    string `json:"site_name"`
	LastVisitAt string `json:"last_visit_at"`
}

SiteVisitReportRequest is the payload for POST /api/sites/visit emitted by the browser extension after webNavigation.onCompleted fires for a known PT site domain.

type SupportedSiteDefinition added in v0.30.1

type SupportedSiteDefinition struct {
	ID                string   `json:"id"`
	Name              string   `json:"name"`
	Aka               []string `json:"aka,omitempty"`
	Description       string   `json:"description,omitempty"`
	Schema            string   `json:"schema"`
	URLs              []string `json:"urls"`
	FaviconURL        string   `json:"faviconUrl,omitempty"`
	AuthMethod        string   `json:"authMethod,omitempty"`
	HREnabled         bool     `json:"hrEnabled"`
	Unavailable       bool     `json:"unavailable,omitempty"`
	UnavailableReason string   `json:"unavailableReason,omitempty"`
}

type SyncFailedEntry added in v0.2.0

type SyncFailedEntry struct {
	Site  string `json:"site"`
	Error string `json:"error"`
}

SyncFailedEntry represents a failed sync entry

type SyncRequest added in v0.2.0

type SyncRequest struct {
	Sites []string `json:"sites,omitempty"` // Empty means sync all
}

SyncRequest represents a sync request

type SyncResponse added in v0.2.0

type SyncResponse struct {
	Success []string          `json:"success"`
	Failed  []SyncFailedEntry `json:"failed,omitempty"`
}

SyncResponse represents a sync response

type TemplateImportRequest added in v0.2.0

type TemplateImportRequest struct {
	Template json.RawMessage `json:"template"`
	Cookie   string          `json:"cookie,omitempty"`
	APIKey   string          `json:"api_key,omitempty"`
	Passkey  string          `json:"passkey,omitempty"`
}

TemplateImportRequest 模板导入请求

type TemplateResponse added in v0.2.0

type TemplateResponse struct {
	ID          uint   `json:"id"`
	Name        string `json:"name"`
	DisplayName string `json:"display_name"`
	BaseURL     string `json:"base_url"`
	AuthMethod  string `json:"auth_method"`
	Description string `json:"description,omitempty"`
	Version     string `json:"version,omitempty"`
	Author      string `json:"author,omitempty"`
}

TemplateResponse 模板响应

type TokenCreated

type TokenCreated struct {
	Token     apitoken.Token `json:"token"`
	Plaintext string         `json:"plaintext"`
}

TokenCreated 是新建令牌的回应:明文只在这里出现一次。

type TorrentActionTarget added in v0.18.0

type TorrentActionTarget struct {
	DownloaderID uint   `json:"downloader_id"`
	TaskID       string `json:"task_id"`
}

type TorrentDetailFile added in v0.18.0

type TorrentDetailFile struct {
	Index    int     `json:"index"`
	Name     string  `json:"name"`
	Size     int64   `json:"size"`
	Progress float64 `json:"progress"`
	Priority int     `json:"priority"`
}

type TorrentDetailRequest added in v0.18.0

type TorrentDetailRequest struct {
	DownloaderID uint   `json:"downloader_id"`
	TaskID       string `json:"task_id"`
}

type TorrentDetailResponse added in v0.18.0

type TorrentDetailResponse struct {
	Torrent  DownloaderTorrentItem  `json:"torrent"`
	Files    []TorrentDetailFile    `json:"files"`
	Trackers []TorrentDetailTracker `json:"trackers"`
	Features DownloaderCapability   `json:"features"`
}

type TorrentDetailTracker added in v0.18.0

type TorrentDetailTracker struct {
	URL     string `json:"url"`
	Status  int    `json:"status"`
	Peers   int    `json:"peers"`
	Seeds   int    `json:"seeds"`
	Leeches int    `json:"leeches"`
	Message string `json:"message"`
}

type TorrentItemResponse added in v0.2.0

type TorrentItemResponse struct {
	ID              string   `json:"id"`
	URL             string   `json:"url,omitempty"`
	Title           string   `json:"title"`
	Subtitle        string   `json:"subtitle,omitempty"`
	InfoHash        string   `json:"infoHash,omitempty"`
	Magnet          string   `json:"magnet,omitempty"`
	SizeBytes       int64    `json:"sizeBytes"`
	Seeders         int      `json:"seeders"`
	Leechers        int      `json:"leechers"`
	Snatched        int      `json:"snatched,omitempty"`
	UploadedAt      int64    `json:"uploadedAt,omitempty"`
	Tags            []string `json:"tags,omitempty"`
	SourceSite      string   `json:"sourceSite"`
	DiscountLevel   string   `json:"discountLevel"`
	DiscountEndTime int64    `json:"discountEndTime,omitempty"`
	HasHR           bool     `json:"hasHR,omitempty"`
	DownloadURL     string   `json:"downloadUrl,omitempty"`
	Category        string   `json:"category,omitempty"`
	IsFree          bool     `json:"isFree"`
}

TorrentItemResponse represents a torrent item in API response

type TorrentManifestItem added in v0.2.0

type TorrentManifestItem struct {
	ID            string `json:"id"`
	Title         string `json:"title"`
	SizeBytes     int64  `json:"sizeBytes"`
	DiscountLevel string `json:"discountLevel"`
	DownloadURL   string `json:"downloadUrl"`
	Category      string `json:"category,omitempty"`
	Seeders       int    `json:"seeders,omitempty"`
	Leechers      int    `json:"leechers,omitempty"`
}

TorrentManifestItem represents a torrent in the manifest

type TorrentPushItem added in v0.2.0

type TorrentPushItem struct {
	DownloadURL  string `json:"downloadUrl,omitempty"`
	TorrentID    string `json:"torrentId,omitempty"`
	TorrentTitle string `json:"torrentTitle,omitempty"`
	SourceSite   string `json:"sourceSite,omitempty"`
	SizeBytes    int64  `json:"sizeBytes,omitempty"`
}

TorrentPushItem 批量推送中的单个种子项

type TorrentPushRequest added in v0.2.0

type TorrentPushRequest struct {
	// 种子信息(二选一)
	DownloadURL string `json:"downloadUrl,omitempty"` // 种子下载链接(内部API路径)
	TorrentID   string `json:"torrentId,omitempty"`   // 种子ID

	// 下载器配置
	DownloaderIDs []uint `json:"downloaderIds"`       // 目标下载器ID列表
	SavePath      string `json:"savePath,omitempty"`  // 保存路径(可选)
	Category      string `json:"category,omitempty"`  // 分类
	Tags          string `json:"tags,omitempty"`      // 标签
	AutoStart     *bool  `json:"autoStart,omitempty"` // 是否自动开始(覆盖下载器默认设置)

	// 种子元信息(用于日志和数据库记录)
	TorrentTitle string `json:"torrentTitle,omitempty"`
	SourceSite   string `json:"sourceSite,omitempty"`
	SizeBytes    int64  `json:"sizeBytes,omitempty"`
}

TorrentPushRequest 种子推送请求

type TorrentPushResponse added in v0.2.0

type TorrentPushResponse struct {
	Success bool                    `json:"success"`
	Results []TorrentPushResultItem `json:"results"`
	Message string                  `json:"message,omitempty"`
}

TorrentPushResponse 种子推送响应

type TorrentPushResultItem added in v0.2.0

type TorrentPushResultItem struct {
	DownloaderID   uint   `json:"downloaderId"`
	DownloaderName string `json:"downloaderName"`
	Success        bool   `json:"success"`
	Skipped        bool   `json:"skipped,omitempty"` // 种子已存在时跳过
	Message        string `json:"message,omitempty"`
	TorrentHash    string `json:"torrentHash,omitempty"`
}

TorrentPushResultItem 单个下载器的推送结果

type TransferJobView

type TransferJobView struct {
	models.TorrentTransferJob
	SourceName string `json:"source_name"`
	TargetName string `json:"target_name"`
	Final      bool   `json:"final"`
}

TransferJobView 是任务列表里的一项:任务加上两台下载器的名称。

type TransferPathMapsRequest

type TransferPathMapsRequest struct {
	SourceID uint                    `json:"source_id"`
	TargetID uint                    `json:"target_id"`
	Items    []transfer.PathMapEntry `json:"items"`
}

TransferPathMapsRequest 用 items 整体替换一对下载器之间的路径映射。

type TransferRequest

type TransferRequest struct {
	TargetID uint            `json:"target_id"`
	Items    []transfer.Item `json:"items"`
}

TransferRequest 是预览与建任务的请求体:转到哪台下载器、哪些种子(源下载器 + info hash)。

type TransferRuleRequest

type TransferRuleRequest struct {
	Name               string `json:"name"`
	Enabled            bool   `json:"enabled"`
	SourceDownloaderID uint   `json:"source_downloader_id"`
	TargetDownloaderID uint   `json:"target_downloader_id"`
	Category           string `json:"category"`
	Tag                string `json:"tag"`
	SiteName           string `json:"site_name"`
	MinSeedingHours    int    `json:"min_seeding_hours"`
	MaxPerRun          int    `json:"max_per_run"`
	IntervalMin        int    `json:"interval_min"`
}

TransferRuleRequest 是新建 / 修改规则的请求体;字段含义见 models.TransferRule。

type TransferRuleView

type TransferRuleView struct {
	models.TransferRule
	SourceName string `json:"source_name"`
	TargetName string `json:"target_name"`
}

TransferRuleView 是规则列表里的一项。

type UserInfoHistoryResponse

type UserInfoHistoryResponse struct {
	Site   string          `json:"site"`
	Days   int             `json:"days"`
	From   string          `json:"from"`
	To     string          `json:"to"`
	Points []v2.DailyPoint `json:"points"`
}

UserInfoHistoryResponse 是某站最近若干天的每日数据与增量。

type UserInfoResponse added in v0.2.0

type UserInfoResponse struct {
	Site       string  `json:"site"`
	Username   string  `json:"username"`
	UserID     string  `json:"userId"`
	Uploaded   int64   `json:"uploaded"`
	Downloaded int64   `json:"downloaded"`
	Ratio      float64 `json:"ratio"`
	Bonus      float64 `json:"bonus"`
	Seeding    int     `json:"seeding"`
	Leeching   int     `json:"leeching"`
	Rank       string  `json:"rank"`
	JoinDate   int64   `json:"joinDate,omitempty"`
	LastAccess int64   `json:"lastAccess,omitempty"`
	LastUpdate int64   `json:"lastUpdate"`
	// Extended fields
	LevelName           string  `json:"levelName,omitempty"`
	LevelID             int     `json:"levelId,omitempty"`
	BonusPerHour        float64 `json:"bonusPerHour,omitempty"`
	SeedingBonus        float64 `json:"seedingBonus,omitempty"`
	SeedingBonusPerHour float64 `json:"seedingBonusPerHour,omitempty"`
	UnreadMessageCount  int     `json:"unreadMessageCount,omitempty"`
	TotalMessageCount   int     `json:"totalMessageCount,omitempty"`
	SeederCount         int     `json:"seederCount,omitempty"`
	SeederSize          int64   `json:"seederSize,omitempty"`
	LeecherCount        int     `json:"leecherCount,omitempty"`
	LeecherSize         int64   `json:"leecherSize,omitempty"`
	HnRUnsatisfied      int     `json:"hnrUnsatisfied,omitempty"`
	HnRPreWarning       int     `json:"hnrPreWarning,omitempty"`
	TrueUploaded        int64   `json:"trueUploaded,omitempty"`
	TrueDownloaded      int64   `json:"trueDownloaded,omitempty"`
	Uploads             int     `json:"uploads,omitempty"`
}

UserInfoResponse represents user info API response

type UserInfoTrendsResponse

type UserInfoTrendsResponse struct {
	Days   int                        `json:"days"`
	From   string                     `json:"from"`
	To     string                     `json:"to"`
	Dates  []string                   `json:"dates"`
	Totals []v2.TrendPoint            `json:"totals"`
	Sites  map[string][]v2.TrendPoint `json:"sites"`
}

UserInfoTrendsResponse 是最近若干天每天的增量:各站一条序列,加上各站合计。

Directories

Path Synopsis
Package middleware 放请求主体(路线图 M12):谁发起的请求、有哪些权限范围。
Package middleware 放请求主体(路线图 M12):谁发起的请求、有哪些权限范围。
Package qbitcompat 是 qB 兼容入口(路线图 M13):在单独的端口上实现 qBittorrent WebUI API v2 的一个子集, 让 MoviePilot、IYUU、autobrr、Sonarr/Radarr 这类只认 qB 的工具把 pt-tools 当成下载器。
Package qbitcompat 是 qB 兼容入口(路线图 M13):在单独的端口上实现 qBittorrent WebUI API v2 的一个子集, 让 MoviePilot、IYUU、autobrr、Sonarr/Radarr 这类只认 qB 的工具把 pt-tools 当成下载器。

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL