Documentation ¶
Index ¶
- type CommentQuery
- type CommentRepo
- type CommentService
- func (cs *CommentService) AddComment(ctx context.Context, req *schema.AddCommentReq) (resp *schema.GetCommentResp, err error)
- func (cs *CommentService) GetComment(ctx context.Context, req *schema.GetCommentReq) (resp *schema.GetCommentResp, err error)
- func (cs *CommentService) GetCommentPersonalWithPage(ctx context.Context, req *schema.GetCommentPersonalWithPageReq) (pageModel *pager.PageModel, err error)
- func (cs *CommentService) GetCommentWithPage(ctx context.Context, req *schema.GetCommentWithPageReq) (pageModel *pager.PageModel, err error)
- func (cs *CommentService) RemoveComment(ctx context.Context, req *schema.RemoveCommentReq) (err error)
- func (cs *CommentService) UpdateComment(ctx context.Context, req *schema.UpdateCommentReq) (resp *schema.UpdateCommentResp, err error)
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) 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, ) *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
Click to show internal directories.
Click to hide internal directories.