comment

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommentQuery

type CommentQuery struct {
	pager.PageCond
	// object id
	ObjectID string
	// query condition
	QueryCond string
	// user id
	UserID string
}

func (*CommentQuery) GetOrderBy

func (c *CommentQuery) GetOrderBy() string

type CommentRepo

type CommentRepo interface {
	AddComment(ctx context.Context, comment *entity.Comment) (err error)
	RemoveComment(ctx context.Context, commentID string) (err error)
	UpdateComment(ctx context.Context, comment *entity.Comment) (err error)
	GetComment(ctx context.Context, commentID string) (comment *entity.Comment, exist bool, err error)
	GetCommentPage(ctx context.Context, commentQuery *CommentQuery) (
		comments []*entity.Comment, total int64, err error)
}

CommentRepo comment repository

type CommentService

type CommentService struct {
	// contains filtered or unexported fields
}

CommentService user service

func NewCommentService

func NewCommentService(
	commentRepo CommentRepo,
	commentCommonRepo comment_common.CommentCommonRepo,
	userCommon *usercommon.UserCommon,
	objectInfoService *object_info.ObjService,
	voteCommon activity_common.VoteRepo) *CommentService

NewCommentService new comment service

func (*CommentService) AddComment

func (cs *CommentService) AddComment(ctx context.Context, req *schema.AddCommentReq) (
	resp *schema.GetCommentResp, err error)

AddComment add comment

func (*CommentService) GetComment

func (cs *CommentService) GetComment(ctx context.Context, req *schema.GetCommentReq) (resp *schema.GetCommentResp, err error)

GetComment get comment one

func (*CommentService) GetCommentPersonalWithPage

func (cs *CommentService) GetCommentPersonalWithPage(ctx context.Context, req *schema.GetCommentPersonalWithPageReq) (
	pageModel *pager.PageModel, err error)

GetCommentPersonalWithPage get personal comment list page

func (*CommentService) GetCommentWithPage

func (cs *CommentService) GetCommentWithPage(ctx context.Context, req *schema.GetCommentWithPageReq) (
	pageModel *pager.PageModel, err error)

GetCommentWithPage get comment list page

func (*CommentService) RemoveComment

func (cs *CommentService) RemoveComment(ctx context.Context, req *schema.RemoveCommentReq) (err error)

RemoveComment delete comment

func (*CommentService) UpdateComment

func (cs *CommentService) UpdateComment(ctx context.Context, req *schema.UpdateCommentReq) (err error)

UpdateComment update comment

Jump to

Keyboard shortcuts

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