Documentation ¶
Index ¶
- func NewActivityRepo(data *data.Data, uniqueIDRepo unique.UniqueIDRepo, ...) activity_common.ActivityRepo
- func NewFollowRepo(data *data.Data, uniqueIDRepo unique.UniqueIDRepo, ...) activity_common.FollowRepo
- func NewVoteRepo(data *data.Data, activityRepo activity_common.ActivityRepo) activity_common.VoteRepo
- type ActivityRepo
- func (ar *ActivityRepo) GetActivity(ctx context.Context, session *xorm.Session, objectID, userID string, ...) (existsActivity *entity.Activity, exist bool, err error)
- func (ar *ActivityRepo) GetActivityTypeByObjID(ctx context.Context, objectID string, action string) (activityType, rank, hasRank int, err error)
- func (ar *ActivityRepo) GetActivityTypeByObjKey(ctx context.Context, objectKey, action string) (activityType int, err error)
- func (ar *ActivityRepo) GetUserIDObjectIDActivitySum(ctx context.Context, userID, objectID string) (int, error)
- type FollowRepo
- func (ar *FollowRepo) GetFollowAmount(ctx context.Context, objectID string) (follows int, err error)
- func (ar *FollowRepo) GetFollowIDs(ctx context.Context, userID, objectKey string) (followIDs []string, err error)
- func (ar *FollowRepo) GetFollowUserIDs(ctx context.Context, objectID string) (userIDs []string, err error)
- func (ar *FollowRepo) IsFollowed(userID, objectID string) (bool, error)
- type VoteRepo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewActivityRepo ¶
func NewActivityRepo( data *data.Data, uniqueIDRepo unique.UniqueIDRepo, configRepo config.ConfigRepo, ) activity_common.ActivityRepo
NewActivityRepo new repository
func NewFollowRepo ¶
func NewFollowRepo( data *data.Data, uniqueIDRepo unique.UniqueIDRepo, activityRepo activity_common.ActivityRepo, ) activity_common.FollowRepo
NewFollowRepo new repository
func NewVoteRepo ¶
func NewVoteRepo(data *data.Data, activityRepo activity_common.ActivityRepo) activity_common.VoteRepo
NewVoteRepo new repository
Types ¶
type ActivityRepo ¶
type ActivityRepo struct {
// contains filtered or unexported fields
}
ActivityRepo activity repository
func (*ActivityRepo) GetActivity ¶
func (*ActivityRepo) GetActivityTypeByObjID ¶
func (*ActivityRepo) GetActivityTypeByObjKey ¶
func (*ActivityRepo) GetUserIDObjectIDActivitySum ¶
type FollowRepo ¶
type FollowRepo struct {
// contains filtered or unexported fields
}
FollowRepo follow repository
func (*FollowRepo) GetFollowAmount ¶
func (ar *FollowRepo) GetFollowAmount(ctx context.Context, objectID string) (follows int, err error)
GetFollowAmount get object id's follows
func (*FollowRepo) GetFollowIDs ¶
func (ar *FollowRepo) GetFollowIDs(ctx context.Context, userID, objectKey string) (followIDs []string, err error)
GetFollowIDs get all follow id list
func (*FollowRepo) GetFollowUserIDs ¶
func (ar *FollowRepo) GetFollowUserIDs(ctx context.Context, objectID string) (userIDs []string, err error)
GetFollowUserIDs get follow userID by objectID
func (*FollowRepo) IsFollowed ¶
func (ar *FollowRepo) IsFollowed(userID, objectID string) (bool, error)
IsFollowed check user if follow object or not
Click to show internal directories.
Click to hide internal directories.