host

package
v0.0.1 Latest Latest
Warning

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

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

Documentation

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")
)
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, configPath string, workDir string) Installer

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