Documentation
¶
Index ¶
- type CommentRepository
- func (r *CommentRepository) AddComment(ctx context.Context, comment domain.Comment) (string, error)
- func (r *CommentRepository) AddCommentReply(ctx context.Context, cmtId string, commentReply domain.CommentReply) (string, error)
- func (r *CommentRepository) FindApprovedCommentById(ctx context.Context, cmtId string) (*domain.CommentWithReplies, error)
- func (r *CommentRepository) FindCommentsByPostIdAndCmtStatus(ctx context.Context, postId string, cmtStatus domain.CommentStatus) ([]domain.CommentWithReplies, error)
- func (r *CommentRepository) FineLatestCommentAndReply(ctx context.Context, cnt int) ([]domain.LatestComment, 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) AddCommentReply ¶
func (r *CommentRepository) AddCommentReply(ctx context.Context, cmtId string, commentReply domain.CommentReply) (string, error)
func (*CommentRepository) FindApprovedCommentById ¶
func (r *CommentRepository) FindApprovedCommentById(ctx context.Context, cmtId string) (*domain.CommentWithReplies, error)
func (*CommentRepository) FindCommentsByPostIdAndCmtStatus ¶
func (r *CommentRepository) FindCommentsByPostIdAndCmtStatus(ctx context.Context, postId string, cmtStatus domain.CommentStatus) ([]domain.CommentWithReplies, error)
func (*CommentRepository) FineLatestCommentAndReply ¶
func (r *CommentRepository) FineLatestCommentAndReply(ctx context.Context, cnt int) ([]domain.LatestComment, error)
type ICommentRepository ¶
type ICommentRepository interface { AddComment(ctx context.Context, comment domain.Comment) (string, error) FindApprovedCommentById(ctx context.Context, cmtId string) (*domain.CommentWithReplies, error) AddCommentReply(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) }
Click to show internal directories.
Click to hide internal directories.