Documentation ¶
Overview ¶
Package repository is a generated GoMock package.
Package repository is a generated GoMock package.
Package repository is a generated GoMock package.
Package repository is a generated GoMock package.
Index ¶
- Variables
- type MachineRepo
- func (repo *MachineRepo) CreateMachine(machine *models.Machine) (*models.Machine, error)
- func (repo *MachineRepo) CreateMachineTx(machine *models.Machine, tx pgx.Tx) (*models.Machine, error)
- func (repo *MachineRepo) DeleteMachine(id uuid.UUID) error
- func (repo *MachineRepo) GetMachine(id uuid.UUID) (*models.Machine, error)
- func (repo *MachineRepo) GetMachineByNameAndUser(machineName string, userID uuid.UUID) (*models.Machine, error)
- func (repo *MachineRepo) GetUserMachines(id uuid.UUID) ([]models.Machine, error)
- type MachineRepository
- type MockMachineRepository
- func (m *MockMachineRepository) CreateMachine(machine *models.Machine) (*models.Machine, error)
- func (m *MockMachineRepository) CreateMachineTx(machine *models.Machine, tx pgx.Tx) (*models.Machine, error)
- func (m *MockMachineRepository) DeleteMachine(id uuid.UUID) error
- func (m *MockMachineRepository) EXPECT() *MockMachineRepositoryMockRecorder
- func (m *MockMachineRepository) GetMachine(id uuid.UUID) (*models.Machine, error)
- func (m *MockMachineRepository) GetMachineByNameAndUser(machineName string, userID uuid.UUID) (*models.Machine, error)
- func (m *MockMachineRepository) GetUserMachines(id uuid.UUID) ([]models.Machine, error)
- type MockMachineRepositoryMockRecorder
- func (mr *MockMachineRepositoryMockRecorder) CreateMachine(machine interface{}) *gomock.Call
- func (mr *MockMachineRepositoryMockRecorder) CreateMachineTx(machine, tx interface{}) *gomock.Call
- func (mr *MockMachineRepositoryMockRecorder) DeleteMachine(id interface{}) *gomock.Call
- func (mr *MockMachineRepositoryMockRecorder) GetMachine(id interface{}) *gomock.Call
- func (mr *MockMachineRepositoryMockRecorder) GetMachineByNameAndUser(machineName, userID interface{}) *gomock.Call
- func (mr *MockMachineRepositoryMockRecorder) GetUserMachines(id interface{}) *gomock.Call
- type MockSshConfigRepository
- func (m *MockSshConfigRepository) EXPECT() *MockSshConfigRepositoryMockRecorder
- func (m *MockSshConfigRepository) GetSshConfig(machineID, userID uuid.UUID) (*models.SshConfig, error)
- func (m *MockSshConfigRepository) UpsertSshConfig(config *models.SshConfig) (*models.SshConfig, error)
- func (m *MockSshConfigRepository) UpsertSshConfigTx(config *models.SshConfig, tx pgx.Tx) (*models.SshConfig, error)
- type MockSshConfigRepositoryMockRecorder
- func (mr *MockSshConfigRepositoryMockRecorder) GetSshConfig(machineID, userID interface{}) *gomock.Call
- func (mr *MockSshConfigRepositoryMockRecorder) UpsertSshConfig(config interface{}) *gomock.Call
- func (mr *MockSshConfigRepositoryMockRecorder) UpsertSshConfigTx(config, tx interface{}) *gomock.Call
- type MockSshKeyRepository
- func (m *MockSshKeyRepository) CreateSshKey(sshKey *models.SshKey) (*models.SshKey, error)
- func (m *MockSshKeyRepository) EXPECT() *MockSshKeyRepositoryMockRecorder
- func (m *MockSshKeyRepository) UpsertSshKey(sshKey *models.SshKey) (*models.SshKey, error)
- func (m *MockSshKeyRepository) UpsertSshKeyTx(sshKey *models.SshKey, tx pgx.Tx) (*models.SshKey, error)
- type MockSshKeyRepositoryMockRecorder
- type MockUserRepository
- func (m *MockUserRepository) AddAndUpdateConfig(user *models.User) error
- func (m *MockUserRepository) AddAndUpdateConfigTx(user *models.User, tx pgx.Tx) error
- func (m *MockUserRepository) AddAndUpdateKeys(user *models.User) error
- func (m *MockUserRepository) AddAndUpdateKeysTx(user *models.User, tx pgx.Tx) error
- func (m *MockUserRepository) CreateUser(user *models.User) (*models.User, error)
- func (m *MockUserRepository) CreateUserTx(user *models.User, tx pgx.Tx) (*models.User, error)
- func (m *MockUserRepository) DeleteUser(id uuid.UUID) error
- func (m *MockUserRepository) EXPECT() *MockUserRepositoryMockRecorder
- func (m *MockUserRepository) GetUser(id uuid.UUID) (*models.User, error)
- func (m *MockUserRepository) GetUserByUsername(username string) (*models.User, error)
- func (m *MockUserRepository) GetUserConfig(id uuid.UUID) ([]models.SshConfig, error)
- func (m *MockUserRepository) GetUserKeys(id uuid.UUID) ([]models.SshKey, error)
- type MockUserRepositoryMockRecorder
- func (mr *MockUserRepositoryMockRecorder) AddAndUpdateConfig(user interface{}) *gomock.Call
- func (mr *MockUserRepositoryMockRecorder) AddAndUpdateConfigTx(user, tx interface{}) *gomock.Call
- func (mr *MockUserRepositoryMockRecorder) AddAndUpdateKeys(user interface{}) *gomock.Call
- func (mr *MockUserRepositoryMockRecorder) AddAndUpdateKeysTx(user, tx interface{}) *gomock.Call
- func (mr *MockUserRepositoryMockRecorder) CreateUser(user interface{}) *gomock.Call
- func (mr *MockUserRepositoryMockRecorder) CreateUserTx(user, tx interface{}) *gomock.Call
- func (mr *MockUserRepositoryMockRecorder) DeleteUser(id interface{}) *gomock.Call
- func (mr *MockUserRepositoryMockRecorder) GetUser(id interface{}) *gomock.Call
- func (mr *MockUserRepositoryMockRecorder) GetUserByUsername(username interface{}) *gomock.Call
- func (mr *MockUserRepositoryMockRecorder) GetUserConfig(id interface{}) *gomock.Call
- func (mr *MockUserRepositoryMockRecorder) GetUserKeys(id interface{}) *gomock.Call
- type SshConfigRepo
- func (repo *SshConfigRepo) GetSshConfig(machineID uuid.UUID, userID uuid.UUID) (*models.SshConfig, error)
- func (repo *SshConfigRepo) UpsertSshConfig(config *models.SshConfig) (*models.SshConfig, error)
- func (repo *SshConfigRepo) UpsertSshConfigTx(config *models.SshConfig, tx pgx.Tx) (*models.SshConfig, error)
- type SshConfigRepository
- type SshKeyRepo
- type SshKeyRepository
- type UserRepo
- func (repo *UserRepo) AddAndUpdateConfig(user *models.User) error
- func (repo *UserRepo) AddAndUpdateConfigTx(user *models.User, tx pgx.Tx) error
- func (repo *UserRepo) AddAndUpdateKeys(user *models.User) error
- func (repo *UserRepo) AddAndUpdateKeysTx(user *models.User, tx pgx.Tx) error
- func (repo *UserRepo) CreateUser(user *models.User) (*models.User, error)
- func (repo *UserRepo) CreateUserTx(user *models.User, tx pgx.Tx) (*models.User, error)
- func (repo *UserRepo) DeleteUser(id uuid.UUID) error
- func (repo *UserRepo) GetUser(userId uuid.UUID) (*models.User, error)
- func (repo *UserRepo) GetUserByUsername(username string) (*models.User, error)
- func (repo *UserRepo) GetUserConfig(id uuid.UUID) ([]models.SshConfig, error)
- func (repo *UserRepo) GetUserKeys(id uuid.UUID) ([]models.SshKey, error)
- type UserRepository
Constants ¶
This section is empty.
Variables ¶
var ErrMachineAlreadyExists = errors.New("machine w/ user already exists")
var ErrUserAlreadyExists = errors.New("user already exists")
Functions ¶
This section is empty.
Types ¶
type MachineRepo ¶
func (*MachineRepo) CreateMachine ¶
func (*MachineRepo) CreateMachineTx ¶
func (*MachineRepo) DeleteMachine ¶
func (repo *MachineRepo) DeleteMachine(id uuid.UUID) error
func (*MachineRepo) GetMachine ¶
func (*MachineRepo) GetMachineByNameAndUser ¶
func (*MachineRepo) GetUserMachines ¶
type MachineRepository ¶
type MachineRepository interface { DeleteMachine(id uuid.UUID) error GetMachine(id uuid.UUID) (*models.Machine, error) GetMachineByNameAndUser(machineName string, userID uuid.UUID) (*models.Machine, error) CreateMachine(machine *models.Machine) (*models.Machine, error) CreateMachineTx(machine *models.Machine, tx pgx.Tx) (*models.Machine, error) GetUserMachines(id uuid.UUID) ([]models.Machine, error) }
type MockMachineRepository ¶
type MockMachineRepository struct {
// contains filtered or unexported fields
}
MockMachineRepository is a mock of MachineRepository interface.
func NewMockMachineRepository ¶
func NewMockMachineRepository(ctrl *gomock.Controller) *MockMachineRepository
NewMockMachineRepository creates a new mock instance.
func (*MockMachineRepository) CreateMachine ¶
CreateMachine mocks base method.
func (*MockMachineRepository) CreateMachineTx ¶
func (m *MockMachineRepository) CreateMachineTx(machine *models.Machine, tx pgx.Tx) (*models.Machine, error)
CreateMachineTx mocks base method.
func (*MockMachineRepository) DeleteMachine ¶
func (m *MockMachineRepository) DeleteMachine(id uuid.UUID) error
DeleteMachine mocks base method.
func (*MockMachineRepository) EXPECT ¶
func (m *MockMachineRepository) EXPECT() *MockMachineRepositoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockMachineRepository) GetMachine ¶
GetMachine mocks base method.
func (*MockMachineRepository) GetMachineByNameAndUser ¶
func (m *MockMachineRepository) GetMachineByNameAndUser(machineName string, userID uuid.UUID) (*models.Machine, error)
GetMachineByNameAndUser mocks base method.
func (*MockMachineRepository) GetUserMachines ¶
GetUserMachines mocks base method.
type MockMachineRepositoryMockRecorder ¶
type MockMachineRepositoryMockRecorder struct {
// contains filtered or unexported fields
}
MockMachineRepositoryMockRecorder is the mock recorder for MockMachineRepository.
func (*MockMachineRepositoryMockRecorder) CreateMachine ¶
func (mr *MockMachineRepositoryMockRecorder) CreateMachine(machine interface{}) *gomock.Call
CreateMachine indicates an expected call of CreateMachine.
func (*MockMachineRepositoryMockRecorder) CreateMachineTx ¶
func (mr *MockMachineRepositoryMockRecorder) CreateMachineTx(machine, tx interface{}) *gomock.Call
CreateMachineTx indicates an expected call of CreateMachineTx.
func (*MockMachineRepositoryMockRecorder) DeleteMachine ¶
func (mr *MockMachineRepositoryMockRecorder) DeleteMachine(id interface{}) *gomock.Call
DeleteMachine indicates an expected call of DeleteMachine.
func (*MockMachineRepositoryMockRecorder) GetMachine ¶
func (mr *MockMachineRepositoryMockRecorder) GetMachine(id interface{}) *gomock.Call
GetMachine indicates an expected call of GetMachine.
func (*MockMachineRepositoryMockRecorder) GetMachineByNameAndUser ¶
func (mr *MockMachineRepositoryMockRecorder) GetMachineByNameAndUser(machineName, userID interface{}) *gomock.Call
GetMachineByNameAndUser indicates an expected call of GetMachineByNameAndUser.
func (*MockMachineRepositoryMockRecorder) GetUserMachines ¶
func (mr *MockMachineRepositoryMockRecorder) GetUserMachines(id interface{}) *gomock.Call
GetUserMachines indicates an expected call of GetUserMachines.
type MockSshConfigRepository ¶
type MockSshConfigRepository struct {
// contains filtered or unexported fields
}
MockSshConfigRepository is a mock of SshConfigRepository interface.
func NewMockSshConfigRepository ¶
func NewMockSshConfigRepository(ctrl *gomock.Controller) *MockSshConfigRepository
NewMockSshConfigRepository creates a new mock instance.
func (*MockSshConfigRepository) EXPECT ¶
func (m *MockSshConfigRepository) EXPECT() *MockSshConfigRepositoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockSshConfigRepository) GetSshConfig ¶
func (m *MockSshConfigRepository) GetSshConfig(machineID, userID uuid.UUID) (*models.SshConfig, error)
GetSshConfig mocks base method.
func (*MockSshConfigRepository) UpsertSshConfig ¶
func (m *MockSshConfigRepository) UpsertSshConfig(config *models.SshConfig) (*models.SshConfig, error)
UpsertSshConfig mocks base method.
func (*MockSshConfigRepository) UpsertSshConfigTx ¶
func (m *MockSshConfigRepository) UpsertSshConfigTx(config *models.SshConfig, tx pgx.Tx) (*models.SshConfig, error)
UpsertSshConfigTx mocks base method.
type MockSshConfigRepositoryMockRecorder ¶
type MockSshConfigRepositoryMockRecorder struct {
// contains filtered or unexported fields
}
MockSshConfigRepositoryMockRecorder is the mock recorder for MockSshConfigRepository.
func (*MockSshConfigRepositoryMockRecorder) GetSshConfig ¶
func (mr *MockSshConfigRepositoryMockRecorder) GetSshConfig(machineID, userID interface{}) *gomock.Call
GetSshConfig indicates an expected call of GetSshConfig.
func (*MockSshConfigRepositoryMockRecorder) UpsertSshConfig ¶
func (mr *MockSshConfigRepositoryMockRecorder) UpsertSshConfig(config interface{}) *gomock.Call
UpsertSshConfig indicates an expected call of UpsertSshConfig.
func (*MockSshConfigRepositoryMockRecorder) UpsertSshConfigTx ¶
func (mr *MockSshConfigRepositoryMockRecorder) UpsertSshConfigTx(config, tx interface{}) *gomock.Call
UpsertSshConfigTx indicates an expected call of UpsertSshConfigTx.
type MockSshKeyRepository ¶
type MockSshKeyRepository struct {
// contains filtered or unexported fields
}
MockSshKeyRepository is a mock of SshKeyRepository interface.
func NewMockSshKeyRepository ¶
func NewMockSshKeyRepository(ctrl *gomock.Controller) *MockSshKeyRepository
NewMockSshKeyRepository creates a new mock instance.
func (*MockSshKeyRepository) CreateSshKey ¶
CreateSshKey mocks base method.
func (*MockSshKeyRepository) EXPECT ¶
func (m *MockSshKeyRepository) EXPECT() *MockSshKeyRepositoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockSshKeyRepository) UpsertSshKey ¶
UpsertSshKey mocks base method.
func (*MockSshKeyRepository) UpsertSshKeyTx ¶
func (m *MockSshKeyRepository) UpsertSshKeyTx(sshKey *models.SshKey, tx pgx.Tx) (*models.SshKey, error)
UpsertSshKeyTx mocks base method.
type MockSshKeyRepositoryMockRecorder ¶
type MockSshKeyRepositoryMockRecorder struct {
// contains filtered or unexported fields
}
MockSshKeyRepositoryMockRecorder is the mock recorder for MockSshKeyRepository.
func (*MockSshKeyRepositoryMockRecorder) CreateSshKey ¶
func (mr *MockSshKeyRepositoryMockRecorder) CreateSshKey(sshKey interface{}) *gomock.Call
CreateSshKey indicates an expected call of CreateSshKey.
func (*MockSshKeyRepositoryMockRecorder) UpsertSshKey ¶
func (mr *MockSshKeyRepositoryMockRecorder) UpsertSshKey(sshKey interface{}) *gomock.Call
UpsertSshKey indicates an expected call of UpsertSshKey.
func (*MockSshKeyRepositoryMockRecorder) UpsertSshKeyTx ¶
func (mr *MockSshKeyRepositoryMockRecorder) UpsertSshKeyTx(sshKey, tx interface{}) *gomock.Call
UpsertSshKeyTx indicates an expected call of UpsertSshKeyTx.
type MockUserRepository ¶
type MockUserRepository struct {
// contains filtered or unexported fields
}
MockUserRepository is a mock of UserRepository interface.
func NewMockUserRepository ¶
func NewMockUserRepository(ctrl *gomock.Controller) *MockUserRepository
NewMockUserRepository creates a new mock instance.
func (*MockUserRepository) AddAndUpdateConfig ¶
func (m *MockUserRepository) AddAndUpdateConfig(user *models.User) error
AddAndUpdateConfig mocks base method.
func (*MockUserRepository) AddAndUpdateConfigTx ¶
AddAndUpdateConfigTx mocks base method.
func (*MockUserRepository) AddAndUpdateKeys ¶
func (m *MockUserRepository) AddAndUpdateKeys(user *models.User) error
AddAndUpdateKeys mocks base method.
func (*MockUserRepository) AddAndUpdateKeysTx ¶
AddAndUpdateKeysTx mocks base method.
func (*MockUserRepository) CreateUser ¶
CreateUser mocks base method.
func (*MockUserRepository) CreateUserTx ¶
CreateUserTx mocks base method.
func (*MockUserRepository) DeleteUser ¶
func (m *MockUserRepository) DeleteUser(id uuid.UUID) error
DeleteUser mocks base method.
func (*MockUserRepository) EXPECT ¶
func (m *MockUserRepository) EXPECT() *MockUserRepositoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockUserRepository) GetUserByUsername ¶
func (m *MockUserRepository) GetUserByUsername(username string) (*models.User, error)
GetUserByUsername mocks base method.
func (*MockUserRepository) GetUserConfig ¶
GetUserConfig mocks base method.
func (*MockUserRepository) GetUserKeys ¶
GetUserKeys mocks base method.
type MockUserRepositoryMockRecorder ¶
type MockUserRepositoryMockRecorder struct {
// contains filtered or unexported fields
}
MockUserRepositoryMockRecorder is the mock recorder for MockUserRepository.
func (*MockUserRepositoryMockRecorder) AddAndUpdateConfig ¶
func (mr *MockUserRepositoryMockRecorder) AddAndUpdateConfig(user interface{}) *gomock.Call
AddAndUpdateConfig indicates an expected call of AddAndUpdateConfig.
func (*MockUserRepositoryMockRecorder) AddAndUpdateConfigTx ¶
func (mr *MockUserRepositoryMockRecorder) AddAndUpdateConfigTx(user, tx interface{}) *gomock.Call
AddAndUpdateConfigTx indicates an expected call of AddAndUpdateConfigTx.
func (*MockUserRepositoryMockRecorder) AddAndUpdateKeys ¶
func (mr *MockUserRepositoryMockRecorder) AddAndUpdateKeys(user interface{}) *gomock.Call
AddAndUpdateKeys indicates an expected call of AddAndUpdateKeys.
func (*MockUserRepositoryMockRecorder) AddAndUpdateKeysTx ¶
func (mr *MockUserRepositoryMockRecorder) AddAndUpdateKeysTx(user, tx interface{}) *gomock.Call
AddAndUpdateKeysTx indicates an expected call of AddAndUpdateKeysTx.
func (*MockUserRepositoryMockRecorder) CreateUser ¶
func (mr *MockUserRepositoryMockRecorder) CreateUser(user interface{}) *gomock.Call
CreateUser indicates an expected call of CreateUser.
func (*MockUserRepositoryMockRecorder) CreateUserTx ¶
func (mr *MockUserRepositoryMockRecorder) CreateUserTx(user, tx interface{}) *gomock.Call
CreateUserTx indicates an expected call of CreateUserTx.
func (*MockUserRepositoryMockRecorder) DeleteUser ¶
func (mr *MockUserRepositoryMockRecorder) DeleteUser(id interface{}) *gomock.Call
DeleteUser indicates an expected call of DeleteUser.
func (*MockUserRepositoryMockRecorder) GetUser ¶
func (mr *MockUserRepositoryMockRecorder) GetUser(id interface{}) *gomock.Call
GetUser indicates an expected call of GetUser.
func (*MockUserRepositoryMockRecorder) GetUserByUsername ¶
func (mr *MockUserRepositoryMockRecorder) GetUserByUsername(username interface{}) *gomock.Call
GetUserByUsername indicates an expected call of GetUserByUsername.
func (*MockUserRepositoryMockRecorder) GetUserConfig ¶
func (mr *MockUserRepositoryMockRecorder) GetUserConfig(id interface{}) *gomock.Call
GetUserConfig indicates an expected call of GetUserConfig.
func (*MockUserRepositoryMockRecorder) GetUserKeys ¶
func (mr *MockUserRepositoryMockRecorder) GetUserKeys(id interface{}) *gomock.Call
GetUserKeys indicates an expected call of GetUserKeys.
type SshConfigRepo ¶
func (*SshConfigRepo) GetSshConfig ¶
func (*SshConfigRepo) UpsertSshConfig ¶
func (*SshConfigRepo) UpsertSshConfigTx ¶
type SshConfigRepository ¶
type SshKeyRepo ¶
func (*SshKeyRepo) CreateSshKey ¶
func (*SshKeyRepo) UpsertSshKey ¶
func (*SshKeyRepo) UpsertSshKeyTx ¶
type SshKeyRepository ¶
type UserRepo ¶
func (*UserRepo) AddAndUpdateConfig ¶
func (*UserRepo) AddAndUpdateConfigTx ¶
func (*UserRepo) AddAndUpdateKeysTx ¶
func (*UserRepo) CreateUser ¶
func (*UserRepo) CreateUserTx ¶
func (*UserRepo) GetUserByUsername ¶
func (*UserRepo) GetUserConfig ¶
type UserRepository ¶
type UserRepository interface { GetUser(id uuid.UUID) (*models.User, error) GetUserByUsername(username string) (*models.User, error) CreateUser(user *models.User) (*models.User, error) CreateUserTx(user *models.User, tx pgx.Tx) (*models.User, error) DeleteUser(id uuid.UUID) error GetUserConfig(id uuid.UUID) ([]models.SshConfig, error) GetUserKeys(id uuid.UUID) ([]models.SshKey, error) AddAndUpdateKeys(user *models.User) error AddAndUpdateKeysTx(user *models.User, tx pgx.Tx) error AddAndUpdateConfig(user *models.User) error AddAndUpdateConfigTx(user *models.User, tx pgx.Tx) error }
UserRepository interface for User repository