mocks

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataAdapter

type DataAdapter struct {
	mock.Mock
}

DataAdapter is an autogenerated mock type for the DataAdapter type

func (*DataAdapter) CleanUp

func (_m *DataAdapter) CleanUp() error

CleanUp provides a mock function with given fields:

func (*DataAdapter) GetExecutor

func (_m *DataAdapter) GetExecutor() data.DataExecutor

GetExecutor provides a mock function with given fields:

func (*DataAdapter) Setup

func (_m *DataAdapter) Setup() error

Setup provides a mock function with given fields:

type DataCRUD

type DataCRUD struct {
	mock.Mock
}

DataCRUD is an autogenerated mock type for the DataCRUD type

func (*DataCRUD) CreateClient

func (_m *DataCRUD) CreateClient(client *models.Client) error

CreateClient provides a mock function with given fields: client

func (*DataCRUD) CreateMigration

func (_m *DataCRUD) CreateMigration(timestamp string) error

CreateMigration provides a mock function with given fields: timestamp

func (*DataCRUD) CreateUser

func (_m *DataCRUD) CreateUser(user *models.User) error

CreateUser provides a mock function with given fields: user

func (*DataCRUD) CreateUserRole

func (_m *DataCRUD) CreateUserRole(role *models.UserRole) error

CreateUserRole provides a mock function with given fields: role

func (*DataCRUD) DeleteAllOtherUserSessions

func (_m *DataCRUD) DeleteAllOtherUserSessions(username string, tokem uuid.UUID) error

DeleteAllOtherUserSessions provides a mock function with given fields: username, tokem

func (*DataCRUD) DeleteAllUserSessions

func (_m *DataCRUD) DeleteAllUserSessions(username string) error

DeleteAllUserSessions provides a mock function with given fields: username

func (*DataCRUD) DeleteClient

func (_m *DataCRUD) DeleteClient(uid uuid.UUID) (bool, error)

DeleteClient provides a mock function with given fields: uid

func (*DataCRUD) DeleteMigrationByTimestamp

func (_m *DataCRUD) DeleteMigrationByTimestamp(timestamp string) error

DeleteMigrationByTimestamp provides a mock function with given fields: timestamp

func (*DataCRUD) DeleteSession

func (_m *DataCRUD) DeleteSession(token uuid.UUID) (bool, error)

DeleteSession provides a mock function with given fields: token

func (*DataCRUD) DeleteUser

func (_m *DataCRUD) DeleteUser(username string) (bool, error)

DeleteUser provides a mock function with given fields: username

func (*DataCRUD) DeleteUserRole

func (_m *DataCRUD) DeleteUserRole(username string, clientUID uuid.UUID) (bool, error)

DeleteUserRole provides a mock function with given fields: username, clientUID

func (*DataCRUD) GetClientByUID

func (_m *DataCRUD) GetClientByUID(uid uuid.UUID) (*models.Client, error)

GetClientByUID provides a mock function with given fields: uid

func (*DataCRUD) GetClients

func (_m *DataCRUD) GetClients() ([]*models.Client, error)

GetClients provides a mock function with given fields:

func (*DataCRUD) GetLatestTimestamp

func (_m *DataCRUD) GetLatestTimestamp() (string, bool, error)

GetLatestTimestamp provides a mock function with given fields:

func (*DataCRUD) GetMigrationByTimestamp

func (_m *DataCRUD) GetMigrationByTimestamp(timestamp string) (*models.Migration, error)

GetMigrationByTimestamp provides a mock function with given fields: timestamp

func (*DataCRUD) GetSessionByToken

func (_m *DataCRUD) GetSessionByToken(token uuid.UUID) (*models.Session, error)

GetSessionByToken provides a mock function with given fields: token

func (*DataCRUD) GetUserByUsername

func (_m *DataCRUD) GetUserByUsername(username string) (*models.User, error)

GetUserByUsername provides a mock function with given fields: username

func (*DataCRUD) GetUserRoleByClientUIDAndUsername

func (_m *DataCRUD) GetUserRoleByClientUIDAndUsername(clientUID uuid.UUID, username string) (*models.UserRole, error)

GetUserRoleByClientUIDAndUsername provides a mock function with given fields: clientUID, username

func (*DataCRUD) GetUserRolesWithLesserRankByClientUID

