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
↓ 3 callers
Function
quoteFrom
(e: Event)
apps/web/app/composables/topic/useQuoteContent.ts:110
↓ 3 callers
Function
quoteIdent
quoteIdent double-quotes a SQL identifier (table/column from information_schema) so an odd name (reserved word, mixed case) is referenced safely.
apps/api/internal/infrastructure/cron/reference_ping.go:126
↓ 3 callers
Function
resolveContentImageRef
resolveContentImageRef turns a /image/<hash>[_variant] token into the absolute CDN URL via imageclient.MainURL/VariantURL (the contract path layout —
apps/api/internal/infrastructure/markdown/markdown.go:118
↓ 3 callers
Function
rowToCard
rowToCard maps a resource row to the list-card DTO. `isLiked` is per-caller and must be looked up via the batch helper ResourceRepository.FindLikedSe
apps/api/internal/galgame/service/resource_mapper.go:93
↓ 3 callers
Method
sendEnvelope
sendEnvelope is the single request path behind do/doJSON/doJSONWithToken: build the request, run it, decode the {code,message,data} envelope, and unma
apps/api/pkg/userclient/userclient.go:307
↓ 3 callers
Function
set
(val)
apps/web/app/composables/useTabQuery.ts:21
↓ 3 callers
Function
setOpen
(value: boolean)
apps/web/app/composables/useKunDisclosure.ts:30
↓ 3 callers
Function
sfwScope
────────────────────────────────────────── Reads ────────────────────────────────────────── sfwScope chains the age_limit='all' predicate when SFW mod
apps/api/internal/website/repository/website_repo.go:53
↓ 3 callers
Function
toIntSet
(in []int)
apps/api/internal/galgame/service/collection_service.go:469
↓ 3 callers
Function
toUrls
(src: PagedSource, rows: Record<string, unknown>[])
apps/web/server/utils/kunSitemapSources.ts:103
↓ 3 callers
Function
topicSectionFootprint
topicSectionFootprint is a topic's moemoepoint outcome given whether it sits in a paid section, mirroring Create: a paid section is a net deduction (−
apps/api/internal/topic/service/topic_write_service.go:67
↓ 3 callers
Function
walk
(dir)
apps/web/scripts/generate-icon-list.mjs:108
↓ 3 callers
Function
withImageVariant
( url: string, variant: ImageVariant )
apps/web/shared/utils/getEffectiveBanner.ts:60
↓ 3 callers
Function
write
(items: ToolsetPendingUpload[])
apps/web/app/composables/useToolsetResumeUploads.ts:25
↓ 3 callers
Function
writeImageAttr
writeImageAttr writes ` name="value"` for an attribute the meta transformer stamped on the image node, escaping the value. No-op if the attr is absent
apps/api/internal/infrastructure/markdown/markdown.go:635
↓ 2 callers
Method
AddContributor
AddContributor adds the given user as a contributor (inside a tx), ignoring if the pair already exists.
apps/api/internal/toolset/repository/toolset_repo.go:177
↓ 2 callers
Method
AdjustCommentCount
AdjustCommentCount bumps comment_count by delta.
apps/api/internal/website/repository/website_repo.go:149
↓ 2 callers
Method
AdjustFavoriteCount
AdjustFavoriteCount adjusts topic.favorite_count by delta.
apps/api/internal/topic/repository/topic_repo.go:295
↓ 2 callers
Method
AdjustFavoriteCount
AdjustFavoriteCount bumps favorite_count by delta (inside a tx).
apps/api/internal/website/repository/website_repo.go:143
↓ 2 callers
Method
AdjustGalgameFavoriteCount
(tx *gorm.DB, galgameID, delta int)
apps/api/internal/galgame/repository/collection_repo.go:268
↓ 2 callers
Method
AdjustLikeCount
AdjustLikeCount adjusts galgame_rating.like_count by delta.
apps/api/internal/galgame/repository/rating_repo.go:202
↓ 2 callers
Method
AdjustLikeCount
AdjustLikeCount bumps like_count by delta (inside a tx).
apps/api/internal/website/repository/website_repo.go:137
↓ 2 callers
Method
AdjustLocalResourceCount
AdjustLocalResourceCount adjusts galgame.resource_count by delta. Uses .Table(...).Update(...) which BYPASSES GORM's autoUpdateTime — so adjusting the
apps/api/internal/galgame/repository/resource_repo.go:300
↓ 2 callers
Method
AdjustOptionVoteCount
AdjustOptionVoteCount adjusts topic_poll_option.vote_count by delta.
apps/api/internal/topic/repository/poll_repo.go:148
↓ 2 callers
Method
AwardSync
AwardSync is the SYNCHRONOUS variant of Award for replayable cron paths (notably wiki-approve) that must know whether the OAuth call landed before adv
apps/api/internal/moemoepoint/pusher.go:109
↓ 2 callers
Method
CompleteUpload
(ctx context.Context, uuid string, body CompleteUploadJSONRequestBody, reqEditors ...RequestEditorFn)
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:262
↓ 2 callers
Method
CountByUser
(userID int)
apps/api/internal/galgame/repository/collection_repo.go:34
↓ 2 callers
Method
CountCommentLikes
(commentID int)
apps/api/internal/topic/repository/comment_repo.go:88
↓ 2 callers
Method
Create
Create inserts a new galgame_resource row within the given tx.
apps/api/internal/galgame/repository/resource_repo.go:196
↓ 2 callers
Method
Create
────────────────────────────────────────── Writes (transactional) ────────────────────────────────────────── Create inserts a new toolset. Call inside
apps/api/internal/toolset/repository/toolset_repo.go:109
↓ 2 callers
Method
Create
────────────────────────────────────────── Writes ────────────────────────────────────────── Create inserts a new article row (inside a tx).
apps/api/internal/doc/repository/article_repo.go:90
↓ 2 callers
Method
Create
────────────────────────────────────────── Writes ────────────────────────────────────────── Create inserts a new website row (inside a tx).
apps/api/internal/website/repository/website_repo.go:121
↓ 2 callers
Method
Create
────────────────────────────────────────── Tag writes ────────────────────────────────────────── Create inserts a new tag row.
apps/api/internal/website/repository/tag_repo.go:45
↓ 2 callers
Method
CreateGalgameCommentMention
CreateGalgameCommentMention notifies a user @-mentioned in a galgame comment, deep-linked to that comment so clicking the notification lands on it: ?c
apps/api/internal/galgame/service/interaction.go:74
↓ 2 callers
Method
CreateLike
CreateLike inserts a like row.
apps/api/internal/galgame/repository/rating_repo.go:190
↓ 2 callers
Method
CreateLinks
CreateLinks inserts resource_link rows, skipping (resource_id, url) duplicates.
apps/api/internal/galgame/repository/resource_repo.go:229
↓ 2 callers
Method
CreateLocalStub
────────────────────────────────────────── Side-effect helpers used by Create / MergePR ────────────────────────────────────────── CreateLocalStub cre
apps/api/internal/galgame/repository/galgame_repo.go:84
↓ 2 callers
Method
CreatePollOption
CreatePollOption inserts a TopicPollOption row inside the caller tx.
apps/api/internal/topic/repository/poll_repo.go:131
↓ 2 callers
Method
CreateReplyMessage
CreateReplyMessage creates a (non-deduped) reply/commented notification for every target/owner separately. Callers should ensure this is only invoked
apps/api/internal/topic/service/interaction_helpers.go:66
↓ 2 callers
Method
DeleteByID
DeleteByID removes a rating (cascade clears likes & comments).
apps/api/internal/galgame/repository/rating_repo.go:163
↓ 2 callers
Method
DeleteByID
DeleteByID deletes a tag row and all its relation rows.
apps/api/internal/website/repository/tag_repo.go:55
↓ 2 callers
Method
DeleteLike
DeleteLike removes a specific like row.
apps/api/internal/galgame/repository/rating_repo.go:197
↓ 2 callers
Method
DeleteWithToken
DeleteWithToken performs a DELETE with Bearer token. See PostWithToken for contentType semantics.
apps/api/internal/galgame/client/client.go:230
↓ 2 callers
Method
Emit
(tx *gorm.DB, spec Spec)
apps/api/internal/message/service/notifier.go:60
↓ 2 callers
Function
ExtractMentionIDs
ExtractMentionIDs returns the unique, positive user ids @mentioned in raw markdown `content`, in first-seen order. Used to fan out mention notificatio
apps/api/internal/infrastructure/markdown/mention.go:26
↓ 2 callers
Method
FetchTopicBestAnswers
FetchTopicBestAnswers batch-loads the accepted best-answer reply (topic .best_answer_id → topic_reply) for the topics that have one, keyed by topic id
apps/api/internal/activity/repository/activity_repo.go:647
↓ 2 callers
Method
FetchUserInfo
FetchUserInfo retrieves the OAuth user info using an access token. Returns a typed *Error on OAuth-side failures.
apps/api/internal/user/oauth/client.go:249
↓ 2 callers
Method
FindAll
────────────────────────────────────────── Tag reads ────────────────────────────────────────── FindAll returns all tags ordered by id ASC.
apps/api/internal/website/repository/tag_repo.go:25
↓ 2 callers
Method
FindByName
FindByName returns a tag by its unique name.
apps/api/internal/website/repository/tag_repo.go:32
↓ 2 callers
Method
FindCommentByID
FindCommentByID returns a comment for permission checks.
apps/api/internal/galgame/repository/rating_repo.go:217
↓ 2 callers
Method
FindGalgameOwner
FindGalgameOwner reads galgame.user_id used for delete permission checks.
apps/api/internal/galgame/repository/rating_repo.go:168
↓ 2 callers
Method
FindLike
────────────────────────────────────────── Writes — rating like ────────────────────────────────────────── FindLike returns the like row for (rating,
apps/api/internal/galgame/repository/rating_repo.go:179
↓ 2 callers
Method
FindLocalBatch
FindLocalBatch returns local stats for a list of galgame IDs.
apps/api/internal/galgame/repository/galgame_repo.go:55
↓ 2 callers
Method
FindNamesByIDs
FindNamesByIDs returns a map[id]name for the given category IDs.
apps/api/internal/website/repository/category_repo.go:38
↓ 2 callers
Method
FindOrCreateTags
────────────────────────────────────────── Tags ──────────────────────────────────────────
apps/api/internal/topic/repository/taxonomy_repo.go:26
↓ 2 callers
Method
FindRatingGalgameID
FindRatingGalgameID returns the galgame_id for a rating (used by comment notifications).
apps/api/internal/galgame/repository/rating_repo.go:238
↓ 2 callers
Method
FindResourceMetaBatch
FindResourceMetaBatch aggregates DISTINCT (galgame_id, platform, language) tuples for a batch of galgame IDs.
apps/api/internal/galgame/repository/resource_meta_repo.go:50
↓ 2 callers
Method
FindSectionNamesByTopicID
(topicID int)
apps/api/internal/topic/repository/taxonomy_repo.go:140
↓ 2 callers
Method
FindSectionsByNamesTx
FindSectionsByNamesTx resolves section names to rows inside the caller tx.
apps/api/internal/topic/repository/taxonomy_repo.go:157
↓ 2 callers
Method
FindUserRating
FindUserRating returns the user's rating for a toolset, if any. Returns (nil, nil) when the user has not rated.
apps/api/internal/toolset/repository/practicality_repo.go:70
↓ 2 callers
Method
FindUserVoteOptionIDs
(pollID, userID int)
apps/api/internal/topic/repository/poll_repo.go:47
↓ 2 callers
Method
GetAdminStats
GetAdminStats fetches wiki-side admin stats for the last N days. The wiki's admin/stats is an authenticated admin endpoint (401s anonymously), so the
apps/api/internal/galgame/client/client.go:374
↓ 2 callers
Method
GetBatch
GetBatch fetches lightweight galgame info for multiple IDs anonymously (status=0 only). Returns a map[galgameID] -> GalgameBrief for easy lookup. For
apps/api/internal/galgame/client/client.go:484
↓ 2 callers
Method
GetByIDForUser
GetByIDForUser loads a collection only if it belongs to userID (owner-scoped mutations: 404 for missing OR not-yours).
apps/api/internal/galgame/repository/collection_repo.go:52
↓ 2 callers
Method
GetMoemoepoint
GetMoemoepoint reads a user's unified balance from OAuth (06 §3.2).
apps/api/pkg/userclient/userclient.go:397
↓ 2 callers
Method
GetSystemReadCursor
GetSystemReadCursor returns the user's "read up to" marker, or 0 when the user has never marked any broadcast as read.
apps/api/internal/message/repository/message_repo.go:117
↓ 2 callers
Method
GetUserStats
GetUserStats returns contribution + interaction counts for the profile page.
apps/api/internal/user/repository/stats_repo.go:24
↓ 2 callers
Method
GetUserStats
GetUserStats fetches galgame-related stats for a user from wiki.
apps/api/internal/galgame/client/client.go:286
↓ 2 callers
Method
HasNSFW
HasNSFW reports whether any item in the list is nsfw.
apps/api/internal/galgame/service/galgame_enricher.go:46
↓ 2 callers
Method
HasReaction
Reaction data access for topics + replies (unified 'like'/'dislike'/emoji). Write methods take the caller's tx so toggles stay atomic with count + sid
apps/api/internal/topic/repository/reaction_repo.go:20
↓ 2 callers
Method
HasReplyReaction
────────────────────────────────────────── Reply reactions ──────────────────────────────────────────
apps/api/internal/topic/repository/reaction_repo.go:42
↓ 2 callers
Method
HydrateCardsByIDs
HydrateCardsByIDs turns an ORDERED galgame id list into list cards, fusing wiki metadata + OAuth users + local stats/ratings/resource-meta. The output
apps/api/internal/galgame/service/galgame_service.go:625
↓ 2 callers
Method
InitUpload
(ctx context.Context, body InitUploadJSONRequestBody, reqEditors ...RequestEditorFn)
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:251
↓ 2 callers
Method
IsKnownType
────────────────────────────────────────── Queries ────────────────────────────────────────── IsKnownType reports whether typeStr is a recognised acti
apps/api/internal/activity/repository/activity_repo.go:62
↓ 2 callers
Method
IsLikedBy
IsLikedBy checks whether a user has liked a given resource.
apps/api/internal/galgame/repository/resource_repo.go:141
↓ 2 callers
Method
LevelSumsByWebsiteIDs
LevelSumsByWebsiteIDs returns a map[websiteID] -> sum of tag levels for the given websites.
apps/api/internal/website/repository/tag_repo.go:80
↓ 2 callers
Method
ListPaginated
────────────────────────────────────────── Reads — list with filters ────────────────────────────────────────── ListPaginated applies the filter and r
apps/api/internal/galgame/repository/rating_repo.go:94
↓ 2 callers
Function
MainURL
---- URL helpers (pure, no network) ---- MainURL returns the CDN URL for the main image of a hash. Argument order matches VariantURL for consistency.
apps/api/pkg/imageclient/client.go:75
↓ 2 callers
Function
NewCompleteUploadRequestWithBody
NewCompleteUploadRequestWithBody generates requests for CompleteUpload with any type of body
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:550
↓ 2 callers
Function
NewInitUploadRequestWithBody
NewInitUploadRequestWithBody generates requests for InitUpload with any type of body
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:442
↓ 2 callers
Function
ParseCompleteUploadResp
ParseCompleteUploadResp parses an HTTP response from a CompleteUploadWithResponse call
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:1074
↓ 2 callers
Function
ParseInitUploadResp
ParseInitUploadResp parses an HTTP response from a InitUploadWithResponse call
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:975
↓ 2 callers
Method
PurgeUserContent
PurgeUserContent deletes everything authored/cast by userID and returns the pre-delete preview breakdown. The whole operation is one transaction: any
apps/api/internal/admin/repository/purge_repo.go:105
↓ 2 callers
Method
RemoveReaction
(tx *gorm.DB, topicID, userID int, reaction string)
apps/api/internal/topic/repository/reaction_repo.go:33
↓ 2 callers
Method
RemoveReplyReaction
(tx *gorm.DB, replyID, userID int, reaction string)
apps/api/internal/topic/repository/reaction_repo.go:55
↓ 2 callers
Method
ReplaceAliases
ReplaceAliases deletes existing aliases and inserts the given names (within a tx). Empty/whitespace-only names are skipped.
apps/api/internal/toolset/repository/toolset_repo.go:148
↓ 2 callers
Method
ReplaceProviderNames
ReplaceProviderNames overwrites the jsonb provider_name column with the given display labels (e.g. ["百度网盘", "OneDrive"]). Stored as JSON text; the rea
apps/api/internal/galgame/repository/resource_repo.go:214
↓ 2 callers
Method
ReplaceProviders
ReplaceProviders overwrites the text[] provider column for a resource. GORM has no native array type, so this uses raw SQL with a manually- formatted
apps/api/internal/galgame/repository/resource_repo.go:204
↓ 2 callers
Method
Samples
Samples returns up to `n` minimal samples (name + banner).
apps/api/internal/galgame/service/galgame_enricher.go:56
↓ 2 callers
Method
Search
Search — GET /galgame-tag/search Wiki search is Meilisearch-backed; response shape is `{items, total, processing_time_ms}`. The frontend (galgame/tag
apps/api/internal/galgame/service/tag_service.go:71
↓ 2 callers
Method
SearchUsers
SearchUsers returns user search results from the OAuth /users/search endpoint. Identity is OAuth-owned, so we don't run any local DB query here. moemo
apps/api/internal/search/service/search_service.go:111
↓ 2 callers
Function
SetContentImageMetaResolver
SetContentImageMetaResolver wires the image-metadata resolver used to enrich content <img> tags. Call once at startup with the image client's MetaReso
apps/api/internal/infrastructure/markdown/markdown.go:672
↓ 2 callers
Function
SetContentSiteBase
SetContentSiteBase configures the origin for @mention link hrefs. Call once at startup with the web origin.
apps/api/internal/infrastructure/markdown/markdown.go:110
↓ 2 callers
Method
Summary
Summary returns the (counts, avg) pair for a toolset, used by the detail view.
apps/api/internal/toolset/service/practicality_service.go:40
↓ 2 callers
Method
ToggleReaction
ToggleReaction adds/removes a reaction on a topic. like/dislike are effectful (like → ±1 moemoepoint to the owner + a "liked" notification) and mutual
apps/api/internal/topic/service/topic_write_service.go:344
↓ 2 callers
Method
ToggleReplyReaction
ToggleReplyReaction is the reply-level counterpart of TopicWriteService .ToggleReaction: like → ±1 moemoepoint to the reply owner + a "liked" notifica
apps/api/internal/topic/service/reply_service.go:349
↓ 2 callers
Method
Touch
Touch marks a CONTENT update on a galgame (claim / merged edit) so the kungal list (ORDER BY g.resource_update_time DESC) surfaces it: it ensures the
apps/api/internal/galgame/repository/galgame_repo.go:106
↓ 2 callers
Method
TouchGalgameUpdated
TouchGalgameUpdated bumps galgame.resource_update_time to now to mark a resource content change (publish / edit). Separate from AdjustLocalResourceCou
apps/api/internal/galgame/repository/resource_repo.go:309
↓ 2 callers
Method
Update
────────────────────────────────────────── Update ──────────────────────────────────────────
apps/api/internal/topic/service/topic_write_service.go:212
↓ 2 callers
Method
UpdateFields
UpdateFields updates arbitrary fields on a toolset row.
apps/api/internal/toolset/repository/toolset_repo.go:114
← previous
next →
201–300 of 2,016, ranked by callers