frontend

package
v0.0.0-...-045c0c7 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: AGPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Choices

type Choices struct {
	Disk    *DiskFormattingChoices
	Network *NetworkChoices
}

type Disk

type Disk struct {
	Name   string
	Model  string
	Serial string
	Size   int64
}

type DiskFormattingChoices

type DiskFormattingChoices struct{}

type Frontend

type Frontend interface {
	Initialize(ctx context.Context, commands chan any) error      // Initialize the frontend, providing a channel to send any user choices or other requests
	Shutdown(ctx context.Context) error                           // Shutdown the frontend, if needed
	HardwareState(ctx context.Context, state HardwareState) error // HardwareState is called when new information about the state of the hardware is available
	ChoicesMade(ctx context.Context, options Choices) error       // ChoicesMade is called when a different frontend makes choices
}

type HardwareState

type HardwareState struct {
	NICs  []NIC
	Disks []Disk
}

type NIC

type NIC struct{}

type NetworkChoices

type NetworkChoices struct{}

type ScanHardwareRequest

type ScanHardwareRequest int
const (
	ScanDisks ScanHardwareRequest = iota
	ScanNICs
)

Directories

Path Synopsis
tui

Jump to

Keyboard shortcuts

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