activity

package
v0.0.0-...-883d24b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 9, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

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 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

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 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 (vr *VoteRepo) CancelVote(ctx context.Context, op *schema.VoteOperationInfo) (err error)

func (*VoteRepo) GetAndSaveVoteResult

func (vr *VoteRepo) GetAndSaveVoteResult(ctx context.Context, objectID, objectType string) (
	up, down int64, err error)

func (*VoteRepo) ListUserVotes

func (vr *VoteRepo) ListUserVotes(ctx context.Context, userID string,
	page int, pageSize int, activityTypes []int) (voteList []*entity.Activity, total int64, err error)

func (*VoteRepo) Vote

func (vr *VoteRepo) Vote(ctx context.Context, op *schema.VoteOperationInfo) (err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL