user

package
v0.0.0-...-5fdd26c Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PostgresUserRepository

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

func NewPostgresUserRepository

func NewPostgresUserRepository(db *gorp.DbMap) *PostgresUserRepository

func (PostgresUserRepository) Add

func (repo PostgresUserRepository) Add(ctx context.Context, user *user.User) error

func (PostgresUserRepository) Delete

func (repo PostgresUserRepository) Delete(ctx context.Context, id uuid.UUID) error

func (PostgresUserRepository) Exists

func (repo PostgresUserRepository) Exists(ctx context.Context, login string) (bool, error)

func (PostgresUserRepository) GetByID

func (repo PostgresUserRepository) GetByID(ctx context.Context, id uuid.UUID) (*user.User, error)

func (PostgresUserRepository) GetByLogin

func (repo PostgresUserRepository) GetByLogin(ctx context.Context, login string) (*user.User, error)

type RepositoryMock

type RepositoryMock struct {
	mock.Mock
}

RepositoryMock is an autogenerated mock type for the RepositoryMock type

func (*RepositoryMock) Add

func (_m *RepositoryMock) Add(ctx context.Context, _a1 *user.User) error

Add provides a mock function with given fields: ctx, _a1

func (*RepositoryMock) Delete

func (_m *RepositoryMock) Delete(ctx context.Context, id uuid.UUID) error

Delete provides a mock function with given fields: ctx, id

func (*RepositoryMock) Exists

func (_m *RepositoryMock) Exists(ctx context.Context, login string) (bool, error)

Exists provides a mock function with given fields: ctx, login

func (*RepositoryMock) GetByID

func (_m *RepositoryMock) GetByID(ctx context.Context, id uuid.UUID) (*user.User, error)

GetByID provides a mock function with given fields: ctx, id

func (*RepositoryMock) GetByLogin

func (_m *RepositoryMock) GetByLogin(ctx context.Context, login string) (*user.User, error)

GetByLogin provides a mock function with given fields: ctx, login

type UserDB

type UserDB struct {
	ID          uuid.UUID `db:"id"`
	Login       string    `db:"login"`
	Password    *string   `db:"password"`
	FirstName   string    `db:"name"`
	Surname     string    `db:"surname"`
	Mail        *string   `db:"mail"`
	PhoneNumber *string   `db:"phone_number"`
}

func (*UserDB) LoadUser

func (usrDB *UserDB) LoadUser(usr *user.User)

Jump to

Keyboard shortcuts

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