func (_m *DataCRUD) GetUserRolesWithLesserRankByClientUID(uid uuid.UUID, rank int) ([]*models.UserRole, error)

GetUserRolesWithLesserRankByClientUID provides a mock function with given fields: uid, rank

func (*DataCRUD) GetUsersWithLesserRank

func (_m *DataCRUD) GetUsersWithLesserRank(rank int) ([]*models.User, error)

GetUsersWithLesserRank provides a mock function with given fields: rank

func (*DataCRUD) SaveSession

func (_m *DataCRUD) SaveSession(session *models.Session) error

SaveSession provides a mock function with given fields: session

func (*DataCRUD) Setup

func (_m *DataCRUD) Setup() error

Setup provides a mock function with given fields:

func (*DataCRUD) UpdateClient

func (_m *DataCRUD) UpdateClient(client *models.Client) (bool, error)

UpdateClient provides a mock function with given fields: client

func (*DataCRUD) UpdateUser

func (_m *DataCRUD) UpdateUser(user *models.User) (bool, error)

UpdateUser provides a mock function with given fields: user

func (*DataCRUD) UpdateUserPassword

func (_m *DataCRUD) UpdateUserPassword(username string, hash []byte) (bool, error)

UpdateUserPassword provides a mock function with given fields: username, hash

func (*DataCRUD) UpdateUserRole

func (_m *DataCRUD) UpdateUserRole(role *models.UserRole) (bool, error)

UpdateUserRole provides a mock function with given fields: role

type DataExecutor

type DataExecutor struct {
	mock.Mock
}

DataExecutor is an autogenerated mock type for the DataExecutor type

func (*DataExecutor) CreateClient

func (_m *DataExecutor) CreateClient(client *models.Client) error

CreateClient provides a mock function with given fields: client

func (*DataExecutor) CreateMigration

func (_m *DataExecutor) CreateMigration(timestamp string) error

CreateMigration provides a mock function with given fields: timestamp

func (*DataExecutor) CreateTransaction

func (_m *DataExecutor) CreateTransaction() (data.Transaction, error)

CreateTransaction provides a mock function with given fields:

func (*DataExecutor) CreateUser

func (_m *DataExecutor) CreateUser(user *models.User) error

CreateUser provides a mock function with given fields: user

func (*DataExecutor) CreateUserRole

func (_m *DataExecutor) CreateUserRole(role *models.UserRole) error

CreateUserRole provides a mock function with given fields: role

func (*DataExecutor) DeleteAllOtherUserSessions

func (_m *DataExecutor) DeleteAllOtherUserSessions(username string, tokem uuid.UUID) error

DeleteAllOtherUserSessions provides a mock function with given fields: username, tokem

func (*DataExecutor) DeleteAllUserSessions

func (_m *DataExecutor) DeleteAllUserSessions(username string) error

DeleteAllUserSessions provides a mock function with given fields: username

func (*DataExecutor) DeleteClient

func (_m *DataExecutor) DeleteClient(uid uuid.UUID) (bool, error)

DeleteClient provides a mock function with given fields: uid

func (*DataExecutor) DeleteMigrationByTimestamp

func (_m *DataExecutor) DeleteMigrationByTimestamp(timestamp string) error

DeleteMigrationByTimestamp provides a mock function with given fields: timestamp

func (*DataExecutor) DeleteSession

func (_m *DataExecutor) DeleteSession(token uuid.UUID) (bool, error)

DeleteSession provides a mock function with given fields: token

func (*DataExecutor) DeleteUser

func (_m *DataExecutor) DeleteUser(username string) (bool, error)

DeleteUser provides a mock function with given fields: username

func (*DataExecutor) DeleteUserRole

func (_m *DataExecutor) DeleteUserRole(username string, clientUID uuid.UUID) (bool, error)

DeleteUserRole provides a mock function with given fields: username, clientUID

func (*DataExecutor) GetClientByUID

func (_m *DataExecutor) GetClientByUID(uid uuid.UUID) (*models.Client, error)

GetClientByUID provides a mock function with given fields: uid

func (*DataExecutor) GetClients

func (_m *DataExecutor) GetClients() ([]*models.Client, error)

GetClients provides a mock function with given fields:

func (*DataExecutor) GetLatestTimestamp

func (_m *DataExecutor) GetLatestTimestamp() (string, bool, error)

GetLatestTimestamp provides a mock function with given fields:

