handles

package
v4.2.9 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2026 License: AGPL-3.0 Imports: 79 Imported by: 1

Documentation

Index

Constants

View Source
const (
	CANCEL    = "cancel"
	OVERWRITE = "overwrite"
	SKIP      = "skip"
)

Variables

View Source
var (
	AccessCache      = cache.NewMemCache[interface{}]()
	AccessCountDelay = 30 * time.Minute
)

Functions

func AddMyPublicKey

func AddMyPublicKey(c *gin.Context)

func AddOfflineDownload

func AddOfflineDownload(c *gin.Context)

func ArchiveDown

func ArchiveDown(c *gin.Context)

func ArchiveExtensions

func ArchiveExtensions(c *gin.Context)

func ArchiveInternalExtract

func ArchiveInternalExtract(c *gin.Context)

func ArchiveProxy

func ArchiveProxy(c *gin.Context)

func BeginAuthnLogin

func BeginAuthnLogin(c *gin.Context)

func BeginAuthnRegistration

func BeginAuthnRegistration(c *gin.Context)

func BuildIndex

func BuildIndex(c *gin.Context)

func CanUserAccessItem added in v4.2.8

func CanUserAccessItem(user *model.User, item *model.MediaItem) bool

CanUserAccessItem 判断用户是否可访问某个媒体条目(含所属媒体类型开关)

func CanUserAccessPath added in v4.2.8

func CanUserAccessPath(user *model.User, reqPath string) bool

CanUserAccessPath 判断用户是否有权访问指定 VFS 路径 规则与文件浏览保持一致:base_path 前缀 + 元信息(meta) 读权限 + 隐藏文件规则。

user 为 nil 一律拒绝(fail-closed):所有调用点都应经过 Auth / embyAuth 拿到用户, 缺失用户说明鉴权链路出了问题,不能默认放行;被禁用的访客同样拒绝。

func Cancel2FAById

func Cancel2FAById(c *gin.Context)

func CancelTranscodeJob added in v4.2.8

func CancelTranscodeJob(c *gin.Context)

CancelTranscodeJob POST /api/admin/transcode/cancel

func ClearIndex

func ClearIndex(c *gin.Context)

func ClearMediaDB added in v4.2.8

func ClearMediaDB(c *gin.Context)

ClearMediaDB 清空指定类型媒体数据库

func ClearMediaScanPathDB added in v4.2.8

func ClearMediaScanPathDB(c *gin.Context)

ClearMediaScanPathDB 清空指定扫描路径的媒体数据

func ClearMediaScrape added in v4.2.8

func ClearMediaScrape(c *gin.Context)

ClearMediaScrape 清空刮削数据(保留扫描记录,但清空所有刮削结果字段) 参数:media_type 可选,留空表示所有类型;item_id 暂不支持(统一为类型/全部)

func ConvertSeed added in v4.2.8

func ConvertSeed(c *gin.Context)

ConvertSeed converts between OSS, standard torrent+x-openlist and CAS containers.

func CreateMediaAppKey added in v4.2.8

func CreateMediaAppKey(c *gin.Context)

CreateMediaAppKey 创建应用密钥(明文只在创建时返回一次)

func CreateMediaScanPath added in v4.2.8

func CreateMediaScanPath(c *gin.Context)

CreateMediaScanPath 创建扫描路径

func CreateMeta

func CreateMeta(c *gin.Context)

func CreateSharing added in v4.1.2

func CreateSharing(c *gin.Context)

func CreateStorage

func CreateStorage(c *gin.Context)

func CreateUser

func CreateUser(c *gin.Context)

func CurrentUser

func CurrentUser(c *gin.Context)

CurrentUser get current user by token if token is empty, return guest user

func DefaultSettings added in v4.0.9

func DefaultSettings(c *gin.Context)

func DelUserCache

func DelUserCache(c *gin.Context)

func DeleteAuthnLogin

func DeleteAuthnLogin(c *gin.Context)

func DeleteInvalidMedia added in v4.2.8

func DeleteInvalidMedia(c *gin.Context)

DeleteInvalidMedia 删除已失效的媒体条目(即对应文件 / 文件夹在存储中已不存在) 参数:media_type 可选,留空表示扫描所有类型 返回:检测总数、被删除条目数

func DeleteMediaAppKey added in v4.2.8

func DeleteMediaAppKey(c *gin.Context)

DeleteMediaAppKey 删除应用密钥

func DeleteMediaItemAdmin added in v4.2.8

func DeleteMediaItemAdmin(c *gin.Context)

DeleteMediaItemAdmin 后台删除媒体条目

func DeleteMediaScanPath added in v4.2.8

func DeleteMediaScanPath(c *gin.Context)

DeleteMediaScanPath 删除扫描路径

func DeleteMeta

func DeleteMeta(c *gin.Context)

func DeleteMyPublicKey

func DeleteMyPublicKey(c *gin.Context)

func DeletePublicKey

func DeletePublicKey(c *gin.Context)

func DeleteSetting

func DeleteSetting(c *gin.Context)

func DeleteSharing added in v4.1.2

func DeleteSharing(c *gin.Context)

func DeleteStorage

func DeleteStorage(c *gin.Context)

func DeleteUser

func DeleteUser(c *gin.Context)

func DiagnoseSeed added in v4.2.8

func DiagnoseSeed(c *gin.Context)

DiagnoseSeed reports conversion requirements for every supported container.

func DisableStorage

func DisableStorage(c *gin.Context)

func Down

func Down(c *gin.Context)

func EmbyAPI added in v4.2.8

func EmbyAPI(c *gin.Context)

EmbyAPI Emby 兼容 API 入口,兼容 /@emby 与 /@mediabrowser 前缀,路径大小写不敏感

func EnableStorage

func EnableStorage(c *gin.Context)

func ExportMediaDB added in v4.2.8

func ExportMediaDB(c *gin.Context)

ExportMediaDB 导出媒体数据 query: media_type(可选,为空表示全部类型), scan_path_id(可选,单路径导出) 返回 JSON 文件下载流

func Favicon

func Favicon(c *gin.Context)

func FinishAuthnLogin

func FinishAuthnLogin(c *gin.Context)

func FinishAuthnRegistration

func FinishAuthnRegistration(c *gin.Context)

func FsArchiveDecompress

func FsArchiveDecompress(c *gin.Context)

func FsArchiveList

func FsArchiveList(c *gin.Context, req *ArchiveListReq, user *model.User)

