Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/KunMoe/kun-galgame-patch
/ functions
Functions
1,135 in github.com/KunMoe/kun-galgame-patch
⨍
Functions
1,135
◇
Types & classes
365
Function
TestOKMessage
(t *testing.T)
apps/api/pkg/response/response_test.go:42
Function
TestOptionalAuth_NoSession
(t *testing.T)
apps/api/internal/middleware/auth_test.go:69
Function
TestOptionalAuth_ValidSession
(t *testing.T)
apps/api/internal/middleware/auth_test.go:88
Function
TestPaginated
(t *testing.T)
apps/api/pkg/response/response_test.go:61
Function
TestPagination_Offset
(t *testing.T)
apps/api/pkg/utils/validate_test.go:117
Function
TestParseAndValidate_InvalidEmail
(t *testing.T)
apps/api/pkg/utils/validate_test.go:60
Function
TestParseAndValidate_MissingRequired
(t *testing.T)
apps/api/pkg/utils/validate_test.go:41
Function
TestParseAndValidate_Valid
(t *testing.T)
apps/api/pkg/utils/validate_test.go:22
Function
TestParseQueryAndValidate_Invalid
(t *testing.T)
apps/api/pkg/utils/validate_test.go:101
Function
TestParseQueryAndValidate_Valid
(t *testing.T)
apps/api/pkg/utils/validate_test.go:85
Function
TestPatchComment_TableName
(t *testing.T)
apps/api/internal/patch/model/model_test.go:86
Function
TestPatchResource_TableName
(t *testing.T)
apps/api/internal/patch/model/model_test.go:82
Function
TestPatch_TableName
(t *testing.T)
apps/api/internal/patch/model/model_test.go:78
Function
TestRateLimit_AllowsWithinLimit
(t *testing.T)
apps/api/internal/middleware/ratelimit_test.go:16
Function
TestRateLimit_BlocksOverLimit
(t *testing.T)
apps/api/internal/middleware/ratelimit_test.go:32
Function
TestRenderEmptyString
(t *testing.T)
apps/api/internal/infrastructure/markdown/markdown_test.go:67
Function
TestRenderGFMStrikethrough
(t *testing.T)
apps/api/internal/infrastructure/markdown/markdown_test.go:150
Function
TestRenderSanitizesRawHTML
TestRenderSanitizesRawHTML locks the server-side XSS boundary: goldmark runs with WithUnsafe (raw user HTML passes through) and the bluemonday allow-l
apps/api/internal/infrastructure/markdown/markdown_test.go:84
Function
TestRenderStripsDangerousURLs
TestRenderStripsDangerousURLs locks goldmark's html.IsDangerousURL behavior for markdown links/images: javascript:/vbscript:/data: destinations must b
apps/api/internal/infrastructure/markdown/markdown_test.go:133
Function
TestRenderWithTOCChineseHeadings
(t *testing.T)
apps/api/internal/infrastructure/markdown/markdown_test.go:157
Function
TestRenderWithTOCDuplicateHeadings
(t *testing.T)
apps/api/internal/infrastructure/markdown/markdown_test.go:199
Function
TestRenderWithTOCSkipsHeadingsBeyondLevel3
(t *testing.T)
apps/api/internal/infrastructure/markdown/markdown_test.go:214
Function
TestRequireRole_InsufficientRole
(t *testing.T)
apps/api/internal/middleware/auth_test.go:105
Function
TestRequireRole_SufficientRole
(t *testing.T)
apps/api/internal/middleware/auth_test.go:125
Function
TestSanitizePreservesRichContent
TestSanitizePreservesRichContent is the companion to the XSS test: the allow-list must NOT strip anything this package's renderers legitimately emit,
apps/api/internal/infrastructure/markdown/markdown_test.go:109
Function
TestSearch_ReturnsResults
(t *testing.T)
apps/api/pkg/userclient/client_test.go:147
Function
TestUserPatchFavoriteRelation_TableName
(t *testing.T)
apps/api/internal/patch/model/model_test.go:90
Function
TestUser_ReturnsNilOnNotFound
(t *testing.T)
apps/api/pkg/userclient/client_test.go:135
Function
TestUsers_CacheHitSecondCall
(t *testing.T)
apps/api/pkg/userclient/client_test.go:19
Function
TestUsers_DedupesAndIgnoresZero
(t *testing.T)
apps/api/pkg/userclient/client_test.go:67
Function
TestUsers_NotFoundExpires
(t *testing.T)
apps/api/pkg/userclient/client_test.go:52
Function
TestUsers_NotFoundIsNegativeCached
(t *testing.T)
apps/api/pkg/userclient/client_test.go:35
Function
TestUsers_ShardsLargeBatch
(t *testing.T)
apps/api/pkg/userclient/client_test.go:84
Function
TestUsers_SingleflightCoalescesConcurrentMiss
(t *testing.T)
apps/api/pkg/userclient/client_test.go:112
Method
ToggleCommentLike
(commentID, userID int)
apps/api/internal/patch/service/service.go:762
Method
ToggleCommentLike
ToggleCommentLike PUT /api/patch/comment/:commentId/like
apps/api/internal/patch/handler/handler.go:423
Method
ToggleFavorite
===== Favorites =====
apps/api/internal/patch/service/service.go:1432
Method
ToggleFavorite
===== Favorites ===== ToggleFavorite PUT /api/patch/:id/favorite
apps/api/internal/patch/handler/handler.go:748
Method
ToggleReaction
ToggleReaction toggles an emoji reaction.
apps/api/internal/chat/service/service.go:172
Method
ToggleReaction
─── Reactions ────────────────────────────────────── ToggleReaction toggles an emoji reaction. added=true means added, false means removed.
apps/api/internal/chat/repository/repository.go:284
Method
ToggleReaction
ToggleReaction POST /api/chat/message/:id/reaction
apps/api/internal/chat/handler/handler.go:452
Method
ToggleResourceDisable
ToggleResourceDisable flips a resource between enabled (status 0, downloadable) and disabled (status 1, download link blocked — used to pull a virus-i
apps/api/internal/patch/service/service.go:1302
Method
ToggleResourceDisable
ToggleResourceDisable PUT /api/patch/resource/:resourceId/disable
apps/api/internal/patch/handler/handler.go:630
Method
ToggleResourceFavorite
ToggleResourceFavorite subscribes / unsubscribes the user to a SINGLE resource's updates. Unlike ToggleResourceLike there is no public count and no mo
apps/api/internal/patch/service/service.go:1395
Method
ToggleResourceFavorite
ToggleResourceFavorite PUT /api/patch/resource/:resourceId/favorite Per-resource SUBSCRIPTION — distinct from the resource LIKE (appreciation) and th
apps/api/internal/patch/handler/handler.go:727
Method
ToggleResourceLike
(resourceID, userID int)
apps/api/internal/patch/service/service.go:1359
Method
ToggleResourceLike
ToggleResourceLike PUT /api/patch/resource/:resourceId/like
apps/api/internal/patch/handler/handler.go:706
Method
Transform
(doc *ast.Document, _ text.Reader, pc parser.Context)
apps/api/internal/infrastructure/markdown/markdown.go:207
Method
Unfollow
Unfollow removes a follow relation and decrements counts ONLY when a relation actually existed. Without the rows-affected guard, calling unfollow on a
apps/api/internal/user/service/service.go:167
Method
Unfollow
Unfollow DELETE /api/user/:id/follow
apps/api/internal/user/handler/handler.go:247
Method
Update
(id int, fields map[string]any)
apps/api/internal/doc/repository/repository.go:47
Method
UpdateComment
(commentID, userID int, content string)
apps/api/internal/patch/service/service.go:691
Method
UpdateComment
(comment *model.PatchComment)
apps/api/internal/patch/repository/repository.go:235
Method
UpdateComment
UpdateComment PUT /api/patch/comment/:commentId
apps/api/internal/patch/handler/handler.go:370
Method
UpdateComment
(commentID int, content string, adminUID int)
apps/api/internal/admin/service/service.go:52
Method
UpdateComment
(commentID int, content string)
apps/api/internal/admin/repository/repository.go:59
Method
UpdateComment
UpdateComment PUT /api/admin/comment/:id
apps/api/internal/admin/handler/handler.go:138
Method
UpdateGalgame
UpdateGalgame proxies PUT /galgame/:gid. Returns the raw `data` payload (left as RawMessage so callers can re-wrap without an extra unmarshal). On a n
apps/api/internal/galgame/client/client.go:643
Method
UpdateLastLoginTime
UpdateLastLoginTime stamps last_login_time on the local row.
apps/api/internal/auth/repository/repository.go:43
Method
UpdateMe
─── OAuth display-layer proxy ──────────────────────────────────────── Only name / bio / avatar are proxied — these are 展示层 per the 2026-05-23 OAuth p
apps/api/internal/auth/handler/handler.go:167
Method
UpdateMessage
UpdateMessage edits a message. Only the sender may edit.
apps/api/internal/chat/service/service.go:144
Method
UpdateMessage
UpdateMessage PUT /api/chat/message/:id
apps/api/internal/chat/handler/handler.go:419
Method
UpdatePatch
UpdatePatch: after D13, patch.id IS the Wiki galgame_id, so changing vndb_id to one that resolves to a different galgame_id would require remapping pa
apps/api/internal/patch/service/service.go:413
Method
UpdatePatch
(patch *model.Patch)
apps/api/internal/patch/repository/repository.go:70
Method
UpdatePatch
UpdatePatch PUT /api/patch/:id After D12 this only permits "rebinding vndb_id": the owner may rebind their own patch; rebinding someone else's requir
apps/api/internal/patch/handler/handler.go:221
Method
UpdatePost
UpdatePost PUT /admin/doc/:id
apps/api/internal/doc/handler/handler.go:123
Method
UpdateResource
UpdateResource mutates a resource in place. When the FILE fields (Storage / S3Key / Content) differ from the current row, an append-only history row i
apps/api/internal/patch/service/service.go:987
Method
UpdateResource
UpdateResource PUT /api/patch/resource/:resourceId
apps/api/internal/patch/handler/handler.go:560
Method
UpdateResource
(resourceID int, note string, adminUID int)
apps/api/internal/admin/service/service.go:78
Method
UpdateResource
(resourceID int, note string)
apps/api/internal/admin/repository/repository.go:109
Method
UpdateResource
UpdateResource PUT /api/admin/resource/:id
apps/api/internal/admin/handler/handler.go:189
Method
UpdateWikiMessagesReadState
UpdateWikiMessagesReadState PUT /api/v1/galgame/messages/read-state Body: { "last_read_message_id": int64 }. We only move forward — submitting a smal
apps/api/internal/patch/handler/handler.go:1173
Method
UploadAvatar
UploadAvatar POST /api/v1/auth/me/avatar Proxies multipart → OAuth POST /auth/me/avatar (OAuth handles image_service upload internally and writes avat
apps/api/internal/auth/handler/handler.go:183
Method
UploadImage
UpdateAvatar was removed -- avatars are owned by OAuth/image_service. UploadImage POST /api/user/image Images used on the user's personal page. Rate-l
apps/api/internal/user/handler/handler.go:364
Method
UploadImageService
UploadImageService POST /api/upload/image-service Proxies a multipart image upload to the centralized image_service (kun-galgame-infra :9278) and ret
apps/api/internal/common/upload/handler.go:119
Method
Value
()
apps/api/internal/patch/model/model.go:440
Method
WikiPRSubmit
WikiPRSubmit handles POST /api/v1/galgame/:gid/prs. Like Submit/Update it accepts JSON or multipart/form-data (`data` JSON + optional `file` banner) s
apps/api/internal/patch/handler/galgame_edit.go:207
Method
WikiTaxonomyDetailProxy
WikiTaxonomyDetailProxy specializes WikiEditProxy for /tag/:name and official/:name: it forwards to Wiki same as the generic proxy, then rewrites the
apps/api/internal/patch/handler/galgame_edit.go:100
Function
WithBaseURL
WithBaseURL overrides the baseURL.
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:649
Function
WithHTTPClient
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client. This is useful for tests.
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:227
Function
WithRequestEditorFn
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request. This can be used to mutate the reque
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:236
Function
ackNsfw
(id: number)
apps/web/app/stores/settingStore.ts:89
Function
bbcodeToText
(bbcode: string | undefined)
apps/web/app/shared/utils/bbcodeToText.ts:1
Method
briefsToUserBasic
briefsToUserBasic batches an id list through OAuth and returns the wire shape. IDs missing on OAuth are silently dropped from the result.
apps/api/internal/user/service/service.go:242
Function
camelToSnakeCase
(str: string)
apps/web/app/shared/utils/format.ts:36
Function
chatStickerArray
()
apps/web/app/shared/utils/chatStickers.ts:3
Function
clear
()
apps/web/app/stores/messageStore.ts:18
Function
clearAll
()
apps/web/app/composables/useKnownAccounts.ts:93
Function
cn
(...inputs: ClassValue[])
apps/web/app/shared/utils/cn.ts:4
Function
consumeOAuthReturnTo
()
apps/web/app/shared/utils/pkce.ts:220
Function
createAlias
(gid: number, name: string)
apps/web/app/composables/useGalgameEdit.ts:261
Function
createEngine
(body: { name: string description?: string alias?: string[] })
apps/web/app/composables/useGalgameEdit.ts:333
Function
createLink
(gid: number, body: { name: string; link: string })
apps/web/app/composables/useGalgameEdit.ts:254
Function
createOfficial
(body: { name: string category: string original?: string link?: string lang?: string d
apps/web/app/composables/useGalgameEdit.ts:305
Function
createSeries
(body: { name: string description?: string galgame_ids: number[] })
apps/web/app/composables/useGalgameEdit.ts:358
Function
createTag
(body: { name: string category: string description?: string alias?: string[] })
apps/web/app/composables/useGalgameEdit.ts:271
Function
dataURItoBlob
(dataURI: string)
apps/web/app/shared/utils/dataURItoBlob.ts:1
Function
debounce
( fn: F, time: number )
apps/web/app/shared/utils/debounce.ts:5
Function
declinePR
(gid: number, prid: number)
apps/web/app/composables/useGalgameEdit.ts:248
Function
deleteAlias
(gid: number, id: number)
apps/web/app/composables/useGalgameEdit.ts:263
← previous
next →
901–1,000 of 1,135, ranked by callers