host

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Code generated by MockGen. DO NOT EDIT. Source: github.com/rancher-sandbox/cluster-api-provider-elemental/internal/agent/host (interfaces: InstallerSelector,Installer)

Generated by this command:

mockgen -copyright_file=hack/boilerplate.go.txt -destination=internal/agent/host/installer_mocks.go -package=host github.com/rancher-sandbox/cluster-api-provider-elemental/internal/agent/host InstallerSelector,Installer

Package host is a generated GoMock package.

Index

Constants

View Source
const (
	IdentityFile = "private.key"
)

Variables

View Source
var (
	ErrManagedOSNotSupportedYet = errors.New("managed Elemental OS not supported yet")
	ErrUnmanagedOSNotReset      = errors.New("unmanaged OS reset sentinel file still exists")
	ErrUnknownInstaller         = errors.New("unknown installer")
)
View Source
var ErrIdentityDoesNotExist = errors.New("no identity found")

Functions

This section is empty.

Types

type DummyIdentity

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

func NewDummyIdentity

func NewDummyIdentity() (*DummyIdentity, error)

func (*DummyIdentity) GetSigningKey

func (i *DummyIdentity) GetSigningKey() ([]byte, error)

func (*DummyIdentity) LoadFromFile

func (i *DummyIdentity) LoadFromFile(fs vfs.FS, filePath string) error

func (*DummyIdentity) WriteToFile

func (i *DummyIdentity) WriteToFile(fs vfs.FS, filePath string) error

type DummyManager

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

func (*DummyManager) GetOrCreateIdentity

func (m *DummyManager) GetOrCreateIdentity() (Identity, error)

type ElementalInstaller

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

func (*ElementalInstaller) Install

func (*ElementalInstaller) Reset

func (*ElementalInstaller) TriggerReset

func (i *ElementalInstaller) TriggerReset() error

type Identity

type Identity interface {
	GetSigningKey() ([]byte, error)
}

type IdentityManager

type IdentityManager interface {
	GetOrCreateIdentity() (Identity, error)
}

func NewDummyManager

func NewDummyManager(fs vfs.FS, workDir string) IdentityManager

type Installer

type Installer interface {
	Install(conf api.RegistrationResponse, hostnameToSet string) error
	TriggerReset() error
	Reset(conf api.RegistrationResponse) error
}

func NewElementalInstaller

func NewElementalInstaller(fs vfs.FS) Installer

func NewUnmanagedInstaller

func NewUnmanagedInstaller(fs vfs.FS, hostnameManager hostname.Manager, configPath string, workDir string) Installer

type InstallerSelector added in v0.0.2

type InstallerSelector interface {
	GetInstaller(fs vfs.FS, configPath string, conf config.Config) (Installer, error)
}

func NewInstallerSelector added in v0.0.2

func NewInstallerSelector() InstallerSelector

type MockInstaller added in v0.0.2

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

MockInstaller is a mock of Installer interface.

func NewMockInstaller added in v0.0.2

func NewMockInstaller(ctrl *gomock.Controller) *MockInstaller

NewMockInstaller creates a new mock instance.

func (*MockInstaller) EXPECT added in v0.0.2

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockInstaller) Install added in v0.0.2

func (m *MockInstaller) Install(arg0 api.RegistrationResponse, arg1 string) error

Install mocks base method.

func (*MockInstaller) Reset added in v0.0.2

Reset mocks base method.

func (*MockInstaller) TriggerReset added in v0.0.2

func (m *MockInstaller) TriggerReset() error

TriggerReset mocks base method.

type MockInstallerMockRecorder added in v0.0.2

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

MockInstallerMockRecorder is the mock recorder for MockInstaller.

func (*MockInstallerMockRecorder) Install added in v0.0.2

func (mr *MockInstallerMockRecorder) Install(arg0, arg1 any) *gomock.Call

Install indicates an expected call of Install.

func (*MockInstallerMockRecorder) Reset added in v0.0.2

func (mr *MockInstallerMockRecorder) Reset(arg0 any) *gomock.Call

Reset indicates an expected call of Reset.

func (*MockInstallerMockRecorder) TriggerReset added in v0.0.2

func (mr *MockInstallerMockRecorder) TriggerReset() *gomock.Call

TriggerReset indicates an expected call of TriggerReset.

type MockInstallerSelector added in v0.0.2

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

MockInstallerSelector is a mock of InstallerSelector interface.

func NewMockInstallerSelector added in v0.0.2

func NewMockInstallerSelector(ctrl *gomock.Controller) *MockInstallerSelector

NewMockInstallerSelector creates a new mock instance.

func (*MockInstallerSelector) EXPECT added in v0.0.2

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockInstallerSelector) GetInstaller added in v0.0.2

func (m *MockInstallerSelector) GetInstaller(arg0 vfs.FS, arg1 string, arg2 config.Config) (Installer, error)

GetInstaller mocks base method.

type MockInstallerSelectorMockRecorder added in v0.0.2

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

MockInstallerSelectorMockRecorder is the mock recorder for MockInstallerSelector.

func (*MockInstallerSelectorMockRecorder) GetInstaller added in v0.0.2

func (mr *MockInstallerSelectorMockRecorder) GetInstaller(arg0, arg1, arg2 any) *gomock.Call

GetInstaller indicates an expected call of GetInstaller.

type UnmanagedInstaller

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

func (*UnmanagedInstaller) Install

func (i *UnmanagedInstaller) Install(conf api.RegistrationResponse, hostnameToSet string) error

func (*UnmanagedInstaller) Reset

func (*UnmanagedInstaller) TriggerReset

func (i *UnmanagedInstaller) TriggerReset() error

Jump to

Keyboard shortcuts

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