postgres

package
v0.0.0-...-86abe10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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

type UserProfile map[string]any

func (*UserProfile) Scan

func (pc *UserProfile) Scan(val any) error

func (*UserProfile) Value

func (pc *UserProfile) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL