Documentation ¶
Index ¶
- Constants
- func NewActivityRepo(data *data.Data, configService *config.ConfigService) activity.ActivityRepo
- func NewAnswerActivityRepo(data *data.Data, activityRepo activity_common.ActivityRepo, ...) activity.AnswerActivityRepo
- func NewFollowRepo(data *data.Data, uniqueIDRepo unique.UniqueIDRepo, ...) follow.FollowRepo
- func NewReviewActivityRepo(data *data.Data, activityRepo activity_common.ActivityRepo, ...) activity.ReviewActivityRepo
- func NewUserActiveActivityRepo(data *data.Data, activityRepo activity_common.ActivityRepo, ...) activity.UserActiveActivityRepo
- func NewVoteRepo(data *data.Data, activityRepo activity_common.ActivityRepo, ...) content.VoteRepo
- type AnswerActivityRepo
- type FollowRepo
- type ReviewActivityRepo
- type UserActiveActivityRepo
- type VoteRepo
- func (vr *VoteRepo) CancelVote(ctx context.Context, op *schema.VoteOperationInfo) (err error)
- func (vr *VoteRepo) GetAndSaveVoteResult(ctx context.Context, objectID, objectType string) (up, down int64, err error)
- func (vr *VoteRepo) ListUserVotes(ctx context.Context, userID string, page int, pageSize int, ...) (voteList []*entity.Activity, total int64, err error)
- func (vr *VoteRepo) Vote(ctx context.Context, op *schema.VoteOperationInfo) (err error)
Constants ¶
View Source
const (
EditAccepted = "edit.accepted"
)
View Source
const (
UserActivated = "user.activated"
)
Variables ¶
This section is empty.
Functions ¶
func NewActivityRepo ¶
func NewActivityRepo( data *data.Data, configService *config.ConfigService, ) activity.ActivityRepo
NewActivityRepo new repository
func NewAnswerActivityRepo ¶
func NewAnswerActivityRepo( data *data.Data, activityRepo activity_common.ActivityRepo, userRankRepo rank.UserRankRepo, notificationQueueService notice_queue.NotificationQueueService, ) activity.AnswerActivityRepo
NewAnswerActivityRepo new repository
func NewFollowRepo ¶
func NewFollowRepo( data *data.Data, uniqueIDRepo unique.UniqueIDRepo, activityRepo activity_common.ActivityRepo, ) follow.FollowRepo
NewFollowRepo new repository
func NewReviewActivityRepo ¶ added in v1.3.0
func NewReviewActivityRepo( data *data.Data, activityRepo activity_common.ActivityRepo, userRankRepo rank.UserRankRepo, configService *config.ConfigService, ) activity.ReviewActivityRepo
NewReviewActivityRepo new repository
func NewUserActiveActivityRepo ¶
func NewUserActiveActivityRepo( data *data.Data, activityRepo activity_common.ActivityRepo, userRankRepo rank.UserRankRepo, configService *config.ConfigService, ) activity.UserActiveActivityRepo
NewUserActiveActivityRepo new repository
func NewVoteRepo ¶
func NewVoteRepo( data *data.Data, activityRepo activity_common.ActivityRepo, userRankRepo rank.UserRankRepo, notificationQueueService notice_queue.NotificationQueueService, ) content.VoteRepo
NewVoteRepo new repository
Types ¶
type AnswerActivityRepo ¶
type AnswerActivityRepo struct {
// contains filtered or unexported fields
}
AnswerActivityRepo answer accepted
func (*AnswerActivityRepo) SaveAcceptAnswerActivity ¶
func (ar *AnswerActivityRepo) SaveAcceptAnswerActivity(ctx context.Context, op *schema.AcceptAnswerOperationInfo) ( err error)
func (*AnswerActivityRepo) SaveCancelAcceptAnswerActivity ¶
func (ar *AnswerActivityRepo) SaveCancelAcceptAnswerActivity(ctx context.Context, op *schema.AcceptAnswerOperationInfo) ( err error)
type FollowRepo ¶
type FollowRepo struct {
// contains filtered or unexported fields
}
FollowRepo activity repository
func (*FollowRepo) Follow ¶
func (ar *FollowRepo) Follow(ctx context.Context, objectID, userID string) error
func (*FollowRepo) FollowCancel ¶
func (ar *FollowRepo) FollowCancel(ctx context.Context, objectID, userID string) error
type ReviewActivityRepo ¶ added in v1.3.0
type ReviewActivityRepo struct {
// contains filtered or unexported fields
}
ReviewActivityRepo answer accepted
func (*ReviewActivityRepo) Review ¶ added in v1.3.0
func (ar *ReviewActivityRepo) Review(ctx context.Context, act *schema.PassReviewActivity) (err error)
Review user active
type UserActiveActivityRepo ¶
type UserActiveActivityRepo struct {
// contains filtered or unexported fields
}
UserActiveActivityRepo answer accepted
func (*UserActiveActivityRepo) UserActive ¶
func (ar *UserActiveActivityRepo) UserActive(ctx context.Context, userID string) (err error)
UserActive user active
type VoteRepo ¶
type VoteRepo struct {
// contains filtered or unexported fields
}
VoteRepo activity repository
func (*VoteRepo) CancelVote ¶
func (*VoteRepo) GetAndSaveVoteResult ¶
func (*VoteRepo) ListUserVotes ¶
Click to show internal directories.
Click to hide internal directories.