Documentation
¶
Index ¶
- Variables
- type Comment
- type CommentDraft
- type CommentRepo
- type CommentReview
- type CommentStatistic
- type CommentUseCase
- func (r *CommentUseCase) AddCommentContentReviewDbAndCache(ctx context.Context, review *TextReview) error
- func (r *CommentUseCase) CancelCommentAgree(ctx context.Context, id, creationId, creationType int32, uuid, userUuid string) error
- func (r *CommentUseCase) CancelCommentAgreeDbAndCache(ctx context.Context, id, creationId, creationType int32, uuid, userUuid string) error
- func (r *CommentUseCase) CancelSubCommentAgree(ctx context.Context, id int32, uuid, userUuid string) error
- func (r *CommentUseCase) CancelSubCommentAgreeDbAndCache(ctx context.Context, id int32, uuid, userUuid string) error
- func (r *CommentUseCase) CommentContentIrregular(ctx context.Context, review *TextReview) error
- func (r *CommentUseCase) CreateComment(ctx context.Context, id, creationTd, creationType int32, uuid string) error
- func (r *CommentUseCase) CreateCommentDbAndCache(ctx context.Context, id, creationId, creationType int32, uuid string) (string, error)
- func (r *CommentUseCase) CreateCommentDraft(ctx context.Context, uuid string) (int32, error)
- func (r *CommentUseCase) CreateSubComment(ctx context.Context, id, rootId, parentId int32, uuid string) error
- func (r *CommentUseCase) CreateSubCommentDbAndCache(ctx context.Context, id, rootId, parentId int32, uuid string) (string, string, error)
- func (r *CommentUseCase) GetCommentContentReview(ctx context.Context, page int32, uuid string) ([]*TextReview, error)
- func (r *CommentUseCase) GetCommentList(ctx context.Context, page, creationId, creationType int32) ([]*Comment, error)
- func (r *CommentUseCase) GetCommentListHot(ctx context.Context, page, creationId, creationType int32) ([]*Comment, error)
- func (r *CommentUseCase) GetCommentListStatistic(ctx context.Context, ids []int32) ([]*CommentStatistic, error)
- func (r *CommentUseCase) GetCommentUser(ctx context.Context, uuid string) (*CommentUser, error)
- func (r *CommentUseCase) GetLastCommentDraft(ctx context.Context, uuid string) (*CommentDraft, error)
- func (r *CommentUseCase) GetSubCommentList(ctx context.Context, page, id int32) ([]*SubComment, error)
- func (r *CommentUseCase) GetSubCommentListStatistic(ctx context.Context, ids []int32) ([]*CommentStatistic, error)
- func (r *CommentUseCase) GetUserCommentAgree(ctx context.Context, uuid string) (map[int32]bool, error)
- func (r *CommentUseCase) GetUserCommentArticleRepliedList(ctx context.Context, page int32, uuid string) ([]*Comment, error)
- func (r *CommentUseCase) GetUserCommentArticleReplyList(ctx context.Context, page int32, uuid string) ([]*Comment, error)
- func (r *CommentUseCase) GetUserCommentRepliedList(ctx context.Context, page int32, uuid string) ([]*Comment, error)
- func (r *CommentUseCase) GetUserCommentTalkRepliedList(ctx context.Context, page int32, uuid string) ([]*Comment, error)
- func (r *CommentUseCase) GetUserCommentTalkReplyList(ctx context.Context, page int32, uuid string) ([]*Comment, error)
- func (r *CommentUseCase) GetUserSubCommentArticleRepliedList(ctx context.Context, page int32, uuid string) ([]*SubComment, error)
- func (r *CommentUseCase) GetUserSubCommentArticleReplyList(ctx context.Context, page int32, uuid string) ([]*SubComment, error)
- func (r *CommentUseCase) GetUserSubCommentRepliedList(ctx context.Context, page int32, uuid string) ([]*SubComment, error)
- func (r *CommentUseCase) GetUserSubCommentTalkRepliedList(ctx context.Context, page int32, uuid string) ([]*SubComment, error)
- func (r *CommentUseCase) GetUserSubCommentTalkReplyList(ctx context.Context, page int32, uuid string) ([]*SubComment, error)
- func (r *CommentUseCase) RemoveComment(ctx context.Context, id int32, uuid string) error
- func (r *CommentUseCase) RemoveCommentDbAndCache(ctx context.Context, id int32, uuid string) error
- func (r *CommentUseCase) RemoveSubComment(ctx context.Context, id int32, uuid string) error
- func (r *CommentUseCase) RemoveSubCommentDbAndCache(ctx context.Context, id int32, uuid string) error
- func (r *CommentUseCase) SendComment(ctx context.Context, id int32, uuid, ip string) error
- func (r *CommentUseCase) SendSubComment(ctx context.Context, id int32, uuid, ip string) error
- func (r *CommentUseCase) SetCommentAgree(ctx context.Context, id, creationId, creationType int32, uuid, userUuid string) error
- func (r *CommentUseCase) SetCommentAgreeDbAndCache(ctx context.Context, id, creationId, creationType int32, uuid, userUuid string) error
- func (r *CommentUseCase) SetSubCommentAgree(ctx context.Context, id int32, uuid, userUuid string) error
- func (r *CommentUseCase) SetSubCommentAgreeDbAndCache(ctx context.Context, id int32, uuid, userUuid string) error
- type CommentUser
- type Recovery
- type SubComment
- type TextReview
- type Transaction
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewCommentUseCase)
Functions ¶
This section is empty.
Types ¶
type CommentDraft ¶
type CommentRepo ¶
type CommentRepo interface { GetLastCommentDraft(ctx context.Context, uuid string) (*CommentDraft, error) GetUserCommentAgree(ctx context.Context, uuid string) (map[int32]bool, error) GetCommentUser(ctx context.Context, uuid string) (*CommentUser, error) GetCommentList(ctx context.Context, page, creationId, creationType int32) ([]*Comment, error) GetSubCommentList(ctx context.Context, page, id int32) ([]*SubComment, error) GetCommentListHot(ctx context.Context, page, creationId, creationType int32) ([]*Comment, error) GetCommentListStatistic(ctx context.Context, ids []int32) ([]*CommentStatistic, error) GetSubCommentListStatistic(ctx context.Context, ids []int32) ([]*CommentStatistic, error) GetUserCommentArticleReplyList(ctx context.Context, page int32, uuid string) ([]*Comment, error) GetUserSubCommentArticleReplyList(ctx context.Context, page int32, uuid string) ([]*SubComment, error) GetUserCommentTalkReplyList(ctx context.Context, page int32, uuid string) ([]*Comment, error) GetUserSubCommentTalkReplyList(ctx context.Context, page int32, uuid string) ([]*SubComment, error) GetUserCommentArticleRepliedList(ctx context.Context, page int32, uuid string) ([]*Comment, error) GetUserSubCommentArticleRepliedList(ctx context.Context, page int32, uuid string) ([]*SubComment, error) GetUserCommentTalkRepliedList(ctx context.Context, page int32, uuid string) ([]*Comment, error) GetUserSubCommentTalkRepliedList(ctx context.Context, page int32, uuid string) ([]*SubComment, error) GetUserCommentRepliedList(ctx context.Context, page int32, uuid string) ([]*Comment, error) GetUserSubCommentRepliedList(ctx context.Context, page int32, uuid string) ([]*SubComment, error) GetCommentContentReview(ctx context.Context, page int32, uuid string) ([]*TextReview, error) GetRootComment(ctx context.Context, id int32) (*Comment, error) GetSubComment(ctx context.Context, id int32) (*SubComment, error) GetParentCommentUserId(ctx context.Context, id, rootId int32) (string, error) GetSubCommentReply(ctx context.Context, id int32, uuid string) (string, error) GetArticleAuthor(ctx context.Context, id int32) (string, error) GetTalkAuthor(ctx context.Context, id int32) (string, error) CreateCommentDraft(ctx context.Context, uuid string) (int32, error) CreateCommentFolder(ctx context.Context, id int32, uuid string) error CreateComment(ctx context.Context, id, creationId, creationType int32, creationAuthor, uuid string) error CreateSubComment(ctx context.Context, id, rootId, parentId, creationId, creationType int32, creationAuthor, rootUser, uuid, reply string) error CreateCommentCache(ctx context.Context, id, creationId, creationType int32, creationAuthor, uuid string) error CreateSubCommentCache(ctx context.Context, id, rootId, parentId, creationId, creationType int32, creationAuthor, rootUser, uuid, reply string) error AddCreationComment(ctx context.Context, creationId, creationType int32, uuid string) error AddArticleCommentUser(ctx context.Context, creationAuthor, uuid string) error AddArticleSubCommentUser(ctx context.Context, parentId int32, rootUser, parentUser, uuid string) error AddTalkCommentUser(ctx context.Context, creationAuthor, uuid string) error AddTalkSubCommentUser(ctx context.Context, parentId int32, rootUser, parentUser, uuid string) error SendComment(ctx context.Context, id int32, uuid string) (*CommentDraft, error) SendCommentAgreeToMq(ctx context.Context, id, creationId, creationType int32, uuid, userUuid, mode string) error SendSubCommentAgreeToMq(ctx context.Context, id int32, uuid, userUuid, mode string) error SendCommentToMq(ctx context.Context, comment *Comment, mode string) error SendCommentContentIrregularToMq(ctx context.Context, review *TextReview) error SendSubCommentToMq(ctx context.Context, comment *SubComment, mode string) error SendReviewToMq(ctx context.Context, review *CommentReview) error SendCommentStatisticToMq(ctx context.Context, uuid, userUuid, mode string) error SendScoreToMq(ctx context.Context, score int32, uuid, mode string) error SetRecord(ctx context.Context, id int32, uuid, ip string) error SetCommentAgree(ctx context.Context, id int32, uuid string) error SetSubCommentAgree(ctx context.Context, id int32, uuid string) error SetCommentComment(ctx context.Context, id int32) error SetUserCommentAgree(ctx context.Context, id int32, userUuid string) error SetUserCommentAgreeToCache(ctx context.Context, id int32, userUuid string) error SetCommentAgreeToCache(ctx context.Context, id, creationId, creationType int32, uuid, userUuid string) error SetSubCommentAgreeToCache(ctx context.Context, id int32, uuid, userUuid string) error SetCommentContentIrregular(ctx context.Context, review *TextReview) (*TextReview, error) SetCommentContentIrregularToCache(ctx context.Context, review *TextReview) error CancelUserCommentAgreeFromCache(ctx context.Context, id int32, userUuid string) error CancelCommentAgree(ctx context.Context, id int32, uuid string) error CancelSubCommentAgree(ctx context.Context, id int32, uuid string) error CancelUserCommentAgree(ctx context.Context, id int32, userUuid string) error CancelCommentAgreeFromCache(ctx context.Context, id, creationId, creationType int32, uuid, userUuid string) error CancelSubCommentAgreeFromCache(ctx context.Context, id int32, uuid, userUuid string) error DeleteCommentDraft(ctx context.Context, id int32, uuid string) error ReduceArticleCommentUser(ctx context.Context, creationAuthor, uuid string) error ReduceTalkCommentUser(ctx context.Context, creationAuthor, uuid string) error ReduceCreationComment(ctx context.Context, createId, createType int32, uuid string) error ReduceArticleSubCommentUser(ctx context.Context, parentId int32, rootUser, parentUser, uuid string) error ReduceTalkSubCommentUser(ctx context.Context, parentId int32, rootUser, parentUser, uuid string) error RemoveComment(ctx context.Context, id int32, uuid string) error RemoveSubComment(ctx context.Context, id, rootId int32, uuid string) error RemoveCommentAgree(ctx context.Context, id int32, uuid string) error RemoveCommentCache(ctx context.Context, id, creationId, creationType int32, creationAuthor, uuid string) error RemoveSubCommentCache(ctx context.Context, id, rootId, parentId, creationId, creationType int32, creationAuthor, rootUser, uuid, reply string) error }
type CommentReview ¶
type CommentStatistic ¶
type CommentUseCase ¶
type CommentUseCase struct {
// contains filtered or unexported fields
}
func NewCommentUseCase ¶
func NewCommentUseCase(repo CommentRepo, re Recovery, tm Transaction, logger log.Logger) *CommentUseCase
func (*CommentUseCase) AddCommentContentReviewDbAndCache ¶
func (r *CommentUseCase) AddCommentContentReviewDbAndCache(ctx context.Context, review *TextReview) error
func (*CommentUseCase) CancelCommentAgree ¶
func (*CommentUseCase) CancelCommentAgreeDbAndCache ¶
func (*CommentUseCase) CancelSubCommentAgree ¶
func (*CommentUseCase) CancelSubCommentAgreeDbAndCache ¶
func (*CommentUseCase) CommentContentIrregular ¶
func (r *CommentUseCase) CommentContentIrregular(ctx context.Context, review *TextReview) error
func (*CommentUseCase) CreateComment ¶
func (*CommentUseCase) CreateCommentDbAndCache ¶
func (*CommentUseCase) CreateCommentDraft ¶
func (*CommentUseCase) CreateSubComment ¶
func (*CommentUseCase) CreateSubCommentDbAndCache ¶
func (*CommentUseCase) GetCommentContentReview ¶
func (r *CommentUseCase) GetCommentContentReview(ctx context.Context, page int32, uuid string) ([]*TextReview, error)
func (*CommentUseCase) GetCommentList ¶
func (*CommentUseCase) GetCommentListHot ¶
func (*CommentUseCase) GetCommentListStatistic ¶
func (r *CommentUseCase) GetCommentListStatistic(ctx context.Context, ids []int32) ([]*CommentStatistic, error)
func (*CommentUseCase) GetCommentUser ¶
func (r *CommentUseCase) GetCommentUser(ctx context.Context, uuid string) (*CommentUser, error)
func (*CommentUseCase) GetLastCommentDraft ¶
func (r *CommentUseCase) GetLastCommentDraft(ctx context.Context, uuid string) (*CommentDraft, error)
func (*CommentUseCase) GetSubCommentList ¶
func (r *CommentUseCase) GetSubCommentList(ctx context.Context, page, id int32) ([]*SubComment, error)
func (*CommentUseCase) GetSubCommentListStatistic ¶
func (r *CommentUseCase) GetSubCommentListStatistic(ctx context.Context, ids []int32) ([]*CommentStatistic, error)
func (*CommentUseCase) GetUserCommentAgree ¶
func (*CommentUseCase) GetUserCommentArticleRepliedList ¶
func (*CommentUseCase) GetUserCommentArticleReplyList ¶
func (*CommentUseCase) GetUserCommentRepliedList ¶
func (*CommentUseCase) GetUserCommentTalkRepliedList ¶
func (*CommentUseCase) GetUserCommentTalkReplyList ¶
func (*CommentUseCase) GetUserSubCommentArticleRepliedList ¶
func (r *CommentUseCase) GetUserSubCommentArticleRepliedList(ctx context.Context, page int32, uuid string) ([]*SubComment, error)
func (*CommentUseCase) GetUserSubCommentArticleReplyList ¶
func (r *CommentUseCase) GetUserSubCommentArticleReplyList(ctx context.Context, page int32, uuid string) ([]*SubComment, error)
func (*CommentUseCase) GetUserSubCommentRepliedList ¶
func (r *CommentUseCase) GetUserSubCommentRepliedList(ctx context.Context, page int32, uuid string) ([]*SubComment, error)
func (*CommentUseCase) GetUserSubCommentTalkRepliedList ¶
func (r *CommentUseCase) GetUserSubCommentTalkRepliedList(ctx context.Context, page int32, uuid string) ([]*SubComment, error)
func (*CommentUseCase) GetUserSubCommentTalkReplyList ¶
func (r *CommentUseCase) GetUserSubCommentTalkReplyList(ctx context.Context, page int32, uuid string) ([]*SubComment, error)
func (*CommentUseCase) RemoveComment ¶
func (*CommentUseCase) RemoveCommentDbAndCache ¶
func (*CommentUseCase) RemoveSubComment ¶
func (*CommentUseCase) RemoveSubCommentDbAndCache ¶
func (*CommentUseCase) SendComment ¶
func (*CommentUseCase) SendSubComment ¶
func (*CommentUseCase) SetCommentAgree ¶
func (*CommentUseCase) SetCommentAgreeDbAndCache ¶
func (*CommentUseCase) SetSubCommentAgree ¶
func (*CommentUseCase) SetSubCommentAgreeDbAndCache ¶
type CommentUser ¶
type SubComment ¶
type TextReview ¶
Click to show internal directories.
Click to hide internal directories.