{"modulePath":"github.com/answerdev/answer","version":"v1.2.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package comment\n\n## Types\n\n```go\ntype CommentQuery struct {\n\tpager.PageCond\n\t// object id\n\tObjectID string\n\t// query condition\n\tQueryCond string\n\t// user id\n\tUserID string\n}\n```\n\n```go\nfunc (c *CommentQuery) GetOrderBy() string\n```\n\n```go\ntype CommentRepo interface {\n\tAddComment(ctx context.Context, comment *entity.Comment) (err error)\n\tRemoveComment(ctx context.Context, commentID string) (err error)\n\tUpdateCommentContent(ctx context.Context, commentID string, original string, parsedText string) (err error)\n\tGetComment(ctx context.Context, commentID string) (comment *entity.Comment, exist bool, err error)\n\tGetCommentPage(ctx context.Context, commentQuery *CommentQuery) (\n\t\tcomments []*entity.Comment, total int64, err error)\n}\n```\nCommentRepo comment repository\n\n```go\ntype CommentService struct {\n\t// contains filtered or unexported fields\n}\n```\nCommentService user service\n\n```go\nfunc NewCommentService(\n\tcommentRepo CommentRepo,\n\tcommentCommonRepo comment_common.CommentCommonRepo,\n\tuserCommon *usercommon.UserCommon,\n\tobjectInfoService *object_info.ObjService,\n\tvoteCommon activity_common.VoteRepo,\n\temailService *export.EmailService,\n\tuserRepo usercommon.UserRepo,\n\tnotificationQueueService notice_queue.NotificationQueueService,\n\texternalNotificationQueueService notice_queue.ExternalNotificationQueueService,\n\tactivityQueueService activity_queue.ActivityQueueService,\n) *CommentService\n```\nNewCommentService new comment service\n\n```go\nfunc (cs *CommentService) AddComment(ctx context.Context, req *schema.AddCommentReq) (\n\tresp *schema.GetCommentResp, err error)\n```\nAddComment add comment\n\n```go\nfunc (cs *CommentService) GetComment(ctx context.Context, req *schema.GetCommentReq) (resp *schema.GetCommentResp, err error)\n```\nGetComment get comment one\n\n```go\nfunc (cs *CommentService) GetCommentPersonalWithPage(ctx context.Context, req *schema.GetCommentPersonalWithPageReq) (\n\tpageModel *pager.PageModel, err error)\n```\nGetCommentPersonalWithPage get personal comment list page\n\n```go\nfunc (cs *CommentService) GetCommentWithPage(ctx context.Context, req *schema.GetCommentWithPageReq) (\n\tpageModel *pager.PageModel, err error)\n```\nGetCommentWithPage get comment list page\n\n```go\nfunc (cs *CommentService) RemoveComment(ctx context.Context, req *schema.RemoveCommentReq) (err error)\n```\nRemoveComment delete comment\n\n```go\nfunc (cs *CommentService) UpdateComment(ctx context.Context, req *schema.UpdateCommentReq) (\n\tresp *schema.UpdateCommentResp, err error)\n```\nUpdateComment update comment\n\n","path":"github.com/answerdev/answer/internal/service/comment","name":"comment","synopsis":"","isRedistributable":true}
