MCPcopy Create free account

hub / github.com/KunMoe/kun-galgame-patch / functions

Functions1,135 in github.com/KunMoe/kun-galgame-patch

↓ 1 callersFunctionNewMock
NewMock returns a Client backed by an in-memory MockServer. The server is shut down via t.Cleanup.
apps/api/pkg/userclient/mock.go:38
↓ 1 callersFunctionNewMockServer
NewMockServer starts a test HTTP server that serves the given users. Caller is responsible for Close().
apps/api/pkg/userclient/mock.go:27
↓ 1 callersFunctionParseDeleteArtifactResp
ParseDeleteArtifactResp parses an HTTP response from a DeleteArtifactWithResponse call
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:1008
↓ 1 callersFunctionParseDownloadArtifactResp
ParseDownloadArtifactResp parses an HTTP response from a DownloadArtifactWithResponse call
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:1107
↓ 1 callersFunctionParseGetArtifactResp
ParseGetArtifactResp parses an HTTP response from a GetArtifactWithResponse call
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:1041
↓ 1 callersFunctionParseListArtifactsResp
ParseListArtifactsResp parses an HTTP response from a ListArtifactsWithResponse call
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:942
↓ 1 callersMethodPatchGalgameDraftMultipart
PatchGalgameDraftMultipart proxies PATCH /galgame/:gid with a new banner file.
apps/api/internal/galgame/client/submission.go:169
↓ 1 callersMethodProxyMultipart
ProxyMultipart relays a multipart write (a `data` JSON part + an optional `file` part) — used by POST /galgame/:gid/prs so a PR proposal can carry a n
apps/api/internal/galgame/client/editing.go:66
↓ 1 callersMethodProxyUserToOAuth
ProxyUserToOAuth forwards a logged-in user's request to an OAuth self- service endpoint (PATCH /auth/me, PUT /auth/password, etc.). The user's access_
apps/api/internal/auth/service/service.go:368
↓ 1 callersMethodPublicURL
PublicURL returns the public download URL for the given s3_key.
apps/api/internal/infrastructure/storage/s3.go:100
↓ 1 callersMethodPurgePreview
PurgePreview returns the count breakdown without mutating anything.
apps/api/internal/admin/repository/repository.go:353
↓ 1 callersMethodPurgeUserPreview
User management (GetUsers / UpdateUser / DeleteUser) was removed when identity moved to OAuth: name / email / role / status / bans are all owned by th
apps/api/internal/admin/service/service.go:106
↓ 1 callersMethodPutObject
PutObject performs a server-side upload (used for user-page images, where the image is processed/resized first). Intended for small objects — it consu
apps/api/internal/infrastructure/storage/s3.go:107
↓ 1 callersMethodReactionsByMessageIDs
ReactionsByMessageIDs / MessagesByIDs are thin passthroughs the handler uses to enrich a message page with reactions + reply quotes in two extra batch
apps/api/internal/chat/service/service.go:221
↓ 1 callersMethodReferencePing
ReferencePing refreshes last_referenced_at for a batch of hashes so the image_service GC doesn't reclaim images this site still references (cold- stor
apps/api/pkg/imageclient/client.go:231
↓ 1 callersMethodRegisterClaimedGalgame
RegisterClaimedGalgame creates the local patch row for a galgame the user just claimed on Wiki (status 2 → 0), awarding +3 moemoepoint and registering
apps/api/internal/patch/service/service.go:347
↓ 1 callersMethodRegisterRoutes
()
apps/api/internal/app/router.go:11
↓ 1 callersFunctionRender
Render renders markdown text to HTML.
apps/api/internal/infrastructure/markdown/markdown.go:375
↓ 1 callersMethodResolve
Resolve returns metadata for the given hashes, serving cached entries and fetching the rest via one MetaBatch. Best-effort: on any error (client uncon
apps/api/pkg/imageclient/meta_resolver.go:45
↓ 1 callersMethodResolveDownloadURL
ResolveDownloadURL fills r.DownloadURL for artifact-backed rows by asking the artifact service to issue a download URL (presigned, or a CDN/Worker URL
apps/api/internal/patch/service/service.go:1347
↓ 1 callersMethodRevokeOAuthToken
RevokeOAuthToken is fire-and-forget per RFC 7009: the endpoint always returns 200 regardless of whether the token was valid, so we only log transport-
apps/api/internal/auth/service/service.go:277
↓ 1 callersFunctionRunReferencePing
RunReferencePing collects every image_service hash this site still references and pings image_service so its GC doesn't reclaim them (cold-storage TTL
apps/api/internal/infrastructure/cron/reference_ping.go:52
↓ 1 callersFunctionRunWikiMessageSync
RunWikiMessageSync is exported so it can be called manually (e.g. for tests or one-off backfills). The cron path is the StartWikiSync wrapper below.
apps/api/internal/infrastructure/cron/wiki_sync.go:54
↓ 1 callersMethodSearch
Search proxies /users/search. Results are not cached (query space is unbounded).
apps/api/pkg/userclient/client.go:171
↓ 1 callersMethodSearch
Search POST /api/search
apps/api/internal/common/search/search.go:59
↓ 1 callersMethodSearchGalgame
SearchGalgame calls /galgame/search.
apps/api/internal/galgame/client/client.go:274
↓ 1 callersMethodSetBasicAuth
─── Configuration ───────────────────────────────────── SetBasicAuth registers the OAuth Client credentials used for service-to-service endpoints (cur
apps/api/internal/galgame/client/submission.go:34
↓ 1 callersMethodSetBool
SetBool upserts the setting, recording the admin who changed it + the time.
apps/api/internal/setting/service/service.go:44
↓ 1 callersMethodSoftDeleteMessage
SoftDeleteMessage soft-deletes a message.
apps/api/internal/chat/repository/repository.go:273
↓ 1 callersMethodStartPrivateChat
StartPrivateChat returns the private chat room between the current user and peerUID, creating it on first call. The caller then navigates to message/c
apps/api/internal/chat/service/service.go:56
↓ 1 callersMethodSubmitGalgameMultipart
SubmitGalgameMultipart proxies POST /galgame/submit in multipart mode. The `data` part is the JSON body, the `file` part is the optional banner image.
apps/api/internal/galgame/client/submission.go:142
↓ 1 callersMethodToggleResourceStatus
(resourceID int)
apps/api/internal/patch/repository/repository.go:346
↓ 1 callersMethodUpdateCommentStatus
UpdateCommentStatus sets a comment's moderation status (0=approved, 1=pending). Used by PatchService.ApproveComment.
apps/api/internal/patch/repository/repository.go:211
↓ 1 callersMethodUpdateFields
(userID int, fields map[string]any)
apps/api/internal/user/repository/repository.go:29
↓ 1 callersMethodUpdateGalgameMultipart
UpdateGalgameMultipart proxies PUT /galgame/:gid in multipart/form-data mode (per docs/galgame_wiki/01-galgame.md §Banner 上传). The wire shape: data=
apps/api/internal/galgame/client/client.go:689
↓ 1 callersMethodUpdateMessageContent
UpdateMessageContent edits a message and writes the edit history (in a transaction).
apps/api/internal/chat/repository/repository.go:257
↓ 1 callersMethodUploadGalgameImage
UploadGalgameImage proxies a galgame cover/screenshot upload to the wiki's canonical POST /galgame/image (multipart {preset, file}), forwarding the us
apps/api/internal/galgame/client/client.go:768
↓ 1 callersMethodUploadUserImage
─── User image uploads ────────────────────────────── UploadUserImage uploads an image for the user's personal page (fit within 1920x1080, JPEG q=50).
apps/api/internal/user/service/service.go:436
↓ 1 callersMethodVariantURL
VariantURL builds the CDN URL for a pre-generated variant (e.g. "mini", "100", "256"). Returns "" if the hash is invalid.
apps/api/pkg/imageclient/client.go:372
↓ 1 callersMethodWhichFollowed
WhichFollowed returns a set of candidateIDs that the viewer currently follows. One query for the whole page; used by GetFollowers / GetFollowing to st
apps/api/internal/user/repository/repository.go:220
↓ 1 callersMethodWikiEditProxy
WikiEditProxy is the generic GET / JSON-write pass-through used by every §15 endpoint except the multipart-capable PR submit (see WikiPRSubmit).
apps/api/internal/patch/handler/galgame_edit.go:46
↓ 1 callersMethodadoptStub
adoptStub upgrades an interaction-stub (a favorite/comment lazily recorded the galgame with the wiki creator as placeholder owner) into a real registr
apps/api/internal/patch/service/service.go:192
↓ 1 callersFunctionalreadyRan
(db *sql.DB)
apps/api/cmd/migrate-oauth-prep/main.go:161
↓ 1 callersFunctionappendContentLimit
(endpoint: string)
apps/web/app/composables/useApi.ts:101
↓ 1 callersFunctionappendIncludeEmpty
(endpoint: string)
apps/web/app/composables/useApi.ts:130
↓ 1 callersFunctionapplyWikiMessage
applyWikiMessage handles a single Wiki message inside an open tx. It is the idempotency boundary: a non-zero RowsAffected on the INSERT means this is
apps/api/internal/infrastructure/cron/wiki_sync.go:122
↓ 1 callersMethodattachCommentUsers
(ctx context.Context, cs []patchModel.PatchComment)
apps/api/internal/user/service/service.go:419
↓ 1 callersMethodattachCommentUsers
attachUserBriefs is a tiny helper used by every admin list endpoint that previously relied on Preload("User") -- fetches publisher briefs from OAuth u
apps/api/internal/admin/handler/handler.go:36
↓ 1 callersMethodattachLogUsers
(ctx context.Context, ls []adminModel.AdminLog)
apps/api/internal/admin/handler/handler.go:98
↓ 1 callersMethodattachMemberUsers
(ctx context.Context, ms []chatModel.ChatMember)
apps/api/internal/chat/handler/handler.go:50
↓ 1 callersMethodattachMessageSenders
attach helpers stamp the embedded user/sender field on rows after they come back from the repository (Preload was removed in Phase 6e).
apps/api/internal/chat/handler/handler.go:37
↓ 1 callersMethodattachMoemoepointLinks
attachMoemoepointLinks fills LogEntry.Link for moyu-local rows so the records modal can deep-link them. resource / galgame refs map straight to a page
apps/api/internal/user/service/service.go:300
↓ 1 callersMethodattachOneSender
(ctx context.Context, msg *chatModel.ChatMessage)
apps/api/internal/chat/handler/handler.go:63
↓ 1 callersMethodattachResourceUsers
attachResourceUsers / attachCommentUsers stamp the User field on rows returned to the user-profile pages.
apps/api/internal/user/service/service.go:406
↓ 1 callersMethodattachResourceUsers
(ctx context.Context, rs []patchModel.PatchResource)
apps/api/internal/admin/handler/handler.go:49
↓ 1 callersFunctionattachUsersToCards
attachUsersToCards batch-fetches publisher briefs from OAuth and stamps the User field on each card. Best-effort -- on error the User field stays nil
apps/api/internal/galgame/enricher/enricher.go:173
↓ 1 callersFunctionavifToPNG
avifToPNG decodes AVIF bytes to PNG via ffmpeg. The input goes through a temp FILE (not a pipe): AVIF is ISOBMFF, whose demuxer needs seekable input.
apps/api/cmd/migrate-content-images/main.go:362
↓ 1 callersFunctionbuildImageServiceURL
(hash: string, variant?: string)
apps/web/app/shared/utils/resolveAvatarUrl.ts:27
↓ 1 callersFunctionbuildPlan
(files []string, direction string, step int, only, exclude, applied map[string]bool)
apps/api/cmd/migrate/main.go:166
↓ 1 callersFunctionbuildSitemapUrls
( apiBase: string )
apps/web/server/utils/kunSitemapSources.ts:85
↓ 1 callersFunctionbuildTree
(docs []model.Doc)
apps/api/internal/doc/service/service.go:173
↓ 1 callersMethodcalendarFavoriteSet
calendarFavoriteSet returns which of the given galgame ids the user has favorited — one indexed query, used to render the calendar's inline 收藏 state.
apps/api/internal/common/handler.go:949
↓ 1 callersMethodcalendarHasPatchSet
calendarHasPatchSet returns the subset of galgame ids that have a REAL downloadable patch on moyu — i.e. resource_count > 0, NOT merely a row. The det
apps/api/internal/common/handler.go:908
↓ 1 callersFunctionchunk
(ids []uint, n int)
apps/api/pkg/userclient/client.go:270
↓ 1 callersFunctioncleanup
()
apps/web/app/composables/topic/useSpoilerContent.ts:108
↓ 1 callersFunctioncloneUserMap
(in map[uint]*Brief)
apps/api/pkg/userclient/mock.go:121
↓ 1 callersFunctioncollect
(src: PagedSource)
apps/web/server/utils/kunSitemapSources.ts:122
↓ 1 callersFunctioncollectFiles
(dir, direction string)
apps/api/cmd/migrate/main.go:151
↓ 1 callersFunctioncollectGalgameIDs
─── helpers ──────────────────────────────────────
apps/api/internal/galgame/enricher/enricher.go:478
↓ 1 callersFunctioncollectReferencedHashes
collectReferencedHashes gathers the distinct, well-formed (64-hex) hashes from every moyu-owned surface that references image_service.
apps/api/internal/infrastructure/cron/reference_ping.go:79
↓ 1 callersFunctioncollectSingle
( path: string, pick: (data: unknown) => Record<string, unknown>[], loc: (row: Record<string, unkn
apps/web/server/utils/kunSitemapSources.ts:143
↓ 1 callersFunctionconfirm
()
apps/api/cmd/migrate/main.go:229
↓ 1 callersFunctionconfirm
()
apps/api/cmd/migrate-oauth-prep/main.go:182
↓ 1 callersFunctioncontentImageHashes
contentImageHashes returns the unique content-image hashes (the /image/<hash> tokens) referenced in raw markdown, used to batch-resolve their metadata
apps/api/internal/infrastructure/markdown/markdown.go:142
↓ 1 callersFunctioncreateFrostOverlay
(spoilerEl: HTMLElement)
apps/web/app/composables/topic/useSpoilerContent.ts:9
↓ 1 callersFunctioncreateLimiter
(max: number)
apps/web/server/utils/kunSitemapSources.ts:29
↓ 1 callersFunctiondecodeIfEncoded
(text: string)
apps/web/app/shared/utils/decodeIfEncoded.ts:1
↓ 1 callersMethoddeductQuotaOnce
deductQuotaOnce increments daily_upload_size once per artifact uuid (Redis SETNX, 24h TTL). If the user is over quota at this point the artifact is so
apps/api/internal/common/upload/service.go:181
↓ 1 callersFunctiondedupHashes
(in []string)
apps/api/pkg/imageclient/meta_resolver.go:99
↓ 1 callersFunctiondedupe
(in []string)
apps/api/cmd/migrate-content-images/main.go:298
↓ 1 callersFunctiondefaultLinkRender
defaultLinkRender mirrors goldmark/renderer/html.(*Renderer).renderLink so non-mention links continue to render exactly as before. Reproduced inline b
apps/api/internal/infrastructure/markdown/markdown.go:313
↓ 1 callersFunctiondiffResourceFields
diffResourceFields computes the public-safe per-field diff between the pre-edit (before) and post-edit (after) resource. Secrets (download link / s3 k
apps/api/internal/patch/service/service.go:1756
↓ 1 callersFunctiondirectoryLabel
(cat string)
apps/api/internal/doc/service/service.go:205
↓ 1 callersFunctionensureTracker
(db *sql.DB)
apps/api/cmd/migrate/main.go:122
↓ 1 callersFunctionensureTracker
(db *sql.DB)
apps/api/cmd/migrate-oauth-prep/main.go:150
↓ 1 callersFunctionextractLegacyURLs
extractLegacyURLs pulls every legacy image URL out of one content string, strips clinging prose punctuation, and de-dups (a row may repeat the same im
apps/api/cmd/migrate-content-images/main.go:280
↓ 1 callersFunctionfakeJWTWithRoles
fakeJWTWithRoles builds a header.payload.sig JWT-shaped string whose payload encodes {"roles": [...]}. Signature is dummy; middleware decodes without
apps/api/internal/testutil/testutil.go:78
↓ 1 callersFunctionfetch
(ctx context.Context, c *http.Client, url string)
apps/api/cmd/migrate-content-images/main.go:311
↓ 1 callersMethodfetchBatch
(ctx context.Context, ids []uint)
apps/api/pkg/userclient/client.go:217
↓ 1 callersMethodfetchCalendarMonth
fetchCalendarMonth fetches one ISO month, folding the content_limit fan-out ("all" → sfw + nsfw) into one merged GalgameCalendar.
apps/api/internal/common/handler.go:984
↓ 1 callersMethodfetchEcosystem
fetchEcosystem performs the server-to-server GET against the OAuth provider's public app-directory endpoint and unwraps the {code, message, data:{apps
apps/api/internal/auth/service/service.go:115
↓ 1 callersFunctionfetchPage
(src: PagedSource, page: number)
apps/web/server/utils/kunSitemapSources.ts:115
↓ 1 callersFunctionformatValidationError
(e validator.FieldError)
apps/api/pkg/utils/validate.go:41
↓ 1 callersFunctiongalgameDisplayName
galgameDisplayName picks a human-readable name from a wiki brief, preferring zh-CN, then ja-JP, en-US, zh-TW, falling back to the VNDB id.
apps/api/internal/patch/service/service.go:1650
↓ 1 callersFunctiongenerateCodeChallenge
(verifier: string)
apps/web/app/shared/utils/pkce.ts:15
↓ 1 callersFunctiongenerateCodeVerifier
()
apps/web/app/shared/utils/pkce.ts:9
↓ 1 callersFunctiongenerateSessionID
()
apps/api/internal/middleware/auth.go:434
↓ 1 callersFunctiongenerateState
()
apps/web/app/shared/utils/pkce.ts:22
↓ 1 callersFunctiongenerateStickerArray
()
apps/web/app/shared/utils/getRandomSticker.ts:1
↓ 1 callersFunctiongetRandomSticker
(seed: string)
apps/web/app/shared/utils/getRandomSticker.ts:21
← previousnext →301–400 of 1,135, ranked by callers