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 NewUserActiveActivityRepo(data *data.Data, activityRepo activity_common.ActivityRepo, ...) activity.UserActiveActivityRepo
- func NewVoteRepo(data *data.Data, activityRepo activity_common.ActivityRepo, ...) service.VoteRepo
- type AnswerActivityRepo
- type FollowRepo
- 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 (
UserActivated = "user.activated"
)
Variables ¶
This section is empty.
Functions ¶
func NewActivityRepo ¶ added in v0.5.0
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 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, ) service.VoteRepo
NewVoteRepo new repository
Types ¶
type AnswerActivityRepo ¶
type AnswerActivityRepo struct {
// contains filtered or unexported fields
}
AnswerActivityRepo answer accepted
func (*AnswerActivityRepo) SaveAcceptAnswerActivity ¶ added in v1.1.1
func (ar *AnswerActivityRepo) SaveAcceptAnswerActivity(ctx context.Context, op *schema.AcceptAnswerOperationInfo) ( err error)
func (*AnswerActivityRepo) SaveCancelAcceptAnswerActivity ¶ added in v1.1.1
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 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 ¶ added in v1.1.1
func (*VoteRepo) GetAndSaveVoteResult ¶ added in v1.1.1
func (*VoteRepo) ListUserVotes ¶
Click to show internal directories.
Click to hide internal directories.