t

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 27, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIDRSA

func GetIDRSA() (string, error)

Types

type Chpasswd

type Chpasswd struct {
	List   string `yaml:"list"`
	Expire bool   `yaml:"expire"`
}

func (Chpasswd) FromUsers

func (self Chpasswd) FromUsers(users []User) Chpasswd

type Disk

type Disk struct {
	//   Name string
	Size          int
	CreateOptions string
}

type DownloadOptions

type DownloadOptions struct {
	URL      string
	Filename string

	TimeoutDial int
	TimeoutTLS  int
	TimeoutHTTP int
}

func (DownloadOptions) New

type GrowPart

type GrowPart struct {
	Mode    string   `yaml:"mode"`
	Devices []string `yaml:"devices"`
}

type MetaData

type MetaData struct {
	// 	DSMode        string `yaml:"dsmode",default:"auto"`
	InstanceID    string `yaml:"instance-id"`
	LocalHostname string `yaml:"local-hostname"`
}

func (MetaData) New

func (self MetaData) New(hostname string) MetaData

type User

type User struct {
	Name              string   `yaml:"name"`
	Gecos             string   `yaml:"gecos"`
	Sudo              string   `yaml:"sudo"`
	PlainTextPasswd   string   `yaml:"plain_text_passwd"`
	LockPasswd        bool     `yaml:"lock_passwd",default:false`
	SSHAuthorizedKeys []string `yaml:"ssh_authorized_keys"`
}

func (User) DefaultUser

func (self User) DefaultUser() (User, error)

func (User) New

func (self User) New(name string, password string) User

type UserData

type UserData struct {
	AptPreserveSourcesList bool     `yaml:"apt_preserve_sources_list"`
	Chpasswd               Chpasswd `yaml:"chpasswd"`
	Bootcmd                []string `yaml:"bootcmd"`
	Users                  []User   `yaml:"users"`
}

func (UserData) New

func (self UserData) New() UserData

type VMOptions

type VMOptions struct {
	Name    string
	CPUs    int
	Memory  int
	BootISO string
	InitISO string
	Network string
	Args    string
	Disks   []Disk
}

Jump to

Keyboard shortcuts

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