service

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func CommentConvert

func CommentConvert(in db.Comment) *comment.Comment

Types

type CommentService

type CommentService struct {
	Config       *config.Config
	CommentModel mapper.CommentModel
	HistoryModel mapper.HistoryModel
	Redis        *redis.Redis
}

func (*CommentService) CountCommentByParent

func (s *CommentService) CountCommentByParent(ctx context.Context, req *comment.CountCommentByParentReq) (resp *comment.CountCommentByParentResp, err error)

func (*CommentService) CreateComment

func (s *CommentService) CreateComment(ctx context.Context, req *comment.CreateCommentReq) (resp *comment.CreateCommentResp, err error)

func (*CommentService) DeleteComment

func (*CommentService) ListCommentByAuthorIdAndType

func (*CommentService) ListCommentByParent

func (s *CommentService) ListCommentByParent(ctx context.Context, req *comment.ListCommentByParentReq) (resp *comment.ListCommentByParentResp, err error)

func (*CommentService) ListCommentByReplyToAndType

func (*CommentService) RetrieveCommentById

func (s *CommentService) RetrieveCommentById(ctx context.Context, req *comment.RetrieveCommentByIdReq) (resp *comment.RetrieveCommentByIdResp, err error)

func (*CommentService) UpdateComment

func (s *CommentService) UpdateComment(ctx context.Context, req *comment.UpdateCommentReq) (resp *comment.UpdateCommentResp, err error)

type ICommentService

type ICommentService interface {
	CreateComment(ctx context.Context, req *comment.CreateCommentReq) (resp *comment.CreateCommentResp, err error)
	UpdateComment(ctx context.Context, req *comment.UpdateCommentReq) (resp *comment.UpdateCommentResp, err error)
	DeleteComment(ctx context.Context, req *comment.DeleteCommentByIdReq) (resp *comment.DeleteCommentByIdResp, err error)
	ListCommentByParent(ctx context.Context, req *comment.ListCommentByParentReq) (resp *comment.ListCommentByParentResp, err error)
	CountCommentByParent(ctx context.Context, req *comment.CountCommentByParentReq) (resp *comment.CountCommentByParentResp, err error)
	RetrieveCommentById(ctx context.Context, req *comment.RetrieveCommentByIdReq) (resp *comment.RetrieveCommentByIdResp, err error)
	ListCommentByAuthorIdAndType(ctx context.Context, req *comment.ListCommentByAuthorIdAndTypeReq) (resp *comment.ListCommentByAuthorIdAndTypeResp, err error)
	ListCommentByReplyToAndType(ctx context.Context, req *comment.ListCommentByReplyToAndTypeReq) (resp *comment.ListCommentByReplyToAndTypeResp, err error)
}

Jump to

Keyboard shortcuts

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