Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrFollowerNotFound = errors.New("follower not found")
)
Common errors
View Source
var (
ErrUserNotFound = errors.New("user not found")
)
Functions ¶
This section is empty.
Types ¶
type FollowerRepository ¶
type FollowerRepository interface { Create(ctx context.Context, userID int, followerReferenceID string) error Delete(ctx context.Context, userID int, followerReferenceID string) error }
FollowerRepository is used to manipulate and perform write operations on the user follower records.
func NewFollowerRepository ¶
func NewFollowerRepository(db database.Database) FollowerRepository
NewFollowerRepository returns a new instance of FollowerRepository.
type UserRepository ¶
type UserRepository interface { Create(ctx context.Context, u *model.User) error DoesUsernameExist(ctx context.Context, username string, excludeRefID *string) (bool, error) GetUserByUsername(ctx context.Context, username string) (*model.User, error) // GetUserByReference gets a user's model by referenceID, // for the user with the reference userReferenceID. GetUserByReference(ctx context.Context, referenceID, userReferenceID string) (*model.User, error) GetIDByReference(ctx context.Context, referenceID string) (*int, error) }
func NewUserRepository ¶
func NewUserRepository(url string) UserRepository
Click to show internal directories.
Click to hide internal directories.