func FsArchiveListSplit added in v4.1.2

func FsArchiveListSplit(c *gin.Context)

func FsArchiveMeta

func FsArchiveMeta(c *gin.Context, req *ArchiveMetaReq, user *model.User)

func FsArchiveMetaSplit added in v4.1.2

func FsArchiveMetaSplit(c *gin.Context)

func FsBatchRename

func FsBatchRename(c *gin.Context)

FsBatchRename performs batch rename (individual item permission checks skipped for performance).

func FsCopy

func FsCopy(c *gin.Context)

FsCopy performs batch copy (individual item permission checks skipped for performance).

func FsDirs

func FsDirs(c *gin.Context)

func FsForm

func FsForm(c *gin.Context)

func FsGet

func FsGet(c *gin.Context, req *FsGetReq, user *model.User)

func FsGetDirectUploadInfo added in v4.1.7

func FsGetDirectUploadInfo(c *gin.Context)

FsGetDirectUploadInfo returns the direct upload info if supported by the driver If the driver does not support direct upload, returns null for upload_info

func FsGetSplit added in v4.1.2

func FsGetSplit(c *gin.Context)

func FsList

func FsList(c *gin.Context, req *ListReq, user *model.User)

func FsListSplit added in v4.1.2

func FsListSplit(c *gin.Context)

func FsMkdir

func FsMkdir(c *gin.Context)

func FsMove

func FsMove(c *gin.Context)

FsMove performs batch move (individual item permission checks skipped for performance).

func FsOther

func FsOther(c *gin.Context)

func FsRecursiveMove

func FsRecursiveMove(c *gin.Context)

FsRecursiveMove recursively moves files (individual item permission checks skipped for performance).

func FsRegexRename

func FsRegexRename(c *gin.Context)

FsRegexRename renames files by regex (individual item permission checks skipped for performance).

func FsRemove

func FsRemove(c *gin.Context)

FsRemove performs batch remove (individual item permission checks skipped for performance).

func FsRemoveEmptyDirectory

func FsRemoveEmptyDirectory(c *gin.Context)

FsRemoveEmptyDirectory recursively removes empty directories (individual item permission checks skipped for performance).

func FsRename

func FsRename(c *gin.Context)

func FsStream

func FsStream(c *gin.Context)

func Generate2FA

func Generate2FA(c *gin.Context)

func GenerateMediaStrm added in v4.2.8

func GenerateMediaStrm(c *gin.Context)

GenerateMediaStrm 手动批量生成 STRM

func GenerateSeedForPaths added in v4.2.8

func GenerateSeedForPaths(c *gin.Context)

GenerateSeedForPaths reads each file once while calculating complete hashes. Requests exceeding the synchronous size limit are queued as a background task.

func GenerateTorrentForPath added in v4.2.2

func GenerateTorrentForPath(c *gin.Context)

GenerateTorrentForPath 为指定路径的文件生成 torrent 这是一个通用接口,适用于所有驱动 会获取文件内容计算哈希,然后生成 torrent

func GetAuthnCredentials

func GetAuthnCredentials(c *gin.Context)

func GetDriverInfo

func GetDriverInfo(c *gin.Context)

func GetManualScanProgress added in v4.1.8

func GetManualScanProgress(c *gin.Context)

func GetMediaProgress added in v4.2.8

func GetMediaProgress(c *gin.Context)

GetMediaProgress 查询单个条目(或选集)的播放进度

func GetMediaScanProgress added in v4.2.8

func GetMediaScanProgress(c *gin.Context)

GetMediaScanProgress 获取扫描进度

func GetMediaScrapeStats added in v4.2.8

func GetMediaScrapeStats(c *gin.Context)

GetMediaScrapeStats 获取刮削统计(进程级累计值,重启清零) 返回字段:

  • total_scraped : 累计触发刮削次数
  • hit_count : 命中(含强命中)次数
  • low_confidence_count : 仅低置信度兜底命中次数
  • no_match_count : 完全未命中次数
  • total_attempts : 累计 TMDB 搜索请求次数
  • total_search_millis : 累计搜索耗时(毫秒)

func GetMediaStreamURL added in v4.2.8

func GetMediaStreamURL(c *gin.Context)

GetMediaStreamURL 返回条目(或其中一集)的签名直链,供本地播放器/外链使用

func GetMediaStrm added in v4.2.8

func GetMediaStrm(c *gin.Context)

GetMediaStrm 动态生成单个条目的 .strm 内容(详情页下载)

func GetMediaUserDataBatch added in v4.2.8

func GetMediaUserDataBatch(c *gin.Context)

GetMediaUserDataBatch 批量查询当前用户对条目的播放状态(收藏/进度/已看) GET /fs/media/userdata?ids=1,2,3

func GetMeta

func GetMeta(c *gin.Context)

func GetOIDCClient

func GetOIDCClient(c *gin.Context, useCompatibility bool, redirectUri, method string) (*oauth2.Config, error)

func GetProgress

func GetProgress(c *gin.Context)

func GetSetting

func GetSetting(c *gin.Context)

func GetSharing added in v4.1.2

func GetSharing(c *gin.Context)

func GetStorage

func GetStorage(c *gin.Context)

func GetUser

func GetUser(c *gin.Context)

func ImportMediaDB added in v4.2.8

func ImportMediaDB(c *gin.Context)

ImportMediaDB 导入媒体数据 支持两种调用方式:

  1. multipart/form-data:file 字段携带导出生成的 JSON 文件
  2. application/json:直接 POST 整个 MediaExportData 结构

可选 query 参数 scan_path_id:当导入"scan_path"范围数据时, 把所有条目重定向到该扫描路径ID(覆盖文件中原有的 scan_path_id)。

func InitSetup added in v4.2.7

func InitSetup(c *gin.Context)

InitSetup 执行系统初始化:创建管理员账号并设置站点名称等初始参数。 仅在系统尚未初始化时允许调用;已初始化则返回错误。

func InitStatus added in v4.2.7

func InitStatus(c *gin.Context)

InitStatus 返回系统是否已完成初始化(即是否已存在管理员账号)。 前端据此判断是否跳转到安装向导。

func Link(c *gin.Context)

Link return real link, just for proxy program, it may contain cookie, so just allowed for admin

func ListDriverInfo

func ListDriverInfo(c *gin.Context)

func ListDriverNames

func ListDriverNames(c *gin.Context)

func ListMediaAnnotationsAPI added in v4.2.8

func ListMediaAnnotationsAPI(c *gin.Context)

