totalos

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LatestImageURL

func LatestImageURL(ctx context.Context, machineHardwareName string, client *http.Client) (string, error)

LatestImageURL takes the machine hardware name (architecture, the result of `uname -m`), reads the GitHub releases API and returns the latest non-draft and non-prerelease metal ISO URL.

func NewServer

func NewServer(ip, user string, port uint16, password string, key []byte) *server

Types

type CPU added in v0.0.5

type CPU struct {
	Name    string `json:"name"`
	Cores   int    `json:"cores"`
	Threads int    `json:"threads"`
}

type Disk added in v0.0.5

type Disk struct {
	Model     string `json:"model"`
	Name      string `json:"name"`
	Serial    string `json:"serial"`
	Size      int    `json:"size"`
	Type      string `json:"type"`
	Transport string `json:"tran"`
	WWN       string `json:"wwn"`
}

func (*Disk) Device added in v0.0.5

func (d *Disk) Device() string

type GigaByte added in v0.0.4

type GigaByte int

type Machine added in v0.0.5

type Machine struct {
	Arch        string   `json:"arch"`
	IPv4Network Network  `json:"ipv4_network"`
	Hostname    string   `json:"hostname"`
	Disks       []Disk   `json:"disks"`
	CPU         CPU      `json:"cpu"`
	Memory      GigaByte `json:"memory_gb"`
	MAC         string   `json:"mac"`
	UUID        string   `json:"uuid"`
}

type Network added in v0.0.5

type Network struct {
	IP      string `json:"ip"`
	Netmask string `json:"netmask"`
	Gateway string `json:"gateway"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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