account

package
v0.0.0-...-ca0f7d1 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrRepositoryAccountNameConstraint = errors.New("account with the same name already exists")
)

Functions

This section is empty.

Types

type MockRepository

type MockRepository struct {
	mock.Mock
}

MockRepository is an autogenerated mock type for the Repository type

func (*MockRepository) ConfirmAccount

func (_m *MockRepository) ConfirmAccount(accountID uuid.UUID, executor database.QueryExecutor) (*models.Account, error)

ConfirmAccount provides a mock function with given fields: accountID, executor

func (*MockRepository) CreateAccount

func (_m *MockRepository) CreateAccount(account models.Account, executor database.QueryExecutor) (*models.Account, error)

CreateAccount provides a mock function with given fields: account, executor

func (*MockRepository) DeactivateAccountByID

func (_m *MockRepository) DeactivateAccountByID(accountID uuid.UUID, executor database.QueryExecutor) error

DeactivateAccountByID provides a mock function with given fields: accountID, executor

func (*MockRepository) DeleteUnconfirmedAccountsByAccountIDs

func (_m *MockRepository) DeleteUnconfirmedAccountsByAccountIDs(accountIDs []uuid.UUID, executor database.QueryExecutor) error

DeleteUnconfirmedAccountsByAccountIDs provides a mock function with given fields: accountIDs, executor

func (*MockRepository) GetAccountByID

func (_m *MockRepository) GetAccountByID(accountID uuid.UUID, executor database.QueryExecutor) (*models.Account, error)

GetAccountByID provides a mock function with given fields: accountID, executor

func (*MockRepository) GetAccountByName

func (_m *MockRepository) GetAccountByName(accountName string, executor database.QueryExecutor) (*models.Account, error)

GetAccountByName provides a mock function with given fields: accountName, executor

func (*MockRepository) GetAccountsByIDsList

func (_m *MockRepository) GetAccountsByIDsList(ids []uuid.UUID, executor database.QueryExecutor) ([]*models.Account, error)

GetAccountsByIDsList provides a mock function with given fields: ids, executor

func (*MockRepository) LoginAccount

func (_m *MockRepository) LoginAccount(account uuid.UUID, clientIP string, executor database.QueryExecutor) (*models.Account, error)

LoginAccount provides a mock function with given fields: account, clientIP, executor

func (*MockRepository) UpdateAccountName

func (_m *MockRepository) UpdateAccountName(accountID uuid.UUID, name string, executor database.QueryExecutor) error

UpdateAccountName provides a mock function with given fields: accountID, name, executor

type Repository

type Repository interface {
	GetAccountByID(executor database.QueryExecutor, accountID uuid.UUID) (*models.Account, error)
	GetAccountsByIDsList(executor database.QueryExecutor, ids []uuid.UUID) ([]*models.Account, error)
	GetAccountByName(executor database.QueryExecutor, accountName string) (*models.Account, error)
	CreateAccount(executor database.QueryExecutor, account models.Account) (*models.Account, error)
	LoginAccount(executor database.QueryExecutor, account uuid.UUID, clientIP string) (*models.Account, error)
	ConfirmAccount(executor database.QueryExecutor, accountID uuid.UUID) (*models.Account, error)
	UpdateAccountName(executor database.QueryExecutor, accountID uuid.UUID, name string) error
	DeactivateAccountByID(executor database.QueryExecutor, accountID uuid.UUID) error
	DeleteUnconfirmedAccountsByAccountIDs(executor database.QueryExecutor, accountIDs []uuid.UUID) error
}

Repository is an interface for any repository

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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