Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/KunMoe/kun-galgame-patch
/ functions
Functions
1,135 in github.com/KunMoe/kun-galgame-patch
⨍
Functions
1,135
◇
Types & classes
365
↓ 1 callers
Function
handleCopyClick
(copyButton: HTMLElement)
apps/web/app/composables/topic/useSpoilerContent.ts:62
↓ 1 callers
Function
handleSpoilerClick
(spoilerElement: HTMLElement)
apps/web/app/composables/topic/useSpoilerContent.ts:56
↓ 1 callers
Function
hashString
(input: string)
apps/web/app/shared/utils/getRandomSticker.ts:13
↓ 1 callers
Method
hikariAvatarURL
hikariAvatarURL resolves a brief's avatar to an ABSOLUTE URL for third-party (Hikari) consumers, mirroring the frontend resolveAvatarUrl: prefer the i
apps/api/internal/common/handler.go:632
↓ 1 callers
Function
imageAspectRatio
( width?: number | null, height?: number | null, fallback = '16 / 9' )
apps/web/app/shared/utils/resolveBannerUrl.ts:91
↓ 1 callers
Function
installedCollections
()
apps/web/scripts/generate-icon-list.mjs:76
↓ 1 callers
Function
isAVIF
isAVIF detects the ISOBMFF `ftyp` box with an `avif`/`avis` brand (major or compatible). moyu's legacy content images are 100% AVIF.
apps/api/cmd/migrate-content-images/main.go:344
↓ 1 callers
Function
isHex
(s string)
apps/api/pkg/imageclient/client.go:388
↓ 1 callers
Function
isHexHash
(s: string)
apps/web/app/shared/utils/resolveBannerUrl.ts:39
↓ 1 callers
Function
isHexHash
(s: string)
apps/web/app/shared/utils/resolveAvatarUrl.ts:25
↓ 1 callers
Function
linkText
linkText extracts the rendered text of a link's children, just enough to answer "does this link's label start with @?". We only look at *ast.Text node
apps/api/internal/infrastructure/markdown/markdown.go:274
↓ 1 callers
Function
loadApplied
(db *sql.DB)
apps/api/cmd/migrate/main.go:133
↓ 1 callers
Function
loadCollection
(collection)
apps/web/scripts/generate-icon-list.mjs:97
↓ 1 callers
Function
main
()
apps/web/scripts/generate-icon-list.mjs:131
↓ 1 callers
Method
markCompleteOnce
markCompleteOnce returns true if THIS call is the first complete for the given artifact uuid, false if a prior call already deducted quota. Nil rdb (t
apps/api/internal/common/upload/service.go:58
↓ 1 callers
Method
markResourceFavorited
markResourceFavorited stamps is_favorite (收藏资源 subscription) on each resource for the given currentUID. Anonymous (0) leaves it false. Mirrors markRes
apps/api/internal/patch/service/service.go:847
↓ 1 callers
Method
markResourceLiked
markResourceLiked stamps is_liked on each resource for the given currentUID. Anonymous (currentUID == 0) leaves is_liked false everywhere.
apps/api/internal/patch/service/service.go:823
↓ 1 callers
Function
maxMonthStr
(a, b string)
apps/api/internal/common/handler.go:1063
↓ 1 callers
Function
minMonthStr
minMonthStr / maxMonthStr compare zero-padded "YYYY-MM" lexicographically (== chronologically), treating "" as absent. Used to union the data bounds w
apps/api/internal/common/handler.go:1050
↓ 1 callers
Function
mustGetEnv
(key string)
apps/api/pkg/config/config.go:179
↓ 1 callers
Function
newCJKIDs
()
apps/api/internal/infrastructure/markdown/markdown.go:47
↓ 1 callers
Function
newMentionLinkRenderer
()
apps/api/internal/infrastructure/markdown/markdown.go:262
↓ 1 callers
Function
newSanitizePolicy
newSanitizePolicy builds moyu's allow-list on top of bluemonday's UGCPolicy, extended with exactly what this package's renderers emit. Mirrors forum's
apps/api/internal/infrastructure/markdown/sanitize.go:25
↓ 1 callers
Method
notifyFavoritedUsers
===== Notifications (simplified) =====
apps/api/internal/patch/service/service.go:1496
↓ 1 callers
Method
notifyResourceFavoritedUsers
notifyResourceFavoritedUsers notifies every user subscribed to a SINGLE resource that its file/link changed. Called from UpdateResource ONLY on a file
apps/api/internal/patch/service/service.go:1515
↓ 1 callers
Function
open
()
apps/web/app/composables/useAuthModal.ts:15
↓ 1 callers
Function
parseCSVInts
parseCSVInts parses "1,2,3" → [1,2,3], skipping blanks/non-numeric, capped at 200 to bound the query.
apps/api/internal/chat/handler/handler.go:381
↓ 1 callers
Function
parseEndpoint
parseEndpoint splits a full URL ("https://s3.xxx.com") into host and TLS flag; minio-go requires the host part to have no scheme.
apps/api/internal/infrastructure/storage/s3.go:75
↓ 1 callers
Function
parsePrivateLink
parsePrivateLink splits a "{a}-{b}" private-room link into the two uids.
apps/api/internal/chat/handler/handler.go:246
↓ 1 callers
Function
partsConcurrency
(fileSize: number)
apps/web/app/composables/useResourceUpload.ts:39
↓ 1 callers
Function
persist
()
apps/web/app/composables/useKnownAccounts.ts:67
↓ 1 callers
Function
previewMessage
previewMessage returns a one-line preview of a message for the room list.
apps/api/internal/chat/handler/handler.go:260
↓ 1 callers
Function
printPlan
(plan []migration, direction, dbURL string)
apps/api/cmd/migrate/main.go:217
↓ 1 callers
Function
printPlan
(cfg *config.Config)
apps/api/cmd/migrate-oauth-prep/main.go:167
↓ 1 callers
Function
range
(from: number, to: number)
apps/web/server/utils/kunSitemapSources.ts:47
↓ 1 callers
Function
read
()
apps/web/app/composables/useKnownAccounts.ts:35
↓ 1 callers
Function
readImageFormFile
Read the bytes of a single image file from a form, with a 10 MB size cap.
apps/api/internal/user/handler/handler.go:22
↓ 1 callers
Function
readTitleLanguagePreference
()
apps/web/app/shared/utils/getPreferredLanguageText.ts:6
↓ 1 callers
Function
redactURL
redactURL replaces the password in postgres://user:pass@host/db with ***
apps/api/cmd/migrate/main.go:240
↓ 1 callers
Function
redactURL
redactURL replaces the password in postgres://user:pass@host/db with ***.
apps/api/cmd/migrate-oauth-prep/main.go:193
↓ 1 callers
Function
release
()
apps/web/server/utils/kunSitemapSources.ts:32
↓ 1 callers
Function
rememberUser
( user: Pick< UserState, 'sub' | 'id' | 'name' | 'avatar' | 'avatar_image_hash' | 'roles'
apps/web/app/composables/useKnownAccounts.ts:106
↓ 1 callers
Function
render
(entries)
apps/web/scripts/generate-icon-list.mjs:226
↓ 1 callers
Function
renderNote
renderNote is the single point where a resource's markdown note becomes HTML. Pulled out so RenderResourceNotes (and its single-element callers) share
apps/api/internal/patch/model/model.go:35
↓ 1 callers
Function
reset
()
apps/web/app/composables/useResourceUpload.ts:136
↓ 1 callers
Method
resolveGalgameName
resolveGalgameName fetches a patch's galgame display name. patch.id IS the wiki galgame id (D13: patch.id == galgame_id), so a single batch lookup suf
apps/api/internal/patch/service/service.go:1662
↓ 1 callers
Function
resolveMappings
resolveMappings hits Wiki concurrently and returns the partition.
apps/api/cmd/remap-patch-ids/main.go:261
↓ 1 callers
Function
resolveOrphanPublisherNames
resolveOrphanPublisherNames batch-fetches user names from OAuth /users/batch for every distinct publisher across the skipped rows. On error it returns
apps/api/cmd/remap-patch-ids/main.go:537
↓ 1 callers
Function
rewriteHost
rewriteHost swaps the legacy host for -base so originals can be fetched from an internal mirror when image.moyu.moe isn't reachable from the job.
apps/api/cmd/migrate-content-images/main.go:291
↓ 1 callers
Function
runOne
(db *sql.DB, m migration, direction string)
apps/api/cmd/migrate/main.go:198
↓ 1 callers
Function
runRemap
runRemap performs the actual two-pass remap + schema fixups in one tx.
apps/api/cmd/remap-patch-ids/main.go:336
↓ 1 callers
Function
schemaState
schemaState inspects every child table and returns the aggregate phase.
apps/api/cmd/remap-patch-ids/main.go:448
↓ 1 callers
Function
singleflightKey
(ids []uint)
apps/api/pkg/userclient/client.go:282
↓ 1 callers
Function
splitOrigins
splitOrigins turns the comma-separated CORS_ALLOW_ORIGINS env value into the []string that Fiber v3's cors.Config expects, trimming incidental whitesp
apps/api/internal/middleware/cors.go:33
↓ 1 callers
Function
str
(row: Record<string, unknown>, key: string)
apps/web/server/utils/kunSitemapSources.ts:64
↓ 1 callers
Method
submitGalgameJSON
(c fiber.Ctx, accessToken string)
apps/api/internal/patch/handler/handler.go:959
↓ 1 callers
Method
submitGalgameMultipart
(c fiber.Ctx, accessToken string)
apps/api/internal/patch/handler/handler.go:968
↓ 1 callers
Function
toLegacyVariant
(url: string, variant?: 'mini')
apps/web/app/shared/utils/resolveBannerUrl.ts:58
↓ 1 callers
Function
toLegacyVariant
(url: string, variant?: string)
apps/web/app/shared/utils/resolveAvatarUrl.ts:41
↓ 1 callers
Function
toUploadable
toUploadable returns bytes image_service can ingest. image_service has no AVIF decoder and the topic preset accepts only jpeg/png/webp/gif, so AVIF or
apps/api/cmd/migrate-content-images/main.go:331
↓ 1 callers
Function
trigger
()
apps/web/app/plugins/revalidate-me.client.ts:21
↓ 1 callers
Method
unmarkComplete
unmarkComplete releases the idempotency marker when a complete attempt set it but failed before the quota deduction committed (so a retry can re-run i
apps/api/internal/common/upload/service.go:75
↓ 1 callers
Method
updateGalgameJSON
updateGalgameJSON is the plain JSON path. Decoding into the client's pointer-fielded shape filters out unsupported keys (e.g. vndb_id, which Wiki reje
apps/api/internal/patch/handler/handler.go:847
↓ 1 callers
Method
updateGalgameMultipart
updateGalgameMultipart reads `data` + optional `file` from the incoming multipart body and forwards them through the wiki client. Size cap is 10 MB (c
apps/api/internal/patch/handler/handler.go:863
↓ 1 callers
Function
upload
( file: File, galgameId: number )
apps/web/app/composables/useResourceUpload.ts:258
↓ 1 callers
Function
uploadEditorImage
(apiBase: string, file: File)
apps/web/app/composables/useKunEditorAdapters.ts:28
↓ 1 callers
Function
upsert
(account: KnownAccount)
apps/web/app/composables/useKnownAccounts.ts:77
↓ 1 callers
Function
useKnownAccounts
()
apps/web/app/composables/useKnownAccounts.ts:60
↓ 1 callers
Function
useRefreshMe
()
apps/web/app/composables/useRefreshMe.ts:33
↓ 1 callers
Method
validatePreUpload
validatePreUpload pre-checks at init time: extension, per-role single-file cap, and (unless the tier is unlimited) the per-user daily quota based on t
apps/api/internal/common/upload/service.go:89
↓ 1 callers
Function
walk
(dir)
apps/web/scripts/generate-icon-list.mjs:110
↓ 1 callers
Function
writeBackup
writeBackup appends one original row as a JSONL record before it is rewritten.
apps/api/cmd/migrate-content-images/main.go:393
↓ 1 callers
Function
writeOrphansFile
writeOrphansFile dumps every skipped patch to a TSV file. Game names live on Wiki and these rows by definition have no Wiki match, so the most useful
apps/api/cmd/remap-patch-ids/main.go:493
Method
Abort
Abort POST /api/upload/abort — voluntarily cancel an in-progress upload.
apps/api/internal/common/upload/handler.go:204
Method
Abort
Abort soft-deletes an in-progress upload on client request (the artifact GC also reclaims orphaned status=uploading rows after its TTL).
apps/api/internal/common/upload/service.go:261
Method
AdminGetPost
AdminGetPost GET /admin/doc/:id — raw doc for the editor.
apps/api/internal/doc/handler/handler.go:93
Method
AdminListPosts
===== Admin (moderator+) ===== AdminListPosts GET /admin/doc — all docs incl. drafts.
apps/api/internal/doc/handler/handler.go:84
Method
ApproveComment
ApproveComment flips a pending comment to approved and applies the deferred visible-comment side effects. Idempotent: approving an already-approved co
apps/api/internal/patch/service/service.go:673
Method
ApproveComment
ApproveComment PUT /api/admin/comment/:id/approve Flips a pending comment (comment-verify) to approved, applying the deferred visible-comment side ef
apps/api/internal/patch/handler/handler.go:353
Function
Auth
(rdb *redis.Client, oauthCfg config.OAuthConfig)
apps/api/internal/middleware/auth.go:129
Method
Balance
Balance reads the user's current authoritative balance from OAuth (C3 single source — NOT the local user.moemoepoint cache). Read-only passthrough; a
apps/api/pkg/moemoepoint/awarder.go:71
Function
BriefMapByInt
BriefMapByInt is a thin convenience over Users that takes []int (the concrete type used in our domain models, where user_id is `int`), dedupes, drops
apps/api/pkg/userclient/helpers.go:16
Function
BuildPatchSummaryMap
BuildPatchSummaryMap fetches Wiki briefs for the given patch IDs and returns a map keyed by patch_id (the local row id) of compact summaries. Patches
apps/api/internal/galgame/enricher/enricher.go:221
Function
CORS
(cfg config.CORSConfig)
apps/api/internal/middleware/cors.go:13
Method
CheckDuplicate
(vndbID string)
apps/api/internal/patch/service/service.go:495
Method
CheckDuplicate
CheckDuplicate GET /api/patch/duplicate
apps/api/internal/patch/handler/handler.go:260
Method
CheckIn
CheckIn performs daily check-in.
apps/api/internal/user/service/service.go:254
Method
CheckIn
===== Daily ===== CheckIn marks the user as checked-in for today. The moemoepoint reward is no longer applied here — it goes through OAuth (the unifie
apps/api/internal/user/repository/repository.go:247
Method
CheckIn
CheckIn POST /api/user/check-in
apps/api/internal/user/handler/handler.go:314
Method
ClaimGalgame
ClaimGalgame proxies POST /galgame/:gid/claim — claim a VNDB draft (status=2) and immediately publish it (status=0). Returns the published galgame.
apps/api/internal/galgame/client/submission.go:156
Method
ClaimGalgame
ClaimGalgame POST /api/v1/galgame/:gid/claim Flip a VNDB draft (status=2) to published (status=0) on Wiki, then register the local patch row + award
apps/api/internal/patch/handler/handler.go:991
Method
Complete
Complete POST /api/upload/complete — finalize (size verified by artifact) and deduct the per-user daily quota.
apps/api/internal/common/upload/handler.go:68
Method
Complete
Complete finalizes the upload via artifact (which HeadObject-verifies the size server-side), then deducts the per-user daily quota once (idempotent).
apps/api/internal/common/upload/service.go:154
Method
CompleteUpload
CompleteUpload finalizes an upload (HeadObject size verify + optional manifest) and returns the ready artifact's metadata.
apps/api/pkg/artifactclient/client.go:177
Method
CompleteUpload
(ctx context.Context, uuid string, body CompleteUploadJSONRequestBody, reqEditors ...RequestEditorFn)
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:340
Method
CompleteUploadWithBody
(ctx context.Context, uuid string, contentType string, body io.Reader, reqEditors ...RequestEditorFn)
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:328
Method
CompleteUploadWithBodyWithResponse
CompleteUploadWithBodyWithResponse request with any body
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:677
Method
CompleteUploadWithBodyWithResponse
CompleteUploadWithBodyWithResponse request with arbitrary body returning *CompleteUploadResp
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:916
Method
CompleteUploadWithResponse
(ctx context.Context, uuid string, body CompleteUploadJSONRequestBody, reqEditors ...RequestEditorFn)
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:924
Function
ContentLimitForListBrowse
ContentLimitForListBrowse resolves the content_limit for browse-style list endpoints (home / list / ranking / user patches / etc.). The query value wi
apps/api/pkg/utils/contentlimit.go:43
← previous
next →
401–500 of 1,135, ranked by callers