review

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: 22 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReviewRepo

type ReviewRepo interface {
	AddReview(ctx context.Context, review *entity.Review) (err error)
	UpdateReviewStatus(ctx context.Context, reviewID int, reviewerUserID string, status int) (err error)
	GetReview(ctx context.Context, reviewID int) (review *entity.Review, exist bool, err error)
	GetReviewByObject(ctx context.Context, objectID string) (review *entity.Review, exist bool, err error)
	GetReviewCount(ctx context.Context, status int) (count int64, err error)
	GetReviewPage(ctx context.Context, page, pageSize int, cond *entity.Review) (reviewList []*entity.Review, total int64, err error)
}

ReviewRepo review repository

type ReviewService

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

ReviewService user service

func NewReviewService

func NewReviewService(
	reviewRepo ReviewRepo,
	objectInfoService *object_info.ObjService,
	userCommon *usercommon.UserCommon,
	userRepo usercommon.UserRepo,
	questionRepo questioncommon.QuestionRepo,
	answerRepo answercommon.AnswerRepo,
	userRoleService *role.UserRoleRelService,
	externalNotificationQueueService notice_queue.ExternalNotificationQueueService,
	tagCommon *tagcommon.TagCommonService,
	questionCommon *questioncommon.QuestionCommon,
	notificationQueueService notice_queue.NotificationQueueService,
	siteInfoService siteinfo_common.SiteInfoCommonService,
	commentCommonRepo commentcommon.CommentCommonRepo,
) *ReviewService

NewReviewService new review service

func (*ReviewService) AddAnswerReview

func (cs *ReviewService) AddAnswerReview(ctx context.Context,
	answer *entity.Answer, ip, ua string) (answerStatus int)

AddAnswerReview add review for answer if needed

func (*ReviewService) AddCommentReview added in v1.7.0

func (cs *ReviewService) AddCommentReview(ctx context.Context,
	comment *entity.Comment, ip, ua string) (commentStatus int)

AddCommentReview add review for comment if needed

func (*ReviewService) AddQuestionReview

func (cs *ReviewService) AddQuestionReview(ctx context.Context,
	question *entity.Question, tags []*schema.TagItem, ip, ua string) (questionStatus int)

AddQuestionReview add review for question if needed

func (*ReviewService) GetReviewPendingCount

func (cs *ReviewService) GetReviewPendingCount(ctx context.Context) (count int64, err error)

GetReviewPendingCount get review pending count

func (*ReviewService) GetUnreviewedPostPage

func (cs *ReviewService) GetUnreviewedPostPage(ctx context.Context, req *schema.GetUnreviewedPostPageReq) (
	pageModel *pager.PageModel, err error)

GetUnreviewedPostPage get review page

func (*ReviewService) UpdateReview

func (cs *ReviewService) UpdateReview(ctx context.Context, req *schema.UpdateReviewReq) (err error)

UpdateReview update review

Jump to

Keyboard shortcuts

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