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
↓ 2 callers
Function
determineFileContentType
(fileHeader textproto.MIMEHeader)
pkg/utils/images.go:20
↓ 2 callers
Method
validateJWTToken
(tokenString string, authUC auth.UseCase, c echo.Context, cfg *config.Config)
internal/middleware/auth.go:187
↓ 1 callers
Function
CheckImageContentType
(image *multipart.FileHeader)
pkg/utils/images.go:28
↓ 1 callers
Function
CheckImageFileContentType
(fileContent []byte)
pkg/utils/http.go:182
↓ 1 callers
Method
ComparePasswords
Compare user password and payload
internal/models/user.go:44
↓ 1 callers
Function
CreateMetrics
Create metrics with address and name
pkg/metric/metric.go:26
↓ 1 callers
Method
DPanic
(args ...interface{})
pkg/logger/zap_logger.go:23
↓ 1 callers
Method
DPanicf
(template string, args ...interface{})
pkg/logger/zap_logger.go:24
↓ 1 callers
Method
Debug
(args ...interface{})
pkg/logger/zap_logger.go:15
↓ 1 callers
Method
Debugf
(template string, args ...interface{})
pkg/logger/zap_logger.go:16
↓ 1 callers
Function
DeleteSessionCookie
Delete session
pkg/utils/http.go:80
↓ 1 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use
internal/auth/mock/aws_repository_mock.go:34
↓ 1 callers
Function
ExtractBearerToken
Extract bearer token from request Authorization header
pkg/utils/jwt.go:77
↓ 1 callers
Method
GetCSRFToken
()
internal/auth/delivery.go:17
↓ 1 callers
Function
GetConfigPath
Get config path for local or docker
pkg/utils/http.go:42
↓ 1 callers
Function
GetImageContentType
(image []byte)
pkg/utils/images.go:74
↓ 1 callers
Method
GetMe
()
internal/auth/delivery.go:15
↓ 1 callers
Method
GetObject
(ctx context.Context, bucket string, fileName string)
internal/auth/aws_repository.go:15
↓ 1 callers
Method
GetUserByID
()
internal/auth/delivery.go:12
↓ 1 callers
Method
HashPassword
Hash user password with bcrypt
internal/models/user.go:34
↓ 1 callers
Method
IncHits
(status int, method, path string)
pkg/metric/metric.go:14
↓ 1 callers
Method
InitLogger
()
pkg/logger/zap_logger.go:14
↓ 1 callers
Function
IsAllowedImageContentType
(image []byte)
pkg/utils/images.go:80
↓ 1 callers
Function
IsAllowedImageHeader
(image *multipart.FileHeader)
pkg/utils/images.go:52
↓ 1 callers
Method
MetricsMiddleware
Prometheus metrics middleware
internal/middleware/metrics.go:12
↓ 1 callers
Function
NewAWSClient
Minio AWS S3 Client constructor
pkg/db/aws/aws.go:9
↓ 1 callers
Function
NewAuthRedisRepo
Auth redis repository constructor
internal/auth/repository/redis_repository.go:22
↓ 1 callers
Function
NewMockAWSRepository
NewMockAWSRepository creates a new mock instance
internal/auth/mock/aws_repository_mock.go:27
↓ 1 callers
Function
NewNewsRedisRepo
News redis repository constructor
internal/news/repository/redis_repository.go:22
↓ 1 callers
Function
NewPsqlDB
Return new Postgresql db instance
pkg/db/postgres/db_conn.go:21
↓ 1 callers
Function
NewRedisClient
Returns new redis client
pkg/db/redis/conn.go:12
↓ 1 callers
Function
NewRestErrorWithMessage
New Rest Error With Message
pkg/httpErrors/http_errors.go:84
↓ 1 callers
Function
NewServer
NewServer New Server constructor
internal/server/server.go:40
↓ 1 callers
Function
NewSessionRepository
Session repository constructor
internal/session/repository/redis_repository.go:31
↓ 1 callers
Method
ObserveResponseTime
(status int, method, path string, observeTime float64)
pkg/metric/metric.go:15
↓ 1 callers
Method
OwnerOrAdminMiddleware
Role based auth middleware, using ctx user
internal/middleware/auth.go:129
↓ 1 callers
Method
PrepareCreate
Prepare user for register
internal/models/user.go:57
↓ 1 callers
Method
PrepareUpdate
Prepare user for register
internal/models/user.go:75
↓ 1 callers
Function
ReadImage
(ctx echo.Context, field string)
pkg/utils/http.go:136
↓ 1 callers
Method
RemoveObject
(ctx context.Context, bucket string, fileName string)
internal/auth/aws_repository.go:16
↓ 1 callers
Method
RoleBasedAuthMiddleware
Role based auth middleware, using ctx user
internal/middleware/auth.go:157
↓ 1 callers
Method
SetOrderBy
Set order by
pkg/utils/pagination.go:53
↓ 1 callers
Method
SetPage
Set page number
pkg/utils/pagination.go:38
↓ 1 callers
Method
SetSize
Set page size
pkg/utils/pagination.go:23
↓ 1 callers
Method
Status
()
pkg/httpErrors/http_errors.go:47
↓ 1 callers
Function
ValidateStruct
Validate struct fields
pkg/utils/validator.go:17
↓ 1 callers
Function
ValidateToken
Validate CSRF token
pkg/csrf/csrf.go:29
↓ 1 callers
Method
Warn
(args ...interface{})
pkg/logger/zap_logger.go:19
↓ 1 callers
Method
Warnf
(template string, args ...interface{})
pkg/logger/zap_logger.go:20
↓ 1 callers
Method
createKey
(sessionID string)
internal/session/repository/redis_repository.go:81
↓ 1 callers
Method
generateAWSMinioURL
(bucket string, key string)
internal/auth/usecase/usecase.go:210
↓ 1 callers
Method
generateFileName
(fileName string)
internal/auth/repository/aws_repository.go:67
↓ 1 callers
Method
getLoggerLevel
(cfg *config.Config)
pkg/logger/zap_logger.go:51
↓ 1 callers
Function
parseSqlErrors
(err error)
pkg/httpErrors/http_errors.go:176
↓ 1 callers
Function
parseValidatorError
(err error)
pkg/httpErrors/http_errors.go:184
↓ 1 callers
Function
sanitize
(data interface{})
pkg/sanitize/sanitize.go:29
Method
AdminMiddleware
Admin role
internal/middleware/auth.go:118
Method
AuthJWTMiddleware
JWT way of auth using cookie or Authorization header
internal/middleware/auth.go:78
Method
AuthSessionMiddleware
Auth sessions middleware using redis
internal/middleware/auth.go:23
Method
CSRF
CSRF Middleware
internal/middleware/csrf.go:14
Method
Causes
()
pkg/httpErrors/http_errors.go:49
Method
Causes
RestError Causes
pkg/httpErrors/http_errors.go:70
Method
CheckAuth
Check auth middleware
internal/middleware/auth.go:233
Function
ConfigureJWTCookie
Configure jwt cookie
pkg/utils/http.go:50
Method
Create
(ctx context.Context, comment *models.Comment)
internal/comments/pg_repository.go:15
Method
Create
(ctx context.Context, comment *models.Comment)
internal/comments/usecase.go:15
Method
Create
()
internal/comments/delivery.go:7
Method
Create
Create @Summary Create new comment @Description create new comment @Tags Comments @Accept json @Produce json @Success 201 {object} models.Comment @F
internal/comments/delivery/http/hanldlers.go:39
Method
Create
Create comment
internal/comments/repository/pg_repository.go:28
Method
Create
Create mocks base method
internal/comments/mock/pg_repository_mock.go:40
Method
Create
Create indicates an expected call of Create
internal/comments/mock/pg_repository_mock.go:49
Method
Create
Create mocks base method
internal/comments/mock/usecase_mock.go:40
Method
Create
Create indicates an expected call of Create
internal/comments/mock/usecase_mock.go:49
Method
Create
Create comment
internal/comments/usecase/usecase.go:32
Method
Create
(ctx context.Context, news *models.News)
internal/news/pg_repository.go:15
Method
Create
()
internal/news/delivery.go:7
Method
Create
Create godoc @Summary Create news @Description Create news handler @Tags News @Accept json @Produce json @Success 201 {object} models.News @Router /ne
internal/news/delivery/http/handlers.go:38
Method
Create
Create news
internal/news/repository/pg_repository.go:28
Method
Create
Create mocks base method
internal/news/mock/pg_repository_mock.go:40
Method
Create
Create indicates an expected call of Create
internal/news/mock/pg_repository_mock.go:49
Method
Create
Create mocks base method
internal/news/mock/usecase_mock.go:40
Method
Create
Create indicates an expected call of Create
internal/news/mock/usecase_mock.go:49
Method
Create
Create news
internal/news/usecase/usecase.go:39
Method
CreateSession
(ctx context.Context, session *models.Session, expire int)
internal/session/redis_repository.go:12
Method
CreateSession
Create session in redis
internal/session/repository/redis_repository.go:36
Method
CreateSession
CreateSession mocks base method
internal/session/mock/redis_repository_mock.go:38
Method
CreateSession
CreateSession indicates an expected call of CreateSession
internal/session/mock/redis_repository_mock.go:47
Method
CreateSession
CreateSession mocks base method
internal/session/mock/usecase_mock.go:38
Method
CreateSession
CreateSession indicates an expected call of CreateSession
internal/session/mock/usecase_mock.go:47
Method
CreateSession
Create new session
internal/session/usecase/usecase.go:25
Method
DPanic
(args ...interface{})
pkg/logger/zap_logger.go:130
Method
DPanicf
(template string, args ...interface{})
pkg/logger/zap_logger.go:134
Method
Debug
Logger methods
pkg/logger/zap_logger.go:98
Method
DebugMiddleware
Debug dump request middleware
internal/middleware/debug.go:12
Method
Debugf
(template string, args ...interface{})
pkg/logger/zap_logger.go:102
Method
Delete
(ctx context.Context, userID uuid.UUID)
internal/auth/pg_repository.go:17
Method
Delete
(ctx context.Context, userID uuid.UUID)
internal/auth/usecase.go:18
Method
Delete
()
internal/auth/delivery.go:11
Method
Delete
Delete @Summary Delete user account @Description some description @Tags Auth @Accept json @Param id path int true "user_id" @Produce json @Success 200
internal/auth/delivery/http/handlers.go:234
Method
Delete
Delete existing user
internal/auth/repository/pg_repository.go:60
← previous
next →
101–200 of 480, ranked by callers