Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/KunMoe/kun-galgame-forum
/ functions
Functions
2,016 in github.com/KunMoe/kun-galgame-forum
⨍
Functions
2,016
◇
Types & classes
1,043
↓ 4 callers
Method
DB
()
apps/api/internal/website/repository/tag_repo.go:18
↓ 4 callers
Method
FilterSFW
FilterSFW removes NSFW items when the caller requests SFW-only content.
apps/api/internal/galgame/service/galgame_enricher.go:32
↓ 4 callers
Method
FindByIDTx
────────────────────────────────────────── Reply interaction helpers (for tx participation) ────────────────────────────────────────── FindByIDTx load
apps/api/internal/topic/repository/reply_repo.go:196
↓ 4 callers
Method
FindLinks
FindLinks returns all download URLs for a resource.
apps/api/internal/galgame/repository/resource_repo.go:115
↓ 4 callers
Method
GetDetail
────────────────────────────────────────── GetDetail / GetList ────────────────────────────────────────── GetDetail — GET /api/galgame/:gid Bearer-aw
apps/api/internal/galgame/handler/galgame_handler.go:139
↓ 4 callers
Method
GetList
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 callers
Method
GetList
GetList — GET /doc/tag
apps/api/internal/doc/service/tag_service.go:25
↓ 4 callers
Function
GetUser
GetUser extracts UserInfo from the Fiber context. Returns nil if not authenticated.
apps/api/internal/middleware/auth.go:232
↓ 4 callers
Method
LockForUpdate
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 callers
Method
NotifyMentions
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 callers
Method
ProxyWrite
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 callers
Function
ResolveMentionNames
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 callers
Method
StatusCode
StatusCode returns HTTPResponse.StatusCode
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:732
↓ 4 callers
Function
_fetchReplies
( fetchPage: number, fetchSortOrder: 'asc' | 'desc' )
apps/web/app/composables/topic/useTopicReplies.ts:34
↓ 4 callers
Function
adjustMoemoepoint
────────────────────────────────────────── Shared helpers ────────────────────────────────────────── adjustMoemoepoint applies a moemoepoint change vi
apps/api/internal/toolset/service/resource_service.go:237
↓ 4 callers
Function
aliasesToNames
aliasesToNames extracts the name field from a slice of WikiAlias.
apps/api/internal/galgame/service/official_service.go:192
↓ 4 callers
Function
arrayDiffScalar
( oldArr: readonly T[] | undefined | null, newArr: readonly T[] | undefined | null )
apps/web/shared/utils/arrayDiffByKey.ts:85
↓ 4 callers
Function
bannerURLFromHash
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 callers
Method
buildReplyResponses
────────────────────────────────────────── Reply mappers ────────────────────────────────────────── buildReplyResponses turns a batch of ReplyRow into
apps/api/internal/topic/service/mapper.go:133
↓ 4 callers
Method
cachedKeyset
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 callers
Function
clearHideTimer
()
apps/web/app/composables/topic/useQuoteContent.ts:42
↓ 4 callers
Function
collectReplyMentionIDs
(content string)
apps/api/internal/activity/service/activity_service.go:689
↓ 4 callers
Function
collectUniqueIDs
collectUniqueIDs extracts unique int IDs from a slice via a projection.
apps/api/internal/user/service/user_mapper.go:57
↓ 4 callers
Function
createDedupMessage
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 callers
Function
decodeEnvelope
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 callers
Method
do
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 callers
Method
doRequest
(req *http.Request)
apps/api/internal/galgame/client/client.go:727
↓ 4 callers
Function
extractContentImageHashes
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 callers
Function
fetch
(ctx context.Context, c *http.Client, url string)
apps/api/cmd/backfill-cover-hashes/main.go:206
↓ 4 callers
Function
handleApiError
(code: number, message: string)
apps/web/app/utils/kunFetch.ts:88
↓ 4 callers
Function
hourDiff
(upvoteTime: number | Date | string, hours: number)
apps/web/shared/utils/time.ts:43
↓ 4 callers
Function
hoursAgo
(n: number)
apps/web/shared/utils/time.spec.ts:25
↓ 4 callers
Function
imageHashUrl
( base: string, hash: string, variant?: string )
apps/web/app/utils/imageSrc.ts:13
↓ 4 callers
Function
isValidPassword
(pwd: string)
apps/web/shared/utils/validate.ts:88
↓ 4 callers
Function
makeMultipart
makeMultipart builds a multipart form body with the given fields.
apps/api/internal/image/handler/galgame_upload_test.go:56
↓ 4 callers
Method
mutateWithToken
(ctx context.Context, method, path, token string, body any, contentType string)
apps/api/internal/galgame/client/client.go:241
↓ 4 callers
Function
newTestApp
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 callers
Function
ratingReward
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 callers
Function
rawJSON
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 callers
Function
read
()
apps/web/app/composables/useToolsetResumeUploads.ts:12
↓ 4 callers
Function
recomputeTopicCounts
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 callers
Function
renderReplyTokens
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 callers
Function
unwrap
(json: unknown)
apps/web/server/utils/kunSitemapSources.ts:56
↓ 4 callers
Function
uploadGalgameImage
( file: Blob, preset: GalgameImageUploadPreset, filename = 'image' )
apps/web/app/utils/uploadGalgameImage.ts:38
↓ 4 callers
Function
useAuthModal
()
apps/web/app/composables/useAuthModal.ts:7
↓ 3 callers
Method
AddReaction
(tx *gorm.DB, topicID, userID int, reaction string)
apps/api/internal/topic/repository/reaction_repo.go:28
↓ 3 callers
Method
AddReplyReaction
(tx *gorm.DB, replyID, userID int, reaction string)
apps/api/internal/topic/repository/reaction_repo.go:50
↓ 3 callers
Method
AdjustDislikeCount
AdjustDislikeCount adjusts topic.dislike_count by delta.
apps/api/internal/topic/repository/topic_repo.go:289
↓ 3 callers
Method
AdjustLikeCount
AdjustLikeCount adjusts topic.like_count by delta.
apps/api/internal/topic/repository/topic_repo.go:283
↓ 3 callers
Method
AdjustReplyDislikeCount
AdjustReplyDislikeCount adjusts the topic_reply.dislike_count by `delta`.
apps/api/internal/topic/repository/reply_repo.go:243
↓ 3 callers
Method
AdjustReplyLikeCount
AdjustReplyLikeCount adjusts the topic_reply.like_count by `delta`.
apps/api/internal/topic/repository/reply_repo.go:237
↓ 3 callers
Method
Configured
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 callers
Method
Create
── Collection CRUD ──
apps/api/internal/galgame/repository/collection_repo.go:26
↓ 3 callers
Method
Create
────────────────────────────────────────── Create — POST /toolset ──────────────────────────────────────────
apps/api/internal/toolset/service/toolset_service.go:117
↓ 3 callers
Method
Create
────────────────────────────────────────── Create — all checks inside transaction ──────────────────────────────────────────
apps/api/internal/topic/service/topic_write_service.go:107
↓ 3 callers
Method
Create
────────────────────────────────────────── Create — POST /website-tag ──────────────────────────────────────────
apps/api/internal/website/service/tag_service.go:77
↓ 3 callers
Method
DB
()
apps/api/internal/message/repository/chat_repo.go:18
↓ 3 callers
Method
Delete
────────────────────────────────────────── Delete — DELETE /website-tag ──────────────────────────────────────────
apps/api/internal/website/service/tag_service.go:108
↓ 3 callers
Method
DeleteByID
DeleteByID deletes a tag and any related article-tag rows.
apps/api/internal/doc/repository/tag_repo.go:46
↓ 3 callers
Method
DeleteLocalStub
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 callers
Method
FindByID
FindByID loads a single comment.
apps/api/internal/website/repository/comment_repo.go:75
↓ 3 callers
Method
FindCommentByID
────────────────────────────────────────── Comment CRUD ──────────────────────────────────────────
apps/api/internal/topic/repository/comment_repo.go:82
↓ 3 callers
Method
FindPaginated
FindPaginated returns tags matching an optional keyword plus total.
apps/api/internal/doc/repository/tag_repo.go:20
↓ 3 callers
Method
FindRatingForWrite
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 callers
Method
FindRepliesByIDs
(ids []int)
apps/api/internal/topic/repository/reply_repo.go:122
↓ 3 callers
Method
GetBatchWithOptions
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 callers
Method
GetDailyCount
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 callers
Method
GetDetail
────────────────────────────────────────── GetDetail — GET /website-tag/:name ──────────────────────────────────────────
apps/api/internal/website/service/tag_service.go:43
↓ 3 callers
Method
HasUserVoted
(pollID, userID int)
apps/api/internal/topic/repository/poll_repo.go:55
↓ 3 callers
Method
IncrementDailyCount
IncrementDailyCount atomically increments the user's daily image upload count.
apps/api/internal/image/repository/image_repo.go:27
↓ 3 callers
Method
IncrementView
IncrementView atomically bumps the view counter (best-effort).
apps/api/internal/galgame/repository/rating_repo.go:84
↓ 3 callers
Method
Invalidate
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 callers
Method
MainURL
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 callers
Function
NewWikiService
( wikiClient *client.GalgameClient, galgameRepo *repository.GalgameRepository, userClient *userclient.Clien
apps/api/internal/galgame/service/wiki_service.go:71
↓ 3 callers
Method
PutWithToken
PutWithToken performs a PUT with Bearer token. See PostWithToken for contentType semantics.
apps/api/internal/galgame/client/client.go:224
↓ 3 callers
Method
ReplaceViewers
ReplaceViewers swaps the full viewer allow-list for a collection.
apps/api/internal/galgame/repository/collection_repo.go:123
↓ 3 callers
Method
Update
Update applies the provided fields to a tag and returns the refreshed row.
apps/api/internal/doc/repository/tag_repo.go:55
↓ 3 callers
Method
UpdateFields
UpdateFields updates arbitrary fields on a tag row.
apps/api/internal/website/repository/tag_repo.go:50
↓ 3 callers
Method
Upload
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 callers
Method
Upload
(ctx context.Context, key, contentType string, body io.Reader)
apps/api/internal/infrastructure/storage/s3.go:55
↓ 3 callers
Function
anyConsumeSection
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 callers
Function
apiGet
(path: string)
apps/web/server/utils/kunSitemapSources.ts:86
↓ 3 callers
Method
basicAuthHeader
basicAuthHeader produces a Basic auth header value from client id/secret.
apps/api/pkg/imageclient/client.go:364
↓ 3 callers
Function
briefToLocale
(b galgameClient.GalgameBrief)
apps/api/internal/user/service/user_mapper.go:33
↓ 3 callers
Function
briefToName
briefToName maps a wiki GalgameBrief to the four-language KunLanguage DTO.
apps/api/internal/galgame/service/resource_mapper.go:65
↓ 3 callers
Method
buildGalgameCards
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 callers
Method
buildSingleItem
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 callers
Function
classifyError
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 callers
Function
clone
(rs: KunReaction[])
apps/web/app/composables/useReactions.ts:39
↓ 3 callers
Function
collectQueryWithRenames
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 callers
Function
deleteImage
(imageName: string)
apps/web/app/composables/useLocalforage.ts:17
↓ 3 callers
Function
encodeCursor
(created time.Time, typeStr string, id int)
apps/api/internal/activity/service/activity_service.go:364
↓ 3 callers
Function
entityDetailRenames
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 callers
Method
fetchMonthRaw
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 callers
Method
fetchParentNames
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 callers
Function
formatKunZodIssue
(issue: KunZodIssue)
apps/web/app/utils/kunZodError.ts:84
↓ 3 callers
Function
galgameImageSrc
(row: { cdn_url?: string image_hash: string })
apps/web/app/utils/galgameImageSrc.ts:12
↓ 3 callers
Function
mapArtifactErr
mapArtifactErr translates an artifactclient sentinel into a kungal AppError.
apps/api/internal/toolset/service/upload_service.go:275
↓ 3 callers
Function
mapKeys
(m map[string]bool)
apps/api/internal/galgame/repository/resource_meta_repo.go:61
↓ 3 callers
Function
newFakeWiki
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
← previous
next →
101–200 of 2,016, ranked by callers