bootstrapconfig: add SignerPublicKey and lots of omitempty

This commit is contained in:
Mikaël Cluseau
2025-07-06 11:23:53 +02:00
parent 554aaf0a89
commit d857af8032

View File

@ -3,8 +3,8 @@ package bootstrapconfig
type Config struct {
AntiPhishingCode string `yaml:"anti_phishing_code"`
Keymap string
Modules string
Keymap string `yaml:",omitempty"`
Modules string `yaml:",omitempty"`
Auths []Auth
@ -18,27 +18,29 @@ type Config struct {
Script string
}
SSH struct {
Listen string
UserCA string `yaml:"user_ca"`
SignerPublicKey string `yaml:"signer_public_key,omitempty"`
SSH *struct {
Listen string `yaml:",omitempty"`
UserCA string `yaml:"user_ca,omitempty"`
Keys struct {
DSA string
RSA string
ECDSA string
ED25519 string
}
DSA string `yaml:",omitempty"`
RSA string `yaml:",omitempty"`
ECDSA string `yaml:",omitempty"`
ED25519 string `yaml:",omitempty"`
}
} `yaml:",omitempty"`
PreLVMCrypt []CryptDev `yaml:"pre_lvm_crypt"`
LVM []LvmVG
Crypt []CryptDev
Bootstrap Bootstrap
Bootstrap *Bootstrap `yaml:",omitempty"`
}
type Auth struct {
Name string
SSHKey string `yaml:"sshKey"`
Password string `yaml:"password"`
SSHKey string `yaml:"sshKey,omitempty"`
Password string `yaml:"password,omitempty"`
}
type LvmVG struct {
@ -55,25 +57,25 @@ type LvmVG struct {
LVs []struct {
Name string
FS string
Raid *RaidConfig
Size string
Extents string
FS string `yaml:",omitempty"`
Raid *RaidConfig `yaml:",omitempty"`
Size string `yaml:",omitempty"`
Extents string `yaml:",omitempty"`
}
}
type CryptDev struct {
Dev string
Prefix string
Dev string `yaml:",omitempty"`
Prefix string `yaml:",omitempty"`
Name string
}
type RaidConfig struct {
Mirrors int
Stripes int
Mirrors int `yaml:",omitempty"`
Stripes int `yaml:",omitempty"`
}
type Bootstrap struct {
Dev string
Seed string
Dev string `yaml:",omitempty"`
Seed string `yaml:",omitempty"`
}