repository

package
v0.0.0-...-3122bcc Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmailNotExist = myerrors.NewErrorBadContentRequest("Такой email не существует")
	ErrEmailBusy     = myerrors.NewErrorBadContentRequest("Такой email уже занят")

	NameSeqUser = pgx.Identifier{"public", "user_id_seq"} //nolint:gochecknoglobals
)

Functions

func GetLastValSeq

func GetLastValSeq(ctx context.Context,
	tx pgx.Tx, logger *mylogger.MyLogger, nameTable pgx.Identifier,
) (uint64, error)

Types

type AuthStorage

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

func NewAuthStorage

func NewAuthStorage(pool pgxpool.IPgxPool) (*AuthStorage, error)

func (*AuthStorage) AddUser

func (a *AuthStorage) AddUser(ctx context.Context, email string, password string) (*models.User, error)

func (*AuthStorage) GetUser

func (a *AuthStorage) GetUser(ctx context.Context, email string) (*models.User, error)

Jump to

Keyboard shortcuts

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