MCPcopy Create free account

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

Functions1,135 in github.com/KunMoe/kun-galgame-patch

↓ 2 callersMethodwriteUserMultipart
( ctx context.Context, method, path, accessToken string, jsonBody any, fileName string, fileContent []byt
apps/api/internal/galgame/client/submission.go:435
↓ 2 callersFunctionwriteWikiNotification
writeWikiNotification inserts a local user_message row pointing at the patch page of the galgame so the user can jump in one click.
apps/api/internal/infrastructure/cron/wiki_sync.go:242
↓ 1 callersMethodApplyCreator
ApplyCreator enforces moyu's eligibility gate, then files the application on the central OAuth queue with evidence. OAuth's own guards (already-creato
apps/api/internal/user/service/creator.go:75
↓ 1 callersMethodCollectUserS3Keys
CollectUserS3Keys returns the deduped set of moyu-bucket S3 object keys that the purge must delete (PG CASCADE removes the rows but never the objects)
apps/api/internal/admin/repository/repository.go:423
↓ 1 callersMethodCompleteUploadWithBody
CompleteUploadWithBody request with any body
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:260
↓ 1 callersMethodCompleteUploadWithResponse
(ctx context.Context, uuid string, body CompleteUploadJSONRequestBody, reqEditors ...RequestEditorFn)
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:679
↓ 1 callersFunctionContentLimitFromQuery
ContentLimitFromQuery parses the `content_limit` query parameter and returns one of {"sfw","nsfw","all"} when recognized, or "" otherwise. Returning
apps/api/pkg/utils/contentlimit.go:24
↓ 1 callersMethodCountCommentAndReplies
CountCommentAndReplies counts a comment + its direct replies, restricted to APPROVED rows (status = 0). DeleteComment uses this to decrement patch.com
apps/api/internal/patch/repository/repository.go:248
↓ 1 callersMethodCountOrphanPatches
CountOrphanPatches returns true-orphan counts by category (excludeIDs excluded).
apps/api/internal/admin/service/service.go:269
↓ 1 callersMethodCountPublishedPatchResources
CountPublishedPatchResources counts a user's PUBLISHED (status=0) patch resources — the moyu-side creator eligibility signal.
apps/api/internal/user/repository/repository.go:256
↓ 1 callersMethodCountRootCommentsBefore
CountRootCommentsBefore returns how many APPROVED root comments of the patch sort BEFORE the given root under the list order (created DESC, id DESC).
apps/api/internal/patch/repository/repository.go:226
↓ 1 callersMethodCountUserComments
(userID int)
apps/api/internal/user/repository/repository.go:53
↓ 1 callersMethodCountUserFavorites
(userID int)
apps/api/internal/user/repository/repository.go:57
↓ 1 callersMethodCountUserPatches
(userID int)
apps/api/internal/user/repository/repository.go:45
↓ 1 callersMethodCountUserResources
(userID int)
apps/api/internal/user/repository/repository.go:49
↓ 1 callersMethodCreateCommentLike
(rel *model.UserPatchCommentLikeRelation)
apps/api/internal/patch/repository/repository.go:285
↓ 1 callersMethodCreateCreatorApplication
CreateCreatorApplication files a creator-role application AS THE END USER (Authorization: Bearer <token>), not via client credentials.
apps/api/pkg/userclient/client.go:316
↓ 1 callersMethodCreateFavorite
(rel *model.UserPatchFavoriteRelation)
apps/api/internal/patch/repository/repository.go:391
↓ 1 callersMethodCreateFollowAndIncrement
CreateFollowAndIncrement inserts the relation AND bumps both denormalized counts in ONE transaction (audit F029), so they can't drift if the process d
apps/api/internal/user/repository/repository.go:149
↓ 1 callersMethodCreateGroupRoom
CreateGroupRoom creates a group chat. Only role >= 4 is allowed (checked in the handler layer).
apps/api/internal/chat/service/service.go:36
↓ 1 callersMethodCreateLikeCommentNotification
(senderID int, comment *model.PatchComment)
apps/api/internal/patch/service/service.go:1640
↓ 1 callersMethodCreatePatchByGalgameID
CreatePatchByGalgameID registers a local patch carrier directly by Wiki galgame_id — the path the publish wizard ("选择此条目") uses. Unlike the vndb_id pa
apps/api/internal/patch/service/service.go:100
↓ 1 callersMethodCreateResourceFavorite
(rel *model.UserPatchResourceFavoriteRelation)
apps/api/internal/patch/repository/repository.go:375
↓ 1 callersMethodCreateResourceLike
(rel *model.UserPatchResourceLikeRelation)
apps/api/internal/patch/repository/repository.go:359
↓ 1 callersMethodCreateRoom
CreateRoom POST /api/chat/room (admin only)
apps/api/internal/chat/handler/handler.go:280
↓ 1 callersMethodCreateUser
CreateUser inserts a new local row. Caller must populate ID with the OAuth-side integer id (NOT autoincrement; see migration 005). ON CONFLICT DO NOTH
apps/api/internal/auth/repository/repository.go:38
↓ 1 callersMethodDeleteArtifact
DeleteArtifact request
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:254
↓ 1 callersMethodDeleteArtifactWithResponse
DeleteArtifactWithResponse request
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:671
↓ 1 callersMethodDeleteCommentLike
(id int)
apps/api/internal/patch/repository/repository.go:289
↓ 1 callersMethodDeleteFavorite
(id int)
apps/api/internal/patch/repository/repository.go:395
↓ 1 callersMethodDeleteFollowAndDecrement
DeleteFollowAndDecrement removes the relation and, ONLY if a row was actually deleted, decrements both counts — all in one transaction (audit F029 + t
apps/api/internal/user/repository/repository.go:162
↓ 1 callersMethodDeleteResourceFavorite
(id int)
apps/api/internal/patch/repository/repository.go:379
↓ 1 callersMethodDeleteResourceLike
(id int)
apps/api/internal/patch/repository/repository.go:363
↓ 1 callersMethodDownloadArtifact
DownloadArtifact request
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:265
↓ 1 callersMethodDownloadArtifactWithResponse
DownloadArtifactWithResponse request
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:682
↓ 1 callersMethodExchangeCode
ExchangeCode trades an authorization code (+ PKCE verifier) for tokens. KUN OAuth takes a JSON body, not RFC-6749 form-encoded, and wraps the respons
apps/api/internal/auth/service/service.go:172
↓ 1 callersMethodFindCommentLike
===== Comment Likes =====
apps/api/internal/patch/repository/repository.go:279
↓ 1 callersMethodFindOrCreatePrivateRoom
FindOrCreatePrivateRoom returns the unique private chat room between two users, creating it (with both members) if it does not yet exist. The room li
apps/api/internal/chat/repository/repository.go:100
↓ 1 callersMethodFindOrCreateUserByID
FindOrCreateUserByID looks up the local user row by id, inserting an empty site-local row if it does not exist. The id MUST be the integer returned by
apps/api/internal/auth/service/service.go:249
↓ 1 callersMethodFindPatchByVndbID
(vndbID string)
apps/api/internal/patch/repository/repository.go:137
↓ 1 callersMethodFindResourceLike
===== Resource Likes =====
apps/api/internal/patch/repository/repository.go:353
↓ 1 callersMethodGetAllPatches
===== All Patches =====
apps/api/internal/admin/service/service.go:193
↓ 1 callersMethodGetArtifact
GetArtifact request
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:257
↓ 1 callersMethodGetContributorIDs
===== Contributors ===== GetContributorIDs returns the user_ids of every contributor on a patch. Handler enriches them via OAuth /users/batch (pkg/use
apps/api/internal/patch/service/service.go:1481
↓ 1 callersMethodGetFavoritedResourceIDs
GetFavoritedResourceIDs returns the subset of resourceIDs the user has subscribed to (收藏资源) — mirrors GetLikedResourceIDs, used to stamp is_favorite o
apps/api/internal/patch/repository/repository.go:480
↓ 1 callersMethodGetFollowerIDs
GetFollowerIDs / GetFollowingIDs return only the user_ids; the handler layer resolves them to display briefs via OAuth /users/batch (pkg/userclient).
apps/api/internal/user/repository/repository.go:193
↓ 1 callersMethodGetFollowingIDs
(userID, offset, limit int)
apps/api/internal/user/repository/repository.go:204
↓ 1 callersMethodGetForEdit
(id int)
apps/api/internal/doc/service/service.go:312
↓ 1 callersMethodGetGalgameCalendar
GetGalgameCalendar GET /api/galgame/calendar?month=YYYY-MM
apps/api/internal/common/handler.go:965
↓ 1 callersMethodGetLikedCommentIDs
(userID int, commentIDs []int)
apps/api/internal/patch/repository/repository.go:488
↓ 1 callersMethodGetLikedResourceIDs
moemoepoint is no longer mutated locally — OAuth is the unified source of truth (see pkg/moemoepoint). The local user.moemoepoint column is a read-cac
apps/api/internal/patch/repository/repository.go:469
↓ 1 callersMethodGetMessages
─── Messages ─────────────────────────────────────── GetMessages polls for new messages. Resolves the room by link and checks membership first, then
apps/api/internal/chat/service/service.go:85
↓ 1 callersMethodGetMessages
GetMessages GET /api/message
apps/api/internal/message/handler/handler.go:135
↓ 1 callersMethodGetMessagesByIDs
GetMessagesByIDs loads bare messages by id (used to build reply quotes).
apps/api/internal/chat/repository/repository.go:316
↓ 1 callersMethodGetMessagesByIDsInRoom
GetMessagesByIDsInRoom returns the given messages, scoped to the room (and verifying caller membership) so a member can only refresh messages from a r
apps/api/internal/chat/service/service.go:101
↓ 1 callersMethodGetMyCreatorApplication
GetMyCreatorApplication returns the user's latest creator application (nil if none).
apps/api/pkg/userclient/client.go:328
↓ 1 callersMethodGetOrphanCandidateIDs
===== Orphan Patches (D12) ===== GetOrphanCandidateIDs returns ids of candidate orphans (cheap local filter); the handler verifies them against Wiki b
apps/api/internal/admin/service/service.go:258
↓ 1 callersMethodGetPatchResourceFileHistoryS3Keys
GetPatchResourceFileHistoryS3Keys returns every non-empty old_s3_key on patch_resource_file_history rows belonging to the patch's resources. UpdateRes
apps/api/internal/patch/repository/repository.go:117
↓ 1 callersMethodGetPatchResourceS3Keys
GetPatchResourceS3Keys returns every non-empty s3_key on patch_resource rows owned by the patch. Used by DeletePatch right before the row goes away —
apps/api/internal/patch/repository/repository.go:99
↓ 1 callersMethodGetPatchesByIDs
GetPatchesByIDs returns existing patches for the given ids in the caller- supplied order — no lazy materialization. Used by handlers that enrich a lis
apps/api/internal/patch/service/service.go:247
↓ 1 callersMethodGetRandomPatchID
GetRandomPatchID returns a random patch id, optionally constrained by the caller's content_limit. The single-row RANDOM() path can land on a NSFW patc
apps/api/internal/patch/service/service.go:518
↓ 1 callersMethodGetRandomPatchIDs
GetRandomPatchIDs returns up to n random patch ids. Used by the random-patch endpoint so the service layer can ask wiki to filter the candidate set by
apps/api/internal/patch/repository/repository.go:165
↓ 1 callersMethodGetResourceFileHistoryS3Keys
GetResourceFileHistoryS3Keys returns the history's old_s3_keys for a single resource. Used by DeleteResource for the same reason as the patch-scoped h
apps/api/internal/patch/repository/repository.go:129
↓ 1 callersFunctionGetUserID
(c fiber.Ctx)
apps/api/internal/middleware/auth.go:275
↓ 1 callersMethodGetUserInfo
GetUserInfo fetches the current user's identity from /oauth/userinfo.
apps/api/internal/auth/service/service.go:195
↓ 1 callersMethodGetUserInfo
GetUserInfo composes the public user profile: site-local row (moemoepoint, follower/following counts, content counts) + OAuth brief (name/avatar/bio).
apps/api/internal/user/service/service.go:98
↓ 1 callersMethodGetUserStats
GetUserStats fetches a user's galgame contribution stats from the wiki.
apps/api/internal/galgame/client/client.go:853
↓ 1 callersMethodGetWikiMessageFeed
GetWikiMessageFeed proxies GET /galgame/messages/feed for the cron job. Authenticated via OAuth Client Basic Auth — the same client_id/secret used by
apps/api/internal/galgame/client/submission.go:361
↓ 1 callersMethodIncrementView
IncrementView PUT /doc/view?slug=... — best-effort view counter.
apps/api/internal/doc/handler/handler.go:73
↓ 1 callersMethodIncrementViewBySlug
IncrementViewBySlug bumps the view counter for a published doc (best-effort).
apps/api/internal/doc/service/service.go:280
↓ 1 callersMethodInitUploadWithBody
InitUploadWithBody request with any body
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:249
↓ 1 callersMethodInitUploadWithResponse
(ctx context.Context, body InitUploadJSONRequestBody, reqEditors ...RequestEditorFn)
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:668
↓ 1 callersMethodIsCommentVerifyEnabled
===== Admin Settings Check ===== Source of truth is the site_setting table via settingService (durable + audited), read directly — see internal/setti
apps/api/internal/patch/service/service.go:1717
↓ 1 callersMethodIsCreatorOnlyEnabled
IsCreatorOnlyEnabled reports the admin "仅创作者 / 版主 / 管理员可发布 Galgame" toggle. When on, the publish handlers reject users without creator / moderator / a
apps/api/internal/patch/service/service.go:1723
↓ 1 callersMethodIsFavorited
(userID, patchID int)
apps/api/internal/patch/service/service.go:1472
↓ 1 callersFunctionIsNotFound
IsNotFound reports whether an error from DeleteObject is "object not found".
apps/api/internal/infrastructure/storage/s3.go:121
↓ 1 callersMethodJoinRoomByLink
JoinRoomByLink joins a room via its link.
apps/api/internal/chat/service/service.go:42
↓ 1 callersMethodLatestMessagePerRoom
LatestMessagePerRoom passthrough for room-list last-message previews.
apps/api/internal/chat/service/service.go:94
↓ 1 callersMethodList
===== Public ===== List returns the published flat list + the category tree.
apps/api/internal/doc/service/service.go:77
↓ 1 callersMethodListAdmin
===== Admin =====
apps/api/internal/doc/service/service.go:289
↓ 1 callersMethodListArtifacts
ListArtifacts request
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:246
↓ 1 callersMethodListEcosystem
ListEcosystem returns the OAuth app-directory strip, served same-origin from moyu so the browser never has to cross-origin fetch the OAuth provider (w
apps/api/internal/auth/service/service.go:90
↓ 1 callersMethodListMembers
ListMembers returns all members of a room. The handler layer attaches the user briefs from OAuth /users/batch.
apps/api/internal/chat/repository/repository.go:230
↓ 1 callersMethodListMessages
─── Messages ─────────────────────────────────────── ListMessages GET /api/chat/room/:link/message?after=&limit=
apps/api/internal/chat/handler/handler.go:349
↓ 1 callersMethodListMessagesByIDsInRoom
ListMessagesByIDsInRoom returns the given messages that belong to roomID, ascending by id. Room-scoped so a member can't fetch arbitrary messages.
apps/api/internal/chat/repository/repository.go:192
↓ 1 callersMethodListPinned
ListPinned returns the pinned, published docs for the home carousel, newest first by the displayed `date`. We parse the date string for ordering rathe
apps/api/internal/doc/service/service.go:92
↓ 1 callersMethodListReactionsByMessageIDs
ListReactionsByMessageIDs returns all reactions for the given message ids, ordered by id so reaction chips render stably. The handler attaches the rea
apps/api/internal/chat/repository/repository.go:306
↓ 1 callersMethodListRoomsByUser
ListRoomsByUser lists rooms a user has joined that contain at least one live (non-deleted) message, ordered by last message time desc. Empty rooms ar
apps/api/internal/chat/repository/repository.go:39
↓ 1 callersMethodMessagesByIDs
(ids []int)
apps/api/internal/chat/service/service.go:225
↓ 1 callersMethodMetaBatch
MetaBatch fetches width/height/thumbhash for a batch of hashes in one roundtrip, keyed by hash. Hashes image_service doesn't know are simply absent fr
apps/api/pkg/imageclient/client.go:302
↓ 1 callersFunctionNew
(cfg Config)
apps/api/pkg/moemoepoint/client.go:45
↓ 1 callersFunctionNewClient
Creates a new Client, with reasonable defaults
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:203
↓ 1 callersFunctionNewCompleteUploadRequest
NewCompleteUploadRequest calls the generic CompleteUpload builder with application/json body
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:539
↓ 1 callersFunctionNewDeleteArtifactRequest
NewDeleteArtifactRequest generates requests for DeleteArtifact
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:471
↓ 1 callersFunctionNewDownloadArtifactRequest
NewDownloadArtifactRequest generates requests for DownloadArtifact
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:586
↓ 1 callersFunctionNewGetArtifactRequest
NewGetArtifactRequest generates requests for GetArtifact
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:505
↓ 1 callersFunctionNewHandler
(db *gorm.DB, wiki *galgameClient.Client, users *userclient.Client, art *artifactclient.Client, img *imageclie
apps/api/internal/common/handler.go:37
↓ 1 callersFunctionNewInitUploadRequest
NewInitUploadRequest calls the generic InitUpload builder with application/json body
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:431
↓ 1 callersFunctionNewListArtifactsRequest
NewListArtifactsRequest generates requests for ListArtifacts
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:365
↓ 1 callersMethodNewMetaResolver
NewMetaResolver builds a resolver over this client. timeout bounds the synchronous meta-batch call on the cold path (<= 0 → 3s default) so a slow or u
apps/api/pkg/imageclient/meta_resolver.go:34
← previousnext →201–300 of 1,135, ranked by callers