MCPcopy Create free account

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

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

↓ 4 callersMethodDB
()
apps/api/internal/website/repository/tag_repo.go:18
↓ 4 callersMethodFilterSFW
FilterSFW removes NSFW items when the caller requests SFW-only content.
apps/api/internal/galgame/service/galgame_enricher.go:32
↓ 4 callersMethodFindByIDTx
────────────────────────────────────────── Reply interaction helpers (for tx participation) ────────────────────────────────────────── FindByIDTx load
apps/api/internal/topic/repository/reply_repo.go:196
↓ 4 callersMethodFindLinks
FindLinks returns all download URLs for a resource.
apps/api/internal/galgame/repository/resource_repo.go:115
↓ 4 callersMethodGetDetail
────────────────────────────────────────── GetDetail / GetList ────────────────────────────────────────── GetDetail — GET /api/galgame/:gid Bearer-aw
apps/api/internal/galgame/handler/galgame_handler.go:139
↓ 4 callersMethodGetList
GetList — GET /api/galgame SFW-default. Crawlers and cookie-less visitors get content_limit=sfw only; logged-in users with the NSFW switch on see eve
apps/api/internal/galgame/handler/galgame_handler.go:160
↓ 4 callersMethodGetList
GetList — GET /doc/tag
apps/api/internal/doc/service/tag_service.go:25
↓ 4 callersFunctionGetUser
GetUser extracts UserInfo from the Fiber context. Returns nil if not authenticated.
apps/api/internal/middleware/auth.go:232
↓ 4 callersMethodLockForUpdate
moemoepoint mutations no longer live here: OAuth is the single source of truth and changes flow through internal/moemoepoint.Awarder (which mirrors th
apps/api/internal/user/repository/state_repo.go:53
↓ 4 callersMethodNotifyMentions
NotifyMentions emits a deduped "mentioned" notification to every user @mentioned in `content` (a topic or reply body). replyFloor deep-links the notif
apps/api/internal/topic/service/interaction_helpers.go:94
↓ 4 callersMethodProxyWrite
ProxyWrite forwards a write request (POST/PUT/DELETE) with OAuth token. contentType is the original Content-Type from the gateway request — kept verb
apps/api/internal/galgame/service/wiki_service.go:163
↓ 4 callersFunctionResolveMentionNames
ResolveMentionNames rewrites the display text of rendered @mention links to the CURRENT display name from `names` (user id → name), so a renamed user
apps/api/internal/infrastructure/markdown/mention.go:71
↓ 4 callersMethodStatusCode
StatusCode returns HTTPResponse.StatusCode
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:732
↓ 4 callersFunction_fetchReplies
( fetchPage: number, fetchSortOrder: 'asc' | 'desc' )
apps/web/app/composables/topic/useTopicReplies.ts:34
↓ 4 callersFunctionadjustMoemoepoint
────────────────────────────────────────── Shared helpers ────────────────────────────────────────── adjustMoemoepoint applies a moemoepoint change vi
apps/api/internal/toolset/service/resource_service.go:237
↓ 4 callersFunctionaliasesToNames
aliasesToNames extracts the name field from a slice of WikiAlias.
apps/api/internal/galgame/service/official_service.go:192
↓ 4 callersFunctionarrayDiffScalar
( oldArr: readonly T[] | undefined | null, newArr: readonly T[] | undefined | null )
apps/web/shared/utils/arrayDiffByKey.ts:85
↓ 4 callersFunctionbannerURLFromHash
Banner / image resolution — server-side hash → CDN URL. Background: the Galgame Wiki is the SoT for galgame metadata. After wiki PR5 (K-PR6) the cano
apps/api/internal/galgame/client/banner.go:29
↓ 4 callersMethodbuildReplyResponses
────────────────────────────────────────── Reply mappers ────────────────────────────────────────── buildReplyResponses turns a batch of ReplyRow into
apps/api/internal/topic/service/mapper.go:133
↓ 4 callersMethodcachedKeyset
cachedKeyset wraps serveKeyset with the activityCacheTTL cache-aside. Keyed by cursor (the page), isSFW (which galgame names the wiki returns) and sho
apps/api/internal/activity/service/activity_service.go:251
↓ 4 callersFunctionclearHideTimer
()
apps/web/app/composables/topic/useQuoteContent.ts:42
↓ 4 callersFunctioncollectReplyMentionIDs
(content string)
apps/api/internal/activity/service/activity_service.go:689
↓ 4 callersFunctioncollectUniqueIDs
collectUniqueIDs extracts unique int IDs from a slice via a projection.
apps/api/internal/user/service/user_mapper.go:57
↓ 4 callersFunctioncreateDedupMessage
createDedupMessage creates a Message only if no row already exists with the same (sender, receiver, type, link) triple. Same-user actions are a no-op.
apps/api/internal/topic/service/interaction_helpers.go:106
↓ 4 callersFunctiondecodeEnvelope
decodeEnvelope reads resp.Body, parses the standard envelope, and returns either the data payload (success) or a structured *Error (failure). "Succes
apps/api/internal/user/oauth/client.go:119
↓ 4 callersMethoddo
do is a bodiless GET/DELETE authenticated with the client-credentials Basic header. v should be a pointer.
apps/api/pkg/userclient/userclient.go:346
↓ 4 callersMethoddoRequest
(req *http.Request)
apps/api/internal/galgame/client/client.go:727
↓ 4 callersFunctionextractContentImageHashes
extractContentImageHashes pulls every distinct /image/<hash> token hash out of a set of content strings. A row may carry several images (and the same
apps/api/internal/infrastructure/cron/reference_ping.go:133
↓ 4 callersFunctionfetch
(ctx context.Context, c *http.Client, url string)
apps/api/cmd/backfill-cover-hashes/main.go:206
↓ 4 callersFunctionhandleApiError
(code: number, message: string)
apps/web/app/utils/kunFetch.ts:88
↓ 4 callersFunctionhourDiff
(upvoteTime: number | Date | string, hours: number)
apps/web/shared/utils/time.ts:43
↓ 4 callersFunctionhoursAgo
(n: number)
apps/web/shared/utils/time.spec.ts:25
↓ 4 callersFunctionimageHashUrl
( base: string, hash: string, variant?: string )
apps/web/app/utils/imageSrc.ts:13
↓ 4 callersFunctionisValidPassword
(pwd: string)
apps/web/shared/utils/validate.ts:88
↓ 4 callersFunctionmakeMultipart
makeMultipart builds a multipart form body with the given fields.
apps/api/internal/image/handler/galgame_upload_test.go:56
↓ 4 callersMethodmutateWithToken
(ctx context.Context, method, path, token string, body any, contentType string)
apps/api/internal/galgame/client/client.go:241
↓ 4 callersFunctionnewTestApp
newTestApp wires a Fiber app with the upload handler + a session stub so MustGetUser succeeds for UID=1. ImageService is constructed without a wiki cl
apps/api/internal/image/handler/galgame_upload_test.go:35
↓ 4 callersFunctionratingReward
ratingReward applies the documented thresholds (architecture-patterns spec): summary < 233 → +3, < 666 → +5, ≥ 666 → +10.
apps/api/internal/galgame/service/rating_service.go:44
↓ 4 callersFunctionrawJSON
rawJSON wraps a DB-stored JSON string into a json.RawMessage. Falls back to an empty array (`[]`) rather than `null` because the only call site is `G
apps/api/internal/galgame/service/rating_mapper.go:18
↓ 4 callersFunctionread
()
apps/web/app/composables/useToolsetResumeUploads.ts:12
↓ 4 callersFunctionrecomputeTopicCounts
recomputeTopicCounts refreshes the denormalized topic.reply_count and topic.comment_count from the actual rows. The new BE does not otherwise maintain
apps/api/internal/topic/service/interaction_helpers.go:136
↓ 4 callersFunctionrenderReplyTokens
renderReplyTokens rewrites @/# tokens to readable text: mentions → "@<name>" (from the resolved names map; unknown → "@用户"), quotes → their "#<floor>"
apps/api/internal/activity/service/activity_service.go:712
↓ 4 callersFunctionunwrap
(json: unknown)
apps/web/server/utils/kunSitemapSources.ts:56
↓ 4 callersFunctionuploadGalgameImage
( file: Blob, preset: GalgameImageUploadPreset, filename = 'image' )
apps/web/app/utils/uploadGalgameImage.ts:38
↓ 4 callersFunctionuseAuthModal
()
apps/web/app/composables/useAuthModal.ts:7
↓ 3 callersMethodAddReaction
(tx *gorm.DB, topicID, userID int, reaction string)
apps/api/internal/topic/repository/reaction_repo.go:28
↓ 3 callersMethodAddReplyReaction
(tx *gorm.DB, replyID, userID int, reaction string)
apps/api/internal/topic/repository/reaction_repo.go:50
↓ 3 callersMethodAdjustDislikeCount
AdjustDislikeCount adjusts topic.dislike_count by delta.
apps/api/internal/topic/repository/topic_repo.go:289
↓ 3 callersMethodAdjustLikeCount
AdjustLikeCount adjusts topic.like_count by delta.
apps/api/internal/topic/repository/topic_repo.go:283
↓ 3 callersMethodAdjustReplyDislikeCount
AdjustReplyDislikeCount adjusts the topic_reply.dislike_count by `delta`.
apps/api/internal/topic/repository/reply_repo.go:243
↓ 3 callersMethodAdjustReplyLikeCount
AdjustReplyLikeCount adjusts the topic_reply.like_count by `delta`.
apps/api/internal/topic/repository/reply_repo.go:237
↓ 3 callersMethodConfigured
Configured reports whether the client has a base URL and credentials — i.e. it can actually reach image_service. Lets callers (e.g. the content-image
apps/api/pkg/imageclient/client.go:224
↓ 3 callersMethodCreate
── Collection CRUD ──
apps/api/internal/galgame/repository/collection_repo.go:26
↓ 3 callersMethodCreate
────────────────────────────────────────── Create — POST /toolset ──────────────────────────────────────────
apps/api/internal/toolset/service/toolset_service.go:117
↓ 3 callersMethodCreate
────────────────────────────────────────── Create — all checks inside transaction ──────────────────────────────────────────
apps/api/internal/topic/service/topic_write_service.go:107
↓ 3 callersMethodCreate
────────────────────────────────────────── Create — POST /website-tag ──────────────────────────────────────────
apps/api/internal/website/service/tag_service.go:77
↓ 3 callersMethodDB
()
apps/api/internal/message/repository/chat_repo.go:18
↓ 3 callersMethodDelete
────────────────────────────────────────── Delete — DELETE /website-tag ──────────────────────────────────────────
apps/api/internal/website/service/tag_service.go:108
↓ 3 callersMethodDeleteByID
DeleteByID deletes a tag and any related article-tag rows.
apps/api/internal/doc/repository/tag_repo.go:46
↓ 3 callersMethodDeleteLocalStub
DeleteLocalStub removes the local row for a galgame and lets CASCADE clean up the local interaction children (galgame_like, galgame_favorite, galgame_
apps/api/internal/galgame/repository/galgame_repo.go:121
↓ 3 callersMethodFindByID
FindByID loads a single comment.
apps/api/internal/website/repository/comment_repo.go:75
↓ 3 callersMethodFindCommentByID
────────────────────────────────────────── Comment CRUD ──────────────────────────────────────────
apps/api/internal/topic/repository/comment_repo.go:82
↓ 3 callersMethodFindPaginated
FindPaginated returns tags matching an optional keyword plus total.
apps/api/internal/doc/repository/tag_repo.go:20
↓ 3 callersMethodFindRatingForWrite
FindRatingForWrite returns the writable rating model — used for permission and length checks before update/delete.
apps/api/internal/galgame/repository/rating_repo.go:140
↓ 3 callersMethodFindRepliesByIDs
(ids []int)
apps/api/internal/topic/repository/reply_repo.go:122
↓ 3 callersMethodGetBatchWithOptions
GetBatchWithOptions is the fully-parameterized batch fetch: - token: caller's Bearer access_token; "" = anonymous - contentLimit: "sfw" / "nsfw" / "a
apps/api/internal/galgame/client/client.go:530
↓ 3 callersMethodGetDailyCount
GetDailyCount returns the user's current daily image upload count from the kungal_user_state table (the OAuth-migration successor to user.daily_*).
apps/api/internal/image/repository/image_repo.go:19
↓ 3 callersMethodGetDetail
────────────────────────────────────────── GetDetail — GET /website-tag/:name ──────────────────────────────────────────
apps/api/internal/website/service/tag_service.go:43
↓ 3 callersMethodHasUserVoted
(pollID, userID int)
apps/api/internal/topic/repository/poll_repo.go:55
↓ 3 callersMethodIncrementDailyCount
IncrementDailyCount atomically increments the user's daily image upload count.
apps/api/internal/image/repository/image_repo.go:27
↓ 3 callersMethodIncrementView
IncrementView atomically bumps the view counter (best-effort).
apps/api/internal/galgame/repository/rating_repo.go:84
↓ 3 callersMethodInvalidate
Invalidate drops a user id from hot+miss cache. Use after explicit updates (admin ban, etc.) so the next read goes back to OAuth.
apps/api/pkg/userclient/userclient.go:474
↓ 3 callersMethodMainURL
MainURL builds a URL using the client's configured CDN base. Uses "webp" as the default extension (V1 outputs are always webp).
apps/api/pkg/imageclient/client.go:104
↓ 3 callersFunctionNewWikiService
( wikiClient *client.GalgameClient, galgameRepo *repository.GalgameRepository, userClient *userclient.Clien
apps/api/internal/galgame/service/wiki_service.go:71
↓ 3 callersMethodPutWithToken
PutWithToken performs a PUT with Bearer token. See PostWithToken for contentType semantics.
apps/api/internal/galgame/client/client.go:224
↓ 3 callersMethodReplaceViewers
ReplaceViewers swaps the full viewer allow-list for a collection.
apps/api/internal/galgame/repository/collection_repo.go:123
↓ 3 callersMethodUpdate
Update applies the provided fields to a tag and returns the refreshed row.
apps/api/internal/doc/repository/tag_repo.go:55
↓ 3 callersMethodUpdateFields
UpdateFields updates arbitrary fields on a tag row.
apps/api/internal/website/repository/tag_repo.go:50
↓ 3 callersMethodUpload
Upload uploads a file and waits for processing. filename is used only in the multipart content-disposition (does not influence storage key).
apps/api/pkg/imageclient/client.go:164
↓ 3 callersMethodUpload
(ctx context.Context, key, contentType string, body io.Reader)
apps/api/internal/infrastructure/storage/s3.go:55
↓ 3 callersFunctionanyConsumeSection
anyConsumeSection reports whether any section name is a paid (moemoepoint-consuming) one — see constants.TopicSectionConsume.
apps/api/internal/topic/service/topic_write_service.go:52
↓ 3 callersFunctionapiGet
(path: string)
apps/web/server/utils/kunSitemapSources.ts:86
↓ 3 callersMethodbasicAuthHeader
basicAuthHeader produces a Basic auth header value from client id/secret.
apps/api/pkg/imageclient/client.go:364
↓ 3 callersFunctionbriefToLocale
(b galgameClient.GalgameBrief)
apps/api/internal/user/service/user_mapper.go:33
↓ 3 callersFunctionbriefToName
briefToName maps a wiki GalgameBrief to the four-language KunLanguage DTO.
apps/api/internal/galgame/service/resource_mapper.go:65
↓ 3 callersMethodbuildGalgameCards
buildGalgameCards turns an ORDERED slice of wiki briefs into profile cards, fusing in kungal-local stats (view / like), resource meta (platform / lang
apps/api/internal/user/service/user_content_service.go:118
↓ 3 callersMethodbuildSingleItem
buildSingleItem maps one row to a CommentItem with empty Replies. Returns nil if the author is no longer renderable (deleted user), letting callers sk
apps/api/internal/galgame/service/comment_service.go:230
↓ 3 callersFunctionclassifyError
classifyError maps an image service error code to a sentinel if applicable. Returns the original *Error if no sentinel matches.
apps/api/pkg/imageclient/client.go:146
↓ 3 callersFunctionclone
(rs: KunReaction[])
apps/web/app/composables/useReactions.ts:39
↓ 3 callersFunctioncollectQueryWithRenames
collectQueryWithRenames is like collectQuery but rewrites keys per the supplied translation map on the way through. Used to bridge the camelCase param
apps/api/internal/galgame/handler/entity_handler.go:189
↓ 3 callersFunctiondeleteImage
(imageName: string)
apps/web/app/composables/useLocalforage.ts:17
↓ 3 callersFunctionencodeCursor
(created time.Time, typeStr string, id int)
apps/api/internal/activity/service/activity_service.go:364
↓ 3 callersFunctionentityDetailRenames
entityDetailRenames returns the rename map for a wiki-backed entity detail handler (tag / official / engine): only the FE's per-entity ID key → snake_
apps/api/internal/galgame/handler/entity_handler.go:210
↓ 3 callersMethodfetchMonthRaw
fetchMonthRaw fetches + parses a single month's wiki calendar response. An empty `month` lets wiki default to the current JST month. content_limit is
apps/api/internal/galgame/service/calendar_service.go:74
↓ 3 callersMethodfetchParentNames
fetchParentNames is the shared id→parent-name lookup for the toolset / website cards: `childTable c JOIN parentTable p ON p.id = c.<fk>` selecting p.n
apps/api/internal/activity/repository/activity_repo.go:260
↓ 3 callersFunctionformatKunZodIssue
(issue: KunZodIssue)
apps/web/app/utils/kunZodError.ts:84
↓ 3 callersFunctiongalgameImageSrc
(row: { cdn_url?: string image_hash: string })
apps/web/app/utils/galgameImageSrc.ts:12
↓ 3 callersFunctionmapArtifactErr
mapArtifactErr translates an artifactclient sentinel into a kungal AppError.
apps/api/internal/toolset/service/upload_service.go:275
↓ 3 callersFunctionmapKeys
(m map[string]bool)
apps/api/internal/galgame/repository/resource_meta_repo.go:61
↓ 3 callersFunctionnewFakeWiki
newFakeWiki spins up a tiny HTTP server that captures the next request and replies with a successful {code,message,data} envelope. Returns the capture
apps/api/internal/galgame/service/wiki_service_test.go:42
← previousnext →101–200 of 2,016, ranked by callers