MCPcopy Create free account

hub / github.com/Prejudice-Studio/Twilight / functions

Functions2,686 in github.com/Prejudice-Studio/Twilight

↓ 1 callersFunctionminInt
(a, b int)
internal/store/playback.go:74
↓ 1 callersFunctionnewBindStatusHub
()
internal/api/bind_status_hub.go:27
↓ 1 callersFunctionnewViperConfigReader
()
internal/config/config.go:1091
↓ 1 callersFunctionnonEmptyLines
(value string)
internal/api/system_update.go:293
↓ 1 callersFunctionnormalizeAuditLogSort
(value string)
internal/api/audit_handlers.go:191
↓ 1 callersFunctionnormalizeConfigField
(field configFieldDef, value any)
internal/api/config_admin.go:1227
↓ 1 callersFunctionnormalizeSortOrder
(value string)
internal/api/audit_handlers.go:200
↓ 1 callersFunctionnormalizeStringList
normalizeStringList 把配置值里常见的字符串列表形态([]string / []any / 单个字符串)统一成 []string,便于 ensureTicketDefaults 这类归一逻辑复用。
internal/api/config_admin.go:574
↓ 1 callersFunctionnormalizeTelegramCommand
(value string)
internal/config/config.go:1663
↓ 1 callersMethodnotifyTicketOwner
notifyTicketOwner 工单变动后向工单所属用户发送 Telegram 通知。
internal/api/ticket_handlers.go:705
↓ 1 callersMethodobserveTelegramRoster
(update map[string]any)
internal/api/telegram_bot.go:259
↓ 1 callersFunctionopenActionDialog
(request: MediaRequest)
webui/src/app/(main)/admin/requests/page.tsx:162
↓ 1 callersFunctionopenConfiguredStore
(ctx context.Context, cfg config.Config)
internal/api/app.go:274
↓ 1 callersFunctionopenEdit
(ann: Announcement)
webui/src/app/(main)/admin/announcements/page.tsx:152
↓ 1 callersFunctionopenEdit
(ticket: Ticket)
webui/src/app/(main)/admin/tickets/page.tsx:128
↓ 1 callersFunctionopenLogs
(job: SchedulerJobItem)
webui/src/app/(main)/admin/scheduler/page.tsx:818
↓ 1 callersFunctionopenRenewDialog
(child: InviteMyStatus["children"][number])
webui/src/app/(main)/invite/page.tsx:184
↓ 1 callersFunctionpages
(total, perPage int)
internal/api/business.go:43
↓ 1 callersFunctionparseClock
(value string, fallbackHour, fallbackMinute int)
internal/api/scheduler_daemon.go:442
↓ 1 callersFunctionparseLineList
(value: string)
webui/src/app/(auth)/setup/page.tsx:28
↓ 1 callersFunctionparseRgbInput
(value: string)
webui/src/components/theme-customizer.tsx:47
↓ 1 callersFunctionparseRoutes
(path string)
scripts/check_docs_drift.go:225
↓ 1 callersFunctionpatchJSON
(ctx context.Context, endpoint string, headers map[string]string, body any, dst any)
internal/api/http_json_client.go:105
↓ 1 callersFunctionpatchJSONWithTimeout
(ctx context.Context, endpoint string, headers map[string]string, body any, dst any, timeout time.Duration)
internal/api/http_json_client.go:109
↓ 1 callersFunctionpathMatches
(pathname: string, prefixes: readonly string[])
webui/src/lib/auth-routes.ts:13
↓ 1 callersFunctionpbkdf2SHA256
(password, salt []byte, iterations, keyLen int)
internal/security/password.go:96
↓ 1 callersMethodpeekDelAccountPending
(chatID, telegramID int64)
internal/api/telegram_bot.go:57
↓ 1 callersMethodpersistToPostgres
(ctx context.Context, token string, record sessionRecord)
internal/api/session.go:142
↓ 1 callersFunctionpoll
()
webui/src/hooks/use-bind-code-status.ts:111
↓ 1 callersMethodpostgresRuntimeLogMaxID
()
internal/store/runtime_log.go:272
↓ 1 callersMethodpostgresRuntimeLogs
(limit int, after int64)
internal/store/runtime_log.go:220
↓ 1 callersFunctionpostgresTargetReadyMap
(driver string, status store.PostgresTargetStatus)
internal/api/database_admin.go:341
↓ 1 callersFunctionpreferredBrowserLocale
()
webui/src/lib/i18n.tsx:76
↓ 1 callersFunctionpreview
()
webui/src/app/(main)/admin/developer/page.tsx:541
↓ 1 callersMethodpreviewDatabaseRestore
(name: string)
webui/src/lib/api.ts:1347
↓ 1 callersMethodpreviewDeveloperJSCommand
(code: string)
webui/src/lib/api.ts:1826
↓ 1 callersMethodpreviewGrantRegistrationQueueUsersEntitlement
(days?: number)
webui/src/lib/api.ts:920
↓ 1 callersMethodpreviewRegistrationQueueUsers
()
webui/src/lib/api.ts:900
↓ 1 callersFunctionpreviewRestoreBackup
(backup: DatabaseBackup)
webui/src/app/(main)/admin/database/page.tsx:205
↓ 1 callersFunctionprintHelp
()
cmd/twilight/main.go:439
↓ 1 callersFunctionprobeWritable
probeWritable 在目标目录里写一字节 sentinel 再删除,确认 dir 实际可写。
internal/store/store.go:532
↓ 1 callersMethodpruneAuditLogs
(options: { maxEntries?: number; retentionDays?: number; preserveAdmin?: boolean })
webui/src/lib/api.ts:2234
↓ 1 callersMethodpublicServerIconURL
()
internal/api/handlers.go:1335
↓ 1 callersMethodpublicTelegramBotInfo
(ctx context.Context)
internal/api/handlers.go:1206
↓ 1 callersFunctionpublicTelegramLink
(raw string)
internal/api/handlers.go:1275
↓ 1 callersMethodpurgeFailedBindEmail
purgeFailedBindEmail 在 bind 类验证码发送失败后清理"幽灵绑定": - 删除该地址在 bind 用途下尚未消费的活跃验证记录(重发失败时的残留); - 仅当用户邮箱仍未验证且正是该地址时清空 Email/EmailVerified,避免误删已验证邮箱。 该操作幂等且容错:
internal/api/email_verify_service.go:211
↓ 1 callersMethodputConn
(conn net.Conn)
internal/redis/redis.go:224
↓ 1 callersFunctionrandomAlphaNum
(length int)
internal/security/password.go:119
↓ 1 callersFunctionrandomKey
(prefix string, id, now int64)
internal/store/store.go:4443
↓ 1 callersFunctionreadLinuxLoadAverage
()
internal/api/runtime_logs.go:609
↓ 1 callersFunctionreadLinuxMemInfo
()
internal/api/runtime_logs.go:641
↓ 1 callersFunctionreadLinuxUptime
()
internal/api/runtime_logs.go:625
↓ 1 callersFunctionreadParagraph
()
webui/src/lib/safe-render.tsx:179
↓ 1 callersFunctionredactedUpdateCommand
(args []string)
internal/api/system_update.go:271
↓ 1 callersFunctionreducer
(state: State, action: Action)
webui/src/hooks/use-toast.ts:87
↓ 1 callersFunctionrefreshBindConfirmedBeforeSubmit
()
webui/src/app/(auth)/register/page.tsx:230
↓ 1 callersMethodrefreshEmbyStatusForUser
refreshEmbyStatusForUser 核对并回写单个用户的 Emby 用户名与启停状态。
internal/api/admin_user_refresh.go:95
↓ 1 callersMethodrefreshTelegramUsernameForUser
refreshTelegramUsernameForUser 拉取并回写单个用户的最新 Telegram 用户名。
internal/api/admin_user_refresh.go:67
↓ 1 callersMethodrefreshUserStatus
(uid: number, scope: "telegram" | "emby" | "both" = "both")
webui/src/lib/api.ts:976
↓ 1 callersFunctionrefuseUnsafeOutboundIP
refuseUnsafeOutboundIP 否决典型 SSRF 目标。允许 loopback(见上方注释); 拒绝 link-local(169.254.0.0/16、IPv6 fe80::/10)、unspecified(0.0.0.0/::) 与未被 link-local 覆盖的云元数据 ma
internal/api/outbound_url.go:73
↓ 1 callersFunctionregCodeUUID
()
internal/api/business.go:803
↓ 1 callersFunctionregcodeDecoyActionOptions
()
internal/api/config_admin.go:891
↓ 1 callersMethodregister
(data: RegisterData)
webui/src/lib/api.ts:231
↓ 1 callersMethodregisterAPIKeyRoutes
()
internal/api/routes.go:280
↓ 1 callersMethodregisterAdminRoutes
()
internal/api/routes.go:160
↓ 1 callersMethodregisterBatchRoutes
()
internal/api/routes.go:310
↓ 1 callersMethodregisterRoutes
()
internal/api/routes.go:5
↓ 1 callersMethodregisterSecurityRoutes
()
internal/api/routes.go:296
↓ 1 callersMethodregisterStatsInviteSigninAnnouncementRoutes
()
internal/api/routes.go:329
↓ 1 callersMethodrejectTelegramRebindRequest
(id: number, admin_note?: string)
webui/src/lib/api.ts:1190
↓ 1 callersFunctionremainingInviteSlots
(code store.InviteCode, now int64)
internal/api/business.go:131
↓ 1 callersFunctionremainingInviteUserSlots
remainingInviteUserSlots 邀请码剩余可注册用户数(计入系统用户上限)。
internal/api/business.go:92
↓ 1 callersFunctionremainingRegCodeEmbySlots
(code store.RegCode, now int64)
internal/api/business.go:138
↓ 1 callersFunctionremainingRegCodeUserSlots
remainingRegCodeUserSlots 注册码/白名单码剩余可注册用户数(计入系统用户上限)。
internal/api/business.go:81
↓ 1 callersFunctionremoveItem
(idx: number)
webui/src/app/(main)/admin/config/page.tsx:323
↓ 1 callersFunctionremoveRow
(idx: number)
webui/src/app/(main)/admin/config/page.tsx:422
↓ 1 callersFunctionrenderBBCode
(content: string)
webui/src/lib/safe-render.tsx:287
↓ 1 callersMethodrenderEmailCodeMessage
(code string, ttlMinutes int)
internal/api/email_verify_service.go:109
↓ 1 callersFunctionrenderLatencyText
(key: string)
webui/src/app/(main)/dashboard/page.tsx:373
↓ 1 callersFunctionrenderLatencyToneClass
(key: string)
webui/src/app/(main)/dashboard/page.tsx:382
↓ 1 callersFunctionrenderRoleBadge
(role: number, t: TFunc)
webui/src/app/(main)/admin/users/admin-users-cells.tsx:45
↓ 1 callersFunctionrenderToolbar
()
webui/src/components/admin/emby-device-audit-panel.tsx:354
↓ 1 callersMethodrenewUser
(uid: number, days: number)
webui/src/lib/api.ts:1019
↓ 1 callersMethodreopenOwnTicket
(id: number)
webui/src/lib/api.ts:2514
↓ 1 callersMethodreplaceRuntimeLogsLocked
replaceRuntimeLogsLocked 必须在持有 s.mu 的情况下调用:用事务清空表再批量 COPY 入库。中途失败回滚。空 entries 也走 TRUNCATE,使快照"无日志"语义被严格 遵守(避免恢复后还能看到恢复点之后的日志)。
internal/store/store.go:1359
↓ 1 callersFunctionrequestEmailCode
(e?: React.FormEvent)
webui/src/app/(auth)/forgot-password/page.tsx:104
↓ 1 callersMethodrequestForm
( endpoint: string, formData: FormData, method: "POST" | "PUT" = "POST" )
webui/src/lib/api.ts:206
↓ 1 callersFunctionrequestIsLoopbackInternal
requestIsLoopbackInternal 判定请求是否来自本机回环且未经任何反代转发,即 “同机受信内部调用”(独立 Bot 进程直连 http://127.0.0.1:<port>)。 取代 bind-confirm 过去的共享密钥:Bot 与 API 部署在同一台机器、同一网络环境,
internal/api/telegram_bind_secure.go:25
↓ 1 callersFunctionrequestMethod
(options: RequestInit, fallback = "GET")
webui/src/lib/api-request.ts:85
↓ 1 callersMethodrequestPasswordResetEmail
(email: string)
webui/src/lib/api.ts:550
↓ 1 callersMethodrequestTelegramRebind
(reason?: string)
webui/src/lib/api.ts:468
↓ 1 callersFunctionrequireBatchPayload
(w http.ResponseWriter, r *http.Request, confirmPhrase string, maxUsers int, tooManyMessage string)
internal/api/batch_helpers.go:5
↓ 1 callersMethodrequireTelegramConfigured
requireTelegramConfigured 与 requireEmbyConfigured 同构,集中维护"Bot Token 未配置 / Telegram 模式未启用"分支。状态码 400 与 admin_extra.go:798 唯一现存 call site 对齐。
internal/api/business.go:349
↓ 1 callersMethodresetAllEmbyBindings
()
webui/src/lib/api.ts:1559
↓ 1 callersMethodresetPassword
( uid: number, opts?: { scope?: "system" | "emby" | "both"; password?: string }, )
webui/src/lib/api.ts:1137
↓ 1 callersMethodresetPasswordByEmail
(data: { email: string; code: string; new_password: string })
webui/src/lib/api.ts:558
↓ 1 callersMethodresetSchedulerJobSchedule
(jobId: string)
webui/src/lib/api.ts:1461
↓ 1 callersFunctionresetThemeCustom
()
webui/src/lib/theme-custom.ts:149
↓ 1 callersFunctionresolveStateFileTarget
(databaseDir, target string)
internal/api/database_admin.go:434
↓ 1 callersFunctionresolveUploadAssetPath
(uploadDir, kind, filename string)
internal/api/upload_handlers.go:444
← previousnext →1,501–1,600 of 2,686, ranked by callers