Documentation ¶
Index ¶
- Variables
- type MockService
- func (_m *MockService) ConfirmAccount(accountID uuid.UUID, tx *sql.Tx) (*models.Account, error)
- func (_m *MockService) CreateAccount(tx *sql.Tx, email string, accountStatus models.AccountStatus) (*models.Account, error)
- func (_m *MockService) CreateAccountWithOAuth(email string, firstName string, lastName string, avatarURL string, tx *sql.Tx) (*models.Account, error)
- func (_m *MockService) DeactivateAccountByID(accountID uuid.UUID, tx *sql.Tx) error
- func (_m *MockService) DeleteUnconfirmedAccountsByAccountIDs(accountIDs []uuid.UUID, tx *sql.Tx) error
- func (_m *MockService) GetAccountByID(accountID uuid.UUID) (*models.Account, error)
- func (_m *MockService) GetAccountByName(accountName string) (*models.Account, error)
- func (_m *MockService) LoginAccount(account uuid.UUID, clientIP string, tx *sql.Tx) (*models.Account, error)
- func (_m *MockService) UpdateAccountName(accountID uuid.UUID, name string) error
- type Repository
- type Service
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type MockService ¶
MockService is an autogenerated mock type for the Service type
func (*MockService) ConfirmAccount ¶
ConfirmAccount provides a mock function with given fields: accountID, tx
func (*MockService) CreateAccount ¶
func (_m *MockService) CreateAccount(tx *sql.Tx, email string, accountStatus models.AccountStatus) (*models.Account, error)
CreateAccount provides a mock function with given fields: tx, email, accountStatus
func (*MockService) CreateAccountWithOAuth ¶
func (_m *MockService) CreateAccountWithOAuth(email string, firstName string, lastName string, avatarURL string, tx *sql.Tx) (*models.Account, error)
CreateAccountWithOAuth provides a mock function with given fields: email, firstName, lastName, avatarURL, tx
func (*MockService) DeactivateAccountByID ¶
DeactivateAccountByID provides a mock function with given fields: accountID, tx
func (*MockService) DeleteUnconfirmedAccountsByAccountIDs ¶
func (_m *MockService) DeleteUnconfirmedAccountsByAccountIDs(accountIDs []uuid.UUID, tx *sql.Tx) error
DeleteUnconfirmedAccountsByAccountIDs provides a mock function with given fields: accountIDs, tx
func (*MockService) GetAccountByID ¶
GetAccountByID provides a mock function with given fields: accountID
func (*MockService) GetAccountByName ¶
func (_m *MockService) GetAccountByName(accountName string) (*models.Account, error)
GetAccountByName provides a mock function with given fields: accountName
func (*MockService) LoginAccount ¶
func (_m *MockService) LoginAccount(account uuid.UUID, clientIP string, tx *sql.Tx) (*models.Account, error)
LoginAccount provides a mock function with given fields: account, clientIP, tx
func (*MockService) UpdateAccountName ¶
func (_m *MockService) UpdateAccountName(accountID uuid.UUID, name string) error
UpdateAccountName provides a mock function with given fields: accountID, name
type Repository ¶
type Repository interface { GetAccountByID(executor database.QueryExecutor, accountID 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 }
type Service ¶
type Service interface { GetAccountByID(executor database.QueryExecutor, accountID uuid.UUID) (*models.Account, error) GetAccountByName(executor database.QueryExecutor, accountName string) (*models.Account, error) LoginAccount( executor database.QueryExecutor, account uuid.UUID, clientIP string, ) (*models.Account, error) CreateAccount( executor database.QueryExecutor, email string, accountStatus models.AccountStatus, ) (*models.Account, error) CreateAccountWithOAuth( executor database.QueryExecutor, email, firstName, lastName, avatarURL string, ) (*models.Account, error) DeactivateAccountByID(executor database.QueryExecutor, accountID uuid.UUID) error DeleteUnconfirmedAccountsByAccountIDs(executor database.QueryExecutor, accountIDs []uuid.UUID) error UpdateAccountName(executor database.QueryExecutor, accountID uuid.UUID, name string) error ConfirmAccount(executor database.QueryExecutor, accountID uuid.UUID) (*models.Account, error) }