repository

package
v0.0.0-...-0e8bb44 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEmailBusy          = myerrors.NewErrorBadContentRequest("Такой email уже занят")
	ErrEmailNotExist      = myerrors.NewErrorBadContentRequest("Такой email не существует")
	ErrPhoneBusy          = myerrors.NewErrorBadContentRequest("Такой телефон уже занят")
	ErrWrongCredentials   = myerrors.NewErrorBadContentRequest("Некорректный логин или пароль")
	ErrNoUpdateFields     = myerrors.NewErrorBadFormatRequest("Вы пытаетесь обновить пустое количество полей")
	ErrNoAffectedUserRows = myerrors.NewErrorBadFormatRequest("Не получилось обновить данные пользователя")

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

Functions

This section is empty.

Types

type UserStorage

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

func NewUserStorage

func NewUserStorage(pool pgxpool.IPgxPool) (*UserStorage, error)

func (*UserStorage) GetUserWithoutPasswordByID

func (u *UserStorage) GetUserWithoutPasswordByID(ctx context.Context, id uint64) (*models.UserWithoutPassword, error)

func (*UserStorage) UpdateUser

func (u *UserStorage) UpdateUser(ctx context.Context,
	userID uint64, updateData map[string]interface{},
) (*models.UserWithoutPassword, error)

Jump to

Keyboard shortcuts

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