ListMediaAnnotationsAPI 列出当前用户对某个条目保存的批注 GET /fs/media/annotations?item_id=1

func ListMediaAppKeys added in v4.2.8

func ListMediaAppKeys(c *gin.Context)

ListMediaAppKeys 列出当前管理员的媒体应用密钥

func ListMediaConfigs added in v4.2.8

func ListMediaConfigs(c *gin.Context)

ListMediaConfigs 获取所有媒体库配置

func ListMediaFavoritesAPI added in v4.2.8

func ListMediaFavoritesAPI(c *gin.Context)

ListMediaFavoritesAPI 列出当前用户收藏的媒体条目 GET /fs/media/favorites?media_type=video&page=1&page_size=20

func ListMediaItemsAdmin added in v4.2.8

func ListMediaItemsAdmin(c *gin.Context)

ListMediaItemsAdmin 后台分页查询媒体条目

func ListMediaResumeAPI added in v4.2.8

func ListMediaResumeAPI(c *gin.Context)

ListMediaResumeAPI 继续观看列表

func ListMediaScanPaths added in v4.2.8

func ListMediaScanPaths(c *gin.Context)

ListMediaScanPaths 获取指定媒体类型的扫描路径列表

func ListMetas

func ListMetas(c *gin.Context)

func ListMyPublicKey

func ListMyPublicKey(c *gin.Context)

func ListPublicKeys

func ListPublicKeys(c *gin.Context)

func ListSettings

func ListSettings(c *gin.Context)

func ListSharings added in v4.1.2

func ListSharings(c *gin.Context)

func ListStorages

func ListStorages(c *gin.Context)

func ListTranscodeJobs added in v4.2.8

func ListTranscodeJobs(c *gin.Context)

ListTranscodeJobs GET /api/admin/transcode/jobs (admin)

func ListTranscodeWorkers added in v4.2.8

func ListTranscodeWorkers(c *gin.Context)

ListTranscodeWorkers GET /api/admin/transcode/workers (admin)

func ListUsers

func ListUsers(c *gin.Context)

func LoadAllStorages

func LoadAllStorages(c *gin.Context)

func LogOut

func LogOut(c *gin.Context)

func Login

func Login(c *gin.Context)

Login Deprecated

func LoginHash

func LoginHash(c *gin.Context)

LoginHash login with password hashed by sha256

func LoginLdap

func LoginLdap(c *gin.Context)

func LookUpAppKeyUser added in v4.2.8

func LookUpAppKeyUser(key string) (*model.User, *model.MediaAppKey, bool)

LookUpAppKeyUser 按明文应用密钥查找对应用户与密钥记录。 Emby 与 Subsonic 的所有密钥认证都走这里,避免两套实现产生行为差异。

func MediaEmbyEnabled added in v4.2.8

func MediaEmbyEnabled() bool

MediaEmbyEnabled Emby 兼容 API 是否可用(依赖总开关)

func MediaEnabled added in v4.2.8

func MediaEnabled() bool

MediaEnabled 媒体库总开关是否开启

func MediaEpisodeFilePath added in v4.2.8

func MediaEpisodeFilePath(item *model.MediaItem, ep *model.EpisodeInfo) string

MediaEpisodeFilePath 拼接文件夹型条目的单集文件路径

func MediaItemFilePath added in v4.2.8

func MediaItemFilePath(item *model.MediaItem) string

MediaItemFilePath 拼接媒体条目对应的实际文件路径

func MediaStreamURL added in v4.2.8

func MediaStreamURL(c *gin.Context, item *model.MediaItem, ep *model.EpisodeInfo) string

MediaStreamURL 返回媒体条目(或其中一集)的签名直链

func MediaSubsonicEnabled added in v4.2.8

func MediaSubsonicEnabled() bool

MediaSubsonicEnabled OpenSubsonic API 是否可用(依赖总开关)

func MediaTypeEnabled added in v4.2.8

func MediaTypeEnabled(mediaType model.MediaType) bool

MediaTypeEnabled 判断某媒体类型是否启用扫描

func MediaTypeEnabledList added in v4.2.8

func MediaTypeEnabledList() []model.MediaType

MediaTypeEnabledList 返回已启用的媒体类型

func MultipartAbort added in v4.2.5

func MultipartAbort(c *gin.Context)

MultipartAbort cancels the pipeline and discards the session.

func MultipartChunk added in v4.2.5

func MultipartChunk(c *gin.Context)

MultipartChunk ingests one chunk. Chunks are idempotent and may be sent concurrently and out of order within the receiving window. code 429 = window full (flow control, retry after a short delay), code 409 = the same chunk is already in flight on another connection.

func MultipartComplete added in v4.2.5

func MultipartComplete(c *gin.Context)

MultipartComplete waits for the pipeline outcome and reports it, mirroring how /fs/put only responds once the driver upload finished.

func MultipartInit added in v4.2.5

func MultipartInit(c *gin.Context)

MultipartInit creates (or resumes) a multipart upload session and starts its upload pipeline. Headers mirror FsStream (fsup.go).

func MultipartStatus added in v4.2.5

func MultipartStatus(c *gin.Context)

MultipartStatus looks a session up by upload_id, or by path+size so an interrupted client can discover a resumable session.

func OIDCLoginCallback

func OIDCLoginCallback(c *gin.Context)

func OfflineDownloadTools

func OfflineDownloadTools(c *gin.Context)

func ParseSeed added in v4.2.8

func ParseSeed(c *gin.Context)

ParseSeed parses OSS, torrent or CAS data into one preview contract.

func ParseTorrent added in v4.2.2

func ParseTorrent(c *gin.Context)

ParseTorrent 解析 torrent 文件,返回文件列表等信息

func Plist

func Plist(c *gin.Context)

func Proxy

func Proxy(c *gin.Context)

func PublicGetAlbum added in v4.2.8

func PublicGetAlbum(c *gin.Context)

PublicGetAlbum 公开获取专辑详情及曲目

func PublicGetMedia added in v4.2.8

func PublicGetMedia(c *gin.Context)

PublicGetMedia 公开获取媒体详情

func PublicListAlbums added in v4.2.8

func PublicListAlbums(c *gin.Context)

PublicListAlbums 公开专辑列表(音乐)

func PublicListFolders added in v4.2.8

func PublicListFolders(c *gin.Context)

PublicListFolders 公开文件夹列表(目录浏览模式)

func PublicListMedia added in v4.2.8