func (*DataExecutor) GetMigrationByTimestamp

func (_m *DataExecutor) GetMigrationByTimestamp(timestamp string) (*models.Migration, error)

GetMigrationByTimestamp provides a mock function with given fields: timestamp

func (*DataExecutor) GetSessionByToken

func (_m *DataExecutor) GetSessionByToken(token uuid.UUID) (*models.Session, error)

GetSessionByToken provides a mock function with given fields: token

func (*DataExecutor) GetUserByUsername

func (_m *DataExecutor) GetUserByUsername(username string) (*models.User, error)

GetUserByUsername provides a mock function with given fields: username

func (*DataExecutor) GetUserRoleByClientUIDAndUsername

func (_m *DataExecutor) GetUserRoleByClientUIDAndUsername(clientUID uuid.UUID, username string) (*models.UserRole, error)

GetUserRoleByClientUIDAndUsername provides a mock function with given fields: clientUID, username

func (*DataExecutor) GetUserRolesWithLesserRankByClientUID

func (_m *DataExecutor) GetUserRolesWithLesserRankByClientUID(uid uuid.UUID, rank int) ([]*models.UserRole, error)

GetUserRolesWithLesserRankByClientUID provides a mock function with given fields: uid, rank

func (*DataExecutor) GetUsersWithLesserRank

func (_m *DataExecutor) GetUsersWithLesserRank(rank int) ([]*models.User, error)

GetUsersWithLesserRank provides a mock function with given fields: rank

func (*DataExecutor) SaveSession

func (_m *DataExecutor) SaveSession(session *models.Session) error

SaveSession provides a mock function with given fields: session

func (*DataExecutor) Setup

func (_m *DataExecutor) Setup() error

Setup provides a mock function with given fields:

func (*DataExecutor) UpdateClient

func (_m *DataExecutor) UpdateClient(client *models.Client) (bool, error)

UpdateClient provides a mock function with given fields: client

func (*DataExecutor) UpdateUser

func (_m *DataExecutor) UpdateUser(user *models.User) (bool, error)

UpdateUser provides a mock function with given fields: user

func (*DataExecutor) UpdateUserPassword

func (_m *DataExecutor) UpdateUserPassword(username string, hash []byte) (bool, error)

UpdateUserPassword provides a mock function with given fields: username, hash

func (*DataExecutor) UpdateUserRole

func (_m *DataExecutor) UpdateUserRole(role *models.UserRole) (bool, error)

UpdateUserRole provides a mock function with given fields: role

type MigrationRepositoryFactory

type MigrationRepositoryFactory struct {
	mock.Mock
}

MigrationRepositoryFactory is an autogenerated mock type for the MigrationRepositoryFactory type

func (*MigrationRepositoryFactory) CreateMigrationRepository

CreateMigrationRepository provides a mock function with given fields: _a0

type ScopeFactory

type ScopeFactory struct {
	mock.Mock
}

ScopeFactory is an autogenerated mock type for the ScopeFactory type

func (*ScopeFactory) CreateDataExecutorScope

func (_m *ScopeFactory) CreateDataExecutorScope(_a0 func(data.DataExecutor) error) error

CreateDataExecutorScope provides a mock function with given fields: _a0

func (*ScopeFactory) CreateTransactionScope

func (_m *ScopeFactory) CreateTransactionScope(_a0 data.DataExecutor, _a1 func(data.Transaction) (bool, error)) error

CreateTransactionScope provides a mock function with given fields: _a0, _a1

type Transaction

type Transaction struct {
	mock.Mock
}

Transaction is an autogenerated mock type for the Transaction type

func (*Transaction) Commit

func (_m *Transaction) Commit() error

Commit provides a mock function with given fields:

func (*Transaction) CreateClient

func (_m *Transaction) CreateClient(client *models.Client) error

CreateClient provides a mock function with given fields: client

func (*Transaction) CreateMigration

func (_m *Transaction) CreateMigration(timestamp string) error

CreateMigration provides a mock function with given fields: timestamp

func (*Transaction) CreateUser

func (_m *Transaction) CreateUser(user *models.User) error

CreateUser provides a mock function with given fields: user

func (*Transaction) CreateUserRole

func (_m *Transaction) CreateUserRole(role *models.UserRole) error

CreateUserRole provides a mock function with given fields: role

func (*Transaction) DeleteAllOtherUserSessions

