Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDuplicateEmail = newRepositoryError(errors.New("duplicate email"))
View Source
var ErrEmailNotFound = newRepositoryError(errors.New("email not found"))
View Source
var ErrInvalidTokenOrUserAlreadyConfirmed = newRepositoryError(errors.New("invalid token or user already confirmed"))
Functions ¶
This section is empty.
Types ¶
type NoteRepository ¶
type NoteRepository interface { Create(ctx context.Context, userId int64, title, content, color string) (*models.Note, error) GetById(ctx context.Context, id int64) (*models.Note, error) List(ctx context.Context, userId int64) ([]models.Note, error) Update(ctx context.Context, id int64, title, content, color string) (*models.Note, error) Delete(ctx context.Context, id int64) error }
func NewNoteRepository ¶
func NewNoteRepository(dbpool *pgxpool.Pool) NoteRepository
type RepositoriesError ¶
type RepositoriesError struct {
// contains filtered or unexported fields
}
type UserRepository ¶
type UserRepository interface { Create(ctx context.Context, email, password, hashToken string) (*models.User, string, error) FindByEmail(ctx context.Context, email string) (*models.User, error) ConfirmUserByToken(ctx context.Context, token string) error CreateResetPasswordToken(ctx context.Context, email, hashToken string) (string, error) GetUserConfirmationByToken(ctx context.Context, token string) (*models.UserConfirmationToken, error) UpdatePasswordByToken(ctx context.Context, newPassword, token string) (string, error) }
func NewUserRepository ¶
func NewUserRepository(dbpoll *pgxpool.Pool) UserRepository
Click to show internal directories.
Click to hide internal directories.