MCPcopy Create free account

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

Functions2,016 in github.com/KunMoe/kun-galgame-forum

↓ 610 callersMethodError
()
apps/api/internal/user/oauth/client.go:44
↓ 185 callersMethodGet
Get performs a GET request to the wiki service.
apps/api/internal/galgame/client/client.go:159
↓ 135 callersMethodScan
(src any)
apps/api/internal/topic/model/topic_draft.go:27
↓ 58 callersMethodPut
(value []byte)
apps/api/internal/infrastructure/markdown/markdown.go:383
↓ 56 callersMethodHydrate
Hydrate looks up `ids` and returns a *total* map (every id in `ids` is present, missing/unknown ids get a Placeholder). Mapper code can then do `m[r.U
apps/api/pkg/userclient/hydrate.go:38
↓ 50 callersMethodError
()
apps/api/pkg/errors/errors.go:13
↓ 37 callersMethodOffset
()
apps/api/pkg/utils/pagination.go:10
↓ 35 callersFunctionenvOrDefault
(key, fallback string)
apps/api/pkg/config/config.go:249
↓ 34 callersMethodDelete
(ctx context.Context, key string)
apps/api/internal/infrastructure/storage/s3.go:65
↓ 33 callersMethodAdjustMoemoepoint
(ctx context.Context, userID, delta int, reason, ref, idempotencyKey string)
apps/api/internal/moemoepoint/pusher.go:49
↓ 33 callersMethodDB
DB exposes the connection for service-owned transactions.
apps/api/internal/galgame/repository/rating_repo.go:20
↓ 31 callersFunctionuseMessage
( messageData: number | string, type: KunMessageType, duration = 3000, richText = false, position: K
apps/web/app/composables/useMessage.ts:10
↓ 25 callersMethodDo
(req *http.Request)
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:179
↓ 25 callersMethodUser
User is the single-id convenience. Returns (zero, false) for unknown ids.
apps/api/pkg/userclient/userclient.go:228
↓ 22 callersMethodDelete
(userID, id int)
apps/api/internal/topic/service/draft_service.go:94
↓ 22 callersMethodProxyWriteWithToken
ProxyWriteWithToken returns a Fiber handler that forwards a POST/PUT/DELETE to wiki with the session-stored OAuth access token. The token is taken fro
apps/api/internal/galgame/handler/wiki_handler.go:72
↓ 21 callersMethodDB
()
apps/api/internal/topic/repository/poll_repo.go:19
↓ 20 callersMethodCreate
(topic *model.Topic)
apps/api/internal/topic/repository/topic_repo.go:51
↓ 19 callersMethodFindByID
(id int)
apps/api/internal/topic/repository/poll_repo.go:23
↓ 18 callersFunctioncollectQuery
────────────────────────────────────────── Query helpers ────────────────────────────────────────── collectQuery converts the Fiber request query args
apps/api/internal/galgame/handler/entity_handler.go:176
↓ 17 callersFunctionuserBriefToDTO
userBriefToDTO maps a userclient.User to the dto.UserBrief projection.
apps/api/internal/galgame/service/resource_mapper.go:73
↓ 16 callersFunctionformatTimeDifference
(pastTime: number | Date | string)
apps/web/shared/utils/time.ts:11
↓ 14 callersMethodDelete
Delete removes an owner's collection. The default collection is protected. favorite_count is kept accurate for games held only in this collection; own
apps/api/internal/galgame/service/collection_service.go:133
↓ 14 callersMethodFindByID
FindByID loads a single comment.
apps/api/internal/toolset/repository/comment_repo.go:96
↓ 14 callersMethodRun
Run executes one sync cycle. Safe to call concurrently — events use SETNX guards so duplicate processing only re-writes the cursor. Designed to be che
apps/api/internal/galgame/service/wiki_message_sync.go:90
↓ 13 callersMethodFindByID
────────────────────────────────────────── Reads — single rating ────────────────────────────────────────── FindByID returns a single rating row. Retu
apps/api/internal/galgame/repository/rating_repo.go:38
↓ 13 callersFunctiongetPreferredLanguageText
( language: KunLanguage, locale?: Language )
apps/web/shared/utils/getPreferredLanguageText.ts:1
↓ 13 callersFunctiongetReleaseDateText
( releaseDate?: string | null, releaseDateTBA?: boolean )
apps/web/shared/utils/time.ts:128
↓ 12 callersMethodGetBatchPublic
GetBatchPublic is the cookie-aware batch fetch for any public list / feed enrichment path: enriches kungal-local IDs with wiki briefs while honouring
apps/api/internal/galgame/client/client.go:501
↓ 12 callersFunctionisValidName
(name: string)
apps/web/shared/utils/validate.ts:22
↓ 11 callersMethodCreateGalgameMessageWithContent
CreateGalgameMessageWithContent is the variant that records a content preview (used by resource liked/expired notifications). Dedup applies on (sender
apps/api/internal/galgame/service/interaction.go:41
↓ 11 callersMethodInit
────────────────────────────────────────── Init — POST /toolset/:id/upload/init ────────────────────────────────────────── Init validates the file, re
apps/api/internal/toolset/service/upload_service.go:92
↓ 11 callersFunctionRender
Render converts markdown to HTML with all custom transformations.
apps/api/internal/infrastructure/markdown/markdown.go:236
↓ 11 callersMethodUpdate
Update patches arbitrary columns on a rating row.
apps/api/internal/galgame/repository/rating_repo.go:155
↓ 11 callersFunctionclamp
(v: number, lo: number, hi: number)
apps/web/algorithms/GalgameRatingAlg.ts:86
↓ 11 callersFunctiondel
del runs a DELETE/UPDATE and PROPAGATES the error (unlike a fire-and-forget Exec) so any mid-transaction failure aborts and rolls back the whole purge
apps/api/internal/admin/repository/purge_repo.go:350
↓ 10 callersMethodGetWithToken
GetWithToken is like Get but attaches a Bearer token. Used by endpoints whose response shape depends on the caller's identity: - /galgame/batch with B
apps/api/internal/galgame/client/client.go:170
↓ 10 callersMethodToCards
ToCards converts wiki galgame items into enriched GalgameCard DTOs, batch- loading users (from OAuth) and local stats once.
apps/api/internal/galgame/service/galgame_enricher.go:81
↓ 10 callersFunctionisValidEmail
(email: string)
apps/web/shared/utils/validate.ts:17
↓ 10 callersFunctionoptionalUID
optionalUID returns the logged-in user's ID from OptionalAuth middleware, or 0 if not authenticated.
apps/api/internal/galgame/handler/resource_handler.go:101
↓ 10 callersFunctionsecsAgo
(n: number)
apps/web/shared/utils/time.spec.ts:24
↓ 10 callersFunctiontoYMD
(raw?: string | null)
apps/web/shared/utils/time.ts:95
↓ 9 callersMethodCreate
────────────────────────────────────────── Create — POST /galgame ────────────────────────────────────────── Create forwards the payload to wiki, then
apps/api/internal/galgame/service/galgame_service.go:82
↓ 9 callersMethodDelete
Delete — DELETE /doc/tag
apps/api/internal/doc/service/tag_service.go:44
↓ 9 callersFunctionformatFileSize
(size: number)
apps/web/shared/utils/format.ts:1
↓ 9 callersFunctionformatNumber
(num: number)
apps/web/shared/utils/format.ts:16
↓ 9 callersFunctionrewriteBanners
rewriteBanners walks the wiki response JSON and, for every object carrying U2 hash fields (`effective_banner_hash` / per-row `image_hash` + `sort_orde
apps/api/internal/galgame/client/banner.go:48
↓ 9 callersFunctiontruncate
truncate trims `s` to `maxLen` runes (rune-aware, avoids splitting multibyte chars).
apps/api/internal/topic/service/interaction_helpers.go:145
↓ 9 callersFunctionwithSFWFilter
withSFWFilter clones q and pins `content_limit` per the wiki NSFW protocol (see docs/galgame_wiki/00-handbook-for-downstream.md §16). Both modes are
apps/api/internal/galgame/service/official_service.go:212
↓ 8 callersMethodAward
Award adjusts the user's unified balance on OAuth and syncs the local cache. Fire-and-forget: it returns immediately and does the OAuth call + cache m
apps/api/internal/moemoepoint/pusher.go:71
↓ 8 callersMethodDelete
Delete removes a comment by reference.
apps/api/internal/toolset/repository/comment_repo.go:122
↓ 8 callersFunctionNew
(code int, message string, statusCode int)
apps/api/pkg/errors/errors.go:17
↓ 8 callersFunctionSessionKey
SessionKey returns the Redis key for a session token.
apps/api/internal/middleware/auth.go:67
↓ 8 callersMethodUpdate
Update edits an existing topic. PUT /api/topic/:tid
apps/api/internal/topic/handler/topic_handler.go:167
↓ 8 callersMethodapplyEditors
(ctx context.Context, req *http.Request, additionalEditors []RequestEditorFn)
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:619
↓ 8 callersFunctiongalgameNameFromWire
( g: WireGalgameName, fallback = '' )
apps/web/shared/utils/galgameStatus.ts:62
↓ 8 callersFunctiongalgameStatusBadge
( status: number | undefined )
apps/web/shared/utils/galgameStatus.ts:32
↓ 8 callersFunctionkunFetch
( url: string, options?: Record<string, unknown> )
apps/web/app/utils/kunFetch.ts:246
↓ 8 callersFunctionnum
(row: Record<string, unknown>, key: string)
apps/web/server/utils/kunSitemapSources.ts:164
↓ 8 callersFunctiontruncate
────────────────────────────────────────── Helpers ──────────────────────────────────────────
apps/api/internal/galgame/service/comment_service.go:537
↓ 8 callersFunctionuserBriefFromClient
userBriefFromClient maps a userclient.User to the UserBrief shape used across toolset DTOs. Centralized so every call site is consistent.
apps/api/internal/toolset/service/toolset_service.go:61
↓ 7 callersMethodCreate
Create — POST /doc/tag
apps/api/internal/doc/service/tag_service.go:31
↓ 7 callersFunctionSetContentImageCDNBase
SetContentImageCDNBase configures the CDN base for resolving /image/<hash> content refs. Call once at startup with cfg.GalgameWiki.ImageCDNBase.
apps/api/internal/infrastructure/markdown/markdown.go:97
↓ 7 callersMethodUpdate
Update — PUT /doc/tag (moderator+ enforced at the route level).
apps/api/internal/doc/service/tag_service.go:52
↓ 7 callersMethodUpdate
────────────────────────────────────────── Update — PUT /website-tag ──────────────────────────────────────────
apps/api/internal/website/service/tag_service.go:94
↓ 7 callersFunctionarrayDiffByKey
( oldArr: readonly T[] | undefined | null, newArr: readonly T[] | undefined | null, keyFn: (item: T) =>
apps/web/shared/utils/arrayDiffByKey.ts:30
↓ 7 callersFunctiongetEffectiveBanner
( g?: BannerSource | null, opts?: { variant?: Extract<ImageVariant, 'mini'> } )
apps/web/shared/utils/getEffectiveBanner.ts:77
↓ 7 callersMethodhideTarget
hideTarget reports whether the profile owner (userID) is banned. When true, every content tab must render nothing: the profile page itself already deg
apps/api/internal/user/service/user_content_service.go:40
↓ 7 callersFunctionisValidURL
(url: string)
apps/web/shared/utils/validate.ts:7
↓ 6 callersMethodCreate
Create inserts a new galgame_rating row.
apps/api/internal/galgame/repository/rating_repo.go:150
↓ 6 callersMethodDB
()
apps/api/internal/toolset/repository/comment_repo.go:19
↓ 6 callersMethodDB
()
apps/api/internal/doc/repository/tag_repo.go:17
↓ 6 callersMethodDelete
Delete removes a comment by reference.
apps/api/internal/website/repository/comment_repo.go:116
↓ 6 callersFunctionHas
Has reports whether the claim set contains an exact role name.
apps/api/pkg/role/role.go:32
↓ 6 callersMethodPostWithToken
PostWithToken performs a POST with Bearer token. contentType controls how body is forwarded: - "" (empty) → defaults to "application/json"; st
apps/api/internal/galgame/client/client.go:218
↓ 6 callersFunctionRenderInline
RenderInline renders message markdown to sanitized HTML — inline formatting plus images only. Output is safe to render with v-html.
apps/api/internal/infrastructure/markdown/inline.go:125
↓ 6 callersFunctioncreateUserPageNavItems
( userId: number, basePath: string, typesArray: readonly T[], config: Record<T, _NavItemData> )
apps/web/app/constants/user.ts:64
↓ 6 callersFunctiondaysAgo
(n: number)
apps/web/shared/utils/time.spec.ts:26
↓ 6 callersFunctionemptyStrSliceIfNil
(s []string)
apps/api/internal/galgame/service/engine_service.go:102
↓ 6 callersFunctionpinCoverAtomic
( covers: readonly T[], targetHash: string )
apps/web/shared/utils/pinCoverAtomic.ts:27
↓ 5 callersMethodConfigured
Configured reports whether the client can talk to the artifact service.
apps/api/pkg/artifactclient/client.go:139
↓ 5 callersMethodCreateTopicMessageWithContent
CreateTopicMessageWithContent is like CreateTopicMessage but stores a content preview. replyFloor/commentID deep-link the notification to a specific p
apps/api/internal/topic/service/interaction_helpers.go:50
↓ 5 callersMethodDelete
────────────────────────────────────────── Delete — DELETE /toolset/:id ──────────────────────────────────────────
apps/api/internal/toolset/service/toolset_service.go:304
↓ 5 callersMethodFindByID
FindByID returns the state row or sql.ErrNoRows if missing.
apps/api/internal/user/repository/state_repo.go:38
↓ 5 callersMethodFindLikedSet
FindLikedSet returns the subset of commentIDs the user has liked. Anonymous (userID=0) or empty input → empty set without hitting DB. Used by GetComme
apps/api/internal/galgame/repository/comment_repo.go:25
↓ 5 callersMethodUpdate
Update mutates an owner's collection (partial). The default collection can be renamed / re-described / re-privacied, but not deleted (see Delete).
apps/api/internal/galgame/service/collection_service.go:88
↓ 5 callersMethodUpdate
────────────────────────────────────────── Update — PUT /toolset/:id ──────────────────────────────────────────
apps/api/internal/toolset/service/toolset_service.go:265
↓ 5 callersFunctionappendUniqueStr
(slice []string, val string)
apps/api/internal/galgame/service/resource_mapper.go:55
↓ 5 callersFunctioncamelToSnakeCase
(str: string)
apps/web/shared/utils/format.ts:36
↓ 5 callersFunctionenvOrDefaultInt
(key string, fallback int)
apps/api/pkg/config/config.go:256
↓ 5 callersMethodfetchOwnerAndName
fetchOwnerAndName reads the galgame's owner user_id AND a display name from wiki in ONE request (0 / "" on any failure). The name becomes the notifica
apps/api/internal/galgame/service/galgame_service.go:345
↓ 5 callersFunctionformatDate
( time: Date | string | number, config?: { isShowYear?: boolean; isPrecise?: boolean } )
apps/web/shared/utils/time.ts:54
↓ 5 callersFunctionformatNumberWithCommas
(number: number)
apps/web/shared/utils/format.ts:28
↓ 5 callersFunctiongetAssetsFile
(name: number)
apps/web/app/components/kun/setting-panel/components/getLoli.ts:4
↓ 5 callersFunctionisValidTimestamp
(timestamp: number)
apps/web/shared/utils/validate.ts:1
↓ 5 callersFunctionmapErr
mapErr turns a non-success artifact response into a sentinel (where callers branch) or a descriptive error.
apps/api/pkg/artifactclient/client.go:249
↓ 5 callersFunctionoptionalString
(max: number, defaultValue = '')
apps/web/app/validations/doc.ts:23
↓ 5 callersFunctionrequireEnv
(key string)
apps/api/pkg/config/config.go:241
↓ 5 callersFunctiontoIso
(d: unknown)
apps/web/server/utils/kunSitemapSources.ts:59
↓ 5 callersFunctiontokenize
tokenize splits a keyword string into trimmed non-empty tokens. Returns an error if the result is empty.
apps/api/internal/search/service/search_service.go:38
next →1–100 of 2,016, ranked by callers