Documentation
¶
Index ¶
- type AccountsRepository
- func (r *AccountsRepository) Create(account domain.Account) error
- func (r *AccountsRepository) Delete(username string) error
- func (r *AccountsRepository) EmailExists(email string) (bool, error)
- func (r *AccountsRepository) GetActiveAccounts() ([]domain.Account, error)
- func (r *AccountsRepository) GetAllAccounts() ([]domain.Account, error)
- func (r *AccountsRepository) GetByEmail(email string) (domain.Account, error)
- func (r *AccountsRepository) GetByUsername(username string) (domain.Account, error)
- func (r *AccountsRepository) Update(account domain.Account) error
- func (r *AccountsRepository) UpdateProfile(account domain.Account) error
- func (r *AccountsRepository) UpdateProfile2(username string, profile domain.Profile) error
- func (r *AccountsRepository) UsernameExists(username string) (bool, error)
- type User
- type UserProfile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountsRepository ¶
type AccountsRepository struct {
// contains filtered or unexported fields
}
func NewAccountsRepository ¶
func NewAccountsRepository(db *sqlx.DB) *AccountsRepository
func (*AccountsRepository) Create ¶
func (r *AccountsRepository) Create(account domain.Account) error
func (*AccountsRepository) Delete ¶
func (r *AccountsRepository) Delete(username string) error
func (*AccountsRepository) EmailExists ¶
func (r *AccountsRepository) EmailExists(email string) (bool, error)
func (*AccountsRepository) GetActiveAccounts ¶
func (r *AccountsRepository) GetActiveAccounts() ([]domain.Account, error)
func (*AccountsRepository) GetAllAccounts ¶
func (r *AccountsRepository) GetAllAccounts() ([]domain.Account, error)
func (*AccountsRepository) GetByEmail ¶
func (r *AccountsRepository) GetByEmail(email string) (domain.Account, error)
func (*AccountsRepository) GetByUsername ¶
func (r *AccountsRepository) GetByUsername(username string) (domain.Account, error)
func (*AccountsRepository) Update ¶
func (r *AccountsRepository) Update(account domain.Account) error
func (*AccountsRepository) UpdateProfile ¶
func (r *AccountsRepository) UpdateProfile(account domain.Account) error
func (*AccountsRepository) UpdateProfile2 ¶
func (r *AccountsRepository) UpdateProfile2(username string, profile domain.Profile) error
func (*AccountsRepository) UsernameExists ¶
func (r *AccountsRepository) UsernameExists(username string) (bool, error)
type User ¶
type User struct {
Username string `db:"username"`
Email string `db:"email"`
Password []byte `db:"password"`
FirstName string `db:"first_name"`
LastName string `db:"last_name"`
IsSuperuser bool `db:"is_superuser"`
IsActive bool `db:"is_active"`
Created *time.Time `db:"created_at"`
Confirmed *time.Time `db:"confirmed_at"`
LastLogin *time.Time `db:"last_login_at"`
Profile UserProfile `db:"profile"`
}
type UserProfile ¶
func (*UserProfile) Scan ¶
func (pc *UserProfile) Scan(val any) error
Click to show internal directories.
Click to hide internal directories.