comment

package
v1.7.0-RC1 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2025 License: Apache-2.0 Imports: 23 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)
	UpdateCommentContent(ctx context.Context, commentID string, original string, parsedText string) (err error)
	UpdateCommentStatus(ctx context.Context, commentID string, status int) (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,
	emailService *export.EmailService,
	userRepo usercommon.UserRepo,
	notificationQueueService notice_queue.NotificationQueueService,
	externalNotificationQueueService notice_queue.ExternalNotificationQueueService,
	activityQueueService activity_queue.ActivityQueueService,
	eventQueueService event_queue.EventQueueService,
	reviewService *review.ReviewService,
) *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) (
	resp *schema.UpdateCommentResp, err error)

UpdateComment update comment

Jump to

Keyboard shortcuts

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