Documentation ¶
Index ¶
- func NewUnitOfWork(log logger.Logger, db *sql.DB) port.UserUnitOfWork
- type MockUnitOfWork
- type MockUserRepository
- func (r *MockUserRepository) GetByEmail(email string) (*domain.User, error)
- func (r *MockUserRepository) GetByID(id uint64) (*domain.User, error)
- func (r *MockUserRepository) GetByUUID(uuid uuid.UUID) (*domain.User, error)
- func (r *MockUserRepository) GetTOTPSecret(id uint64) (*string, error)
- func (r *MockUserRepository) IsEmailUnique(email string) (bool, error)
- func (r *MockUserRepository) List() ([]*domain.User, error)
- func (r *MockUserRepository) MarkWelcomeMessageSent(id uint64) error
- func (r *MockUserRepository) Save(user *domain.User) (*domain.User, error)
- func (r *MockUserRepository) UpdateGoogleID(id uint64, googleID string) error
- func (r *MockUserRepository) UpdateLastLoginTime(id uint64) error
- func (r *MockUserRepository) UpdatePassword(id uint64, password string) error
- func (r *MockUserRepository) UpdateTOTPSecret(id uint64, secret *string) error
- func (r *MockUserRepository) VerifiedEmail(email string) error
- type UserRepository
- func (r *UserRepository) GetByEmail(email string) (*domain.User, error)
- func (r *UserRepository) GetByID(id uint64) (*domain.User, error)
- func (r *UserRepository) GetByUUID(uuid uuid.UUID) (*domain.User, error)
- func (r *UserRepository) GetTOTPSecret(id uint64) (*string, error)
- func (r *UserRepository) IsEmailUnique(email string) (bool, error)
- func (r *UserRepository) List() ([]*domain.User, error)
- func (r *UserRepository) MarkWelcomeMessageSent(id uint64) error
- func (r *UserRepository) Save(user *domain.User) (*domain.User, error)
- func (r *UserRepository) UpdateGoogleID(id uint64, googleID string) error
- func (r *UserRepository) UpdateLastLoginTime(id uint64) error
- func (r *UserRepository) UpdatePassword(id uint64, password string) error
- func (r *UserRepository) UpdateTOTPSecret(id uint64, secret *string) error
- func (r *UserRepository) VerifiedEmail(email string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewUnitOfWork ¶
Types ¶
type MockUnitOfWork ¶
func (*MockUnitOfWork) Commit ¶
func (r *MockUnitOfWork) Commit() error
func (*MockUnitOfWork) Rollback ¶
func (r *MockUnitOfWork) Rollback() error
func (*MockUnitOfWork) UserRepository ¶
func (r *MockUnitOfWork) UserRepository() port.UserRepository
type MockUserRepository ¶
func (*MockUserRepository) GetByEmail ¶
func (r *MockUserRepository) GetByEmail(email string) (*domain.User, error)
func (*MockUserRepository) GetByID ¶
func (r *MockUserRepository) GetByID(id uint64) (*domain.User, error)
func (*MockUserRepository) GetTOTPSecret ¶
func (r *MockUserRepository) GetTOTPSecret(id uint64) (*string, error)
func (*MockUserRepository) IsEmailUnique ¶
func (r *MockUserRepository) IsEmailUnique(email string) (bool, error)
func (*MockUserRepository) MarkWelcomeMessageSent ¶
func (r *MockUserRepository) MarkWelcomeMessageSent(id uint64) error
func (*MockUserRepository) UpdateGoogleID ¶
func (r *MockUserRepository) UpdateGoogleID(id uint64, googleID string) error
func (*MockUserRepository) UpdateLastLoginTime ¶
func (r *MockUserRepository) UpdateLastLoginTime(id uint64) error
func (*MockUserRepository) UpdatePassword ¶
func (r *MockUserRepository) UpdatePassword(id uint64, password string) error
func (*MockUserRepository) UpdateTOTPSecret ¶
func (r *MockUserRepository) UpdateTOTPSecret(id uint64, secret *string) error
func (*MockUserRepository) VerifiedEmail ¶
func (r *MockUserRepository) VerifiedEmail(email string) error
type UserRepository ¶
type UserRepository struct {
// contains filtered or unexported fields
}
UserRepository implements port.UserRepository interface and provides access to the postgres database
func NewUserRepository ¶
func NewUserRepository(log logger.Logger, tx *sql.Tx) *UserRepository
NewUserRepository creates a new user repository instance
func (*UserRepository) GetByEmail ¶
func (r *UserRepository) GetByEmail(email string) (*domain.User, error)
func (*UserRepository) GetTOTPSecret ¶
func (r *UserRepository) GetTOTPSecret(id uint64) (*string, error)
func (*UserRepository) IsEmailUnique ¶
func (r *UserRepository) IsEmailUnique(email string) (bool, error)
func (*UserRepository) MarkWelcomeMessageSent ¶
func (r *UserRepository) MarkWelcomeMessageSent(id uint64) error
func (*UserRepository) UpdateGoogleID ¶
func (r *UserRepository) UpdateGoogleID(id uint64, googleID string) error
func (*UserRepository) UpdateLastLoginTime ¶
func (r *UserRepository) UpdateLastLoginTime(id uint64) error
func (*UserRepository) UpdatePassword ¶
func (r *UserRepository) UpdatePassword(id uint64, password string) error
func (*UserRepository) UpdateTOTPSecret ¶
func (r *UserRepository) UpdateTOTPSecret(id uint64, secret *string) error
func (*UserRepository) VerifiedEmail ¶
func (r *UserRepository) VerifiedEmail(email string) error
Click to show internal directories.
Click to hide internal directories.