MCPcopy Create free account

hub / github.com/AleksK1NG/Go-Clean-Architecture-REST-API / functions

Functions480 in github.com/AleksK1NG/Go-Clean-Architecture-REST-API

↓ 54 callersFunctionLogResponseError
Error response with logging error for echo context
pkg/utils/http.go:119
↓ 50 callersFunctionErrorResponse
Error response
pkg/httpErrors/http_errors.go:197
↓ 36 callersMethodGetSize
Get OrderBy
pkg/utils/pagination.go:81
↓ 31 callersMethodErrorf
(template string, args ...interface{})
pkg/logger/zap_logger.go:22
↓ 30 callersMethodRun
()
internal/server/server.go:44
↓ 29 callersFunctionNewApiLogger
App Logger constructor
pkg/logger/zap_logger.go:36
↓ 28 callersFunctionGetRequestCtx
Get context with request id
pkg/utils/http.go:37
↓ 25 callersMethodError
()
pkg/httpErrors/http_errors.go:48
↓ 23 callersMethodUpdate
(ctx context.Context, news *models.News)
internal/news/usecase.go:16
↓ 22 callersMethodDelete
(ctx context.Context, newsID uuid.UUID)
internal/news/usecase.go:18
↓ 21 callersMethodGetPage
Get OrderBy
pkg/utils/pagination.go:76
↓ 19 callersFunctionNewUnauthorizedError
New Unauthorized Error
pkg/httpErrors/http_errors.go:120
↓ 18 callersFunctionGetRequestID
Get request id from echo context
pkg/utils/http.go:22
↓ 18 callersFunctionNewRestError
New Rest Error
pkg/httpErrors/http_errors.go:75
↓ 17 callersMethodCreate
(ctx context.Context, news *models.News)
internal/news/usecase.go:15
↓ 13 callersMethodRegister
(ctx context.Context, user *models.User)
internal/auth/usecase.go:15
↓ 12 callersMethodGetByID
(ctx context.Context, commentID uuid.UUID)
internal/comments/usecase.go:18
↓ 10 callersMethodError
(args ...interface{})
pkg/logger/zap_logger.go:21
↓ 10 callersFunctionGetHasMore
Get has more
pkg/utils/pagination.go:110
↓ 10 callersFunctionGetTotalPages
Get total pages int
pkg/utils/pagination.go:104
↓ 10 callersMethodInfo
(args ...interface{})
pkg/logger/zap_logger.go:17
↓ 10 callersMethodInfof
(template string, args ...interface{})
pkg/logger/zap_logger.go:18
↓ 9 callersMethodCreateSession
(ctx context.Context, session *models.Session, expire int)
internal/session/usecase.go:12
↓ 9 callersMethodEXPECT
EXPECT returns an object that allows the caller to indicate expected use
internal/auth/mock/pg_repository_mock.go:35
↓ 9 callersMethodGetByID
()
internal/news/delivery.go:9
↓ 9 callersMethodGetNewsByID
(ctx context.Context, newsID uuid.UUID)
internal/news/usecase.go:17
↓ 8 callersMethodEXPECT
EXPECT returns an object that allows the caller to indicate expected use
internal/news/mock/pg_repository_mock.go:35
↓ 8 callersFunctionNewAuthUseCase
Auth UseCase constructor
internal/auth/usecase/usecase.go:35
↓ 8 callersFunctionNewCommentsUseCase
Comments UseCase constructor
internal/comments/usecase/usecase.go:27
↓ 8 callersFunctionNewMockRepository
NewMockRepository creates a new mock instance
internal/auth/mock/pg_repository_mock.go:28
↓ 7 callersMethodEXPECT
EXPECT returns an object that allows the caller to indicate expected use
internal/comments/mock/pg_repository_mock.go:35
↓ 7 callersMethodFatal
(args ...interface{})
pkg/logger/zap_logger.go:25
↓ 7 callersFunctionNewAuthRepository
Auth Repository constructor
internal/auth/repository/pg_repository.go:23
↓ 7 callersFunctionNewMockRedisRepository
NewMockRedisRepository creates a new mock instance
internal/auth/mock/redis_repository_mock.go:26
↓ 6 callersMethodDeleteByID
(ctx context.Context, sessionID string)
internal/session/usecase.go:14
↓ 6 callersMethodFatalf
(template string, args ...interface{})
pkg/logger/zap_logger.go:26
↓ 6 callersMethodFindByName
(ctx context.Context, name string, query *utils.PaginationQuery)
internal/auth/usecase.go:20
↓ 6 callersMethodGetSessionByID
(ctx context.Context, sessionID string)
internal/session/usecase.go:13
↓ 6 callersMethodGetUsers
(ctx context.Context, pq *utils.PaginationQuery)
internal/auth/usecase.go:21
↓ 6 callersFunctionNewMockRepository
NewMockRepository creates a new mock instance
internal/news/mock/pg_repository_mock.go:28
↓ 6 callersFunctionNewNewsUseCase
News UseCase constructor
internal/news/usecase/usecase.go:34
↓ 6 callersMethodSanitizePassword
Sanitize user password
internal/models/user.go:52
↓ 5 callersFunctionAnyToBytesBuffer
Convert bytes to buffer helper
pkg/converter/converter.go:9
↓ 5 callersMethodDeleteNewsCtx
(ctx context.Context, key string)
internal/news/redis_repository.go:14
↓ 5 callersMethodDeleteUserCtx
(ctx context.Context, key string)
internal/auth/redis_repository.go:14
↓ 5 callersMethodFindByEmail
(ctx context.Context, user *models.User)
internal/auth/pg_repository.go:20
↓ 5 callersMethodGetAllByNewsID
(ctx context.Context, newsID uuid.UUID, query *utils.PaginationQuery)
internal/comments/usecase.go:19
↓ 5 callersMethodGetLimit
Get limit
pkg/utils/pagination.go:66
↓ 5 callersMethodGetNews
(ctx context.Context, pq *utils.PaginationQuery)
internal/news/usecase.go:19
↓ 5 callersMethodGetOffset
Get offset
pkg/utils/pagination.go:58
↓ 5 callersFunctionGetPaginationFromCtx
Get pagination query struct from
pkg/utils/pagination.go:90
↓ 5 callersMethodLogin
(ctx context.Context, user *models.User)
internal/auth/usecase.go:16
↓ 5 callersFunctionNewBadRequestError
New Bad Request Error
pkg/httpErrors/http_errors.go:102
↓ 5 callersFunctionNewInternalServerError
New Internal Server Error
pkg/httpErrors/http_errors.go:138
↓ 5 callersFunctionNewMockRedisRepository
NewMockRedisRepository creates a new mock instance
internal/news/mock/redis_repository_mock.go:26
↓ 5 callersFunctionNewMockRepository
NewMockRepository creates a new mock instance
internal/comments/mock/pg_repository_mock.go:28
↓ 5 callersMethodSearchByTitle
(ctx context.Context, title string, query *utils.PaginationQuery)
internal/news/usecase.go:20
↓ 4 callersMethodEXPECT
EXPECT returns an object that allows the caller to indicate expected use
internal/auth/mock/redis_repository_mock.go:33
↓ 4 callersMethodEXPECT
EXPECT returns an object that allows the caller to indicate expected use
internal/comments/mock/usecase_mock.go:35
↓ 4 callersMethodEXPECT
EXPECT returns an object that allows the caller to indicate expected use
internal/news/mock/redis_repository_mock.go:33
↓ 4 callersMethodGenerateUserKey
(userID string)
internal/auth/usecase/usecase.go:206
↓ 4 callersMethodGetNewsByIDCtx
(ctx context.Context, key string)
internal/news/redis_repository.go:12
↓ 4 callersFunctionNewSessionUseCase
New session use case constructor
internal/session/usecase/usecase.go:20
↓ 4 callersMethodSetNewsCtx
(ctx context.Context, key string, seconds int, news *models.NewsBase)
internal/news/redis_repository.go:13
↓ 4 callersMethodSetUserCtx
(ctx context.Context, key string, seconds int, user *models.User)
internal/auth/redis_repository.go:13
↓ 4 callersFunctionValidateIsOwner
Validate is user from owner of content
pkg/utils/auth.go:11
↓ 4 callersMethodgetKeyWithPrefix
(newsID string)
internal/news/usecase/usecase.go:154
↓ 3 callersMethodEXPECT
EXPECT returns an object that allows the caller to indicate expected use
internal/session/mock/redis_repository_mock.go:33
↓ 3 callersMethodEXPECT
EXPECT returns an object that allows the caller to indicate expected use
internal/session/mock/usecase_mock.go:33
↓ 3 callersMethodEXPECT
EXPECT returns an object that allows the caller to indicate expected use
internal/news/mock/usecase_mock.go:35
↓ 3 callersFunctionErrResponseWithLog
Error response with logging error for echo context
pkg/utils/http.go:108
↓ 3 callersMethodGetByIDCtx
(ctx context.Context, key string)
internal/auth/redis_repository.go:12
↓ 3 callersFunctionGetIPAddress
Get user ip address
pkg/utils/http.go:103
↓ 3 callersFunctionGetUserFromCtx
Get user from context
pkg/utils/http.go:93
↓ 3 callersFunctionNewAuthHandlers
NewAuthHandlers Auth handlers constructor
internal/auth/delivery/http/handlers.go:32
↓ 3 callersFunctionNewCommentsHandlers
NewCommentsHandlers Comments handlers constructor
internal/comments/delivery/http/hanldlers.go:26
↓ 3 callersFunctionNewCommentsRepository
Comments Repository constructor
internal/comments/repository/pg_repository.go:23
↓ 3 callersFunctionNewMockSessRepository
NewMockSessRepository creates a new mock instance
internal/session/mock/redis_repository_mock.go:26
↓ 3 callersFunctionNewMockUseCase
NewMockUseCase creates a new mock instance
internal/comments/mock/usecase_mock.go:28
↓ 3 callersFunctionNewMockUseCase
NewMockUseCase creates a new mock instance
internal/news/mock/usecase_mock.go:28
↓ 3 callersFunctionNewNewsHandlers
NewNewsHandlers News handlers constructor
internal/news/delivery/http/handlers.go:26
↓ 3 callersFunctionNewNewsRepository
News repository constructor
internal/news/repository/pg_repository.go:23
↓ 3 callersMethodPutObject
(ctx context.Context, input models.UploadInput)
internal/auth/aws_repository.go:14
↓ 3 callersFunctionReadRequest
Read request body and validate
pkg/utils/http.go:129
↓ 3 callersFunctionSetupRedis
()
internal/auth/repository/redis_repository_test.go:17
↓ 3 callersFunctionSetupRedis
()
internal/session/repository/redis_repository_test.go:17
↓ 3 callersFunctionSetupRedis
()
internal/news/repository/redis_repository_test.go:17
↓ 3 callersMethodUploadAvatar
(ctx context.Context, userID uuid.UUID, file models.UploadInput)
internal/auth/usecase.go:22
↓ 2 callersFunctionCreateSessionCookie
Configure jwt cookie
pkg/utils/http.go:64
↓ 2 callersMethodEXPECT
EXPECT returns an object that allows the caller to indicate expected use
internal/auth/mock/usecase_mock.go:35
↓ 2 callersFunctionGenerateJWTToken
Generate new JWT Token
pkg/utils/jwt.go:24
↓ 2 callersMethodGetOrderBy
Get OrderBy
pkg/utils/pagination.go:71
↓ 2 callersMethodLogout
()
internal/auth/delivery.go:9
↓ 2 callersFunctionMakeToken
Create CSRF token
pkg/csrf/csrf.go:18
↓ 2 callersMethodMapHandlers
Map Server Handlers
internal/server/handlers.go:32
↓ 2 callersFunctionNewForbiddenError
New Forbidden Error
pkg/httpErrors/http_errors.go:129
↓ 2 callersFunctionParseErrors
Parser of error string messages returns RestError
pkg/httpErrors/http_errors.go:148
↓ 2 callersMethodSanitize
Sanitize and read request body to ctx for next use in easy json
internal/middleware/sanitize.go:13
↓ 2 callersFunctionSanitizeJSON
Sanitize json
pkg/sanitize/sanitize.go:17
↓ 2 callersFunctionSanitizeRequest
Read sanitize and validate request
pkg/utils/http.go:151
next →1–100 of 480, ranked by callers