MCPcopy Create free account

hub / github.com/ahmetildirim/morgan / functions

Functions94 in github.com/ahmetildirim/morgan

↓ 26 callersFunctionError
Error sends a JSON error response with status code and headers
internal/platform/response/response.go:39
↓ 7 callersFunctionSuccess
Success sends a JSON success response with status code and headers
internal/platform/response/response.go:20
↓ 6 callersFunctionUserIDFromContext
UserIDFromContext returns the user ID from the given context.
internal/platform/reqctx/userid.go:17
↓ 3 callersFunctionAuthMiddleware
AuthMiddleware is a middleware that checks if the request is authenticated
internal/auth/middleware.go:13
↓ 3 callersMethodExists
(ctx context.Context, postID uuid.UUID)
internal/post/service.go:32
↓ 3 callersMethodString
()
internal/auth/token.go:41
↓ 2 callersMethodCreate
(ctx context.Context, like *like.Like)
internal/post/service.go:40
↓ 2 callersMethodFindByEmail
(ctx context.Context, email string)
internal/user/service.go:26
↓ 2 callersFunctionNewFeed
(posts []*post.Post)
internal/feed/feed.go:13
↓ 2 callersFunctionWithUserID
WithUserID returns a new context with the given user ID.
internal/platform/reqctx/userid.go:12
↓ 1 callersMethodAddLike
(ctx context.Context, postID, ownerID uuid.UUID)
internal/post/handler.go:39
↓ 1 callersMethodAddLike
(ctx context.Context, postID uuid.UUID)
internal/post/service.go:31
↓ 1 callersMethodAuthenticate
(ctx context.Context, email string, password string)
internal/auth/service.go:15
↓ 1 callersMethodCheckPassword
(password string)
internal/user/user.go:56
↓ 1 callersMethodCreate
(ctx context.Context, follow *Follow)
internal/follow/service.go:23
↓ 1 callersMethodCreateComment
(ctx context.Context, params *CreateCommentServiceParams)
internal/post/handler.go:40
↓ 1 callersMethodCreatePost
(ctx context.Context, params *CreatePostServiceParams)
internal/post/handler.go:38
↓ 1 callersMethodCreatePost
(ctx context.Context, post *Post)
internal/post/service.go:29
↓ 1 callersMethodCreateUser
(ctx context.Context, params *CreateServiceParams)
internal/user/handler.go:21
↓ 1 callersMethodCreateUser
(ctx context.Context, user *User)
internal/user/service.go:25
↓ 1 callersMethodFindByFollower
(ctx context.Context, followerID uuid.UUID)
internal/follow/service.go:25
↓ 1 callersMethodFindByFollowerAndFollowee
(ctx context.Context, followerID uuid.UUID, followeeID uuid.UUID)
internal/follow/service.go:24
↓ 1 callersMethodFindByID
(ctx context.Context, id uuid.UUID)
internal/user/service.go:27
↓ 1 callersMethodFollow
(ctx context.Context, params *CreateFollowServiceParams)
internal/follow/handler.go:19
↓ 1 callersMethodGetFeed
(ctx context.Context, userID uuid.UUID)
internal/feed/handler.go:26
↓ 1 callersMethodGetFollowees
(ctx context.Context, userID uuid.UUID)
internal/feed/service.go:11
↓ 1 callersMethodGetPostsByUserIDs
(ctx context.Context, userIDs []uuid.UUID)
internal/feed/service.go:15
↓ 1 callersMethodGetPostsByUserIDs
(ctx context.Context, userIDs []uuid.UUID)
internal/post/service.go:30
↓ 1 callersMethodGetUser
(ctx context.Context, id uuid.UUID)
internal/follow/service.go:29
↓ 1 callersMethodLogin
(ctx context.Context, params *LoginServiceParams)
internal/auth/handler.go:21
↓ 1 callersFunctionNew
()
config/config.go:8
↓ 1 callersFunctionNewFollow
(followerID uuid.UUID, followeeID uuid.UUID)
internal/follow/follow.go:22
↓ 1 callersFunctionNewHandler
(service service)
internal/auth/handler.go:28
↓ 1 callersFunctionNewHandler
(svc service)
internal/user/handler.go:29
↓ 1 callersFunctionNewHandler
(svc service)
internal/feed/handler.go:33
↓ 1 callersFunctionNewHandler
(service service)
internal/post/handler.go:47
↓ 1 callersFunctionNewHandler
(svc service)
internal/follow/handler.go:26
↓ 1 callersFunctionNewPost
(ownerID uuid.UUID, content string)
internal/post/post.go:24
↓ 1 callersFunctionNewRepository
(conn *pgx.Conn)
internal/user/repo.go:19
↓ 1 callersFunctionNewRepository
(conn *pgx.Conn)
internal/post/repo.go:14
↓ 1 callersFunctionNewRepository
(conn *pgx.Conn)
internal/post/like/repo.go:14
↓ 1 callersFunctionNewRepository
(conn *pgx.Conn)
internal/post/comment/repo.go:18
↓ 1 callersFunctionNewRepository
(conn *pgx.Conn)
internal/follow/repo.go:19
↓ 1 callersFunctionNewService
(userService userService, secretKey string)
internal/auth/service.go:23
↓ 1 callersFunctionNewService
(repo repository)
internal/user/service.go:34
↓ 1 callersFunctionNewService
(followSvc followService, postSvc postService)
internal/feed/service.go:23
↓ 1 callersFunctionNewService
(repo repository, commentRepo commentRepository, likeRepo likeRepository)
internal/post/service.go:50
↓ 1 callersFunctionNewService
(repo repository, userSvc userService)
internal/follow/service.go:37
↓ 1 callersFunctionNewToken
(user *user.User, secretKey string)
internal/auth/token.go:20
↓ 1 callersFunctionNewUser
(email string, password string)
internal/user/user.go:25
↓ 1 callersMethodValidate
(secretKey string)
internal/auth/token.go:45
↓ 1 callersFunctionauthenticate
authenticate is a function that checks if the request is authenticated
internal/auth/middleware.go:40
↓ 1 callersFunctionisValidEmail
(email string)
internal/user/user.go:61
↓ 1 callersFunctionmix
(posts []*post.Post)
internal/feed/feed.go:19
↓ 1 callersMethodsetPassword
(password string)
internal/user/user.go:42
MethodAddLike
(w http.ResponseWriter, r *http.Request)
internal/post/handler.go:80
MethodAddLike
(ctx context.Context, postID, userID uuid.UUID)
internal/post/service.go:95
MethodAddLike
(ctx context.Context, postID uuid.UUID)
internal/post/repo.go:46
MethodAuthenticate
(ctx context.Context, email string, password string)
internal/user/handler.go:22
MethodAuthenticate
(ctx context.Context, email string, password string)
internal/user/service.go:59
MethodCreate
(ctx context.Context, comment *comment.Comment)
internal/post/service.go:36
MethodCreate
(ctx context.Context, like *Like)
internal/post/like/repo.go:18
MethodCreate
(ctx context.Context, comment *Comment)
internal/post/comment/repo.go:22
MethodCreate
(ctx context.Context, follow *Follow)
internal/follow/repo.go:23
MethodCreateComment
(w http.ResponseWriter, r *http.Request)
internal/post/handler.go:109
MethodCreateComment
(ctx context.Context, params *CreateCommentServiceParams)
internal/post/service.go:72
MethodCreateFollow
(w http.ResponseWriter, r *http.Request)
internal/follow/handler.go:32
MethodCreatePost
(w http.ResponseWriter, r *http.Request)
internal/post/handler.go:51
MethodCreatePost
(ctx context.Context, params *CreatePostServiceParams)
internal/post/service.go:58
MethodCreatePost
(ctx context.Context, post *Post)
internal/post/repo.go:18
MethodCreateUser
(w http.ResponseWriter, r *http.Request)
internal/user/handler.go:35
MethodCreateUser
(ctx context.Context, params *CreateServiceParams)
internal/user/service.go:40
MethodCreateUser
(ctx context.Context, user *User)
internal/user/repo.go:23
MethodExists
(ctx context.Context, postID, ownerID uuid.UUID)
internal/post/service.go:41
MethodExists
(ctx context.Context, postID uuid.UUID)
internal/post/repo.go:52
MethodExists
(ctx context.Context, postID, ownerID uuid.UUID)
internal/post/like/repo.go:25
MethodFindByEmail
(ctx context.Context, email string)
internal/user/repo.go:30
MethodFindByFollower
(ctx context.Context, followerID uuid.UUID)
internal/follow/repo.go:42
MethodFindByFollowerAndFollowee
(ctx context.Context, followerID uuid.UUID, followeeID uuid.UUID)
internal/follow/repo.go:30
MethodFindByID
(ctx context.Context, id uuid.UUID)
internal/user/repo.go:42
MethodFindByPostID
(ctx context.Context, postID uuid.UUID)
internal/post/like/repo.go:32
MethodFollow
(ctx context.Context, params *CreateFollowServiceParams)
internal/follow/service.go:44
MethodGetFeed
(w http.ResponseWriter, r *http.Request)
internal/feed/handler.go:39
MethodGetFeed
(ctx context.Context, userID uuid.UUID)
internal/feed/service.go:30
MethodGetFollowees
(ctx context.Context, userID uuid.UUID)
internal/follow/service.go:71
MethodGetPostsByUserIDs
(ctx context.Context, userIDs []uuid.UUID)
internal/post/service.go:134
MethodGetPostsByUserIDs
(ctx context.Context, userIDs []uuid.UUID)
internal/post/repo.go:25
MethodGetUser
(ctx context.Context, id uuid.UUID)
internal/user/service.go:71
MethodLogin
(w http.ResponseWriter, r *http.Request)
internal/auth/handler.go:34
MethodLogin
(ctx context.Context, params *LoginServiceParams)
internal/auth/service.go:30
FunctionNewComment
(postID, ownerID uuid.UUID, content string)
internal/post/comment/comment.go:25
FunctionNewLike
(postID, ownerID uuid.UUID)
internal/post/like/like.go:23
FunctionTestUserID
(t *testing.T)
internal/platform/reqctx/userid_test.go:11
Functionmain
()
cmd/main.go:27