Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Prejudice-Studio/Twilight
/ functions
Functions
2,686 in github.com/Prejudice-Studio/Twilight
⨍
Functions
2,686
◇
Types & classes
267
↓ 1 callers
Method
deleteUnlinkedEmbyUsers
(dryRun: boolean = false)
webui/src/lib/api.ts:1546
↓ 1 callers
Method
deleteUserBackground
()
webui/src/lib/api.ts:1948
↓ 1 callers
Method
deleteViolation
(id: number)
webui/src/lib/api.ts:2180
↓ 1 callers
Method
detachExpiredInviteChild
(uid: number)
webui/src/lib/api.ts:2396
↓ 1 callers
Function
detectMediaID
(query string)
internal/api/media_service.go:81
↓ 1 callers
Method
developerJSAdminAPI
(vm *goja.Runtime, user *store.User, opts developerJSRunOptions, logs *[]string)
internal/api/telegram_js_commands.go:605
↓ 1 callers
Method
developerJSAnnouncementsAPI
developerJSAnnouncementsAPI exposes announcement read/create helpers.
internal/api/telegram_js_generators.go:53
↓ 1 callers
Function
developerJSArraysAPI
(vm *goja.Runtime)
internal/api/telegram_js_commands.go:1689
↓ 1 callers
Function
developerJSBindingNames
()
internal/api/developer_handlers.go:298
↓ 1 callers
Method
developerJSCallback
(token string)
internal/api/telegram_js_interactions.go:75
↓ 1 callers
Function
developerJSCallbackActions
(input any)
internal/api/telegram_js_commands.go:1820
↓ 1 callers
Function
developerJSConfigValue
(cfg *config.Config, key string)
internal/api/telegram_js_commands.go:2191
↓ 1 callers
Method
developerJSDBAPI
(vm *goja.Runtime, user *store.User, opts developerJSRunOptions, logs *[]string)
internal/api/telegram_js_commands.go:646
↓ 1 callers
Method
developerJSDBCount
(name string, user *store.User)
internal/api/telegram_js_commands.go:753
↓ 1 callers
Function
developerJSDBSchema
()
internal/api/telegram_js_commands.go:704
↓ 1 callers
Function
developerJSDocs
()
internal/api/developer_handlers.go:305
↓ 1 callers
Function
developerJSEnvValue
(key string)
internal/api/telegram_js_commands.go:2237
↓ 1 callers
Method
developerJSExtendUserExpiry
developerJSExtendUserExpiry adds the given number of days on top of the user's current expiry (or now, whichever is later), then delegates the actual
internal/api/telegram_js_commands.go:1273
↓ 1 callers
Method
developerJSFetchAPI
(vm *goja.Runtime, opts developerJSRunOptions, logs *[]string)
internal/api/telegram_js_commands.go:1997
↓ 1 callers
Function
developerJSFormatAPI
(vm *goja.Runtime)
internal/api/telegram_js_commands.go:1926
↓ 1 callers
Method
developerJSGetRegcode
developerJSGetRegcode returns a single masked registration code snapshot. Admin-only.
internal/api/telegram_js_generators.go:70
↓ 1 callers
Function
developerJSGojaVersion
()
internal/api/developer_handlers.go:698
↓ 1 callers
Method
developerJSInline
(ctx context.Context, c telegramCommandCtx, opts developerJSRunOptions, text string, rawActions any, logs *[]s
internal/api/telegram_js_commands.go:1772
↓ 1 callers
Function
developerJSInputAPI
(vm *goja.Runtime, args []string, commandName string, privateChat bool, preview bool)
internal/api/telegram_js_commands.go:385
↓ 1 callers
Method
developerJSInteractionsAPI
(vm *goja.Runtime, c telegramCommandCtx, opts developerJSRunOptions, logs *[]string)
internal/api/telegram_js_commands.go:1761
↓ 1 callers
Method
developerJSInvitesAPI
developerJSInvitesAPI exposes admin-only invite code generation helpers.
internal/api/telegram_js_generators.go:36
↓ 1 callers
Method
developerJSListMediaRequests
developerJSListMediaRequests returns media request snapshots. Admins see all requests; non-admin users only receive their own.
internal/api/telegram_js_commands.go:955
↓ 1 callers
Method
developerJSListPresets
developerJSListPresets returns developer JS preset metadata (no code bodies). Admin-only.
internal/api/telegram_js_commands.go:1011
↓ 1 callers
Method
developerJSListTickets
developerJSListTickets returns ticket snapshots. Admins see all tickets; non-admin users only receive their own.
internal/api/telegram_js_commands.go:990
↓ 1 callers
Function
developerJSMediaRequestSnapshot
(m store.MediaRequest)
internal/api/telegram_js_commands.go:855
↓ 1 callers
Function
developerJSPresetSnapshot
(p store.DeveloperJSPreset)
internal/api/telegram_js_commands.go:904
↓ 1 callers
Method
developerJSQuickAnnouncement
developerJSQuickAnnouncement adapts the positional post(title, content, level?) form to developerJSCreateAnnouncement.
internal/api/telegram_js_generators.go:439
↓ 1 callers
Method
developerJSQuickInvite
developerJSQuickInvite adapts the positional quick(days?) form to developerJSGenerateInviteCode.
internal/api/telegram_js_generators.go:429
↓ 1 callers
Method
developerJSQuickRegcode
developerJSQuickRegcode adapts the positional quick(days?, count?, type?) form to the options-object developerJSGenerateRegcode, so scripts can omit t
internal/api/telegram_js_generators.go:413
↓ 1 callers
Method
developerJSRegcodesAPI
developerJSRegcodesAPI exposes admin-only registration / renewal code generation helpers to the Telegram custom-command JS sandbox. Read helpers reuse
internal/api/telegram_js_generators.go:16
↓ 1 callers
Method
developerJSSystemAPI
(vm *goja.Runtime, user *store.User)
internal/api/telegram_js_commands.go:1520
↓ 1 callers
Function
developerJSTemplate
(template string, data any)
internal/api/telegram_js_commands.go:2174
↓ 1 callers
Function
developerJSTextAPI
(vm *goja.Runtime)
internal/api/telegram_js_commands.go:1635
↓ 1 callers
Function
developerJSTicketSnapshot
(t store.Ticket)
internal/api/telegram_js_commands.go:888
↓ 1 callers
Function
developerJSTimeAPI
(vm *goja.Runtime)
internal/api/telegram_js_commands.go:1896
↓ 1 callers
Method
developerJSUpdateCurrentUser
(vm *goja.Runtime, user *store.User, opts developerJSRunOptions, logs *[]string, patch any)
internal/api/telegram_js_commands.go:1450
↓ 1 callers
Method
developerJSUserExists
developerJSUserExists reports whether a user with the given UID exists. It reuses the getUser visibility rule: admins may probe any UID, normal users
internal/api/telegram_js_commands.go:1309
↓ 1 callers
Function
developerJSUserMatches
(u store.User, query string)
internal/api/telegram_js_commands.go:1040
↓ 1 callers
Method
developerJSUsersAPI
(vm *goja.Runtime, user *store.User, opts developerJSRunOptions, logs *[]string)
internal/api/telegram_js_commands.go:482
↓ 1 callers
Function
developerJSValidateFetchHost
(ctx context.Context, host string)
internal/api/telegram_js_commands.go:2085
↓ 1 callers
Method
developerJSWaitText
(ctx context.Context, c telegramCommandCtx, opts developerJSRunOptions, rawOptions any, logs *[]string)
internal/api/telegram_js_commands.go:1853
↓ 1 callers
Function
developerJSWasExit
(err error)
internal/api/telegram_js_commands.go:323
↓ 1 callers
Function
deviceHaystack
(u: EmbyAuditUser, d: EmbyAuditDevice)
webui/src/components/admin/emby-device-audit-panel.tsx:114
↓ 1 callers
Function
deviceIDSet
(devices []Device)
internal/store/device_limit_test.go:89
↓ 1 callers
Function
deviceMatchesCategory
( u: EmbyAuditUser, d: EmbyAuditDevice, category: CategoryKey, )
webui/src/components/admin/emby-device-audit-panel.tsx:142
↓ 1 callers
Method
drain
()
internal/api/runtime_logs.go:261
↓ 1 callers
Method
dto
()
internal/api/telegram.go:385
↓ 1 callers
Function
dummyPasswordHash
dummyPasswordHash 返回一份用当前默认参数(PBKDF2-600k)生成的占位哈希, 用于用户名不存在时跑等代价校验。首次调用时惰性生成(~150ms 一次性成本), 之后复用。生成失败(crypto/rand 故障,极罕见)时返回空串——此时 VerifyPassword 会快速返
internal/api/password_verify.go:49
↓ 1 callers
Function
emailCodeProcessSecret
()
internal/api/email_verify_service.go:48
↓ 1 callers
Method
emailCodeSecret
emailCodeSecret 优先用配置里的 BotInternalSecret 派生(跨重启稳定),缺省回退到 进程级随机密钥。加前缀做域分隔,避免和其它复用 BotInternalSecret 的场景撞用途。
internal/api/email_verify_service.go:61
↓ 1 callers
Function
emailVerifyResultToResponse
(rec store.EmailVerification, result store.EmailVerificationResult)
internal/api/email_verify_service.go:245
↓ 1 callers
Function
embyAdminRestrictionAllowed
(method, requestPath string)
internal/api/emby.go:210
↓ 1 callers
Function
embyAuditLocalUser
embyAuditLocalUser 把本地账号映射成审查视图需要的完整信息:网页账号、Emby 账号 与 Telegram 绑定都在这里一次性带出,方便管理员在一处核对一个人的全部身份。
internal/api/emby_device_audit.go:165
↓ 1 callers
Method
embyCreateUser
(ctx context.Context, username, password string)
internal/api/emby.go:251
↓ 1 callers
Method
embyDeleteUser
embyDeleteUser 从 Emby 删除指定用户。仅用于调度任务清理未绑定 Web 的孤立 Emby 账号。
internal/api/emby.go:352
↓ 1 callers
Method
embyDisableUserForUnbind
(ctx context.Context, userID string)
internal/api/emby.go:396
↓ 1 callers
Function
embyErrorIsRetryable
embyErrorIsRetryable 区分"重试可能成功"vs"重试只会复读相同错误"。 5xx 与连接级错误归前者;4xx / ctx-canceled / DNS 解析失败归后者。
internal/api/emby.go:67
↓ 1 callers
Method
embyFindByProviderID
(ctx context.Context, provider, id, mediaType string)
internal/api/emby_inventory.go:43
↓ 1 callers
Method
embyFindByTitle
(ctx context.Context, title, originalTitle, mediaType string, year int)
internal/api/emby_inventory.go:162
↓ 1 callers
Method
embyHealthFast
embyHealthFast 是 embyHealth 的 1.5 秒超时版本,专用于"系统首页摘要" 这类不能阻塞用户响应的场景。
internal/api/emby.go:172
↓ 1 callers
Function
embyMatchingFilter
()
webui/src/app/(main)/admin/users/page.tsx:400
↓ 1 callers
Function
embyRemoteDisabled
(user map[string]any)
internal/api/scheduler_runner.go:728
↓ 1 callers
Method
embySeriesSeasons
(ctx context.Context, seriesID string)
internal/api/emby_inventory.go:70
↓ 1 callers
Function
embyTitleMatches
(title string, item map[string]any)
internal/api/emby_inventory.go:240
↓ 1 callers
Method
enableRejoinedTelegramUsers
重新校验并启用已经回到 Telegram 群聊的禁用用户。
webui/src/lib/api.ts:1628
↓ 1 callers
Function
endpointDocumented
endpointDocumented 用最宽松的"包含"语义:任意 docs/*.md 出现归一化后的 "METHOD PATH" 字符串就算通过——不强求章节编排,只确保有人提过它。 也接受常见格式变体: GET /api/v1/x/{id} `GET` `/api/v1/x/{id}`
scripts/check_docs_drift.go:302
↓ 1 callers
Method
ensureBangumiCollection
(ctx context.Context, subjectID string, headers map[string]string)
internal/api/bangumi_sync_service.go:148
↓ 1 callers
Function
ensureBucket
(key: string)
webui/src/app/(main)/admin/config/page.tsx:912
↓ 1 callers
Function
episodeSuffix
(ep int)
internal/api/bangumi_sync_service.go:104
↓ 1 callers
Function
escapeCssUrlValue
(value: string)
webui/src/lib/safe-url.ts:35
↓ 1 callers
Method
evictEmbyAdminCacheLocked
evictEmbyAdminCacheLocked 必须持有 embyAdminMu 调用: 1. 先扫一遍淘汰过期项(>5min) 2. 若仍 ≥ max,丢掉 checked 最早的一项(防 OOM 兜底)
internal/api/emby.go:127
↓ 1 callers
Function
executeMigration
()
webui/src/app/(main)/admin/database/page.tsx:301
↓ 1 callers
Function
expiryFromDays
(days int, base time.Time)
internal/api/business.go:175
↓ 1 callers
Function
extractProtectedAdminConfig
(content string)
internal/api/config_admin.go:681
↓ 1 callers
Function
extractUploadReference
(raw string)
internal/api/admin_jobs.go:343
↓ 1 callers
Method
fail
(code string, failure bindCodeFailure)
internal/api/bind_status_hub.go:169
↓ 1 callers
Method
failure
(code string, now int64)
internal/api/bind_status_hub.go:205
↓ 1 callers
Function
fetchStatus
(signal: AbortSignal)
webui/src/hooks/use-bind-code-status.ts:81
↓ 1 callers
Function
filepathJoin
(parts ...string)
internal/api/system_update.go:376
↓ 1 callers
Method
filteredBatchRegcodeCodes
filteredBatchRegcodeCodes 按与 handleListRegcodes 完全一致的筛选口径 (type / status / source / search)解析“选中全部匹配”要删除的注册码集合, 并扣除前端 exclude_codes 中明确排除的码。filter 口径必
internal/api/regcode_handlers.go:449
↓ 1 callers
Method
filteredBatchUserUIDs
(payload map[string]any, limit int)
internal/api/batch_user_handlers.go:427
↓ 1 callers
Method
filteredUsers
(payload map[string]any)
internal/api/admin_extra.go:999
↓ 1 callers
Function
findBareSetting
(settings map[string]any, key string)
internal/config/config.go:1130
↓ 1 callers
Function
findRepoRoot
()
scripts/check_docs_drift.go:207
↓ 1 callers
Function
firstNonZeroInt64
(values ...int64)
internal/api/telegram_inline.go:962
↓ 1 callers
Method
forceUnbindUser
(uid: number, scope: "telegram" | "emby" | "both" = "both")
webui/src/lib/api.ts:845
↓ 1 callers
Method
forgotPasswordByEmby
(data: { emby_username: string; emby_password: string })
webui/src/lib/api.ts:2163
↓ 1 callers
Function
formatCommandReplyMap
(value map[string]any)
internal/api/config_admin.go:1368
↓ 1 callers
Function
formatDate
(date: string | null | undefined)
webui/src/app/(main)/score/page.tsx:27
↓ 1 callers
Function
formatDate
(timestamp: number | null)
webui/src/app/(main)/settings/apikey/page.tsx:196
↓ 1 callers
Function
formatDuration
(seconds: number)
webui/src/app/(main)/admin/bangumi/page.tsx:23
↓ 1 callers
Function
formatExpires
(unix: number | null | undefined, locale: string, neverExpires: string)
webui/src/app/(main)/invite/page.tsx:39
↓ 1 callers
Function
formatNumber
(num: number)
webui/src/lib/utils.ts:84
↓ 1 callers
Function
formatRelative
(ts: number, locale: string)
webui/src/app/(main)/score/page.tsx:32
↓ 1 callers
Function
formatRelativeTime
(date: string | Date | number)
webui/src/lib/utils.ts:92
← previous
next →
1,201–1,300 of 2,686, ranked by callers