db

package
v0.0.0-...-7428172 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	// contains filtered or unexported fields
}

func NewStore

func NewStore(db *sqlx.DB, logger *zap.SugaredLogger) Store

func (Store) QueryByEmail

func (s Store) QueryByEmail(ctx context.Context, email string) (User, error)

func (Store) QueryByUUID

func (s Store) QueryByUUID(ctx context.Context, uuid string) (User, error)

type User

type User struct {
	UUID         string         `db:"uuid"`
	Email        string         `db:"email"`
	Permissions  pq.StringArray `db:"permissions"`
	PasswordHash []byte         `db:"password_hash"`
	CreatedAt    time.Time      `db:"date_created"`
	UpdatedAt    time.Time      `db:"date_updated"`
}

Jump to

Keyboard shortcuts

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