Documentation
¶
Index ¶
- Variables
- type AbuseInfo
- type Achievement
- type AchievementRepo
- type AchievementUseCase
- func (r *AchievementUseCase) AccessUserMedal(ctx context.Context, medal string) error
- func (r *AchievementUseCase) CancelUserMedalSet(ctx context.Context, medal string) error
- func (r *AchievementUseCase) GetAchievementList(ctx context.Context, uuids []string) ([]*Achievement, error)
- func (r *AchievementUseCase) GetUserAchievement(ctx context.Context, uuid string) (*Achievement, error)
- func (r *AchievementUseCase) GetUserMedal(ctx context.Context, uuid string) (*Medal, error)
- func (r *AchievementUseCase) GetUserMedalProgress(ctx context.Context) (*MedalProgress, error)
- func (r *AchievementUseCase) SetUserMedal(ctx context.Context, medal string) error
- type Active
- type AdsInfo
- type Article
- type ArticleDraft
- type ArticleRepo
- type ArticleStatistic
- type ArticleStatisticJudge
- type ArticleUseCase
- func (r *ArticleUseCase) ArticleDraftMark(ctx context.Context, id int32) error
- func (r *ArticleUseCase) ArticleStatisticJudge(ctx context.Context, id int32) (*ArticleStatisticJudge, error)
- func (r *ArticleUseCase) CancelArticleAgree(ctx context.Context, id int32, uuid string) error
- func (r *ArticleUseCase) CancelArticleCollect(ctx context.Context, id int32, uuid string) error
- func (r *ArticleUseCase) CreateArticleDraft(ctx context.Context) (int32, error)
- func (r *ArticleUseCase) DeleteArticle(ctx context.Context, id int32) error
- func (r *ArticleUseCase) DeleteArticleDraft(ctx context.Context, id int32) error
- func (r *ArticleUseCase) GetArticleContentReview(ctx context.Context, page int32) ([]*CreationContentReview, error)
- func (r *ArticleUseCase) GetArticleCount(ctx context.Context) (int32, error)
- func (r *ArticleUseCase) GetArticleCountVisitor(ctx context.Context, uuid string) (int32, error)
- func (r *ArticleUseCase) GetArticleDraftList(ctx context.Context) ([]*ArticleDraft, error)
- func (r *ArticleUseCase) GetArticleImageReview(ctx context.Context, page int32) ([]*CreationImageReview, error)
- func (r *ArticleUseCase) GetArticleList(ctx context.Context, page int32) ([]*Article, error)
- func (r *ArticleUseCase) GetArticleListHot(ctx context.Context, page int32) ([]*Article, error)
- func (r *ArticleUseCase) GetArticleListStatistic(ctx context.Context, ids []int32) ([]*ArticleStatistic, error)
- func (r *ArticleUseCase) GetArticleSearch(ctx context.Context, page int32, search, time string) ([]*Article, int32, error)
- func (r *ArticleUseCase) GetArticleStatistic(ctx context.Context, id int32, uuid string) (*ArticleStatistic, error)
- func (r *ArticleUseCase) GetColumnArticleList(ctx context.Context, id int32) ([]*Article, error)
- func (r *ArticleUseCase) GetLastArticleDraft(ctx context.Context) (*ArticleDraft, error)
- func (r *ArticleUseCase) GetUserArticleAgree(ctx context.Context) (map[int32]bool, error)
- func (r *ArticleUseCase) GetUserArticleCollect(ctx context.Context) (map[int32]bool, error)
- func (r *ArticleUseCase) GetUserArticleList(ctx context.Context, page int32) ([]*Article, error)
- func (r *ArticleUseCase) GetUserArticleListAll(ctx context.Context) ([]*Article, error)
- func (r *ArticleUseCase) GetUserArticleListSimple(ctx context.Context, page int32) ([]*Article, error)
- func (r *ArticleUseCase) GetUserArticleListVisitor(ctx context.Context, page int32, uuid string) ([]*Article, error)
- func (r *ArticleUseCase) SendArticle(ctx context.Context, id int32) error
- func (r *ArticleUseCase) SendArticleEdit(ctx context.Context, id int32) error
- func (r *ArticleUseCase) SetArticleAgree(ctx context.Context, id int32, uuid string) error
- func (r *ArticleUseCase) SetArticleCollect(ctx context.Context, id, collectionsId int32, uuid string) error
- func (r *ArticleUseCase) SetArticleView(ctx context.Context, id int32, uuid string) error
- type Collections
- type CollectionsDraft
- type Column
- type ColumnDraft
- type ColumnRepo
- type ColumnStatistic
- type ColumnStatisticJudge
- type ColumnUseCase
- func (r *ColumnUseCase) AddColumnIncludes(ctx context.Context, id, articleId int32) error
- func (r *ColumnUseCase) CancelColumnAgree(ctx context.Context, id int32, uuid string) error
- func (r *ColumnUseCase) CancelColumnCollect(ctx context.Context, id int32, uuid string) error
- func (r *ColumnUseCase) CancelSubscribeColumn(ctx context.Context, id int32) error
- func (r *ColumnUseCase) ColumnStatisticJudge(ctx context.Context, id int32) (*ColumnStatisticJudge, error)
- func (r *ColumnUseCase) CreateColumnDraft(ctx context.Context) (int32, error)
- func (r *ColumnUseCase) DeleteColumn(ctx context.Context, id int32) error
- func (r *ColumnUseCase) DeleteColumnIncludes(ctx context.Context, id, articleId int32) error
- func (r *ColumnUseCase) GetColumnContentReview(ctx context.Context, page int32) ([]*CreationContentReview, error)
- func (r *ColumnUseCase) GetColumnCount(ctx context.Context) (int32, error)
- func (r *ColumnUseCase) GetColumnCountVisitor(ctx context.Context, uuid string) (int32, error)
- func (r *ColumnUseCase) GetColumnImageReview(ctx context.Context, page int32) ([]*CreationImageReview, error)
- func (r *ColumnUseCase) GetColumnList(ctx context.Context, page int32) ([]*Column, error)
- func (r *ColumnUseCase) GetColumnListHot(ctx context.Context, page int32) ([]*Column, error)
- func (r *ColumnUseCase) GetColumnListStatistic(ctx context.Context, ids []int32) ([]*ColumnStatistic, error)
- func (r *ColumnUseCase) GetColumnSearch(ctx context.Context, page int32, search, time string) ([]*Column, int32, error)
- func (r *ColumnUseCase) GetColumnStatistic(ctx context.Context, id int32, uuid string) (*ColumnStatistic, error)
- func (r *ColumnUseCase) GetColumnSubscribes(ctx context.Context, ids []int32) ([]*Subscribe, error)
- func (r *ColumnUseCase) GetLastColumnDraft(ctx context.Context) (*ColumnDraft, error)
- func (r *ColumnUseCase) GetSubscribeList(ctx context.Context, page int32) ([]*Column, error)
- func (r *ColumnUseCase) GetSubscribeListCount(ctx context.Context, uuid string) (int32, error)
- func (r *ColumnUseCase) GetUserColumnAgree(ctx context.Context) (map[int32]bool, error)
- func (r *ColumnUseCase) GetUserColumnCollect(ctx context.Context) (map[int32]bool, error)
- func (r *ColumnUseCase) GetUserColumnList(ctx context.Context, page int32) ([]*Column, error)
- func (r *ColumnUseCase) GetUserColumnListSimple(ctx context.Context, page int32) ([]*Column, error)
- func (r *ColumnUseCase) GetUserColumnListVisitor(ctx context.Context, page int32, uuid string) ([]*Column, error)
- func (r *ColumnUseCase) GetUserSubscribeColumn(ctx context.Context) (map[int32]bool, error)
- func (r *ColumnUseCase) SendColumn(ctx context.Context, id int32) error
- func (r *ColumnUseCase) SendColumnEdit(ctx context.Context, id int32) error
- func (r *ColumnUseCase) SetColumnAgree(ctx context.Context, id int32, uuid string) error
- func (r *ColumnUseCase) SetColumnCollect(ctx context.Context, id, collectionsId int32, uuid string) error
- func (r *ColumnUseCase) SetColumnView(ctx context.Context, id int32, uuid string) error
- func (r *ColumnUseCase) SubscribeColumn(ctx context.Context, id int32) error
- func (r *ColumnUseCase) SubscribeJudge(ctx context.Context, id int32) (bool, error)
- type Comment
- type CommentContentReview
- type CommentDraft
- type CommentRepo
- type CommentStatistic
- type CommentUseCase
- func (r *CommentUseCase) CancelCommentAgree(ctx context.Context, id, creationId, creationType int32, uuid string) error
- func (r *CommentUseCase) CancelSubCommentAgree(ctx context.Context, id int32, uuid string) error
- func (r *CommentUseCase) CreateCommentDraft(ctx context.Context) (int32, error)
- func (r *CommentUseCase) GetCommentContentReview(ctx context.Context, page int32) ([]*CommentContentReview, 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) GetCommentUser(ctx context.Context) (*CommentUser, error)
- func (r *CommentUseCase) GetLastCommentDraft(ctx context.Context) (*CommentDraft, error)
- func (r *CommentUseCase) GetSubCommentList(ctx context.Context, page, id int32) ([]*SubComment, error)
- func (r *CommentUseCase) GetUserCommentAgree(ctx context.Context) (map[int32]bool, error)
- func (r *CommentUseCase) GetUserCommentArticleRepliedList(ctx context.Context, page int32) ([]*Comment, error)
- func (r *CommentUseCase) GetUserCommentArticleReplyList(ctx context.Context, page int32) ([]*Comment, error)
- func (r *CommentUseCase) GetUserCommentRepliedList(ctx context.Context, page int32) ([]*Comment, error)
- func (r *CommentUseCase) GetUserCommentTalkRepliedList(ctx context.Context, page int32) ([]*Comment, error)
- func (r *CommentUseCase) GetUserCommentTalkReplyList(ctx context.Context, page int32) ([]*Comment, error)
- func (r *CommentUseCase) GetUserSubCommentArticleRepliedList(ctx context.Context, page int32) ([]*SubComment, error)
- func (r *CommentUseCase) GetUserSubCommentArticleReplyList(ctx context.Context, page int32) ([]*SubComment, error)
- func (r *CommentUseCase) GetUserSubCommentRepliedList(ctx context.Context, page int32) ([]*SubComment, error)
- func (r *CommentUseCase) GetUserSubCommentTalkRepliedList(ctx context.Context, page int32) ([]*SubComment, error)
- func (r *CommentUseCase) GetUserSubCommentTalkReplyList(ctx context.Context, page int32) ([]*SubComment, error)
- func (r *CommentUseCase) RemoveComment(ctx context.Context, id int32) error
- func (r *CommentUseCase) RemoveSubComment(ctx context.Context, id int32) error
- func (r *CommentUseCase) SendComment(ctx context.Context, id int32) error
- func (r *CommentUseCase) SendSubComment(ctx context.Context, id int32) error
- func (r *CommentUseCase) SetCommentAgree(ctx context.Context, id, creationId, creationType int32, uuid string) error
- func (r *CommentUseCase) SetSubCommentAgree(ctx context.Context, id int32, uuid string) error
- type CommentUser
- type CreationContentReview
- type CreationImageReview
- type CreationRepo
- type CreationUseCase
- func (r *CreationUseCase) CreateCollectionsDraft(ctx context.Context) (int32, error)
- func (r *CreationUseCase) DeleteCollections(ctx context.Context, id int32) error
- func (r *CreationUseCase) GetCollectArticleCount(ctx context.Context, id int32) (int32, error)
- func (r *CreationUseCase) GetCollectArticleList(ctx context.Context, id, page int32) ([]*Article, error)
- func (r *CreationUseCase) GetCollectColumnCount(ctx context.Context, id int32) (int32, error)
- func (r *CreationUseCase) GetCollectColumnList(ctx context.Context, id, page int32) ([]*Column, error)
- func (r *CreationUseCase) GetCollectTalkCount(ctx context.Context, id int32) (int32, error)
- func (r *CreationUseCase) GetCollectTalkList(ctx context.Context, id, page int32) ([]*Talk, error)
- func (r *CreationUseCase) GetCollections(ctx context.Context, id int32, uuid string) (*Collections, error)
- func (r *CreationUseCase) GetCollectionsContentReview(ctx context.Context, page int32) ([]*CreationContentReview, error)
- func (r *CreationUseCase) GetCollectionsCount(ctx context.Context) (int32, error)
- func (r *CreationUseCase) GetCollectionsList(ctx context.Context, page int32) ([]*Collections, error)
- func (r *CreationUseCase) GetCollectionsListAll(ctx context.Context) ([]*Collections, error)
- func (r *CreationUseCase) GetCollectionsListByVisitor(ctx context.Context, page int32, uuid string) ([]*Collections, error)
- func (r *CreationUseCase) GetCollectionsVisitorCount(ctx context.Context, uuid string) (int32, error)
- func (r *CreationUseCase) GetCreationUser(ctx context.Context, uuid string) (*CreationUser, error)
- func (r *CreationUseCase) GetCreationUserVisitor(ctx context.Context, uuid string) (*CreationUser, error)
- func (r *CreationUseCase) GetLastCollectionsDraft(ctx context.Context) (*CollectionsDraft, error)
- func (r *CreationUseCase) GetLeaderBoard(ctx context.Context) ([]*LeaderBoard, error)
- func (r *CreationUseCase) GetUserTimeLineListVisitor(ctx context.Context, page int32, uuid string) ([]*TimeLine, error)
- func (r *CreationUseCase) SendCollections(ctx context.Context, id int32) error
- func (r *CreationUseCase) SendCollectionsEdit(ctx context.Context, id int32) error
- type CreationUser
- type Credentials
- type Follow
- type Follows
- type Github
- type IllegalInfo
- type LeaderBoard
- type MailBox
- type Medal
- type MedalProgress
- type MessageRepo
- type MessageUseCase
- func (r *MessageUseCase) GetMailBoxLastTime(ctx context.Context) (*MailBox, error)
- func (r *MessageUseCase) GetMessageNotification(ctx context.Context) (*Notification, error)
- func (r *MessageUseCase) GetMessageSystemNotification(ctx context.Context, page int32) ([]*SystemNotification, error)
- func (r *MessageUseCase) RemoveMailBoxCommentCount(ctx context.Context) error
- func (r *MessageUseCase) RemoveMailBoxSubCommentCount(ctx context.Context) error
- func (r *MessageUseCase) RemoveMailBoxSystemNotificationCount(ctx context.Context) error
- func (r *MessageUseCase) SetMailBoxLastTime(ctx context.Context, time int32) error
- type News
- type NewsRepo
- type NewsUseCase
- type Notification
- type PornInfo
- type Recovery
- type Section
- type SectionAbuseInfo
- type SectionAdsInfo
- type SectionIllegalInfo
- type SectionPornInfo
- type SubComment
- type Subscribe
- type SystemNotification
- type Talk
- type TalkDraft
- type TalkRepo
- type TalkStatistic
- type TalkStatisticJudge
- type TalkUseCase
- func (r *TalkUseCase) CancelTalkAgree(ctx context.Context, id int32, uuid string) error
- func (r *TalkUseCase) CancelTalkCollect(ctx context.Context, id int32, uuid string) error
- func (r *TalkUseCase) CreateTalkDraft(ctx context.Context) (int32, error)
- func (r *TalkUseCase) DeleteTalk(ctx context.Context, id int32) error
- func (r *TalkUseCase) GetLastTalkDraft(ctx context.Context) (*TalkDraft, error)
- func (r *TalkUseCase) GetTalkContentReview(ctx context.Context, page int32) ([]*CreationContentReview, error)
- func (r *TalkUseCase) GetTalkCount(ctx context.Context) (int32, error)
- func (r *TalkUseCase) GetTalkCountVisitor(ctx context.Context, uuid string) (int32, error)
- func (r *TalkUseCase) GetTalkImageReview(ctx context.Context, page int32) ([]*CreationImageReview, error)
- func (r *TalkUseCase) GetTalkList(ctx context.Context, page int32) ([]*Talk, error)
- func (r *TalkUseCase) GetTalkListHot(ctx context.Context, page int32) ([]*Talk, error)
- func (r *TalkUseCase) GetTalkListStatistic(ctx context.Context, ids []int32) ([]*TalkStatistic, error)
- func (r *TalkUseCase) GetTalkSearch(ctx context.Context, page int32, search, time string) ([]*Talk, int32, error)
- func (r *TalkUseCase) GetTalkStatistic(ctx context.Context, id int32, uuid string) (*TalkStatistic, error)
- func (r *TalkUseCase) GetUserTalkAgree(ctx context.Context) (map[int32]bool, error)
- func (r *TalkUseCase) GetUserTalkCollect(ctx context.Context) (map[int32]bool, error)
- func (r *TalkUseCase) GetUserTalkList(ctx context.Context, page int32) ([]*Talk, error)
- func (r *TalkUseCase) GetUserTalkListSimple(ctx context.Context, page int32) ([]*Talk, error)
- func (r *TalkUseCase) GetUserTalkListVisitor(ctx context.Context, page int32, uuid string) ([]*Talk, error)
- func (r *TalkUseCase) SendTalk(ctx context.Context, id int32) error
- func (r *TalkUseCase) SendTalkEdit(ctx context.Context, id int32) error
- func (r *TalkUseCase) SetTalkAgree(ctx context.Context, id int32, uuid string) error
- func (r *TalkUseCase) SetTalkCollect(ctx context.Context, id, collectionsId int32, uuid string) error
- func (r *TalkUseCase) SetTalkView(ctx context.Context, id int32, uuid string) error
- func (r *TalkUseCase) TalkStatisticJudge(ctx context.Context, id int32) (*TalkStatisticJudge, error)
- type TextReview
- type TimeLIneFollows
- type TimeLine
- type UserAccount
- type UserImageReview
- type UserProfile
- type UserProfileUpdate
- type UserRepo
- type UserSearch
- type UserUseCase
- func (r *UserUseCase) CancelUserFollow(ctx context.Context, uuid string) error
- func (r *UserUseCase) ChangeUserPassword(ctx context.Context, oldpassword, password string) error
- func (r *UserUseCase) GetAccount(ctx context.Context) (*UserAccount, error)
- func (r *UserUseCase) GetAvatarReview(ctx context.Context, page int32) ([]*UserImageReview, error)
- func (r *UserUseCase) GetCosSessionKey(ctx context.Context) (*Credentials, error)
- func (r *UserUseCase) GetCoverReview(ctx context.Context, page int32) ([]*UserImageReview, error)
- func (r *UserUseCase) GetFollowList(ctx context.Context, page int32, uuid string) ([]*Follow, error)
- func (r *UserUseCase) GetFollowListCount(ctx context.Context, uuid string) (int32, error)
- func (r *UserUseCase) GetFollowedList(ctx context.Context, page int32, uuid string) ([]*Follow, error)
- func (r *UserUseCase) GetFollowedListCount(ctx context.Context, uuid string) (int32, error)
- func (r *UserUseCase) GetProfile(ctx context.Context) (*UserProfile, error)
- func (r *UserUseCase) GetProfileList(ctx context.Context, uuids []string) ([]*UserProfile, error)
- func (r *UserUseCase) GetProfileUpdate(ctx context.Context) (*UserProfileUpdate, error)
- func (r *UserUseCase) GetTimeLineUsers(ctx context.Context) ([]*TimeLIneFollows, error)
- func (r *UserUseCase) GetUserFollow(ctx context.Context, uuid string) (bool, error)
- func (r *UserUseCase) GetUserFollows(ctx context.Context) (map[string]bool, error)
- func (r *UserUseCase) GetUserInfo(ctx context.Context) (*UserProfile, error)
- func (r *UserUseCase) GetUserInfoVisitor(ctx context.Context, uuid string) (*UserProfile, error)
- func (r *UserUseCase) GetUserSearch(ctx context.Context, page int32, search string) ([]*UserSearch, int32, error)
- func (r *UserUseCase) LoginByCode(ctx context.Context, phone, code string) (string, error)
- func (r *UserUseCase) LoginByGitee(ctx context.Context, code string) (string, error)
- func (r *UserUseCase) LoginByGithub(ctx context.Context, code string) (*Github, error)
- func (r *UserUseCase) LoginByPassword(ctx context.Context, account, password, mode string) (string, error)
- func (r *UserUseCase) LoginByQQ(ctx context.Context, code string) (string, error)
- func (r *UserUseCase) LoginByWechat(ctx context.Context, code string) (string, error)
- func (r *UserUseCase) LoginPasswordReset(ctx context.Context, account, password, code, mode string) error
- func (r *UserUseCase) SendEmailCode(ctx context.Context, template, email string) error
- func (r *UserUseCase) SendPhoneCode(ctx context.Context, template, phone string) error
- func (r *UserUseCase) SetUserEmail(ctx context.Context, email, code string) error
- func (r *UserUseCase) SetUserFollow(ctx context.Context, uuid string) error
- func (r *UserUseCase) SetUserGitee(ctx context.Context, code, redirectUrl string) error
- func (r *UserUseCase) SetUserGithub(ctx context.Context, code, redirectUrl string) error
- func (r *UserUseCase) SetUserPassword(ctx context.Context, password string) error
- func (r *UserUseCase) SetUserPhone(ctx context.Context, phone, code string) error
- func (r *UserUseCase) SetUserProfile(ctx context.Context, profile *UserProfileUpdate) error
- func (r *UserUseCase) SetUserQQ(ctx context.Context, code, redirectUrl string) error
- func (r *UserUseCase) SetUserWechat(ctx context.Context, code, redirectUrl string) error
- func (r *UserUseCase) UnbindUserEmail(ctx context.Context, ...) error
- func (r *UserUseCase) UnbindUserGitee(ctx context.Context, ...) error
- func (r *UserUseCase) UnbindUserGithub(ctx context.Context, ...) error
- func (r *UserUseCase) UnbindUserPhone(ctx context.Context, ...) error
- func (r *UserUseCase) UnbindUserQQ(ctx context.Context, ...) error
- func (r *UserUseCase) UnbindUserWechat(ctx context.Context, ...) error
- func (r *UserUseCase) UserRegister(ctx context.Context, email, password, code string) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Achievement ¶
type AchievementRepo ¶
type AchievementRepo interface {
GetAchievementList(ctx context.Context, uuids []string) ([]*Achievement, error)
GetUserAchievement(ctx context.Context, uuid string) (*Achievement, error)
GetUserActive(ctx context.Context, uuid string) (*Active, error)
GetUserMedal(ctx context.Context, uuid string) (*Medal, error)
SetUserMedal(ctx context.Context, medal, uuid string) error
CancelUserMedalSet(ctx context.Context, medal, uuid string) error
AccessUserMedal(ctx context.Context, medal, uuid string) error
}
type AchievementUseCase ¶
type AchievementUseCase struct {
// contains filtered or unexported fields
}
func NewAchievementUseCase ¶
func NewAchievementUseCase(repo AchievementRepo, creationRepo CreationRepo, commentRepo CommentRepo, re Recovery, logger log.Logger) *AchievementUseCase
func (*AchievementUseCase) AccessUserMedal ¶
func (r *AchievementUseCase) AccessUserMedal(ctx context.Context, medal string) error
func (*AchievementUseCase) CancelUserMedalSet ¶
func (r *AchievementUseCase) CancelUserMedalSet(ctx context.Context, medal string) error
func (*AchievementUseCase) GetAchievementList ¶
func (r *AchievementUseCase) GetAchievementList(ctx context.Context, uuids []string) ([]*Achievement, error)
func (*AchievementUseCase) GetUserAchievement ¶
func (r *AchievementUseCase) GetUserAchievement(ctx context.Context, uuid string) (*Achievement, error)
func (*AchievementUseCase) GetUserMedal ¶
func (*AchievementUseCase) GetUserMedalProgress ¶
func (r *AchievementUseCase) GetUserMedalProgress(ctx context.Context) (*MedalProgress, error)
func (*AchievementUseCase) SetUserMedal ¶
func (r *AchievementUseCase) SetUserMedal(ctx context.Context, medal string) error
type ArticleDraft ¶
type ArticleRepo ¶
type ArticleRepo interface {
CreateArticleDraft(ctx context.Context, uuid string) (int32, error)
GetLastArticleDraft(ctx context.Context, uuid string) (*ArticleDraft, error)
GetArticleList(ctx context.Context, page int32) ([]*Article, error)
GetArticleListHot(ctx context.Context, page int32) ([]*Article, error)
GetUserArticleListAll(ctx context.Context, uuid string) ([]*Article, error)
GetColumnArticleList(ctx context.Context, id int32) ([]*Article, error)
GetArticleCount(ctx context.Context, uuid string) (int32, error)
GetArticleCountVisitor(ctx context.Context, uuid string) (int32, error)
GetUserArticleList(ctx context.Context, page int32, uuid string) ([]*Article, error)
GetUserArticleListVisitor(ctx context.Context, page int32, uuid string) ([]*Article, error)
GetArticleStatistic(ctx context.Context, id int32, uuid string) (*ArticleStatistic, error)
GetUserArticleAgree(ctx context.Context, uuid string) (map[int32]bool, error)
GetUserArticleCollect(ctx context.Context, uuid string) (map[int32]bool, error)
GetArticleListStatistic(ctx context.Context, articleList []*Article) ([]*ArticleStatistic, error)
GetArticleDraftList(ctx context.Context, uuid string) ([]*ArticleDraft, error)
GetArticleSearch(ctx context.Context, page int32, search, time string) ([]*Article, int32, error)
GetArticleImageReview(ctx context.Context, page int32, uuid string) ([]*CreationImageReview, error)
GetArticleContentReview(ctx context.Context, page int32, uuid string) ([]*CreationContentReview, error)
ArticleDraftMark(ctx context.Context, id int32, uuid string) error
SendArticle(ctx context.Context, id int32, uuid, ip string) error
SendArticleEdit(ctx context.Context, id int32, uuid, ip string) error
DeleteArticle(ctx context.Context, id int32, uuid string) error
DeleteArticleDraft(ctx context.Context, id int32, uuid string) error
SetArticleAgree(ctx context.Context, id int32, uuid, userUuid string) error
SetArticleView(ctx context.Context, id int32, uuid string) error
SetArticleCollect(ctx context.Context, id, collectionsId int32, uuid, userUuid string) error
CancelArticleAgree(ctx context.Context, id int32, uuid, userUuid string) error
CancelArticleCollect(ctx context.Context, id int32, uuid, userUuid string) error
ArticleStatisticJudge(ctx context.Context, id int32, uuid string) (*ArticleStatisticJudge, error)
}
type ArticleStatistic ¶
type ArticleStatisticJudge ¶
type ArticleUseCase ¶
type ArticleUseCase struct {
// contains filtered or unexported fields
}
func NewArticleUseCase ¶
func NewArticleUseCase(repo ArticleRepo, re Recovery, logger log.Logger) *ArticleUseCase
func (*ArticleUseCase) ArticleDraftMark ¶
func (r *ArticleUseCase) ArticleDraftMark(ctx context.Context, id int32) error
func (*ArticleUseCase) ArticleStatisticJudge ¶
func (r *ArticleUseCase) ArticleStatisticJudge(ctx context.Context, id int32) (*ArticleStatisticJudge, error)
func (*ArticleUseCase) CancelArticleAgree ¶
func (*ArticleUseCase) CancelArticleCollect ¶
func (*ArticleUseCase) CreateArticleDraft ¶
func (r *ArticleUseCase) CreateArticleDraft(ctx context.Context) (int32, error)
func (*ArticleUseCase) DeleteArticle ¶
func (r *ArticleUseCase) DeleteArticle(ctx context.Context, id int32) error
func (*ArticleUseCase) DeleteArticleDraft ¶ added in v1.3.0
func (r *ArticleUseCase) DeleteArticleDraft(ctx context.Context, id int32) error
func (*ArticleUseCase) GetArticleContentReview ¶
func (r *ArticleUseCase) GetArticleContentReview(ctx context.Context, page int32) ([]*CreationContentReview, error)
func (*ArticleUseCase) GetArticleCount ¶
func (r *ArticleUseCase) GetArticleCount(ctx context.Context) (int32, error)
func (*ArticleUseCase) GetArticleCountVisitor ¶
func (*ArticleUseCase) GetArticleDraftList ¶
func (r *ArticleUseCase) GetArticleDraftList(ctx context.Context) ([]*ArticleDraft, error)
func (*ArticleUseCase) GetArticleImageReview ¶
func (r *ArticleUseCase) GetArticleImageReview(ctx context.Context, page int32) ([]*CreationImageReview, error)
func (*ArticleUseCase) GetArticleList ¶
func (*ArticleUseCase) GetArticleListHot ¶
func (*ArticleUseCase) GetArticleListStatistic ¶
func (r *ArticleUseCase) GetArticleListStatistic(ctx context.Context, ids []int32) ([]*ArticleStatistic, error)
GetArticleListStatistic todo: delete
func (*ArticleUseCase) GetArticleSearch ¶
func (*ArticleUseCase) GetArticleStatistic ¶
func (r *ArticleUseCase) GetArticleStatistic(ctx context.Context, id int32, uuid string) (*ArticleStatistic, error)
func (*ArticleUseCase) GetColumnArticleList ¶
func (*ArticleUseCase) GetLastArticleDraft ¶
func (r *ArticleUseCase) GetLastArticleDraft(ctx context.Context) (*ArticleDraft, error)
func (*ArticleUseCase) GetUserArticleAgree ¶
func (*ArticleUseCase) GetUserArticleCollect ¶
func (*ArticleUseCase) GetUserArticleList ¶
func (*ArticleUseCase) GetUserArticleListAll ¶
func (r *ArticleUseCase) GetUserArticleListAll(ctx context.Context) ([]*Article, error)
func (*ArticleUseCase) GetUserArticleListSimple ¶
func (*ArticleUseCase) GetUserArticleListVisitor ¶
func (*ArticleUseCase) SendArticle ¶
func (r *ArticleUseCase) SendArticle(ctx context.Context, id int32) error
func (*ArticleUseCase) SendArticleEdit ¶
func (r *ArticleUseCase) SendArticleEdit(ctx context.Context, id int32) error
func (*ArticleUseCase) SetArticleAgree ¶
func (*ArticleUseCase) SetArticleCollect ¶
func (*ArticleUseCase) SetArticleView ¶
type Collections ¶
type CollectionsDraft ¶
type ColumnDraft ¶
type ColumnRepo ¶
type ColumnRepo interface {
GetLastColumnDraft(ctx context.Context, uuid string) (*ColumnDraft, error)
GetColumnList(ctx context.Context, page int32) ([]*Column, error)
GetColumnListHot(ctx context.Context, page int32) ([]*Column, error)
GetUserColumnList(ctx context.Context, page int32, uuid string) ([]*Column, error)
GetUserColumnListVisitor(ctx context.Context, page int32, uuid string) ([]*Column, error)
GetColumnCount(ctx context.Context, uuid string) (int32, error)
GetColumnCountVisitor(ctx context.Context, uuid string) (int32, error)
GetColumnListStatistic(ctx context.Context, columnList []*Column) ([]*ColumnStatistic, error)
GetColumnStatistic(ctx context.Context, id int32, uuid string) (*ColumnStatistic, error)
GetSubscribeList(ctx context.Context, page int32, uuid string) ([]*Column, error)
GetSubscribeListCount(ctx context.Context, uuid string) (int32, error)
GetColumnSubscribes(ctx context.Context, uuid string, ids []int32) ([]*Subscribe, error)
GetColumnSearch(ctx context.Context, page int32, search, time string) ([]*Column, int32, error)
GetUserColumnAgree(ctx context.Context, uuid string) (map[int32]bool, error)
GetUserColumnCollect(ctx context.Context, uuid string) (map[int32]bool, error)
GetUserSubscribeColumn(ctx context.Context, uuid string) (map[int32]bool, error)
GetColumnImageReview(ctx context.Context, page int32, uuid string) ([]*CreationImageReview, error)
GetColumnContentReview(ctx context.Context, page int32, uuid string) ([]*CreationContentReview, error)
SendColumn(ctx context.Context, id int32, uuid, ip string) error
SendColumnEdit(ctx context.Context, id int32, uuid, ip string) error
CreateColumnDraft(ctx context.Context, uuid string) (int32, error)
SubscribeColumn(ctx context.Context, id int32, uuid string) error
SubscribeJudge(ctx context.Context, id int32, uuid string) (bool, error)
DeleteColumn(ctx context.Context, id int32, uuid string) error
ColumnStatisticJudge(ctx context.Context, id int32, uuid string) (*ColumnStatisticJudge, error)
SetColumnView(ctx context.Context, id int32, uuid string) error
SetColumnAgree(ctx context.Context, id int32, uuid, userUuid string) error
SetColumnCollect(ctx context.Context, id, collectionsId int32, uuid, userUuid string) error
CancelColumnAgree(ctx context.Context, id int32, uuid, userUuid string) error
CancelColumnCollect(ctx context.Context, id int32, uuid, userUuid string) error
CancelSubscribeColumn(ctx context.Context, id int32, uuid string) error
AddColumnIncludes(ctx context.Context, id, articleId int32, uuid string) error
DeleteColumnIncludes(ctx context.Context, id, articleId int32, uuid string) error
}
type ColumnStatistic ¶
type ColumnStatisticJudge ¶
type ColumnUseCase ¶
type ColumnUseCase struct {
// contains filtered or unexported fields
}
func NewColumnUseCase ¶
func NewColumnUseCase(repo ColumnRepo, re Recovery, logger log.Logger) *ColumnUseCase
func (*ColumnUseCase) AddColumnIncludes ¶
func (r *ColumnUseCase) AddColumnIncludes(ctx context.Context, id, articleId int32) error
func (*ColumnUseCase) CancelColumnAgree ¶
func (*ColumnUseCase) CancelColumnCollect ¶
func (*ColumnUseCase) CancelSubscribeColumn ¶
func (r *ColumnUseCase) CancelSubscribeColumn(ctx context.Context, id int32) error
func (*ColumnUseCase) ColumnStatisticJudge ¶
func (r *ColumnUseCase) ColumnStatisticJudge(ctx context.Context, id int32) (*ColumnStatisticJudge, error)
func (*ColumnUseCase) CreateColumnDraft ¶
func (r *ColumnUseCase) CreateColumnDraft(ctx context.Context) (int32, error)
func (*ColumnUseCase) DeleteColumn ¶
func (r *ColumnUseCase) DeleteColumn(ctx context.Context, id int32) error
func (*ColumnUseCase) DeleteColumnIncludes ¶
func (r *ColumnUseCase) DeleteColumnIncludes(ctx context.Context, id, articleId int32) error
func (*ColumnUseCase) GetColumnContentReview ¶
func (r *ColumnUseCase) GetColumnContentReview(ctx context.Context, page int32) ([]*CreationContentReview, error)
func (*ColumnUseCase) GetColumnCount ¶
func (r *ColumnUseCase) GetColumnCount(ctx context.Context) (int32, error)
func (*ColumnUseCase) GetColumnCountVisitor ¶
func (*ColumnUseCase) GetColumnImageReview ¶
func (r *ColumnUseCase) GetColumnImageReview(ctx context.Context, page int32) ([]*CreationImageReview, error)
func (*ColumnUseCase) GetColumnList ¶
func (*ColumnUseCase) GetColumnListHot ¶
func (*ColumnUseCase) GetColumnListStatistic ¶
func (r *ColumnUseCase) GetColumnListStatistic(ctx context.Context, ids []int32) ([]*ColumnStatistic, error)
GetColumnListStatistic todo: delete
func (*ColumnUseCase) GetColumnSearch ¶
func (*ColumnUseCase) GetColumnStatistic ¶
func (r *ColumnUseCase) GetColumnStatistic(ctx context.Context, id int32, uuid string) (*ColumnStatistic, error)
func (*ColumnUseCase) GetColumnSubscribes ¶
func (*ColumnUseCase) GetLastColumnDraft ¶
func (r *ColumnUseCase) GetLastColumnDraft(ctx context.Context) (*ColumnDraft, error)
func (*ColumnUseCase) GetSubscribeList ¶
func (*ColumnUseCase) GetSubscribeListCount ¶
func (*ColumnUseCase) GetUserColumnAgree ¶
func (*ColumnUseCase) GetUserColumnCollect ¶
func (*ColumnUseCase) GetUserColumnList ¶
func (*ColumnUseCase) GetUserColumnListSimple ¶
func (*ColumnUseCase) GetUserColumnListVisitor ¶
func (*ColumnUseCase) GetUserSubscribeColumn ¶
func (*ColumnUseCase) SendColumn ¶
func (r *ColumnUseCase) SendColumn(ctx context.Context, id int32) error
func (*ColumnUseCase) SendColumnEdit ¶
func (r *ColumnUseCase) SendColumnEdit(ctx context.Context, id int32) error
func (*ColumnUseCase) SetColumnAgree ¶
func (*ColumnUseCase) SetColumnCollect ¶
func (*ColumnUseCase) SetColumnView ¶
func (*ColumnUseCase) SubscribeColumn ¶
func (r *ColumnUseCase) SubscribeColumn(ctx context.Context, id int32) error
func (*ColumnUseCase) SubscribeJudge ¶
type CommentContentReview ¶
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, page, creationId, creationType int32, key string, commentList []*Comment) ([]*CommentStatistic, error)
GetSubCommentListStatistic(ctx context.Context, page, id int32, commentList []*SubComment) ([]*CommentStatistic, error)
GetUserProfileList(ctx context.Context, page, creationId, creationType int32, key string, commentList []*Comment) (map[string]string, error)
GetSubUserProfileList(ctx context.Context, page, id int32, commentList []*SubComment) (map[string]string, error)
GetUserCommentArticleReplyList(ctx context.Context, page int32, uuid string) ([]*Comment, error)
GetUserSubCommentArticleReplyList(ctx context.Context, page int32, uuid string) ([]*SubComment, error)
GetUserSubCommentProfileList(ctx context.Context, page int32, key, uuid string, commentList []*SubComment) (map[string]string, error)
GetUserCommentProfileList(ctx context.Context, page int32, key, uuid string, commentList []*Comment) (map[string]string, 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) ([]*CommentContentReview, error)
CreateCommentDraft(ctx context.Context, uuid string) (int32, error)
SendComment(ctx context.Context, id int32, uuid, ip string) error
SendSubComment(ctx context.Context, id int32, uuid, ip string) error
RemoveComment(ctx context.Context, id int32, uuid string) error
RemoveSubComment(ctx context.Context, id int32, uuid string) error
SetCommentAgree(ctx context.Context, id, creationId, creationType int32, uuid, userUuid string) error
SetSubCommentAgree(ctx context.Context, id int32, uuid, userUuid string) error
CancelCommentAgree(ctx context.Context, id, creationId, creationType int32, uuid, userUuid string) error
CancelSubCommentAgree(ctx context.Context, id int32, uuid, userUuid string) error
}
type CommentStatistic ¶
type CommentUseCase ¶
type CommentUseCase struct {
// contains filtered or unexported fields
}
func NewCommentUseCase ¶
func NewCommentUseCase(repo CommentRepo, re Recovery, logger log.Logger) *CommentUseCase
func (*CommentUseCase) CancelCommentAgree ¶
func (*CommentUseCase) CancelSubCommentAgree ¶
func (*CommentUseCase) CreateCommentDraft ¶
func (r *CommentUseCase) CreateCommentDraft(ctx context.Context) (int32, error)
func (*CommentUseCase) GetCommentContentReview ¶
func (r *CommentUseCase) GetCommentContentReview(ctx context.Context, page int32) ([]*CommentContentReview, error)
func (*CommentUseCase) GetCommentList ¶
func (*CommentUseCase) GetCommentListHot ¶
func (*CommentUseCase) GetCommentUser ¶
func (r *CommentUseCase) GetCommentUser(ctx context.Context) (*CommentUser, error)
func (*CommentUseCase) GetLastCommentDraft ¶
func (r *CommentUseCase) GetLastCommentDraft(ctx context.Context) (*CommentDraft, error)
func (*CommentUseCase) GetSubCommentList ¶
func (r *CommentUseCase) GetSubCommentList(ctx context.Context, page, id int32) ([]*SubComment, 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) ([]*SubComment, error)
func (*CommentUseCase) GetUserSubCommentArticleReplyList ¶
func (r *CommentUseCase) GetUserSubCommentArticleReplyList(ctx context.Context, page int32) ([]*SubComment, error)
func (*CommentUseCase) GetUserSubCommentRepliedList ¶
func (r *CommentUseCase) GetUserSubCommentRepliedList(ctx context.Context, page int32) ([]*SubComment, error)
func (*CommentUseCase) GetUserSubCommentTalkRepliedList ¶
func (r *CommentUseCase) GetUserSubCommentTalkRepliedList(ctx context.Context, page int32) ([]*SubComment, error)
func (*CommentUseCase) GetUserSubCommentTalkReplyList ¶
func (r *CommentUseCase) GetUserSubCommentTalkReplyList(ctx context.Context, page int32) ([]*SubComment, error)
func (*CommentUseCase) RemoveComment ¶
func (r *CommentUseCase) RemoveComment(ctx context.Context, id int32) error
func (*CommentUseCase) RemoveSubComment ¶
func (r *CommentUseCase) RemoveSubComment(ctx context.Context, id int32) error
func (*CommentUseCase) SendComment ¶
func (r *CommentUseCase) SendComment(ctx context.Context, id int32) error
func (*CommentUseCase) SendSubComment ¶
func (r *CommentUseCase) SendSubComment(ctx context.Context, id int32) error
func (*CommentUseCase) SetCommentAgree ¶
func (*CommentUseCase) SetSubCommentAgree ¶
type CommentUser ¶
type CreationContentReview ¶
type CreationImageReview ¶
type CreationRepo ¶
type CreationRepo interface {
GetLeaderBoard(ctx context.Context) ([]*LeaderBoard, error)
GetCollectArticleList(ctx context.Context, id, page int32) ([]*Article, error)
GetCollectArticleCount(ctx context.Context, id int32) (int32, error)
GetCollectTalkList(ctx context.Context, id, page int32) ([]*Talk, error)
GetCollectTalkCount(ctx context.Context, id int32) (int32, error)
GetCollectColumnList(ctx context.Context, id, page int32) ([]*Column, error)
GetCollectColumnCount(ctx context.Context, id int32) (int32, error)
GetLastCollectionsDraft(ctx context.Context, uuid string) (*CollectionsDraft, error)
GetCollectionsContentReview(ctx context.Context, page int32, uuid string) ([]*CreationContentReview, error)
GetUserTimeLineListVisitor(ctx context.Context, page int32, uuid string) ([]*TimeLine, error)
GetCollections(ctx context.Context, id int32, uuid string) (*Collections, error)
GetCollectionListInfo(ctx context.Context, collectionsList []*Collections) ([]*Collections, error)
GetCollectionsList(ctx context.Context, uuid string, page int32) ([]*Collections, error)
GetCollectionsListAll(ctx context.Context, uuid string) ([]*Collections, error)
GetCollectionsListByVisitor(ctx context.Context, uuid string, page int32) ([]*Collections, error)
GetCollectionsCount(ctx context.Context, uuid string) (int32, error)
GetCollectionsVisitorCount(ctx context.Context, uuid string) (int32, error)
GetCreationUser(ctx context.Context, uuid string) (*CreationUser, error)
GetCreationUserVisitor(ctx context.Context, uuid string) (*CreationUser, error)
CreateCollectionsDraft(ctx context.Context, uuid string) (int32, error)
SendCollections(ctx context.Context, id int32, uuid, ip string) error
SendCollectionsEdit(ctx context.Context, id int32, uuid, ip string) error
DeleteCollections(ctx context.Context, id int32, uuid string) error
}
type CreationUseCase ¶
type CreationUseCase struct {
// contains filtered or unexported fields
}
func NewCreationUseCase ¶
func NewCreationUseCase(repo CreationRepo, articleRepo ArticleRepo, columnRepo ColumnRepo, talkRepo TalkRepo, re Recovery, logger log.Logger) *CreationUseCase
func (*CreationUseCase) CreateCollectionsDraft ¶
func (r *CreationUseCase) CreateCollectionsDraft(ctx context.Context) (int32, error)
func (*CreationUseCase) DeleteCollections ¶
func (r *CreationUseCase) DeleteCollections(ctx context.Context, id int32) error
func (*CreationUseCase) GetCollectArticleCount ¶
func (*CreationUseCase) GetCollectArticleList ¶
func (*CreationUseCase) GetCollectColumnCount ¶
func (*CreationUseCase) GetCollectColumnList ¶
func (*CreationUseCase) GetCollectTalkCount ¶
func (*CreationUseCase) GetCollectTalkList ¶
func (*CreationUseCase) GetCollections ¶
func (r *CreationUseCase) GetCollections(ctx context.Context, id int32, uuid string) (*Collections, error)
func (*CreationUseCase) GetCollectionsContentReview ¶
func (r *CreationUseCase) GetCollectionsContentReview(ctx context.Context, page int32) ([]*CreationContentReview, error)
func (*CreationUseCase) GetCollectionsCount ¶
func (r *CreationUseCase) GetCollectionsCount(ctx context.Context) (int32, error)
func (*CreationUseCase) GetCollectionsList ¶
func (r *CreationUseCase) GetCollectionsList(ctx context.Context, page int32) ([]*Collections, error)
func (*CreationUseCase) GetCollectionsListAll ¶
func (r *CreationUseCase) GetCollectionsListAll(ctx context.Context) ([]*Collections, error)
func (*CreationUseCase) GetCollectionsListByVisitor ¶
func (r *CreationUseCase) GetCollectionsListByVisitor(ctx context.Context, page int32, uuid string) ([]*Collections, error)
func (*CreationUseCase) GetCollectionsVisitorCount ¶
func (*CreationUseCase) GetCreationUser ¶
func (r *CreationUseCase) GetCreationUser(ctx context.Context, uuid string) (*CreationUser, error)
func (*CreationUseCase) GetCreationUserVisitor ¶
func (r *CreationUseCase) GetCreationUserVisitor(ctx context.Context, uuid string) (*CreationUser, error)
func (*CreationUseCase) GetLastCollectionsDraft ¶
func (r *CreationUseCase) GetLastCollectionsDraft(ctx context.Context) (*CollectionsDraft, error)
func (*CreationUseCase) GetLeaderBoard ¶
func (r *CreationUseCase) GetLeaderBoard(ctx context.Context) ([]*LeaderBoard, error)
func (*CreationUseCase) GetUserTimeLineListVisitor ¶
func (*CreationUseCase) SendCollections ¶
func (r *CreationUseCase) SendCollections(ctx context.Context, id int32) error
func (*CreationUseCase) SendCollectionsEdit ¶
func (r *CreationUseCase) SendCollectionsEdit(ctx context.Context, id int32) error
type CreationUser ¶
type Credentials ¶
type IllegalInfo ¶
type LeaderBoard ¶
type Medal ¶
type Medal struct {
Creation1 int32
Creation2 int32
Creation3 int32
Creation4 int32
Creation5 int32
Creation6 int32
Creation7 int32
Agree1 int32
Agree2 int32
Agree3 int32
Agree4 int32
Agree5 int32
Agree6 int32
View1 int32
View2 int32
View3 int32
Comment1 int32
Comment2 int32
Comment3 int32
Collect1 int32
Collect2 int32
Collect3 int32
}
type MedalProgress ¶
type MessageRepo ¶
type MessageRepo interface {
GetMailBoxLastTime(ctx context.Context, uuid string) (*MailBox, error)
GetMessageNotification(ctx context.Context, uuid string, follows []string) (*Notification, error)
GetMessageSystemNotification(ctx context.Context, page int32, uuid string) ([]*SystemNotification, error)
SetMailBoxLastTime(ctx context.Context, uuid string, time int32) error
RemoveMailBoxCommentCount(ctx context.Context, uuid string) error
RemoveMailBoxSubCommentCount(ctx context.Context, uuid string) error
RemoveMailBoxSystemNotificationCount(ctx context.Context, uuid string) error
}
type MessageUseCase ¶
type MessageUseCase struct {
// contains filtered or unexported fields
}
func NewMessageUseCase ¶
func NewMessageUseCase(repo MessageRepo, userRepo UserRepo, re Recovery, logger log.Logger) *MessageUseCase
func (*MessageUseCase) GetMailBoxLastTime ¶
func (r *MessageUseCase) GetMailBoxLastTime(ctx context.Context) (*MailBox, error)
func (*MessageUseCase) GetMessageNotification ¶
func (r *MessageUseCase) GetMessageNotification(ctx context.Context) (*Notification, error)
func (*MessageUseCase) GetMessageSystemNotification ¶
func (r *MessageUseCase) GetMessageSystemNotification(ctx context.Context, page int32) ([]*SystemNotification, error)
func (*MessageUseCase) RemoveMailBoxCommentCount ¶
func (r *MessageUseCase) RemoveMailBoxCommentCount(ctx context.Context) error
func (*MessageUseCase) RemoveMailBoxSubCommentCount ¶
func (r *MessageUseCase) RemoveMailBoxSubCommentCount(ctx context.Context) error
func (*MessageUseCase) RemoveMailBoxSystemNotificationCount ¶
func (r *MessageUseCase) RemoveMailBoxSystemNotificationCount(ctx context.Context) error
func (*MessageUseCase) SetMailBoxLastTime ¶
func (r *MessageUseCase) SetMailBoxLastTime(ctx context.Context, time int32) error
type NewsUseCase ¶
type NewsUseCase struct {
// contains filtered or unexported fields
}
func NewNewsUseCase ¶
func NewNewsUseCase(repo NewsRepo, re Recovery, logger log.Logger) *NewsUseCase
func (*NewsUseCase) GetNewsSearch ¶ added in v1.4.0
type Notification ¶
type Section ¶
type Section struct {
Label string
Result int32
PornInfo *SectionPornInfo
AdsInfo *SectionAdsInfo
IllegalInfo *SectionIllegalInfo
AbuseInfo *SectionAbuseInfo
}
type SectionAbuseInfo ¶
type SectionAdsInfo ¶
type SectionIllegalInfo ¶
type SectionPornInfo ¶
type SubComment ¶
type SystemNotification ¶
type TalkRepo ¶
type TalkRepo interface {
GetTalkList(ctx context.Context, page int32) ([]*Talk, error)
GetTalkListHot(ctx context.Context, page int32) ([]*Talk, error)
GetUserTalkList(ctx context.Context, page int32, uuid string) ([]*Talk, error)
GetUserTalkListVisitor(ctx context.Context, page int32, uuid string) ([]*Talk, error)
GetTalkCount(ctx context.Context, uuid string) (int32, error)
GetTalkCountVisitor(ctx context.Context, uuid string) (int32, error)
GetTalkListStatistic(ctx context.Context, talkList []*Talk) ([]*TalkStatistic, error)
GetTalkStatistic(ctx context.Context, id int32, uuid string) (*TalkStatistic, error)
GetLastTalkDraft(ctx context.Context, uuid string) (*TalkDraft, error)
GetTalkSearch(ctx context.Context, page int32, search, time string) ([]*Talk, int32, error)
GetUserTalkAgree(ctx context.Context, uuid string) (map[int32]bool, error)
GetUserTalkCollect(ctx context.Context, uuid string) (map[int32]bool, error)
GetTalkImageReview(ctx context.Context, page int32, uuid string) ([]*CreationImageReview, error)
GetTalkContentReview(ctx context.Context, page int32, uuid string) ([]*CreationContentReview, error)
CreateTalkDraft(ctx context.Context, uuid string) (int32, error)
SendTalk(ctx context.Context, id int32, uuid, ip string) error
SendTalkEdit(ctx context.Context, id int32, uuid, ip string) error
DeleteTalk(ctx context.Context, id int32, uuid string) error
SetTalkAgree(ctx context.Context, id int32, uuid, userUuid string) error
CancelTalkAgree(ctx context.Context, id int32, uuid, userUuid string) error
CancelTalkCollect(ctx context.Context, id int32, uuid, userUuid string) error
SetTalkView(ctx context.Context, id int32, uuid string) error
SetTalkCollect(ctx context.Context, id, collectionsId int32, uuid, userUuid string) error
TalkStatisticJudge(ctx context.Context, id int32, uuid string) (*TalkStatisticJudge, error)
}
type TalkStatistic ¶
type TalkStatisticJudge ¶
type TalkUseCase ¶
type TalkUseCase struct {
// contains filtered or unexported fields
}
func NewTalkUseCase ¶
func NewTalkUseCase(repo TalkRepo, re Recovery, logger log.Logger) *TalkUseCase
func (*TalkUseCase) CancelTalkAgree ¶
func (*TalkUseCase) CancelTalkCollect ¶
func (*TalkUseCase) CreateTalkDraft ¶
func (r *TalkUseCase) CreateTalkDraft(ctx context.Context) (int32, error)
func (*TalkUseCase) DeleteTalk ¶
func (r *TalkUseCase) DeleteTalk(ctx context.Context, id int32) error
func (*TalkUseCase) GetLastTalkDraft ¶
func (r *TalkUseCase) GetLastTalkDraft(ctx context.Context) (*TalkDraft, error)
func (*TalkUseCase) GetTalkContentReview ¶
func (r *TalkUseCase) GetTalkContentReview(ctx context.Context, page int32) ([]*CreationContentReview, error)
func (*TalkUseCase) GetTalkCount ¶
func (r *TalkUseCase) GetTalkCount(ctx context.Context) (int32, error)
func (*TalkUseCase) GetTalkCountVisitor ¶
func (*TalkUseCase) GetTalkImageReview ¶
func (r *TalkUseCase) GetTalkImageReview(ctx context.Context, page int32) ([]*CreationImageReview, error)
func (*TalkUseCase) GetTalkList ¶
func (*TalkUseCase) GetTalkListHot ¶
func (*TalkUseCase) GetTalkListStatistic ¶
func (r *TalkUseCase) GetTalkListStatistic(ctx context.Context, ids []int32) ([]*TalkStatistic, error)
GetTalkListStatistic todo: delete
func (*TalkUseCase) GetTalkSearch ¶
func (*TalkUseCase) GetTalkStatistic ¶
func (r *TalkUseCase) GetTalkStatistic(ctx context.Context, id int32, uuid string) (*TalkStatistic, error)
func (*TalkUseCase) GetUserTalkAgree ¶
func (*TalkUseCase) GetUserTalkCollect ¶
func (*TalkUseCase) GetUserTalkList ¶
func (*TalkUseCase) GetUserTalkListSimple ¶
func (*TalkUseCase) GetUserTalkListVisitor ¶
func (*TalkUseCase) SendTalkEdit ¶
func (r *TalkUseCase) SendTalkEdit(ctx context.Context, id int32) error
func (*TalkUseCase) SetTalkAgree ¶
func (*TalkUseCase) SetTalkCollect ¶
func (*TalkUseCase) SetTalkView ¶
func (*TalkUseCase) TalkStatisticJudge ¶
func (r *TalkUseCase) TalkStatisticJudge(ctx context.Context, id int32) (*TalkStatisticJudge, error)
type TextReview ¶
type TextReview struct {
Code string
Message string
JobId string
DataId string
State string
CreationTime string
Object string
Label string
Result int32
PornInfo *PornInfo
AdsInfo *AdsInfo
IllegalInfo *IllegalInfo
AbuseInfo *AbuseInfo
BucketId string
Region string
CosHeaders map[string]string
Section []*Section
}
type TimeLIneFollows ¶
type UserAccount ¶
type UserImageReview ¶
type UserProfile ¶
type UserProfile struct {
Uuid string
Username string
Avatar string
School string
Company string
Job string
Homepage string
Github string
Gitee string
Introduce string
Created string
Score int32
Agree int32
Collect int32
View int32
Follow int32
Followed int32
Article int32
Column int32
Subscribe int32
Talk int32
Collections int32
}
type UserProfileUpdate ¶
type UserProfileUpdate struct {
UserProfile
Status int32
}
type UserRepo ¶
type UserRepo interface {
UserRegister(ctx context.Context, email, password, code string) error
LoginByPassword(ctx context.Context, account, password, mode string) (string, error)
LoginByCode(ctx context.Context, phone, code string) (string, error)
LoginPasswordReset(ctx context.Context, account, password, code, mode string) error
LoginByWechat(ctx context.Context, code string) (string, error)
LoginByQQ(ctx context.Context, code string) (string, error)
LoginByGithub(ctx context.Context, code string) (*Github, error)
LoginByGitee(ctx context.Context, code string) (string, error)
SendPhoneCode(ctx context.Context, template, phone string) error
SendEmailCode(ctx context.Context, template, email string) error
GetCosSessionKey(ctx context.Context, uuid string) (*Credentials, error)
GetAccount(ctx context.Context, uuid string) (*UserAccount, error)
GetProfile(ctx context.Context, uuid string) (*UserProfile, error)
GetProfileList(ctx context.Context, uuids []string) ([]*UserProfile, error)
GetUserInfo(ctx context.Context, uuid string) (*UserProfile, error)
GetProfileUpdate(ctx context.Context, uuid string) (*UserProfileUpdate, error)
GetFollowList(ctx context.Context, page int32, uuid string) ([]*Follow, error)
GetFollowProfileList(ctx context.Context, page int32, uuid string, followList []*Follow) ([]*UserProfile, error)
GetFollowAchievementList(ctx context.Context, page int32, uuid string, followList []*Follow) ([]*Achievement, error)
GetFollowedProfileList(ctx context.Context, page int32, uuid string, followedList []*Follow) ([]*UserProfile, error)
GetFollowedAchievementList(ctx context.Context, page int32, uuid string, followedList []*Follow) ([]*Achievement, error)
GetSearchAchievementList(ctx context.Context, searchList []*UserSearch) ([]*Achievement, error)
GetFollowListCount(ctx context.Context, uuid string) (int32, error)
GetFollowedList(ctx context.Context, page int32, uuid string) ([]*Follow, error)
GetFollowedListCount(ctx context.Context, uuid string) (int32, error)
GetUserFollow(ctx context.Context, uuid, userUuid string) (bool, error)
GetUserFollows(ctx context.Context, uuid string) (map[string]bool, error)
GetUserSearch(ctx context.Context, page int32, search string) ([]*UserSearch, int32, error)
GetAvatarReview(ctx context.Context, page int32, uuid string) ([]*UserImageReview, error)
GetCoverReview(ctx context.Context, page int32, uuid string) ([]*UserImageReview, error)
SetProfileUpdate(ctx context.Context, profile *UserProfileUpdate) error
SetUserPhone(ctx context.Context, uuid, phone, code string) error
SetUserPassword(ctx context.Context, uuid, password string) error
SetUserWechat(ctx context.Context, uuid, code, redirectUrl string) error
SetUserQQ(ctx context.Context, uuid, code, redirectUrl string) error
SetUserGitee(ctx context.Context, uuid, code, redirectUrl string) error
SetUserGithub(ctx context.Context, uuid, code, redirectUrl string) error
SetUserEmail(ctx context.Context, uuid, email, code string) error
SetUserFollow(ctx context.Context, uuid, userUuid string) error
CancelUserFollow(ctx context.Context, uuid, userUuid string) error
ChangeUserPassword(ctx context.Context, uuid, oldpassword, password string) error
UnbindUserPhone(ctx context.Context, uuid, phone, email, account, password, code, choose, mode, redirectUri string) error
UnbindUserEmail(ctx context.Context, uuid, phone, email, account, password, code, choose, mode, redirectUri string) error
UnbindUserWechat(ctx context.Context, uuid, phone, email, account, password, code, choose, mode, redirectUri string) error
UnbindUserQQ(ctx context.Context, uuid, phone, email, account, password, code, choose, mode, redirectUri string) error
UnbindUserGitee(ctx context.Context, uuid, phone, email, account, password, code, choose, mode, redirectUri string) error
UnbindUserGithub(ctx context.Context, uuid, phone, email, account, password, code, choose, mode, redirectUri string) error
}
type UserSearch ¶
type UserUseCase ¶
type UserUseCase struct {
// contains filtered or unexported fields
}
func NewUserUseCase ¶
func NewUserUseCase(repo UserRepo, achRepo AchievementRepo, creationRepo CreationRepo, re Recovery, logger log.Logger) *UserUseCase
func (*UserUseCase) CancelUserFollow ¶
func (r *UserUseCase) CancelUserFollow(ctx context.Context, uuid string) error
func (*UserUseCase) ChangeUserPassword ¶
func (r *UserUseCase) ChangeUserPassword(ctx context.Context, oldpassword, password string) error
func (*UserUseCase) GetAccount ¶
func (r *UserUseCase) GetAccount(ctx context.Context) (*UserAccount, error)
func (*UserUseCase) GetAvatarReview ¶
func (r *UserUseCase) GetAvatarReview(ctx context.Context, page int32) ([]*UserImageReview, error)
func (*UserUseCase) GetCosSessionKey ¶
func (r *UserUseCase) GetCosSessionKey(ctx context.Context) (*Credentials, error)
func (*UserUseCase) GetCoverReview ¶
func (r *UserUseCase) GetCoverReview(ctx context.Context, page int32) ([]*UserImageReview, error)
func (*UserUseCase) GetFollowList ¶
func (*UserUseCase) GetFollowListCount ¶
func (*UserUseCase) GetFollowedList ¶
func (*UserUseCase) GetFollowedListCount ¶
func (*UserUseCase) GetProfile ¶
func (r *UserUseCase) GetProfile(ctx context.Context) (*UserProfile, error)
func (*UserUseCase) GetProfileList ¶
func (r *UserUseCase) GetProfileList(ctx context.Context, uuids []string) ([]*UserProfile, error)
func (*UserUseCase) GetProfileUpdate ¶
func (r *UserUseCase) GetProfileUpdate(ctx context.Context) (*UserProfileUpdate, error)
func (*UserUseCase) GetTimeLineUsers ¶
func (r *UserUseCase) GetTimeLineUsers(ctx context.Context) ([]*TimeLIneFollows, error)
func (*UserUseCase) GetUserFollow ¶
func (*UserUseCase) GetUserFollows ¶
func (*UserUseCase) GetUserInfo ¶
func (r *UserUseCase) GetUserInfo(ctx context.Context) (*UserProfile, error)
func (*UserUseCase) GetUserInfoVisitor ¶
func (r *UserUseCase) GetUserInfoVisitor(ctx context.Context, uuid string) (*UserProfile, error)
func (*UserUseCase) GetUserSearch ¶
func (r *UserUseCase) GetUserSearch(ctx context.Context, page int32, search string) ([]*UserSearch, int32, error)
func (*UserUseCase) LoginByCode ¶
func (*UserUseCase) LoginByGitee ¶ added in v1.3.0
func (*UserUseCase) LoginByGithub ¶ added in v1.3.0
func (*UserUseCase) LoginByPassword ¶
func (*UserUseCase) LoginByWechat ¶ added in v1.3.0
func (*UserUseCase) LoginPasswordReset ¶
func (r *UserUseCase) LoginPasswordReset(ctx context.Context, account, password, code, mode string) error
func (*UserUseCase) SendEmailCode ¶
func (r *UserUseCase) SendEmailCode(ctx context.Context, template, email string) error
func (*UserUseCase) SendPhoneCode ¶
func (r *UserUseCase) SendPhoneCode(ctx context.Context, template, phone string) error
func (*UserUseCase) SetUserEmail ¶
func (r *UserUseCase) SetUserEmail(ctx context.Context, email, code string) error
func (*UserUseCase) SetUserFollow ¶
func (r *UserUseCase) SetUserFollow(ctx context.Context, uuid string) error
func (*UserUseCase) SetUserGitee ¶ added in v1.3.0
func (r *UserUseCase) SetUserGitee(ctx context.Context, code, redirectUrl string) error
func (*UserUseCase) SetUserGithub ¶ added in v1.3.0
func (r *UserUseCase) SetUserGithub(ctx context.Context, code, redirectUrl string) error
func (*UserUseCase) SetUserPassword ¶
func (r *UserUseCase) SetUserPassword(ctx context.Context, password string) error
func (*UserUseCase) SetUserPhone ¶
func (r *UserUseCase) SetUserPhone(ctx context.Context, phone, code string) error
func (*UserUseCase) SetUserProfile ¶
func (r *UserUseCase) SetUserProfile(ctx context.Context, profile *UserProfileUpdate) error
func (*UserUseCase) SetUserQQ ¶ added in v1.3.0
func (r *UserUseCase) SetUserQQ(ctx context.Context, code, redirectUrl string) error
func (*UserUseCase) SetUserWechat ¶ added in v1.3.0
func (r *UserUseCase) SetUserWechat(ctx context.Context, code, redirectUrl string) error
func (*UserUseCase) UnbindUserEmail ¶
func (r *UserUseCase) UnbindUserEmail(ctx context.Context, phone, email, account, password, code, choose, mode, redirectUri string) error
func (*UserUseCase) UnbindUserGitee ¶ added in v1.3.0
func (r *UserUseCase) UnbindUserGitee(ctx context.Context, phone, email, account, password, code, choose, mode, redirectUri string) error
func (*UserUseCase) UnbindUserGithub ¶ added in v1.3.0
func (r *UserUseCase) UnbindUserGithub(ctx context.Context, phone, email, account, password, code, choose, mode, redirectUri string) error
func (*UserUseCase) UnbindUserPhone ¶
func (r *UserUseCase) UnbindUserPhone(ctx context.Context, phone, email, account, password, code, choose, mode, redirectUri string) error
func (*UserUseCase) UnbindUserQQ ¶ added in v1.3.0
func (r *UserUseCase) UnbindUserQQ(ctx context.Context, phone, email, account, password, code, choose, mode, redirectUri string) error
func (*UserUseCase) UnbindUserWechat ¶ added in v1.3.0
func (r *UserUseCase) UnbindUserWechat(ctx context.Context, phone, email, account, password, code, choose, mode, redirectUri string) error
func (*UserUseCase) UserRegister ¶
func (r *UserUseCase) UserRegister(ctx context.Context, email, password, code string) error
Click to show internal directories.
Click to hide internal directories.