feat(api): implement task management API with handlers for creating, listing, retrieving, and canceling tasks

- Added Handlers struct and methods for task operations
- Implemented task progress tracking and storage
- Created server setup with middleware for logging and recovery
- Added support for Telegram file extraction and Telegraph image extraction
- Introduced webhook functionality for task status updates
- Defined request and response types for API interactions
This commit is contained in:
krau
2026-03-05 19:11:30 +08:00
parent f377ee3ca4
commit 3eb3b6e3c8
13 changed files with 1612 additions and 1 deletions

View File

@@ -29,6 +29,17 @@ secret = ""
# 转存完成后删除 Aria2 下载的本地文件
remove_after_transfer = true
# HTTP API 配置
[api]
# 启用 HTTP API
enable = false
# 监听地址
host = "0.0.0.0"
# 监听端口
port = 8080
# 认证 Token (必需)
token = ""
# 存储列表
[[storages]]
# 标识名, 需要唯一