MCPcopy Create free account

hub / github.com/LAA-Software-Engineering/golang-rest-api-template / types & classes

Types & classes38 in github.com/LAA-Software-Engineering/golang-rest-api-template

StructBook
pkg/models/book.go:5
InterfaceBookHandler
BookHandler defines Gin handlers for book routes (HTTP layer only; persistence lives in pkg/repository).
pkg/api/books.go:27
InterfaceBookPersistence
go:generate go run -mod=mod go.uber.org/mock/mockgen@v0.6.0 -destination=mock_persistence.go -package=repository golang-rest-api-template/pkg/reposito
pkg/repository/book.go:8
StructBookService
BookService coordinates book reads/writes, list caching, and cache generation bumps.
pkg/service/book_service.go:35
InterfaceCache
Cache abstracts Redis operations used by the app. Book list caching invalidates via a monotonic generation counter (see pkg/service BooksListCacheGenK
pkg/cache/cache.go:21
StructClaims
Claims carries custom JWT fields plus registered (standard) JWT claims.
pkg/auth/auth.go:45
StructCreateBook
pkg/models/book.go:14
StructErrorBody
ErrorBody is the standard JSON error envelope for this API: {"error":"..."}.
pkg/httperr/httperr.go:6
StructGormBookStore
GormBookStore implements BookPersistence using GORM.
pkg/repository/book_gorm.go:12
StructGormUserStore
GormUserStore implements UserPersistence using GORM.
pkg/repository/user_gorm.go:14
StructHealthOKBody
HealthOKBody documents GET /api/v1/ 200 JSON (standard success envelope).
pkg/models/api_json.go:4
StructLoginAPIResponse
LoginAPIResponse documents POST /login 200 JSON.
pkg/models/api_json.go:9
StructLoginTokenBody
LoginTokenBody is the "data" object returned by POST /login on success.
pkg/models/user.go:11
StructLoginUser
pkg/models/user.go:5
StructMockBookPersistence
MockBookPersistence is a mock of BookPersistence interface.
pkg/repository/mock_persistence.go:20
StructMockBookPersistenceMockRecorder
MockBookPersistenceMockRecorder is the mock recorder for MockBookPersistence.
pkg/repository/mock_persistence.go:27
StructMockCache
MockCache is a mock of Cache interface.
pkg/cache/cache_mock.go:22
StructMockCacheMockRecorder
MockCacheMockRecorder is the mock recorder for MockCache.
pkg/cache/cache_mock.go:29
StructMockUserPersistence
MockUserPersistence is a mock of UserPersistence interface.
pkg/repository/mock_persistence.go:132
StructMockUserPersistenceMockRecorder
MockUserPersistenceMockRecorder is the mock recorder for MockUserPersistence.
pkg/repository/mock_persistence.go:139
StructPatchBook
PatchBook is the JSON body for PATCH /books/:id. Omitted JSON keys leave the field unchanged; the request must set at least one of title or author.
pkg/models/book.go:27
StructRegisterAPIResponse
RegisterAPIResponse documents POST /register 201 JSON.
pkg/models/api_json.go:14
StructRegisterSuccessBody
RegisterSuccessBody is the "data" object returned by POST /register on success.
pkg/models/user.go:16
StructReplaceBook
ReplaceBook is the JSON body for PUT /books/:id (full replace of title and author).
pkg/models/book.go:20
StructUser
pkg/models/user.go:20
InterfaceUserHandler
UserHandler defines Gin handlers for auth routes (HTTP layer only).
pkg/api/user.go:17
InterfaceUserPersistence
UserPersistence loads and stores users without HTTP or Gin.
pkg/repository/user.go:6
StructUserService
UserService handles authentication use-cases without Gin.
pkg/service/user_service.go:26
StructbookHandler
pkg/api/books.go:37
Structenvelope
pkg/httpresp/httpresp.go:9
StructerrTestStatus
pkg/api/book_routes_auth_test.go:224
StructfakeBookStore
pkg/service/book_service_test.go:20
StructfakeUserStore
pkg/service/user_service_test.go:19
Structitem
pkg/httpresp/httpresp_test.go:30
StructmongoAccessLogQueue
mongoAccessLogQueue buffers access-log documents and inserts them from a single worker so HTTP handlers do not block on MongoDB. If the buffer fills,
pkg/middleware/logger.go:23
InterfaceredisPinger
redisPinger matches *redis.Client without importing the concrete type in Cache.
pkg/api/probes.go:64
StructrequestIDContextKey
pkg/middleware/request_id.go:16
StructuserHandler
pkg/api/user.go:22