func PublicListMedia(c *gin.Context)

PublicListMedia 公开媒体列表(前端浏览用)

func PublicListScanPaths added in v4.2.8

func PublicListScanPaths(c *gin.Context)

PublicListScanPaths 公开获取扫描路径列表(前端筛选用)

func PublicMediaProxy added in v4.2.8

func PublicMediaProxy(c *gin.Context)

PublicMediaProxy 代理外部封面图(TMDB/豆瓣/Discogs),解决客户端直连被墙的问题。 用法:/api/public/media/proxy?url=https%3A%2F%2Fimage.tmdb.org%2F...

func PublicMediaStatus added in v4.2.8

func PublicMediaStatus(c *gin.Context)

PublicMediaStatus 公开的媒体库状态

func PublicMediaThumb added in v4.2.8

func PublicMediaThumb(c *gin.Context)

PublicMediaThumb 读取本地缩略图目录中的文件。 缩略图由刮削器写入本地磁盘(非 VFS),因此不能用 /d 读取。 用法:/api/public/media/thumb?path=/imgs/xxx.jpg

func PublicSettings

func PublicSettings(c *gin.Context)

func QuickSaveSeed added in v4.2.8

func QuickSaveSeed(c *gin.Context)

QuickSaveSeed imports selected files without downloading when the target supports it.

func RequireMediaEnabled added in v4.2.8

func RequireMediaEnabled(c *gin.Context)

RequireMediaEnabled 媒体库关闭时统一返回 404,使其表现为"功能不存在"

func RequireMediaProtocol added in v4.2.8

func RequireMediaProtocol(enabled func() bool) gin.HandlerFunc

RequireMediaProtocol 校验指定协议开关

func ResetToken

func ResetToken(c *gin.Context)

func Robots

func Robots(c *gin.Context)

func SSOLoginCallback

func SSOLoginCallback(c *gin.Context)

func SSOLoginRedirect

func SSOLoginRedirect(c *gin.Context)

func SaveMediaConfig added in v4.2.8

func SaveMediaConfig(c *gin.Context)

SaveMediaConfig 保存媒体库配置

func SaveMediaProgress added in v4.2.8

func SaveMediaProgress(c *gin.Context)

func SaveSettings

func SaveSettings(c *gin.Context)
func Search(c *gin.Context)

func SeedCapabilities added in v4.2.8

func SeedCapabilities(c *gin.Context)

SeedCapabilities reports whether files can use hashes, source URLs or require downloading.

func Set115

func Set115(c *gin.Context)

func Set115Open added in v4.0.9

func Set115Open(c *gin.Context)

func Set123Open added in v4.1.5

func Set123Open(c *gin.Context)

func Set123Pan added in v4.1.10

func Set123Pan(c *gin.Context)

func SetAria2

func SetAria2(c *gin.Context)

func SetEnableSharing added in v4.1.2

func SetEnableSharing(disable bool) func(ctx *gin.Context)

func SetGuangYaPan added in v4.2.5

func SetGuangYaPan(c *gin.Context)

func SetMediaFavorite added in v4.2.8

func SetMediaFavorite(c *gin.Context)

func SetPikPak

func SetPikPak(c *gin.Context)

func SetQbittorrent

func SetQbittorrent(c *gin.Context)

func SetThunder

func SetThunder(c *gin.Context)

func SetThunderBrowser

func SetThunderBrowser(c *gin.Context)

func SetThunderX added in v4.1.0

func SetThunderX(c *gin.Context)

func SetTransmission

func SetTransmission(c *gin.Context)

func SetupTaskRoute

func SetupTaskRoute(g *gin.RouterGroup)

func SharingArchiveExtract added in v4.1.2

func SharingArchiveExtract(c *gin.Context)

func SharingArchiveList added in v4.1.2

func SharingArchiveList(c *gin.Context, req *ArchiveListReq)

func SharingArchiveMeta added in v4.1.2

func SharingArchiveMeta(c *gin.Context, req *ArchiveMetaReq)

func SharingDown added in v4.1.2

func SharingDown(c *gin.Context)

func SharingGet added in v4.1.2

func SharingGet(c *gin.Context, req *FsGetReq)

func SharingList added in v4.1.2

func SharingList(c *gin.Context, req *ListReq)

func SignedProxyURL added in v4.2.8

func SignedProxyURL(c *gin.Context, rawPath string) string

SignedProxyURL 构造经服务端代理的签名链接(/p)

func SignedStreamURL added in v4.2.8

func SignedStreamURL(c *gin.Context, rawPath string) string

SignedStreamURL 构造带签名的 /d 直链(绝对地址,供 Emby/Subsonic/STRM 使用)

func SignedStreamURLWithBase added in v4.2.8

func SignedStreamURLWithBase(apiBase, rawPath string) string

SignedStreamURLWithBase 使用指定站点前缀构造签名直链

func StartManualScan added in v4.1.8

func StartManualScan(c *gin.Context)

func StartMediaScan added in v4.2.8

func StartMediaScan(c *gin.Context)

StartMediaScan 开始扫描

func StartMediaScrape added in v4.2.8

func StartMediaScrape(c *gin.Context)

StartMediaScrape 开始刮削

func StopIndex

func StopIndex(c *gin.Context)

func StopManualScan added in v4.1.8

func StopManualScan(c *gin.Context)

func SubsonicAPI added in v4.2.8

func SubsonicAPI(c *gin.Context)

