metadata

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateFAT12

func CreateFAT12(w io.Writer, label string, files map[string][]byte) error

CreateFAT12 streams a 1 MiB FAT12 image with VFAT long-filename support to w. label is the volume label (e.g. "CIDATA"); files maps filename → content.

func Generate

func Generate(w io.Writer, cfg *Config) error

Generate streams a cloud-init NoCloud cidata disk image (FAT12) to w.

Types

type Config

type Config struct {
	InstanceID string
	Hostname   string
	Username   string
	Password   string
	Networks   []NetworkInfo
	DNS        []string // e.g. ["8.8.8.8", "8.8.4.4"]
}

Config holds the inputs for generating cloud-init NoCloud metadata.

type NetworkInfo

type NetworkInfo struct {
	IP      string // e.g. "10.0.0.2"
	Prefix  int    // CIDR prefix length, e.g. 24
	Gateway string // e.g. "10.0.0.1"
	Mac     string // MAC address for match:macaddress in network-config
}

NetworkInfo describes a single guest network interface for cloud-init.

Jump to

Keyboard shortcuts

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