bootstrapconfig

package
v0.0.0-...-ccdbf2e Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPassword

func CheckPassword(hashedPassWithSeed string, pass []byte) (ok bool)

func JoinSeedAndHash

func JoinSeedAndHash(seed []byte, hash string) string

func PasswordHash

func PasswordHash(pass []byte) (hashedPassWithSeed string)
Example
seed := []byte("myseed")
hash := PasswordHashFromSeed(seed, []byte("mypass"))
fmt.Println(JoinSeedAndHash(seed, hash))
Output:

bXlzZWVk:HMSxrg1cYphaPuUYUbtbl/htep/tVYYIQAuvkNMVpw0

func PasswordHashFromSeed

func PasswordHashFromSeed(seed, pass []byte) string

Types

type Auth

type Auth struct {
	Name     string
	SSHKey   string `yaml:"sshKey"`
	Password string `yaml:"password"`
}

type Bootstrap

type Bootstrap struct {
	Dev  string
	Seed string
}

type Config

type Config struct {
	AntiPhishingCode string `yaml:"anti_phishing_code"`

	Keymap  string
	Modules string

	Auths []Auth

	Networks []struct {
		Name       string
		Interfaces []struct {
			Var     string
			N       int
			Regexps []string
		}
		Script string
	}

	SSH struct {
		Listen string
		Keys   struct {
			DSA     string
			RSA     string
			ECDSA   string
			ED25519 string
		}
	}

	PreLVMCrypt []CryptDev `yaml:"pre_lvm_crypt"`
	LVM         []LvmVG
	Crypt       []CryptDev
	Bootstrap   Bootstrap
}

type CryptDev

type CryptDev struct {
	Dev    string
	Prefix string
	Name   string
}

type LvmVG

type LvmVG struct {
	VG  string
	PVs struct {
		N       int
		Regexps []string
	}

	Defaults struct {
		FS   string
		Raid *RaidConfig
	}

	LVs []struct {
		Name    string
		FS      string
		Raid    *RaidConfig
		Size    string
		Extents string
	}
}

type RaidConfig

type RaidConfig struct {
	Mirrors int
	Stripes int
}

Jump to

Keyboard shortcuts

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