func (_m *Transaction) DeleteAllOtherUserSessions(username string, tokem uuid.UUID) error

DeleteAllOtherUserSessions provides a mock function with given fields: username, tokem

func (*Transaction) DeleteAllUserSessions

func (_m *Transaction) DeleteAllUserSessions(username string) error

DeleteAllUserSessions provides a mock function with given fields: username

func (*Transaction) DeleteClient

func (_m *Transaction) DeleteClient(uid uuid.UUID) (bool, error)

DeleteClient provides a mock function with given fields: uid

func (*Transaction) DeleteMigrationByTimestamp

func (_m *Transaction) DeleteMigrationByTimestamp(timestamp string) error

DeleteMigrationByTimestamp provides a mock function with given fields: timestamp

func (*Transaction) DeleteSession

func (_m *Transaction) DeleteSession(token uuid.UUID) (bool, error)

DeleteSession provides a mock function with given fields: token

func (*Transaction) DeleteUser

func (_m *Transaction) DeleteUser(username string) (bool, error)

DeleteUser provides a mock function with given fields: username

func (*Transaction) DeleteUserRole

func (_m *Transaction) DeleteUserRole(username string, clientUID uuid.UUID) (bool, error)

DeleteUserRole provides a mock function with given fields: username, clientUID

func (*Transaction) GetClientByUID

func (_m *Transaction) GetClientByUID(uid uuid.UUID) (*models.Client, error)

GetClientByUID provides a mock function with given fields: uid

func (*Transaction) GetClients

func (_m *Transaction) GetClients() ([]*models.Client, error)

GetClients provides a mock function with given fields:

func (*Transaction) GetLatestTimestamp

func (_m *Transaction) GetLatestTimestamp() (string, bool, error)

GetLatestTimestamp provides a mock function with given fields:

func (*Transaction) GetMigrationByTimestamp

func (_m *Transaction) GetMigrationByTimestamp(timestamp string) (*models.Migration, error)

GetMigrationByTimestamp provides a mock function with given fields: timestamp

func (*Transaction) GetSessionByToken

func (_m *Transaction) GetSessionByToken(token uuid.UUID) (*models.Session, error)

GetSessionByToken provides a mock function with given fields: token

func (*Transaction) GetUserByUsername

func (_m *Transaction) GetUserByUsername(username string) (*models.User, error)

GetUserByUsername provides a mock function with given fields: username

func (*Transaction) GetUserRoleByClientUIDAndUsername

func (_m *Transaction) GetUserRoleByClientUIDAndUsername(clientUID uuid.UUID, username string) (*models.UserRole, error)

GetUserRoleByClientUIDAndUsername provides a mock function with given fields: clientUID, username

func (*Transaction) GetUserRolesWithLesserRankByClientUID

func (_m *Transaction) GetUserRolesWithLesserRankByClientUID(uid uuid.UUID, rank int) ([]*models.UserRole, error)

GetUserRolesWithLesserRankByClientUID provides a mock function with given fields: uid, rank

func (*Transaction) GetUsersWithLesserRank

func (_m *Transaction) GetUsersWithLesserRank(rank int) ([]*models.User, error)

GetUsersWithLesserRank provides a mock function with given fields: rank

func (*Transaction) Rollback

func (_m *Transaction) Rollback() error

Rollback provides a mock function with given fields:

func (*Transaction) SaveSession

func (_m *Transaction) SaveSession(session *models.Session) error

SaveSession provides a mock function with given fields: session

func (*Transaction) Setup

func (_m *Transaction) Setup() error

Setup provides a mock function with given fields:

func (*Transaction) UpdateClient

func (_m *Transaction) UpdateClient(client *models.Client) (bool, error)

UpdateClient provides a mock function with given fields: client

func (*Transaction) UpdateUser

func (_m *Transaction) UpdateUser(user *models.User) (bool, error)

UpdateUser provides a mock function with given fields: user

func (*Transaction) UpdateUserPassword

func (_m *Transaction) UpdateUserPassword(username string, hash []byte) (bool, error)

UpdateUserPassword provides a mock function with given fields: username, hash

func (*Transaction) UpdateUserRole

func (_m *Transaction) UpdateUserRole(role *models.UserRole) (bool, error)

UpdateUserRole provides a mock function with given fields: role

Jump to

Keyboard shortcuts

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