Documentation ¶
Index ¶
- type CommentRepository
- func (r *CommentRepository) AddComment(ctx context.Context, comment domain.Comment) (string, error)
- func (r *CommentRepository) AddReply(ctx context.Context, cmtId string, commentReply domain.CommentReply) (string, error)
- func (r *CommentRepository) CountOfToday(ctx context.Context) (int64, error)
- func (r *CommentRepository) DeleteCommentById(ctx context.Context, id string) error
- func (r *CommentRepository) DeleteReplyByCIdAndRId(ctx context.Context, commentId string, replyId string) error
- func (r *CommentRepository) FindApprovedCommentById(ctx context.Context, cmtId string) (*domain.CommentWithReplies, error)
- func (r *CommentRepository) FindCommentById(ctx context.Context, id string) (*domain.Comment, error)
- func (r *CommentRepository) FindCommentWithRepliesById(ctx context.Context, id string) (*domain.CommentWithReplies, error)
- func (r *CommentRepository) FindCommentsByPostIdAndCmtStatus(ctx context.Context, postId string, cmtStatus domain.CommentStatus) ([]domain.CommentWithReplies, error)
- func (r *CommentRepository) FindPage(ctx context.Context, pageDTO dto.PageDTO) ([]domain.AdminComment, int64, error)
- func (r *CommentRepository) FindReplyByCIdAndRId(ctx context.Context, commentId string, replyId string) (*domain.CommentReplyWithPostInfo, error)
- func (r *CommentRepository) FineLatestCommentAndReply(ctx context.Context, cnt int) ([]domain.LatestComment, error)
- func (r *CommentRepository) UpdateCommentReplyStatus(ctx context.Context, commentId string, replyId string, ...) error
- func (r *CommentRepository) UpdateCommentStatus(ctx context.Context, id string, commentStatus domain.CommentStatus) error
- type ICommentRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CommentRepository ¶
type CommentRepository struct {
// contains filtered or unexported fields
}
func NewCommentRepository ¶
func NewCommentRepository(dao dao.ICommentDao) *CommentRepository
func (*CommentRepository) AddComment ¶
func (*CommentRepository) AddReply ¶
func (r *CommentRepository) AddReply(ctx context.Context, cmtId string, commentReply domain.CommentReply) (string, error)
func (*CommentRepository) CountOfToday ¶
func (r *CommentRepository) CountOfToday(ctx context.Context) (int64, error)
func (*CommentRepository) DeleteCommentById ¶
func (r *CommentRepository) DeleteCommentById(ctx context.Context, id string) error
func (*CommentRepository) DeleteReplyByCIdAndRId ¶
func (*CommentRepository) FindApprovedCommentById ¶
func (r *CommentRepository) FindApprovedCommentById(ctx context.Context, cmtId string) (*domain.CommentWithReplies, error)
func (*CommentRepository) FindCommentById ¶
func (*CommentRepository) FindCommentWithRepliesById ¶
func (r *CommentRepository) FindCommentWithRepliesById(ctx context.Context, id string) (*domain.CommentWithReplies, error)
func (*CommentRepository) FindCommentsByPostIdAndCmtStatus ¶
func (r *CommentRepository) FindCommentsByPostIdAndCmtStatus(ctx context.Context, postId string, cmtStatus domain.CommentStatus) ([]domain.CommentWithReplies, error)
func (*CommentRepository) FindPage ¶
func (r *CommentRepository) FindPage(ctx context.Context, pageDTO dto.PageDTO) ([]domain.AdminComment, int64, error)
func (*CommentRepository) FindReplyByCIdAndRId ¶
func (r *CommentRepository) FindReplyByCIdAndRId(ctx context.Context, commentId string, replyId string) (*domain.CommentReplyWithPostInfo, error)
func (*CommentRepository) FineLatestCommentAndReply ¶
func (r *CommentRepository) FineLatestCommentAndReply(ctx context.Context, cnt int) ([]domain.LatestComment, error)
func (*CommentRepository) UpdateCommentReplyStatus ¶
func (r *CommentRepository) UpdateCommentReplyStatus(ctx context.Context, commentId string, replyId string, commentStatus domain.CommentStatus) error
func (*CommentRepository) UpdateCommentStatus ¶
func (r *CommentRepository) UpdateCommentStatus(ctx context.Context, id string, commentStatus domain.CommentStatus) error
type ICommentRepository ¶
type ICommentRepository interface { AddComment(ctx context.Context, comment domain.Comment) (string, error) FindApprovedCommentById(ctx context.Context, cmtId string) (*domain.CommentWithReplies, error) AddReply(ctx context.Context, cmtId string, commentReply domain.CommentReply) (string, error) FineLatestCommentAndReply(ctx context.Context, cnt int) ([]domain.LatestComment, error) FindCommentsByPostIdAndCmtStatus(ctx context.Context, postId string, cmtStatus domain.CommentStatus) ([]domain.CommentWithReplies, error) FindPage(ctx context.Context, pageDTO dto.PageDTO) ([]domain.AdminComment, int64, error) FindCommentById(ctx context.Context, id string) (*domain.Comment, error) UpdateCommentStatus(ctx context.Context, id string, commentStatus domain.CommentStatus) error FindReplyByCIdAndRId(ctx context.Context, commentId string, replyId string) (*domain.CommentReplyWithPostInfo, error) UpdateCommentReplyStatus(ctx context.Context, commentId string, replyId string, commentStatus domain.CommentStatus) error FindCommentWithRepliesById(ctx context.Context, id string) (*domain.CommentWithReplies, error) DeleteCommentById(ctx context.Context, id string) error DeleteReplyByCIdAndRId(ctx context.Context, commentId string, replyId string) error CountOfToday(ctx context.Context) (int64, error) }
Click to show internal directories.
Click to hide internal directories.