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
Method
IncrementView
IncrementView PUT /api/patch/:id/view
apps/api/internal/patch/handler/handler.go:275
Function
Init
(mode string)
apps/api/pkg/logger/logger.go:8
Method
Init
Init validates, then asks the artifact service to start an upload. Artifact returns the presigned single-PUT URL or the multipart parts (server-driven
apps/api/internal/common/upload/service.go:112
Method
InitUpload
InitUpload reserves quota + creates the artifact row, returning the presigned upload URL(s) for the browser to PUT directly to B2.
apps/api/pkg/artifactclient/client.go:159
Method
InitUpload
(ctx context.Context, body InitUploadJSONRequestBody, reqEditors ...RequestEditorFn)
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:292
Method
InitUploadWithBody
(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn)
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:280
Method
InitUploadWithBodyWithResponse
InitUploadWithBodyWithResponse request with any body
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:666
Method
InitUploadWithBodyWithResponse
InitUploadWithBodyWithResponse request with arbitrary body returning *InitUploadResp
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:881
Method
InitUploadWithResponse
(ctx context.Context, body InitUploadJSONRequestBody, reqEditors ...RequestEditorFn)
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:889
Function
IsAdmin
IsAdmin reports whether the caller holds a super-admin role (admin or ren).
apps/api/internal/middleware/auth.go:337
Function
IsModerator
IsModerator reports whether the caller can moderate: super-admins or moderators.
apps/api/internal/middleware/auth.go:340
Function
IsNotFound
IsNotFound exposes an ErrRecordNotFound check for callers to distinguish business errors.
apps/api/internal/chat/service/service.go:230
Method
IsResourceFavorited
(userID, resourceID int)
apps/api/internal/patch/service/service.go:1425
Method
JoinRoom
JoinRoom POST /api/chat/room/join
apps/api/internal/chat/handler/handler.go:312
Method
LatestMessagePerRoom
LatestMessagePerRoom returns the most recent message of each given room, keyed by chat_room_id. One query (id IN max-per-room subquery) — no N+1. Used
apps/api/internal/chat/repository/repository.go:206
Method
ListArtifacts
(ctx context.Context, params *ListArtifactsParams, reqEditors ...RequestEditorFn)
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:268
Method
ListArtifactsWithResponse
ListArtifactsWithResponse request
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:663
Method
ListArtifactsWithResponse
ListArtifactsWithResponse request returning *ListArtifactsResp
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:872
Method
ListMessages
─── Message ──────────────────────────────────────── ListMessages returns a page of messages, always in ascending id order so the frontend can append/
apps/api/internal/chat/repository/repository.go:158
Method
ListMyGalgames
ListMyGalgames proxies GET /galgame/mine. Status filter is csv (default "3,4" when the caller passes an empty string).
apps/api/internal/galgame/client/submission.go:214
Method
ListMyGalgames
ListMyGalgames GET /api/v1/galgame/mine
apps/api/internal/patch/handler/handler.go:1103
Method
ListPinnedPosts
ListPinnedPosts GET /doc/pinned — pinned published docs for the home carousel, newest first by display date.
apps/api/internal/doc/handler/handler.go:48
Method
ListPosts
===== Public ===== ListPosts GET /doc/posts — published flat list + category tree.
apps/api/internal/doc/handler/handler.go:38
Method
ListRooms
─── Room ─────────────────────────────────────────── ListRooms lists all rooms the user has joined.
apps/api/internal/chat/service/service.go:31
Method
ListRooms
─── Room ─────────────────────────────────────────── ListRooms GET /api/chat/room Enriches each room with: the last-message text preview, and — for P
apps/api/internal/chat/handler/handler.go:183
Function
Load
()
apps/api/pkg/config/config.go:99
Method
LocateComment
LocateComment resolves a comment id to its page in the root-comment listing. limit MUST match the list's page size (clamped to the same 1..30 bound).
apps/api/internal/patch/service/service.go:1606
Method
LocateComment
LocateComment GET /api/patch/comment/:commentId/locate?limit=N Resolves a comment id to {page, root_id, is_reply, galgame_id} in the paginated root-c
apps/api/internal/patch/handler/handler.go:474
Method
Log
Log reads a page of the user's moemoepoint ledger from OAuth (the source of truth — moyu keeps no local ledger). Read-only passthrough to the s2s endp
apps/api/pkg/moemoepoint/awarder.go:60
Method
Logout
Logout POST /api/v1/auth/logout Best-effort: revoke the OAuth refresh_token on the upstream OAuth server (per its implementation, /oauth/revoke looks
apps/api/internal/auth/handler/handler.go:109
Method
LookupPatchesByIDs
(ids []int)
apps/api/internal/user/service/service.go:47
Method
LookupPatchesByIDs
(ids []int)
apps/api/internal/common/handler.go:81
Method
LookupPatchesByIDs
LookupPatchesByIDs makes AdminService satisfy enricher.PatchSummaryDB, so the handler can attach galgame name/banner summaries to comment/resource lis
apps/api/internal/admin/service/service.go:199
Method
LookupPatchesByIDs
LookupPatchesByIDs returns the minimal patch projection (id + vndb_id) for a set of ids. Satisfies enricher.PatchSummaryDB so admin list endpoints can
apps/api/internal/admin/repository/repository.go:247
Method
MarkAsRead
MarkAsRead marks messages of a given type (or all) as read
apps/api/internal/message/service/service.go:27
Method
MarkAsRead
MarkAsRead marks messages as read by type (or all if type is "all")
apps/api/internal/message/repository/repository.go:54
Method
MarkAsRead
MarkAsRead PUT /api/message/read
apps/api/internal/message/handler/handler.go:184
Method
MarkSeen
MarkSeen marks messages as seen in bulk.
apps/api/internal/chat/service/service.go:192
Method
MarkSeen
─── Seen ─────────────────────────────────────────── MarkSeen writes seen markers in bulk. Duplicate inserts are ignored via OnConflict DoNothing.
apps/api/internal/chat/repository/repository.go:328
Method
MarkSeen
MarkSeen PUT /api/chat/room/:link/seen
apps/api/internal/chat/handler/handler.go:472
Function
MaybeProbe
MaybeProbe runs the `healthcheck` subcommand and exits the process, or returns immediately when not invoked that way. It is a no-op unless os.Args[1]
apps/api/pkg/health/health.go:28
Method
Me
Me GET /api/v1/auth/me Composes identity (userID/sub/roles from session+JWT), display fields (name/avatar/bio from OAuth /users/batch), and site-loca
apps/api/internal/auth/handler/handler.go:143
Function
MustGetUser
(c fiber.Ctx)
apps/api/internal/middleware/auth.go:271
Function
MustRender
MustRender returns the original text on render failure (as a fallback).
apps/api/internal/infrastructure/markdown/markdown.go:391
Function
New
New constructs a Client. Empty BaseURL/credentials = no-op client whose calls return ErrNotConfigured, so the caller can degrade gracefully in dev.
apps/api/pkg/artifactclient/client.go:123
Function
New
New constructs a Client. Empty BaseURL = no-op client (Upload returns error quickly so the caller can degrade gracefully when image_service is intenti
apps/api/pkg/imageclient/client.go:71
Function
New
(repo *repository.AuthRepository, rdb *redis.Client, oauthCfg config.OAuthConfig)
apps/api/internal/auth/service/service.go:54
Function
New
(db *gorm.DB)
apps/api/internal/auth/repository/repository.go:17
Function
New
(svc *service.AuthService, rdb *redis.Client, db *gorm.DB, users *userclient.Client)
apps/api/internal/auth/handler/handler.go:35
Function
New
(repo *repository.UserRepository, s3 *storage.S3Client, users *userclient.Client, wiki *galgameClient.Client,
apps/api/internal/user/service/service.go:39
Function
New
(db *gorm.DB)
apps/api/internal/user/repository/repository.go:17
Function
New
(svc *service.UserService, wiki *galgameClient.Client, users *userclient.Client)
apps/api/internal/user/handler/handler.go:44
Function
New
New constructs a Client. baseURL looks like http://127.0.0.1:9280/api
apps/api/internal/galgame/client/client.go:49
Function
New
(repo *repository.ChatRepository)
apps/api/internal/chat/service/service.go:24
Function
New
(db *gorm.DB)
apps/api/internal/chat/repository/repository.go:17
Function
New
(svc *service.ChatService, users *userclient.Client)
apps/api/internal/chat/handler/handler.go:31
Function
New
(cfg *config.Config)
apps/api/internal/app/app.go:76
Function
New
New constructs a Handler.
apps/api/internal/common/search/search.go:30
Function
New
New constructs a Service. rdb may be nil in tests (idempotency then degrades to best-effort).
apps/api/internal/common/upload/service.go:46
Function
New
(db *gorm.DB)
apps/api/internal/setting/service/service.go:30
Function
New
(repo *repository.DocRepository, img *imageclient.Client, users *userclient.Client)
apps/api/internal/doc/service/service.go:42
Function
New
(db *gorm.DB)
apps/api/internal/doc/repository/repository.go:14
Function
New
(svc *service.DocService)
apps/api/internal/doc/handler/handler.go:23
Function
New
(repo *repository.PatchRepository, setting *settingService.Service, db *gorm.DB, s3 *storage.S3Client, art *ar
apps/api/internal/patch/service/service.go:58
Function
New
(db *gorm.DB)
apps/api/internal/patch/repository/repository.go:17
Function
New
(svc *service.PatchService, wiki *galgameClient.Client, users *userclient.Client)
apps/api/internal/patch/handler/handler.go:38
Function
New
(repo *repository.MessageRepository)
apps/api/internal/message/service/service.go:12
Function
New
(db *gorm.DB)
apps/api/internal/message/repository/repository.go:13
Function
New
(svc *service.MessageService, users *userclient.Client, wiki *galgameClient.Client)
apps/api/internal/message/handler/handler.go:28
Function
New
(repo *repository.AdminRepository, rdb *redis.Client, setting *settingService.Service, s3 *storage.S3Client, p
apps/api/internal/admin/service/service.go:36
Function
New
(db *gorm.DB)
apps/api/internal/admin/repository/repository.go:27
Function
New
(svc *service.AdminService, wiki *galgameClient.Client, users *userclient.Client)
apps/api/internal/admin/handler/handler.go:29
Function
NewAwarder
(client *Client, db *gorm.DB)
apps/api/pkg/moemoepoint/awarder.go:18
Function
NewClientWithResponses
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling
apps/api/pkg/artifactclient/gen/artifact_client.gen.go:640
Function
NewHandler
NewHandler constructs a Handler. img/wiki may be nil in tests.
apps/api/internal/common/upload/handler.go:30
Function
NewPostgres
(cfg config.DatabaseConfig, mode string)
apps/api/internal/infrastructure/database/postgres.go:14
Function
NewRedis
(cfg config.RedisConfig)
apps/api/internal/infrastructure/cache/redis.go:13
Function
NewS3
NewS3 initializes a client from config. When cfg.Endpoint is empty it returns a disabled placeholder (so dev can start without S3).
apps/api/internal/infrastructure/storage/s3.go:35
Function
NewTestApp
NewTestApp creates a minimal Fiber app with miniredis
apps/api/internal/testutil/testutil.go:34
Method
OAuthCallback
OAuthCallback POST /api/v1/auth/oauth/callback Exchanges the authorization code for tokens, fetches user identity from oauth/userinfo, ensures a loca
apps/api/internal/auth/handler/handler.go:44
Function
OK
(c fiber.Ctx, data any)
apps/api/pkg/response/response.go:21
Function
OKMessage
(c fiber.Ctx, msg string)
apps/api/pkg/response/response.go:29
Function
OptionalAuth
(rdb *redis.Client, oauthCfg config.OAuthConfig)
apps/api/internal/middleware/auth.go:204
Function
Paginate
(page, limit int)
apps/api/pkg/utils/pagination.go:14
Function
Paginated
Paginated emits { code, message, data: { items, total } }. Nullish items are normalized to an empty slice to keep the shape stable for the frontend.
apps/api/pkg/response/response.go:39
Function
ParseAndValidate
(c fiber.Ctx, out any)
apps/api/pkg/utils/validate.go:13
Function
ParseMonthSet
ParseMonthSet parses the released_months CSV (e.g. "3,7,12") into a sorted, deduped []int of months 1-12, per docs/galgame_wiki/00-handbook §17.10. It
apps/api/pkg/utils/release_date.go:36
Function
ParsePaginatedResponse
ParsePaginatedResponse reads and parses the paginated JSON response body.
apps/api/internal/testutil/testutil.go:136
Function
ParseQueryAndValidate
(c fiber.Ctx, out any)
apps/api/pkg/utils/validate.go:20
Function
ParseReleaseLowerBound
ParseReleaseLowerBound parses released_from into an inclusive lower date bound. "" → (nil, nil) meaning "no lower bound". YYYY → Jan 1 of that year; Y
apps/api/pkg/utils/release_date.go:66
Function
ParseReleaseUpperBound
ParseReleaseUpperBound parses released_to into an inclusive upper date bound. "" → (nil, nil). YYYY → Dec 31 of that year; YYYY-MM → the last day of t
apps/api/pkg/utils/release_date.go:89
Function
ParseResponse
ParseResponse reads and parses the JSON response body
apps/api/internal/testutil/testutil.go:110
Function
ParseWikiReleaseDate
ParseWikiReleaseDate turns Wiki's release_date string into a date-only *time.Time for storage in patch.release_date. "" / nil / unparseable → nil (bes
apps/api/pkg/utils/release_date.go:121
Method
PatchGalgameDraft
PatchGalgameDraft proxies PATCH /galgame/:gid (status ∈ {3,4}). Editing a declined draft auto-flips it back to pending review.
apps/api/internal/galgame/client/submission.go:163
Method
PatchGalgameDraft
PatchGalgameDraft PATCH /api/v1/galgame/:gid Edit one's own pending/declined draft. Wiki auto-flips status=4 back to 3. Same dual-content-type as Sub
apps/api/internal/patch/handler/handler.go:1046
Method
PurgeUser
PurgeUser wipes every moyu-side trace of the user, then best-effort deletes the orphaned S3 objects (same philosophy as DeleteResource / DeletePatch:
apps/api/internal/admin/service/service.go:139
Method
PurgeUser
PurgeUser wipes every moyu-side trace of a user in one transaction, then the service does best-effort S3 cleanup with the keys from CollectUserS3Keys.
apps/api/internal/admin/repository/repository.go:499
Method
PurgeUser
PurgeUser POST /api/admin/user/:id/purge body: { purge_owned_patches: bool } Irreversibly removes every moyu-side trace of the user (comments, reso
apps/api/internal/admin/handler/handler.go:246
Method
Put
Put pre-seeds the cache (e.g. from an upload result, which already carries the metadata) so the first render of a freshly uploaded image needs no netw
apps/api/pkg/imageclient/meta_resolver.go:90
Function
RateLimit
(rdb *redis.Client, prefix string, maxRequests int, window time.Duration)
apps/api/internal/middleware/ratelimit.go:15
← previous
next →
701–800 of 1,135, ranked by callers