Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FollowerRepository ¶
func NewFollowerRepository ¶
func NewFollowerRepository(client *mongo.Client) *FollowerRepository
func (*FollowerRepository) Follow ¶
func (r *FollowerRepository) Follow(ctx context.Context, followed, follower string) error
Follow establishes a follow relationship between two users.
The followed parameter represents the ID of the user to be followed.
The follower parameter represents the ID of the user that is following.
func (*FollowerRepository) IsFollowedBy ¶
func (r *FollowerRepository) IsFollowedBy(ctx context.Context, followed, follower string) (*models.Follower, error)
IsFollowedBy queries for a follow relationship between two users. Returns *models.Follower.
The followed parameter represents the ID of the user to be followed.
The follower parameter represents the ID of the user that is following.
func (*FollowerRepository) Unfollow ¶
func (r *FollowerRepository) Unfollow(ctx context.Context, followed, follower string) error
Unfollow de-establishes a follow relationship between two users
The followed parameter represents the ID of the user to be followed.
The follower parameter represents the ID of the user that is following.