repository

package
v0.0.0-...-a783adc Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2023 License: Apache-2.0 Imports: 5 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) 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)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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