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
↓ 2 callers
Method
handleBatchToggleUsers
(w http.ResponseWriter, r *http.Request, enable bool)
internal/api/batch_user_handlers.go:21
↓ 2 callers
Function
handleBindEmby
()
webui/src/app/(main)/settings/page.tsx:502
↓ 2 callers
Function
handleCascadeToggle
(enable: boolean)
webui/src/app/(main)/admin/invite/page.tsx:237
↓ 2 callers
Function
handleCopy
(code: string)
webui/src/app/(main)/invite/page.tsx:231
↓ 2 callers
Function
handleCopyUrl
(url: string, key: string)
webui/src/app/(main)/settings/page.tsx:688
↓ 2 callers
Function
handleDelete
(code: Regcode)
webui/src/app/(main)/admin/regcodes/page.tsx:228
↓ 2 callers
Method
handleDetachExpiredInviteChild
(w http.ResponseWriter, r *http.Request, params Params)
internal/api/invite_handlers.go:234
↓ 2 callers
Function
handleEmbyToggle
(user: UserInfo, enable: boolean)
webui/src/app/(main)/admin/users/page.tsx:1049
↓ 2 callers
Function
handleGitUpdate
(dryRun = false)
webui/src/app/(main)/admin/config/page.tsx:1547
↓ 2 callers
Function
handleRenameType
()
webui/src/app/(main)/admin/tickets/page.tsx:105
↓ 2 callers
Function
handleRevoke
(code: InviteCodeItem)
webui/src/app/(main)/invite/page.tsx:240
↓ 2 callers
Function
handleSaveNote
(code: string)
webui/src/app/(main)/admin/regcodes/page.tsx:356
↓ 2 callers
Method
handleSchedulerSchedule
(w http.ResponseWriter, r *http.Request, params Params)
internal/api/scheduler_handlers.go:110
↓ 2 callers
Function
handleSelectedEmbyToggle
(enable: boolean)
webui/src/app/(main)/admin/users/page.tsx:1312
↓ 2 callers
Function
handleSelectedRefreshStatus
(scope: "telegram" | "emby")
webui/src/app/(main)/admin/users/page.tsx:1344
↓ 2 callers
Function
handleSelectedToggleActive
(enable: boolean)
webui/src/app/(main)/admin/users/page.tsx:1235
↓ 2 callers
Function
handleToggleActive
(code: Regcode)
webui/src/app/(main)/admin/regcodes/page.tsx:374
↓ 2 callers
Method
handleUpload
(w http.ResponseWriter, r *http.Request, kind string)
internal/api/upload_handlers.go:197
↓ 2 callers
Function
handleViewAllPage
(dir: number)
webui/src/app/(main)/bangumi/page.tsx:141
↓ 2 callers
Function
handleVisualChange
( field: "lightBlur" | "darkBlur" | "lightOpacity" | "darkOpacity", value: number )
webui/src/app/(main)/settings/appearance/page.tsx:246
↓ 2 callers
Function
hasHeader
(headers: Record<string, string>, name: string)
webui/src/lib/api-request.ts:98
↓ 2 callers
Function
hasItem
(preset: string)
webui/src/app/(main)/admin/config/page.tsx:330
↓ 2 callers
Function
hashPasswordWithSalt
(password, salt string, iterations int)
internal/security/password.go:91
↓ 2 callers
Function
hslVar
(hex: string)
webui/src/lib/theme-custom.ts:103
↓ 2 callers
Function
int64ListValue
(value string)
internal/config/config.go:1579
↓ 2 callers
Method
int64ListValue
(fallback []int64, keys ...string)
internal/config/config.go:1351
↓ 2 callers
Method
int64Value
(fallback int64, keys ...string)
internal/config/config.go:1218
↓ 2 callers
Function
intListValue
(value string)
internal/config/config.go:1423
↓ 2 callers
Method
intListValue
(fallback []int, keys ...string)
internal/config/config.go:1370
↓ 2 callers
Function
intsToAny
(values []int)
internal/api/config_admin.go:1395
↓ 2 callers
Function
invalidateRequestsCache
()
webui/src/app/(main)/admin/requests/page.tsx:69
↓ 2 callers
Function
invalidateRequestsCache
()
webui/src/app/(main)/admin/telegram-rebind-requests/page.tsx:45
↓ 2 callers
Function
isAbortError
(error: unknown)
webui/src/lib/api-request.ts:65
↓ 2 callers
Function
isActivePath
(pathname: string, href: string)
webui/src/components/layout/sidebar.tsx:125
↓ 2 callers
Function
isChanged
(a: unknown, b: unknown)
webui/src/components/admin/config-section-editor.tsx:40
↓ 2 callers
Function
isDuplicateDatabaseError
(err error)
internal/store/store.go:673
↓ 2 callers
Function
isIntegerString
(value string)
internal/api/config_admin.go:1407
↓ 2 callers
Function
isNormalOps
(k: { allow_query: boolean })
webui/src/app/(main)/settings/apikey/page.tsx:60
↓ 2 callers
Function
isSafeUrl
(raw: string)
webui/src/lib/safe-render.tsx:10
↓ 2 callers
Function
isSyntheticEmbyID
(id string, uid int64)
internal/api/scheduler_runner.go:750
↓ 2 callers
Function
isTimeoutError
(error: unknown)
webui/src/lib/api-request.ts:75
↓ 2 callers
Function
isUndefinedDatabaseError
(err error)
internal/store/store.go:665
↓ 2 callers
Function
isUserSelected
(user: UserInfo)
webui/src/app/(main)/admin/users/page.tsx:371
↓ 2 callers
Function
keyRows
(locale: TextLocale, keys: string[], kind: "config" | "env")
webui/src/components/developer-js-docs-panel.tsx:909
↓ 2 callers
Method
kickEmbySessions
kickEmbySessions 踢出某 Emby 用户当前的全部在线会话(逐个 /Sessions/{id}/Logout), 返回成功登出的会话数。Emby 未配置或 embyID 为空时返回 0。供按 uid / 按 emby_id 两条 踢人入口共用,避免重复遍历 /Sessions 的逻辑
internal/api/admin_emby_user_actions.go:12
↓ 2 callers
Method
kickNoEmbyUsers
(opts?: { dryRun?: boolean; confirm?: string; minDays?: number; preservePendingRegister?: bool
webui/src/lib/api.ts:1730
↓ 2 callers
Method
kickUnboundGroupMembers
一键踢出群里未绑定 Web 账号的成员。``dryRun=true`` 时只统计目标,不实际踢。
webui/src/lib/api.ts:1662
↓ 2 callers
Function
leaves
(obj, prefix = "", out = {})
webui/check_placeholders.mjs:8
↓ 2 callers
Function
linesToStrings
(lines []config.Line)
internal/api/config_admin.go:1348
↓ 2 callers
Method
listDeveloperJSPresets
()
webui/src/lib/api.ts:1846
↓ 2 callers
Function
listFieldWantsInts
(key string)
internal/api/config_admin.go:1403
↓ 2 callers
Function
lookupMessage
(locale: Locale, key: MessageKey)
webui/src/lib/i18n.tsx:85
↓ 2 callers
Function
maskAPIKey
(key string)
internal/api/app.go:1464
↓ 2 callers
Function
maskTOMLSecrets
maskTOMLSecrets 对磁盘原文 TOML 做行级密钥遮蔽:凡是落在某 section 下、且被 configSectionDefs 标记为 Type=="secret" 的非空字段,整行重写为 key = "<哨兵>"。 与 maskConfigSecrets(作用于 values)同口
internal/api/config_admin.go:96
↓ 2 callers
Function
matchesSearch
(haystacks: string[], q: string)
webui/src/components/admin/emby-device-audit-panel.tsx:118
↓ 2 callers
Method
mergeFile
(path string)
internal/config/config.go:1097
↓ 2 callers
Method
migrateDatabase
(payload: { source_driver?: "json" | "postgres"; target_driver: "json" | "postgres"; dry_run?: boo
webui/src/lib/api.ts:1351
↓ 2 callers
Function
minInt
(a, b int)
internal/api/runtime_logs.go:176
↓ 2 callers
Function
newRateLimiter
(redisClient *redis.Client)
internal/api/ratelimit.go:33
↓ 2 callers
Function
newRedisClient
(cfg config.Config)
internal/api/app.go:255
↓ 2 callers
Function
newRuntimeLogBuffer
(limit int)
internal/api/runtime_logs.go:170
↓ 2 callers
Function
normalizeAssetUrl
(url?: string)
webui/src/app/(main)/admin/users/page.tsx:77
↓ 2 callers
Method
normalizeBackgroundAssetCssUrlValue
(value?: string | null)
webui/src/lib/api.ts:160
↓ 2 callers
Function
normalizeConfigContent
(configFile, content string)
internal/api/config_admin.go:525
↓ 2 callers
Function
normalizeEmbyName
(name string)
internal/api/scheduler_runner.go:746
↓ 2 callers
Function
normalizeRefreshScope
normalizeRefreshScope 归一化刷新范围:telegram 仅刷新 TG 用户名、emby 仅核对 Emby 状态、其余(含空)默认 both 两者都刷。让 TG 同步与 Emby 同步可以分开触发。
internal/api/admin_user_refresh.go:34
↓ 2 callers
Function
normalizeRoleValue
normalizeRoleValue 把任意 JSON 数值收成已知 role 整数。 仅 RoleAdmin / RoleNormal / RoleWhitelist / RoleUnrecognized 视为合法。 用于 admin update / set-role 等所有写 user.Rol
internal/api/handlers.go:1981
↓ 2 callers
Function
normalizeSchedulerRunTimestamps
(run *SchedulerRun)
internal/store/scheduler.go:271
↓ 2 callers
Method
normalizeSchedulerRuntimeParams
(jobID string, params map[string]any)
internal/api/scheduler_handlers.go:196
↓ 2 callers
Function
normalizeStoreDriver
(driver string)
internal/api/app.go:315
↓ 2 callers
Function
normalizeTelegramCustomCommand
(value string)
internal/api/config_admin.go:1372
↓ 2 callers
Function
normalizeTelegramUsername
(username string)
internal/store/store.go:1837
↓ 2 callers
Function
normalizedRuntimeDriver
(driver string)
internal/api/storage_guard.go:13
↓ 2 callers
Function
normalizedRuntimeStateFile
(path string)
internal/api/storage_guard.go:39
↓ 2 callers
Function
openActionDialog
(request: TelegramRebindRequest, action: "approve" | "reject")
webui/src/app/(main)/admin/telegram-rebind-requests/page.tsx:69
↓ 2 callers
Function
openBulkActionDialog
(action: "approve" | "reject")
webui/src/app/(main)/admin/telegram-rebind-requests/page.tsx:76
↓ 2 callers
Function
openEditDialog
(code: Regcode)
webui/src/app/(main)/admin/regcodes/page.tsx:399
↓ 2 callers
Function
openUsageDialog
(code: Regcode)
webui/src/app/(main)/admin/regcodes/page.tsx:437
↓ 2 callers
Function
parseClientIPHeader
(value string)
internal/api/app.go:1208
↓ 2 callers
Function
parseTelegramCommandRepliesList
(parts []string)
internal/config/config.go:1635
↓ 2 callers
Function
ph
(s)
webui/check_placeholders.mjs:16
↓ 2 callers
Function
postgresTargetInfo
(dsn string)
internal/store/store.go:687
↓ 2 callers
Function
preloadLocale
(locale: Locale)
webui/src/lib/i18n.tsx:32
↓ 2 callers
Method
previewCode
(ctx context.Context, code string, user store.User)
internal/api/business.go:833
↓ 2 callers
Function
previewMigration
(openConfirm = false)
webui/src/app/(main)/admin/database/page.tsx:271
↓ 2 callers
Method
probeEmbyUrl
(url: string)
webui/src/lib/api.ts:625
↓ 2 callers
Function
protectedAdminConfigLine
(trimmed string)
internal/api/config_admin.go:712
↓ 2 callers
Function
providerID
(item map[string]any, key string)
internal/api/emby_inventory.go:226
↓ 2 callers
Function
publicTelegramLinkList
(values []string)
internal/api/handlers.go:1261
↓ 2 callers
Function
publicTelegramLinks
(groupIDs, channelIDs []string)
internal/api/handlers.go:1247
↓ 2 callers
Function
quotePostgresIdentifier
(value string)
internal/store/store.go:727
↓ 2 callers
Function
readReply
(r *bufio.Reader)
internal/redis/redis.go:258
↓ 2 callers
Function
readStoredPerPage
(key: string, fallback: number, allowed: number[])
webui/src/lib/utils.ts:10
↓ 2 callers
Function
readUntil
(marker: string, from: number)
webui/src/lib/safe-render.tsx:41
↓ 2 callers
Method
recordViolation
recordViolation logs a code violation and applies the configured punitive action. 入参 ctx 通常来自 r.Context(),用于控制审计写入与本地操作的取消语义; 但 disable_user / disable
internal/api/business.go:900
↓ 2 callers
Function
refreshRegisterAvailability
()
webui/src/app/(auth)/register/page.tsx:116
↓ 2 callers
Method
refreshUserExternalStatus
refreshUserExternalStatus 主动核对并回写用户在 Telegram 与 Emby 的当前状态: - Telegram:用 getChat 拉最新 @username(被动刷新只在用户给 Bot 发消息时触发, 这里给管理员一个强制拉取入口);取不到用户名时保留旧值不清空,避免
internal/api/admin_user_refresh.go:53
↓ 2 callers
Method
regCodeFormatForType
(codeType int, explicit string)
internal/api/business.go:652
↓ 2 callers
Function
regCodeMatchesUser
(reg RegCode, user User)
internal/store/store.go:1822
↓ 2 callers
Function
regCodeRandomAlgorithmOptions
()
internal/api/config_admin.go:863
← previous
next →
801–900 of 2,686, ranked by callers