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 SendCommentAgreeMap
- type SendCommentMap
- type SendCommentStatisticMap
- type SendScoreMap
- type SendSubCommentAgreeMap
- type SendSubCommentMap
- type SubComment
- type TextReview
- type Transaction
Constants ¶
This section is empty.
Variables ¶
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 ¶
func (CommentReview) MarshalEasyJSON ¶ added in v1.2.0
func (v CommentReview) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (CommentReview) MarshalJSON ¶ added in v1.2.0
func (v CommentReview) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*CommentReview) UnmarshalEasyJSON ¶ added in v1.2.0
func (v *CommentReview) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*CommentReview) UnmarshalJSON ¶ added in v1.2.0
func (v *CommentReview) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
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 SendCommentAgreeMap ¶ added in v1.2.0
type SendCommentAgreeMap struct { Uuid string Id int32 CreationId int32 CreationType int32 UserUuid string Mode string }
func (SendCommentAgreeMap) MarshalEasyJSON ¶ added in v1.2.0
func (v SendCommentAgreeMap) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (SendCommentAgreeMap) MarshalJSON ¶ added in v1.2.0
func (v SendCommentAgreeMap) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*SendCommentAgreeMap) UnmarshalEasyJSON ¶ added in v1.2.0
func (v *SendCommentAgreeMap) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SendCommentAgreeMap) UnmarshalJSON ¶ added in v1.2.0
func (v *SendCommentAgreeMap) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type SendCommentMap ¶ added in v1.2.0
func (SendCommentMap) MarshalEasyJSON ¶ added in v1.2.0
func (v SendCommentMap) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (SendCommentMap) MarshalJSON ¶ added in v1.2.0
func (v SendCommentMap) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*SendCommentMap) UnmarshalEasyJSON ¶ added in v1.2.0
func (v *SendCommentMap) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SendCommentMap) UnmarshalJSON ¶ added in v1.2.0
func (v *SendCommentMap) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type SendCommentStatisticMap ¶ added in v1.2.0
func (SendCommentStatisticMap) MarshalEasyJSON ¶ added in v1.2.0
func (v SendCommentStatisticMap) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (SendCommentStatisticMap) MarshalJSON ¶ added in v1.2.0
func (v SendCommentStatisticMap) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*SendCommentStatisticMap) UnmarshalEasyJSON ¶ added in v1.2.0
func (v *SendCommentStatisticMap) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SendCommentStatisticMap) UnmarshalJSON ¶ added in v1.2.0
func (v *SendCommentStatisticMap) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type SendScoreMap ¶ added in v1.2.0
func (SendScoreMap) MarshalEasyJSON ¶ added in v1.2.0
func (v SendScoreMap) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (SendScoreMap) MarshalJSON ¶ added in v1.2.0
func (v SendScoreMap) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*SendScoreMap) UnmarshalEasyJSON ¶ added in v1.2.0
func (v *SendScoreMap) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SendScoreMap) UnmarshalJSON ¶ added in v1.2.0
func (v *SendScoreMap) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type SendSubCommentAgreeMap ¶ added in v1.2.0
func (SendSubCommentAgreeMap) MarshalEasyJSON ¶ added in v1.2.0
func (v SendSubCommentAgreeMap) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (SendSubCommentAgreeMap) MarshalJSON ¶ added in v1.2.0
func (v SendSubCommentAgreeMap) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*SendSubCommentAgreeMap) UnmarshalEasyJSON ¶ added in v1.2.0
func (v *SendSubCommentAgreeMap) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SendSubCommentAgreeMap) UnmarshalJSON ¶ added in v1.2.0
func (v *SendSubCommentAgreeMap) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type SendSubCommentMap ¶ added in v1.2.0
func (SendSubCommentMap) MarshalEasyJSON ¶ added in v1.2.0
func (v SendSubCommentMap) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (SendSubCommentMap) MarshalJSON ¶ added in v1.2.0
func (v SendSubCommentMap) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*SendSubCommentMap) UnmarshalEasyJSON ¶ added in v1.2.0
func (v *SendSubCommentMap) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*SendSubCommentMap) UnmarshalJSON ¶ added in v1.2.0
func (v *SendSubCommentMap) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface
type SubComment ¶
type TextReview ¶
type TextReview struct { Id int32 CommentId int32 CreateAt string Comment string Kind string JobId string Label string Result int32 Uuid string Mode string Section string }
func (TextReview) MarshalEasyJSON ¶ added in v1.2.0
func (v TextReview) MarshalEasyJSON(w *jwriter.Writer)
MarshalEasyJSON supports easyjson.Marshaler interface
func (TextReview) MarshalJSON ¶ added in v1.2.0
func (v TextReview) MarshalJSON() ([]byte, error)
MarshalJSON supports json.Marshaler interface
func (*TextReview) UnmarshalEasyJSON ¶ added in v1.2.0
func (v *TextReview) UnmarshalEasyJSON(l *jlexer.Lexer)
UnmarshalEasyJSON supports easyjson.Unmarshaler interface
func (*TextReview) UnmarshalJSON ¶ added in v1.2.0
func (v *TextReview) UnmarshalJSON(data []byte) error
UnmarshalJSON supports json.Unmarshaler interface