repository

package
v0.0.0-...-dc9db17 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

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 (r *CommentRepository) AddComment(ctx context.Context, comment domain.Comment) (string, error)

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 (r *CommentRepository) DeleteReplyByCIdAndRId(ctx context.Context, commentId string, replyId string) error

func (*CommentRepository) FindApprovedCommentById

func (r *CommentRepository) FindApprovedCommentById(ctx context.Context, cmtId string) (*domain.CommentWithReplies, error)

func (*CommentRepository) FindCommentById

func (r *CommentRepository) FindCommentById(ctx context.Context, id string) (*domain.Comment, error)

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)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL