| 19 | } |
| 20 | |
| 21 | type CommentRepository interface { |
| 22 | CreateComment(ctx context.Context, comment domain.Comment) (int64, error) |
| 23 | DeleteComment(ctx context.Context, commentId int64) error |
| 24 | ListComments(ctx context.Context, postId, minID, limit int64) ([]domain.Comment, error) |
| 25 | GetMoreCommentsReply(ctx context.Context, rootId, maxId, limit int64) ([]domain.Comment, error) |
| 26 | GetTopCommentsReply(ctx context.Context, postId int64) (domain.Comment, error) |
| 27 | FindCommentByCommentId(ctx context.Context, commentId int64) (domain.Comment, error) |
| 28 | UpdateComment(ctx context.Context, comment domain.Comment) error |
| 29 | } |
| 30 | |
| 31 | func NewCommentRepository(dao dao.CommentDAO, cache cache.CommentCache) CommentRepository { |
| 32 | return &commentRepository{ |
no outgoing calls
no test coverage detected