SubsonicAPI OpenSubsonic API 入口(/@rest/*)

func SyncMediaAnnotationsAPI added in v4.2.8

func SyncMediaAnnotationsAPI(c *gin.Context)

SyncMediaAnnotationsAPI 增量保存批注:upserts 覆盖同一 remote_id,deletes 按 remote_id 删除。 查看器每次改动只会带上变化的那几条,不需要整份文档重传。 POST /fs/media/annotations

func TCMaster added in v4.2.8

func TCMaster(c *gin.Context)

TCMaster GET /tc/:job/:token/master.m3u8

func TCPlaylist added in v4.2.8

func TCPlaylist(c *gin.Context)

TCPlaylist GET /tc/:job/:token/:profile/playlist.m3u8 等待首切片就绪后返回;阻塞最多 30s

func TCSegment added in v4.2.8

func TCSegment(c *gin.Context)

TCSegment GET /tc/:job/:token/:profile/seg-:seq.ts 切片就绪则直接返回;否则等待最多 60s

func TorrentRapidUpload added in v4.2.2

func TorrentRapidUpload(c *gin.Context)

TorrentRapidUpload 从 torrent 文件中提取 CAS 信息尝试秒传到天翼云

func TranscodePlay added in v4.2.8

func TranscodePlay(c *gin.Context)

TranscodePlay 入口:POST /api/fs/transcode body: {path}

行为:

  1. 检查 transcode_enabled
  2. fs.Get 获取文件并跑 Decide
  3. 不需要转码 → 返回 {transcode:false, direct: true}
  4. 需要转码 → 创建 Job 入队,返回 {transcode:true, job_id, master_url}

func UpdateCurrent

func UpdateCurrent(c *gin.Context)

func UpdateIndex

func UpdateIndex(c *gin.Context)

func UpdateMediaItemAdmin added in v4.2.8

func UpdateMediaItemAdmin(c *gin.Context)

UpdateMediaItemAdmin 后台更新媒体条目

func UpdateMediaScanPath added in v4.2.8

func UpdateMediaScanPath(c *gin.Context)

UpdateMediaScanPath 更新扫描路径

func UpdateMeta

func UpdateMeta(c *gin.Context)

func UpdateSeed added in v4.2.8

func UpdateSeed(c *gin.Context)

UpdateSeed edits seed metadata and optionally recalculates hashes from server files.

func UpdateSeedChannels added in v4.2.8

func UpdateSeedChannels(c *gin.Context)

UpdateSeedChannels updates public discovery metadata and keeps the requested container.

func UpdateSharing added in v4.1.2

func UpdateSharing(c *gin.Context)

func UpdateStorage

func UpdateStorage(c *gin.Context)

func UpdateUser

func UpdateUser(c *gin.Context)

func UploadSeedAndParse added in v4.2.8

func UploadSeedAndParse(c *gin.Context)

UploadSeedAndParse parses a multipart seed upload with the same limits as JSON parsing.

func UploadTorrentAndParse added in v4.2.2

func UploadTorrentAndParse(c *gin.Context)

UploadTorrentAndParse 通过文件上传方式解析 torrent

func Verify2FA

func Verify2FA(c *gin.Context)

func WorkerClaim added in v4.2.8

func WorkerClaim(c *gin.Context)

WorkerClaim POST /api/transcode/worker/claim

func WorkerHeartbeat added in v4.2.8

func WorkerHeartbeat(c *gin.Context)

WorkerHeartbeat POST /api/transcode/worker/heartbeat

func WorkerJobFinish added in v4.2.8

func WorkerJobFinish(c *gin.Context)

WorkerJobFinish POST /api/transcode/worker/job/finish

func WorkerRegister added in v4.2.8

func WorkerRegister(c *gin.Context)

WorkerRegister POST /api/transcode/worker/register

func WorkerSegmentUpload added in v4.2.8

func WorkerSegmentUpload(c *gin.Context)

WorkerSegmentUpload PUT /api/transcode/worker/segment?job=&profile=&seq=&duration=&final=

Types

type AddOfflineDownloadReq

type AddOfflineDownloadReq struct {
	Urls         []string `json:"urls"`
	Path         string   `json:"path"`
	Tool         string   `json:"tool"`
	DeletePolicy string   `json:"delete_policy"`
}

type ArchiveContentResp

type ArchiveContentResp struct {
	ObjResp
	Children []ArchiveContentResp `json:"children"`
}

type ArchiveDecompressReq

type ArchiveDecompressReq struct {
	SrcDir        string   `json:"src_dir" form:"src_dir"`
	DstDir        string   `json:"dst_dir" form:"dst_dir"`
	Names         []string `json:"name" form:"name"`
	ArchivePass   string   `json:"archive_pass" form:"archive_pass"`
	InnerPath     string   `json:"inner_path" form:"inner_path"`
	CacheFull     bool     `json:"cache_full" form:"cache_full"`
	PutIntoNewDir bool     `json:"put_into_new_dir" form:"put_into_new_dir"`
	Overwrite     bool     `json:"overwrite" form:"overwrite"`
}

type ArchiveListReq

type ArchiveListReq struct {
	ArchiveMetaReq
	model.PageReq
	InnerPath string `json:"inner_path" form:"inner_path"`
}

type ArchiveMetaReq

type ArchiveMetaReq struct {
	Path        string `json:"path" form:"path"`
	Password    string `json:"password" form:"password"`
	Refresh     bool   `json:"refresh" form:"refresh"`
	ArchivePass string `json:"archive_pass" form:"archive_pass"`
}

type ArchiveMetaResp

type ArchiveMetaResp struct {
	Comment     string               `json:"comment"`
	IsEncrypted bool                 `json:"encrypted"`
	Content     []ArchiveContentResp `json:"content"`
	Sort        *model.Sort          `json:"sort,omitempty"`
	RawURL      string               `json:"raw_url"`
	Sign        string               `json:"sign"`
}

type BatchRenameReq

type BatchRenameReq struct {
	SrcDir        string `json:"src_dir"`
	RenameObjects []struct {
		SrcName string `json:"src_name"`
		NewName string `json:"new_name"`
	} `json:"rename_objects"`
}

type CASInfoResp added in v4.2.2

type CASInfoResp struct {
	FileMD5   string `json:"file_md5"`
	SliceMD5  string `json:"slice_md5"`
	SliceSize int64  `json:"slice_size"`
	Cloud     string `json:"cloud"`
}

CASInfoResp CAS 信息响应

type CreateMediaScanPathReq added in v4.2.8

type CreateMediaScanPathReq struct {
	MediaType    model.MediaType `json:"media_type" binding:"required"`
	Name         string          `json:"name"`
	Path         string          `json:"path" binding:"required"`
	PathMerge    bool            `json:"path_merge"`
	TypeTag      string          `json:"type_tag"`
	ContentTags  string          `json:"content_tags"`
	EnableScrape bool            `json:"enable_scrape"`
}

CreateMediaScanPathReq 创建扫描路径请求

type DirReq

type DirReq struct {
	Path      string `json:"path" form:"path"`
	Password  string `json:"password" form:"password"`
	ForceRoot bool   `json:"force_root" form:"force_root"`
}

type DirResp

type DirResp struct {
	Name     string    `json:"name"`
	Modified time.Time `json:"modified"`
}

type FsGetDirectUploadInfoReq added in v4.1.7

type FsGetDirectUploadInfoReq struct {
	Path        string `json:"path" form:"path"`
	FileName    string `json:"file_name" form:"file_name"`
	FileSize    int64  `json:"file_size" form:"file_size"`
	ContentType string `json:"content_type" form:"content_type"`
	Tool        string `json:"tool" form:"tool"`
}

type FsGetReq

type FsGetReq struct {
	Path     string `json:"path" form:"path"`
	Password string `json:"password" form:"password"`
}

type FsGetResp

type FsGetResp struct {
	ObjResp
	RawURL   string    `json:"raw_url"`
	Readme   string    `json:"readme"`
	Header   string    `json:"header"`
	Provider string    `json:"provider"`
	Related  []ObjResp `json:"related"`
}

type FsListResp

type FsListResp struct {
	Content            []ObjResp `json:"content"`
	Total              int64     `json:"total"`
	Readme             string    `json:"readme"`
	Header             string    `json:"header"`
	Write              bool      `json:"write"`
	WriteContentBypass bool      `json:"write_content_bypass"`
	Provider           string    `json:"provider"`
	DirectUploadTools  []string  `json:"direct_upload_tools,omitempty"`
}

type FsOtherReq

type FsOtherReq struct {
	model.FsOtherArgs
	Password string `json:"password" form:"password"`
}

type GenerateTorrentReq added in v4.2.2

type GenerateTorrentReq struct {
	// Path 文件在 OpenList 中的路径
	Path string `json:"path" binding:"required"`
	// WithCAS 是否注入 CAS 扩展信息(仅天翼云需要)
	WithCAS bool `json:"with_cas"`
}

GenerateTorrentReq 为指定路径的文件生成 torrent 请求

type InitSetupReq added in v4.2.7

type InitSetupReq struct {
	Username  string `json:"username" binding:"required"`
	Password  string `json:"password" binding:"required"`
	SiteTitle string `json:"site_title"`
}

InitSetupReq 系统初始化请求体

type ListReq

type ListReq struct {
	model.PageReq
	Path     string `json:"path" form:"path"`
	Password string `json:"password" form:"password"`
	Refresh  bool   `json:"refresh"`
}

type LoginReq

type LoginReq struct {
	Username string `json:"username" binding:"required"`
	Password string `json:"password"`
	OtpCode  string `json:"otp_code"`
}

type ManualScanReq added in v4.1.8

type ManualScanReq struct {
	Path  string  `json:"path"`
	Limit float64 `json:"limit"`
}

type ManualScanResp added in v4.1.8

type ManualScanResp struct {
	ObjCount uint64 `json:"obj_count"`
	IsDone   bool   `json:"is_done"`
}

type MediaExportData added in v4.2.8

type MediaExportData struct {
	Version   int                   `json:"version"`
	ExportAt  time.Time             `json:"export_at"`
	Scope     string                `json:"scope"`
	MediaType model.MediaType       `json:"media_type,omitempty"`
	ScanPaths []model.MediaScanPath `json:"scan_paths"`
	Items     []model.MediaItem     `json:"items"`
}

MediaExportData 导出数据结构 包含版本号便于后续兼容性升级;导出粒度由 scope 字段说明:

  • "all" :所有类型的全部数据
  • "media_type" :单个媒体类型(video/music/image/book)的全部数据
  • "scan_path" :单个扫描路径下的数据(仅 1 个路径 + 该路径下的条目)

type MediaScrapeStatsResp added in v4.2.8

type MediaScrapeStatsResp struct {
	TMDB scraper.TMDBStats `json:"tmdb"`
}

MediaScrapeStatsResp 刮削统计响应 包含 TMDB 视频刮削的累计指标,用于运维观测与命中率评估

type MediaStatus added in v4.2.8

type MediaStatus struct {
	Enabled         bool     `json:"enabled"`
	Types           []string `json:"types"`
	EmbyEnabled     bool     `json:"emby_enabled"`
	SubsonicEnabled bool     `json:"subsonic_enabled"`
	EmbyBaseURL     string   `json:"emby_base_url"`
	SubsonicBaseURL string   `json:"subsonic_base_url"`
	StrmPath        string   `json:"strm_path"`
	StrmOnScan      bool     `json:"strm_on_scan"`
	StrmSameDir     bool     `json:"strm_same_dir"`
	ThumbPath       string   `json:"thumb_path"`
	Version         string   `json:"version"`
	ProxyCover      bool     `json:"proxy_cover"`
}

MediaStatus 媒体库状态(前端据此决定是否渲染媒体库入口/侧栏)

type MkdirOrLinkReq

type MkdirOrLinkReq struct {
	Path string `json:"path" form:"path"`
}

type MoveCopyReq

type MoveCopyReq struct {
	SrcDir       string   `json:"src_dir"`
	DstDir       string   `json:"dst_dir"`
	Names        []string `json:"names"`
	Overwrite    bool     `json:"overwrite"`
	SkipExisting bool     `json:"skip_existing"`
	Merge        bool     `json:"merge"`
	FollowSeed   bool     `json:"follow_seed"`
}

type MultipartInitResp added in v4.2.5

type MultipartInitResp struct {
	multipart.SessionSnapshot
	Resumed bool `json:"resumed"`
}

type ObjResp

type ObjResp struct {
	Name         string                     `json:"name"`
	Size         int64                      `json:"size"`
	IsDir        bool                       `json:"is_dir"`
	Modified     time.Time                  `json:"modified"`
	Created      time.Time                  `json:"created"`
	Sign         string                     `json:"sign"`
	Thumb        string                     `json:"thumb"`
	Type         int                        `json:"type"`
	HashInfoStr  string                     `json:"hashinfo"`
	HashInfo     map[*utils.HashType]string `json:"hash_info"`
	MountDetails *model.StorageDetails      `json:"mount_details,omitempty"`
}

type ParseTorrentReq added in v4.2.2

type ParseTorrentReq struct {
	// TorrentData Base64 编码的 torrent 文件内容
	TorrentData string `json:"torrent_data" binding:"required"`
}

ParseTorrentReq 解析 torrent 文件请求

type ParseTorrentResp added in v4.2.2

type ParseTorrentResp struct {
	// Name 种子名称
	Name string `json:"name"`
	// TotalSize 总大小
	TotalSize int64 `json:"total_size"`
	// PieceLength 分片大小
	PieceLength int64 `json:"piece_length"`
	// PieceCount 分片数量
	PieceCount int `json:"piece_count"`
	// InfoHash info_hash(十六进制)
	InfoHash string `json:"info_hash"`
	// Files 文件列表(多文件模式)
	Files []TorrentFileInfo `json:"files"`
	// HasCAS 是否包含 CAS 扩展信息
	HasCAS bool `json:"has_cas"`
	// CAS CAS 扩展信息
	CAS *CASInfoResp `json:"cas,omitempty"`
}

ParseTorrentResp 解析 torrent 文件响应

type RecursiveMoveReq

type RecursiveMoveReq struct {
	SrcDir         string `json:"src_dir"`
	DstDir         string `json:"dst_dir"`
	ConflictPolicy string `json:"conflict_policy"`
}

type RegexRenameReq

type RegexRenameReq struct {
	SrcDir       string `json:"src_dir"`
	SrcNameRegex string `json:"src_name_regex"`
	NewNameRegex string `json:"new_name_regex"`
}

type RemoveEmptyDirectoryReq

type RemoveEmptyDirectoryReq struct {
	SrcDir string `json:"src_dir"`
}

type RemoveReq

type RemoveReq struct {
	Dir        string   `json:"dir"`
	Names      []string `json:"names"`
	FollowSeed bool     `json:"follow_seed"`
}

type RenameReq

type RenameReq struct {
	Path       string `json:"path"`
	Name       string `json:"name"`
	Overwrite  bool   `json:"overwrite"`
	FollowSeed bool   `json:"follow_seed"`
}

type SSHKeyAddReq

type SSHKeyAddReq struct {
	Title string `json:"title" binding:"required"`
	Key   string `json:"key" binding:"required"`
}

type SaveMediaConfigReq added in v4.2.8

type SaveMediaConfigReq struct {
	MediaType     model.MediaType `json:"media_type" binding:"required"`
	Enabled       bool            `json:"enabled"`
	ScraperConfig *string         `json:"scraper_config"`
}

SaveMediaConfigReq 保存配置请求

type ScanMediaReq added in v4.2.8

type ScanMediaReq struct {
	MediaType  model.MediaType `json:"media_type" binding:"required"`
	ScanPathID uint            `json:"scan_path_id"` // 0 表示扫描全部路径
}

ScanMediaReq 扫描请求

type ScrapeMediaReq added in v4.2.8

type ScrapeMediaReq struct {
	MediaType model.MediaType `json:"media_type" binding:"required"`
	ItemID    uint            `json:"item_id"` // 0 表示刮削全部未刮削的
}

ScrapeMediaReq 刮削请求

type SearchReq

type SearchReq struct {
	model.SearchReq
	Password string `json:"password"`
}

type SearchResp

type SearchResp struct {
	model.SearchNode
	Type int `json:"type"`
}

type SeedCapabilityReq added in v4.2.8

type SeedCapabilityReq struct {
	SeedDataReq
	Paths    []string `json:"paths"`
	Path     string   `json:"path"`
	Override string   `json:"policy"`
}

SeedCapabilityReq supports source preflight and destination import planning.

type SeedConvertReq added in v4.2.8

type SeedConvertReq struct {
	SeedDataReq
	TargetFormat string `json:"target_format"`
	Path         string `json:"path"`
}

SeedConvertReq requests a container conversion without changing metadata.

type SeedDataReq added in v4.2.8

type SeedDataReq struct {
	SeedData string `json:"seed_data"`
	Format   string `json:"format"`
	FileName string `json:"file_name"`
}

SeedDataReq carries a bounded base64-encoded seed document. SeedData is intentionally NOT bound with `required` here: some requests that embed SeedDataReq (e.g. SeedCapabilityReq preflight) accept `paths` instead of `seed_data`. Required-ness is enforced inside decodeSeedData for the handlers that actually consume a seed document.

type SeedGenerateReq added in v4.2.8

type SeedGenerateReq struct {
	Paths               []string              `json:"paths" binding:"required"`
	Format              string                `json:"format"`
	Formats             []string              `json:"formats"`
	Name                string                `json:"name"`
	Comment             string                `json:"comment"`
	FileComments        map[string]string     `json:"file_comments"`
	HashMatrix          SeedHashMatrix        `json:"hash_matrix"`
	PieceSize           int64                 `json:"piece_size"`
	Trackers            []string              `json:"trackers"`
	Channels            []torrent.SeedChannel `json:"channels"`
	OutputPath          string                `json:"output_path"`
	SavePath            string                `json:"save_path"`
	IncludeShare        bool                  `json:"include_share"`
	IncludeDirectSource bool                  `json:"include_direct_source"`
	ShareFiles          []string              `json:"share_files"`
	DirectFiles         []string              `json:"direct_files"`
}

SeedGenerateReq generates one or more seed containers for existing files.

type SeedHashMatrix added in v4.2.8

type SeedHashMatrix struct {
	MD5    SeedHashSelection `json:"md5"`
	SHA1   SeedHashSelection `json:"sha1"`
	SHA256 SeedHashSelection `json:"sha256"`
}

SeedHashMatrix controls the optional hash metadata stored in a seed.

type SeedHashSelection added in v4.2.8

type SeedHashSelection struct {
	Whole  bool `json:"whole"`
	Pieces bool `json:"pieces"`
}

SeedHashSelection controls whole-file and piece hash inclusion.

type SeedQuickSaveReq added in v4.2.8

type SeedQuickSaveReq struct {
	SeedDataReq
	Path          string         `json:"path" binding:"required"`
	Files         []string       `json:"files"`
	SelectedFiles []int          `json:"selected_files"`
	Tool          string         `json:"tool"`
	DeletePolicy  string         `json:"delete_policy"`
	Overwrite     bool           `json:"overwrite"`
	TransitPath   string         `json:"transit_path"`
	UpdateChannel bool           `json:"update_channel"`
	Options       map[string]any `json:"options"`
}

SeedQuickSaveReq imports selected seed files using rapid upload or an existing source URL.

type SeedRecalcFile added in v4.2.8

type SeedRecalcFile struct {
	Path       string `json:"path"`        // seed file relative path
	SourcePath string `json:"source_path"` // server-side readable file path
}

SeedRecalcFile maps one seed file to a server-side path for re-hashing.

type SeedUpdateChannelsReq added in v4.2.8

type SeedUpdateChannelsReq struct {
	SeedDataReq
	Channels []torrent.SeedChannel `json:"channels"`
}

SeedUpdateChannelsReq replaces only public channel metadata.

type SeedUpdateReq added in v4.2.8

type SeedUpdateReq struct {
	SeedDataReq
	Comment      *string                         `json:"comment"`
	Trackers     []string                        `json:"trackers"`
	Channels     []torrent.SeedChannel           `json:"channels"`
	FileComments map[string]string               `json:"file_comments"`
	FileSources  map[string][]torrent.SeedSource `json:"file_sources"`
	RemoveFiles  []string                        `json:"remove_files"`
	Recalculate  bool                            `json:"recalculate"`
	RecalcFiles  []SeedRecalcFile                `json:"recalc_files"`
	HashMatrix   SeedHashMatrix                  `json:"hash_matrix"`
	PieceSize    int64                           `json:"piece_size"`
	OutputPath   string                          `json:"output_path"`
	SavePath     string                          `json:"save_path"`
	Options      map[string]any                  `json:"options"`
}

SeedUpdateReq edits metadata and optionally recalculates hashes.

type Set115OpenReq added in v4.0.9

type Set115OpenReq struct {
	TempDir string `json:"temp_dir" form:"temp_dir"`
}

type Set115Req

type Set115Req struct {
	TempDir string `json:"temp_dir" form:"temp_dir"`
}

type Set123OpenReq added in v4.1.5

type Set123OpenReq struct {
	TempDir     string `json:"temp_dir" form:"temp_dir"`
	CallbackUrl string `json:"callback_url" form:"callback_url"`
}

type Set123PanReq added in v4.1.10

type Set123PanReq struct {
	TempDir string `json:"temp_dir" form:"temp_dir"`
}

type SetAria2Req

type SetAria2Req struct {
	Uri    string `json:"uri" form:"uri"`
	Secret string `json:"secret" form:"secret"`
}

type SetGuangYaPanReq added in v4.2.5

type SetGuangYaPanReq struct {
	TempDir string `json:"temp_dir" form:"temp_dir"`
}

type SetPikPakReq

type SetPikPakReq struct {
	TempDir string `json:"temp_dir" form:"temp_dir"`
}

type SetQbittorrentReq

type SetQbittorrentReq struct {
	Url      string `json:"url" form:"url"`
	Seedtime string `json:"seedtime" form:"seedtime"`
}

type SetThunderBrowserReq

type SetThunderBrowserReq struct {
	TempDir string `json:"temp_dir" form:"temp_dir"`
}

type SetThunderReq

type SetThunderReq struct {
	TempDir string `json:"temp_dir" form:"temp_dir"`
}

type SetThunderXReq added in v4.1.0

type SetThunderXReq struct {
	TempDir string `json:"temp_dir" form:"temp_dir"`
}

type SetTransmissionReq

type SetTransmissionReq struct {
	Uri      string `json:"uri" form:"uri"`
	Seedtime string `json:"seedtime" form:"seedtime"`
}

type SharingResp added in v4.1.2

type SharingResp struct {
	*model.Sharing
	CreatorName string `json:"creator"`
	CreatorRole int    `json:"creator_role"`
}

type StorageResp added in v4.1.4

type StorageResp struct {
	model.Storage
	MountDetails *model.StorageDetails `json:"mount_details,omitempty"`
}

type TaskInfo

type TaskInfo struct {
	ID          string      `json:"id"`
	Name        string      `json:"name"`
	Creator     string      `json:"creator"`
	CreatorRole int         `json:"creator_role"`
	State       tache.State `json:"state"`
	Status      string      `json:"status"`
	Progress    float64     `json:"progress"`
	StartTime   *time.Time  `json:"start_time"`
	EndTime     *time.Time  `json:"end_time"`
	TotalBytes  int64       `json:"total_bytes"`
	Error       string      `json:"error"`
}

type TorrentFileInfo added in v4.2.2

type TorrentFileInfo struct {
	Path string `json:"path"`
	Size int64  `json:"size"`
}

TorrentFileInfo torrent 中的文件信息

type TorrentRapidUploadReq added in v4.2.2

type TorrentRapidUploadReq struct {
	// TorrentData Base64 编码的 torrent 文件内容
	TorrentData string `json:"torrent_data" binding:"required"`
	// Path 目标路径
	Path string `json:"path" binding:"required"`
}

TorrentRapidUploadReq 从 torrent 秒传请求

type UpdateIndexReq

type UpdateIndexReq struct {
	Paths    []string `json:"paths"`
	MaxDepth int      `json:"max_depth"`
}

type UpdateMediaItemReq added in v4.2.8

type UpdateMediaItemReq struct {
	ID          uint    `json:"id" binding:"required"`
	ScrapedName string  `json:"scraped_name"`
	Description string  `json:"description"`
	Cover       string  `json:"cover"`
	ReleaseDate string  `json:"release_date"`
	Rating      float32 `json:"rating"`
	Genre       string  `json:"genre"`
	Authors     string  `json:"authors"`
	Plot        string  `json:"plot"`
	Reviews     string  `json:"reviews"`
	AlbumName   string  `json:"album_name"`
	AlbumArtist string  `json:"album_artist"`
	Publisher   string  `json:"publisher"`
	ISBN        string  `json:"isbn"`
	Hidden      bool    `json:"hidden"`
}

UpdateMediaItemReq 更新媒体条目请求

type UpdateMediaScanPathReq added in v4.2.8

type UpdateMediaScanPathReq struct {
	ID           uint   `json:"id" binding:"required"`
	Name         string `json:"name"`
	Path         string `json:"path"`
	PathMerge    bool   `json:"path_merge"`
	TypeTag      string `json:"type_tag"`
	ContentTags  string `json:"content_tags"`
	EnableScrape bool   `json:"enable_scrape"`
}

UpdateMediaScanPathReq 更新扫描路径请求

type UpdateSharingReq added in v4.1.2

type UpdateSharingReq struct {
	Files       []string   `json:"files"`
	Expires     *time.Time `json:"expires"`
	Pwd         string     `json:"pwd"`
	MaxAccessed int        `json:"max_accessed"`
	Disabled    bool       `json:"disabled"`
	Remark      string     `json:"remark"`
	Readme      string     `json:"readme"`
	Header      string     `json:"header"`
	model.Sort
	CreatorName string `json:"creator"`
	Accessed    int    `json:"accessed"`
	ID          string `json:"id"`
	NewID       string `json:"new_id"`
}

type UserResp

type UserResp struct {
	model.User
	Otp bool `json:"otp"`
}

type Verify2FAReq

type Verify2FAReq struct {
	Code   string `json:"code" binding:"required"`
	Secret string `json:"secret" binding:"required"`
}

Jump to

Keyboard shortcuts

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