Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/AleksK1NG/Go-Clean-Architecture-REST-API
/ functions
Functions
480 in github.com/AleksK1NG/Go-Clean-Architecture-REST-API
⨍
Functions
480
◇
Types & classes
90
↓ 54 callers
Function
LogResponseError
Error response with logging error for echo context
pkg/utils/http.go:119
↓ 50 callers
Function
ErrorResponse
Error response
pkg/httpErrors/http_errors.go:197
↓ 36 callers
Method
GetSize
Get OrderBy
pkg/utils/pagination.go:81
↓ 31 callers
Method
Errorf
(template string, args ...interface{})
pkg/logger/zap_logger.go:22
↓ 30 callers
Method
Run
()
internal/server/server.go:44
↓ 29 callers
Function
NewApiLogger
App Logger constructor
pkg/logger/zap_logger.go:36
↓ 28 callers
Function
GetRequestCtx
Get context with request id
pkg/utils/http.go:37
↓ 25 callers
Method
Error
()
pkg/httpErrors/http_errors.go:48
↓ 23 callers
Method
Update
(ctx context.Context, news *models.News)
internal/news/usecase.go:16
↓ 22 callers
Method
Delete
(ctx context.Context, newsID uuid.UUID)
internal/news/usecase.go:18
↓ 21 callers
Method
GetPage
Get OrderBy
pkg/utils/pagination.go:76
↓ 19 callers
Function
NewUnauthorizedError
New Unauthorized Error
pkg/httpErrors/http_errors.go:120
↓ 18 callers
Function
GetRequestID
Get request id from echo context
pkg/utils/http.go:22
↓ 18 callers
Function
NewRestError
New Rest Error
pkg/httpErrors/http_errors.go:75
↓ 17 callers
Method
Create
(ctx context.Context, news *models.News)
internal/news/usecase.go:15
↓ 13 callers
Method
Register
(ctx context.Context, user *models.User)
internal/auth/usecase.go:15
↓ 12 callers
Method
GetByID
(ctx context.Context, commentID uuid.UUID)
internal/comments/usecase.go:18
↓ 10 callers
Method
Error
(args ...interface{})
pkg/logger/zap_logger.go:21
↓ 10 callers
Function
GetHasMore
Get has more
pkg/utils/pagination.go:110
↓ 10 callers
Function
GetTotalPages
Get total pages int
pkg/utils/pagination.go:104
↓ 10 callers
Method
Info
(args ...interface{})
pkg/logger/zap_logger.go:17
↓ 10 callers
Method
Infof
(template string, args ...interface{})
pkg/logger/zap_logger.go:18
↓ 9 callers
Method
CreateSession
(ctx context.Context, session *models.Session, expire int)
internal/session/usecase.go:12
↓ 9 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
internal/auth/mock/pg_repository_mock.go:35
↓ 9 callers
Method
GetByID
()
internal/news/delivery.go:9
↓ 9 callers
Method
GetNewsByID
(ctx context.Context, newsID uuid.UUID)
internal/news/usecase.go:17
↓ 8 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
internal/news/mock/pg_repository_mock.go:35
↓ 8 callers
Function
NewAuthUseCase
Auth UseCase constructor
internal/auth/usecase/usecase.go:35
↓ 8 callers
Function
NewCommentsUseCase
Comments UseCase constructor
internal/comments/usecase/usecase.go:27
↓ 8 callers
Function
NewMockRepository
NewMockRepository creates a new mock instance
internal/auth/mock/pg_repository_mock.go:28
↓ 7 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
internal/comments/mock/pg_repository_mock.go:35
↓ 7 callers
Method
Fatal
(args ...interface{})
pkg/logger/zap_logger.go:25
↓ 7 callers
Function
NewAuthRepository
Auth Repository constructor
internal/auth/repository/pg_repository.go:23
↓ 7 callers
Function
NewMockRedisRepository
NewMockRedisRepository creates a new mock instance
internal/auth/mock/redis_repository_mock.go:26
↓ 6 callers
Method
DeleteByID
(ctx context.Context, sessionID string)
internal/session/usecase.go:14
↓ 6 callers
Method
Fatalf
(template string, args ...interface{})
pkg/logger/zap_logger.go:26
↓ 6 callers
Method
FindByName
(ctx context.Context, name string, query *utils.PaginationQuery)
internal/auth/usecase.go:20
↓ 6 callers
Method
GetSessionByID
(ctx context.Context, sessionID string)
internal/session/usecase.go:13
↓ 6 callers
Method
GetUsers
(ctx context.Context, pq *utils.PaginationQuery)
internal/auth/usecase.go:21
↓ 6 callers
Function
NewMockRepository
NewMockRepository creates a new mock instance
internal/news/mock/pg_repository_mock.go:28
↓ 6 callers
Function
NewNewsUseCase
News UseCase constructor
internal/news/usecase/usecase.go:34
↓ 6 callers
Method
SanitizePassword
Sanitize user password
internal/models/user.go:52
↓ 5 callers
Function
AnyToBytesBuffer
Convert bytes to buffer helper
pkg/converter/converter.go:9
↓ 5 callers
Method
DeleteNewsCtx
(ctx context.Context, key string)
internal/news/redis_repository.go:14
↓ 5 callers
Method
DeleteUserCtx
(ctx context.Context, key string)
internal/auth/redis_repository.go:14
↓ 5 callers
Method
FindByEmail
(ctx context.Context, user *models.User)
internal/auth/pg_repository.go:20
↓ 5 callers
Method
GetAllByNewsID
(ctx context.Context, newsID uuid.UUID, query *utils.PaginationQuery)
internal/comments/usecase.go:19
↓ 5 callers
Method
GetLimit
Get limit
pkg/utils/pagination.go:66
↓ 5 callers
Method
GetNews
(ctx context.Context, pq *utils.PaginationQuery)
internal/news/usecase.go:19
↓ 5 callers
Method
GetOffset
Get offset
pkg/utils/pagination.go:58
↓ 5 callers
Function
GetPaginationFromCtx
Get pagination query struct from
pkg/utils/pagination.go:90
↓ 5 callers
Method
Login
(ctx context.Context, user *models.User)
internal/auth/usecase.go:16
↓ 5 callers
Function
NewBadRequestError
New Bad Request Error
pkg/httpErrors/http_errors.go:102
↓ 5 callers
Function
NewInternalServerError
New Internal Server Error
pkg/httpErrors/http_errors.go:138
↓ 5 callers
Function
NewMockRedisRepository
NewMockRedisRepository creates a new mock instance
internal/news/mock/redis_repository_mock.go:26
↓ 5 callers
Function
NewMockRepository
NewMockRepository creates a new mock instance
internal/comments/mock/pg_repository_mock.go:28
↓ 5 callers
Method
SearchByTitle
(ctx context.Context, title string, query *utils.PaginationQuery)
internal/news/usecase.go:20
↓ 4 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
internal/auth/mock/redis_repository_mock.go:33
↓ 4 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
internal/comments/mock/usecase_mock.go:35
↓ 4 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
internal/news/mock/redis_repository_mock.go:33
↓ 4 callers
Method
GenerateUserKey
(userID string)
internal/auth/usecase/usecase.go:206
↓ 4 callers
Method
GetNewsByIDCtx
(ctx context.Context, key string)
internal/news/redis_repository.go:12
↓ 4 callers
Function
NewSessionUseCase
New session use case constructor
internal/session/usecase/usecase.go:20
↓ 4 callers
Method
SetNewsCtx
(ctx context.Context, key string, seconds int, news *models.NewsBase)
internal/news/redis_repository.go:13
↓ 4 callers
Method
SetUserCtx
(ctx context.Context, key string, seconds int, user *models.User)
internal/auth/redis_repository.go:13
↓ 4 callers
Function
ValidateIsOwner
Validate is user from owner of content
pkg/utils/auth.go:11
↓ 4 callers
Method
getKeyWithPrefix
(newsID string)
internal/news/usecase/usecase.go:154
↓ 3 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
internal/session/mock/redis_repository_mock.go:33
↓ 3 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
internal/session/mock/usecase_mock.go:33
↓ 3 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
internal/news/mock/usecase_mock.go:35
↓ 3 callers
Function
ErrResponseWithLog
Error response with logging error for echo context
pkg/utils/http.go:108
↓ 3 callers
Method
GetByIDCtx
(ctx context.Context, key string)
internal/auth/redis_repository.go:12
↓ 3 callers
Function
GetIPAddress
Get user ip address
pkg/utils/http.go:103
↓ 3 callers
Function
GetUserFromCtx
Get user from context
pkg/utils/http.go:93
↓ 3 callers
Function
NewAuthHandlers
NewAuthHandlers Auth handlers constructor
internal/auth/delivery/http/handlers.go:32
↓ 3 callers
Function
NewCommentsHandlers
NewCommentsHandlers Comments handlers constructor
internal/comments/delivery/http/hanldlers.go:26
↓ 3 callers
Function
NewCommentsRepository
Comments Repository constructor
internal/comments/repository/pg_repository.go:23
↓ 3 callers
Function
NewMockSessRepository
NewMockSessRepository creates a new mock instance
internal/session/mock/redis_repository_mock.go:26
↓ 3 callers
Function
NewMockUseCase
NewMockUseCase creates a new mock instance
internal/comments/mock/usecase_mock.go:28
↓ 3 callers
Function
NewMockUseCase
NewMockUseCase creates a new mock instance
internal/news/mock/usecase_mock.go:28
↓ 3 callers
Function
NewNewsHandlers
NewNewsHandlers News handlers constructor
internal/news/delivery/http/handlers.go:26
↓ 3 callers
Function
NewNewsRepository
News repository constructor
internal/news/repository/pg_repository.go:23
↓ 3 callers
Method
PutObject
(ctx context.Context, input models.UploadInput)
internal/auth/aws_repository.go:14
↓ 3 callers
Function
ReadRequest
Read request body and validate
pkg/utils/http.go:129
↓ 3 callers
Function
SetupRedis
()
internal/auth/repository/redis_repository_test.go:17
↓ 3 callers
Function
SetupRedis
()
internal/session/repository/redis_repository_test.go:17
↓ 3 callers
Function
SetupRedis
()
internal/news/repository/redis_repository_test.go:17
↓ 3 callers
Method
UploadAvatar
(ctx context.Context, userID uuid.UUID, file models.UploadInput)
internal/auth/usecase.go:22
↓ 2 callers
Function
CreateSessionCookie
Configure jwt cookie
pkg/utils/http.go:64
↓ 2 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
internal/auth/mock/usecase_mock.go:35
↓ 2 callers
Function
GenerateJWTToken
Generate new JWT Token
pkg/utils/jwt.go:24
↓ 2 callers
Method
GetOrderBy
Get OrderBy
pkg/utils/pagination.go:71
↓ 2 callers
Method
Logout
()
internal/auth/delivery.go:9
↓ 2 callers
Function
MakeToken
Create CSRF token
pkg/csrf/csrf.go:18
↓ 2 callers
Method
MapHandlers
Map Server Handlers
internal/server/handlers.go:32
↓ 2 callers
Function
NewForbiddenError
New Forbidden Error
pkg/httpErrors/http_errors.go:129
↓ 2 callers
Function
ParseErrors
Parser of error string messages returns RestError
pkg/httpErrors/http_errors.go:148
↓ 2 callers
Method
Sanitize
Sanitize and read request body to ctx for next use in easy json
internal/middleware/sanitize.go:13
↓ 2 callers
Function
SanitizeJSON
Sanitize json
pkg/sanitize/sanitize.go:17
↓ 2 callers
Function
SanitizeRequest
Read sanitize and validate request
pkg/utils/http.go:151
next →
1–100 of 480, ranked by callers