Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/ahmetildirim/morgan
/ functions
Functions
94 in github.com/ahmetildirim/morgan
⨍
Functions
94
◇
Types & classes
58
↓ 26 callers
Function
Error
Error sends a JSON error response with status code and headers
internal/platform/response/response.go:39
↓ 7 callers
Function
Success
Success sends a JSON success response with status code and headers
internal/platform/response/response.go:20
↓ 6 callers
Function
UserIDFromContext
UserIDFromContext returns the user ID from the given context.
internal/platform/reqctx/userid.go:17
↓ 3 callers
Function
AuthMiddleware
AuthMiddleware is a middleware that checks if the request is authenticated
internal/auth/middleware.go:13
↓ 3 callers
Method
Exists
(ctx context.Context, postID uuid.UUID)
internal/post/service.go:32
↓ 3 callers
Method
String
()
internal/auth/token.go:41
↓ 2 callers
Method
Create
(ctx context.Context, like *like.Like)
internal/post/service.go:40
↓ 2 callers
Method
FindByEmail
(ctx context.Context, email string)
internal/user/service.go:26
↓ 2 callers
Function
NewFeed
(posts []*post.Post)
internal/feed/feed.go:13
↓ 2 callers
Function
WithUserID
WithUserID returns a new context with the given user ID.
internal/platform/reqctx/userid.go:12
↓ 1 callers
Method
AddLike
(ctx context.Context, postID, ownerID uuid.UUID)
internal/post/handler.go:39
↓ 1 callers
Method
AddLike
(ctx context.Context, postID uuid.UUID)
internal/post/service.go:31
↓ 1 callers
Method
Authenticate
(ctx context.Context, email string, password string)
internal/auth/service.go:15
↓ 1 callers
Method
CheckPassword
(password string)
internal/user/user.go:56
↓ 1 callers
Method
Create
(ctx context.Context, follow *Follow)
internal/follow/service.go:23
↓ 1 callers
Method
CreateComment
(ctx context.Context, params *CreateCommentServiceParams)
internal/post/handler.go:40
↓ 1 callers
Method
CreatePost
(ctx context.Context, params *CreatePostServiceParams)
internal/post/handler.go:38
↓ 1 callers
Method
CreatePost
(ctx context.Context, post *Post)
internal/post/service.go:29
↓ 1 callers
Method
CreateUser
(ctx context.Context, params *CreateServiceParams)
internal/user/handler.go:21
↓ 1 callers
Method
CreateUser
(ctx context.Context, user *User)
internal/user/service.go:25
↓ 1 callers
Method
FindByFollower
(ctx context.Context, followerID uuid.UUID)
internal/follow/service.go:25
↓ 1 callers
Method
FindByFollowerAndFollowee
(ctx context.Context, followerID uuid.UUID, followeeID uuid.UUID)
internal/follow/service.go:24
↓ 1 callers
Method
FindByID
(ctx context.Context, id uuid.UUID)
internal/user/service.go:27
↓ 1 callers
Method
Follow
(ctx context.Context, params *CreateFollowServiceParams)
internal/follow/handler.go:19
↓ 1 callers
Method
GetFeed
(ctx context.Context, userID uuid.UUID)
internal/feed/handler.go:26
↓ 1 callers
Method
GetFollowees
(ctx context.Context, userID uuid.UUID)
internal/feed/service.go:11
↓ 1 callers
Method
GetPostsByUserIDs
(ctx context.Context, userIDs []uuid.UUID)
internal/feed/service.go:15
↓ 1 callers
Method
GetPostsByUserIDs
(ctx context.Context, userIDs []uuid.UUID)
internal/post/service.go:30
↓ 1 callers
Method
GetUser
(ctx context.Context, id uuid.UUID)
internal/follow/service.go:29
↓ 1 callers
Method
Login
(ctx context.Context, params *LoginServiceParams)
internal/auth/handler.go:21
↓ 1 callers
Function
New
()
config/config.go:8
↓ 1 callers
Function
NewFollow
(followerID uuid.UUID, followeeID uuid.UUID)
internal/follow/follow.go:22
↓ 1 callers
Function
NewHandler
(service service)
internal/auth/handler.go:28
↓ 1 callers
Function
NewHandler
(svc service)
internal/user/handler.go:29
↓ 1 callers
Function
NewHandler
(svc service)
internal/feed/handler.go:33
↓ 1 callers
Function
NewHandler
(service service)
internal/post/handler.go:47
↓ 1 callers
Function
NewHandler
(svc service)
internal/follow/handler.go:26
↓ 1 callers
Function
NewPost
(ownerID uuid.UUID, content string)
internal/post/post.go:24
↓ 1 callers
Function
NewRepository
(conn *pgx.Conn)
internal/user/repo.go:19
↓ 1 callers
Function
NewRepository
(conn *pgx.Conn)
internal/post/repo.go:14
↓ 1 callers
Function
NewRepository
(conn *pgx.Conn)
internal/post/like/repo.go:14
↓ 1 callers
Function
NewRepository
(conn *pgx.Conn)
internal/post/comment/repo.go:18
↓ 1 callers
Function
NewRepository
(conn *pgx.Conn)
internal/follow/repo.go:19
↓ 1 callers
Function
NewService
(userService userService, secretKey string)
internal/auth/service.go:23
↓ 1 callers
Function
NewService
(repo repository)
internal/user/service.go:34
↓ 1 callers
Function
NewService
(followSvc followService, postSvc postService)
internal/feed/service.go:23
↓ 1 callers
Function
NewService
(repo repository, commentRepo commentRepository, likeRepo likeRepository)
internal/post/service.go:50
↓ 1 callers
Function
NewService
(repo repository, userSvc userService)
internal/follow/service.go:37
↓ 1 callers
Function
NewToken
(user *user.User, secretKey string)
internal/auth/token.go:20
↓ 1 callers
Function
NewUser
(email string, password string)
internal/user/user.go:25
↓ 1 callers
Method
Validate
(secretKey string)
internal/auth/token.go:45
↓ 1 callers
Function
authenticate
authenticate is a function that checks if the request is authenticated
internal/auth/middleware.go:40
↓ 1 callers
Function
isValidEmail
(email string)
internal/user/user.go:61
↓ 1 callers
Function
mix
(posts []*post.Post)
internal/feed/feed.go:19
↓ 1 callers
Method
setPassword
(password string)
internal/user/user.go:42
Method
AddLike
(w http.ResponseWriter, r *http.Request)
internal/post/handler.go:80
Method
AddLike
(ctx context.Context, postID, userID uuid.UUID)
internal/post/service.go:95
Method
AddLike
(ctx context.Context, postID uuid.UUID)
internal/post/repo.go:46
Method
Authenticate
(ctx context.Context, email string, password string)
internal/user/handler.go:22
Method
Authenticate
(ctx context.Context, email string, password string)
internal/user/service.go:59
Method
Create
(ctx context.Context, comment *comment.Comment)
internal/post/service.go:36
Method
Create
(ctx context.Context, like *Like)
internal/post/like/repo.go:18
Method
Create
(ctx context.Context, comment *Comment)
internal/post/comment/repo.go:22
Method
Create
(ctx context.Context, follow *Follow)
internal/follow/repo.go:23
Method
CreateComment
(w http.ResponseWriter, r *http.Request)
internal/post/handler.go:109
Method
CreateComment
(ctx context.Context, params *CreateCommentServiceParams)
internal/post/service.go:72
Method
CreateFollow
(w http.ResponseWriter, r *http.Request)
internal/follow/handler.go:32
Method
CreatePost
(w http.ResponseWriter, r *http.Request)
internal/post/handler.go:51
Method
CreatePost
(ctx context.Context, params *CreatePostServiceParams)
internal/post/service.go:58
Method
CreatePost
(ctx context.Context, post *Post)
internal/post/repo.go:18
Method
CreateUser
(w http.ResponseWriter, r *http.Request)
internal/user/handler.go:35
Method
CreateUser
(ctx context.Context, params *CreateServiceParams)
internal/user/service.go:40
Method
CreateUser
(ctx context.Context, user *User)
internal/user/repo.go:23
Method
Exists
(ctx context.Context, postID, ownerID uuid.UUID)
internal/post/service.go:41
Method
Exists
(ctx context.Context, postID uuid.UUID)
internal/post/repo.go:52
Method
Exists
(ctx context.Context, postID, ownerID uuid.UUID)
internal/post/like/repo.go:25
Method
FindByEmail
(ctx context.Context, email string)
internal/user/repo.go:30
Method
FindByFollower
(ctx context.Context, followerID uuid.UUID)
internal/follow/repo.go:42
Method
FindByFollowerAndFollowee
(ctx context.Context, followerID uuid.UUID, followeeID uuid.UUID)
internal/follow/repo.go:30
Method
FindByID
(ctx context.Context, id uuid.UUID)
internal/user/repo.go:42
Method
FindByPostID
(ctx context.Context, postID uuid.UUID)
internal/post/like/repo.go:32
Method
Follow
(ctx context.Context, params *CreateFollowServiceParams)
internal/follow/service.go:44
Method
GetFeed
(w http.ResponseWriter, r *http.Request)
internal/feed/handler.go:39
Method
GetFeed
(ctx context.Context, userID uuid.UUID)
internal/feed/service.go:30
Method
GetFollowees
(ctx context.Context, userID uuid.UUID)
internal/follow/service.go:71
Method
GetPostsByUserIDs
(ctx context.Context, userIDs []uuid.UUID)
internal/post/service.go:134
Method
GetPostsByUserIDs
(ctx context.Context, userIDs []uuid.UUID)
internal/post/repo.go:25
Method
GetUser
(ctx context.Context, id uuid.UUID)
internal/user/service.go:71
Method
Login
(w http.ResponseWriter, r *http.Request)
internal/auth/handler.go:34
Method
Login
(ctx context.Context, params *LoginServiceParams)
internal/auth/service.go:30
Function
NewComment
(postID, ownerID uuid.UUID, content string)
internal/post/comment/comment.go:25
Function
NewLike
(postID, ownerID uuid.UUID)
internal/post/like/like.go:23
Function
TestUserID
(t *testing.T)
internal/platform/reqctx/userid_test.go:11
Function
main
()
cmd/main.go:27