Documentation ¶
Index ¶
- Variables
- func ConvertMBtoGB(i int) int
- func GetBoolValue(envKey string, flagVal bool) bool
- func GetDiskSizeMB(s string) (int, error)
- func GetIntValue(envKey string, flagVal int, defaultVal int) int
- func GetStringValue(envKey string, flagVal string, defaultVal string) string
- func Hetzner(cmd *cobra.Command, args []string)
- func Qemu(cmd *cobra.Command, args []string)
- func SplitLines(in string) []string
- func StringToIntArray(l string, sep string) ([]int, error)
- func Vbox(cmd *cobra.Command, args []string)
- type Disks
- type MultipleFlag
- type PublishedPort
- type VBNetwork
- type VBNetworks
Constants ¶
This section is empty.
Variables ¶
View Source
var ( HetznerCmd = &cobra.Command{ Use: "hetzner [options] image-path", Short: "Run the virtual machine image on Hetzner Cloud", Args: cobra.ExactArgs(1), Run: Hetzner, } )
Functions ¶
func ConvertMBtoGB ¶
func GetBoolValue ¶
func GetDiskSizeMB ¶
This function parses the "size" parameter of a disk specification and returns the size in MB. The "size" parameter defaults to GB, but the unit can be explicitly set with either a G (for GB) or M (for MB). It returns the disk size in MB.
func SplitLines ¶
Convert a multi-line string into an array of strings
Types ¶
type Disks ¶
Disks is the type for a list of DiskConfig
type MultipleFlag ¶
type MultipleFlag []string
Handle flags with multiple occurrences
func (*MultipleFlag) Set ¶
func (f *MultipleFlag) Set(value string) error
func (*MultipleFlag) String ¶
func (f *MultipleFlag) String() string
func (*MultipleFlag) Type ¶
func (f *MultipleFlag) Type() string
type PublishedPort ¶
PublishedPort is used by some backends to expose a VMs port on the host
func NewPublishedPort ¶
func NewPublishedPort(publish string) (PublishedPort, error)
NewPublishedPort parses a string of the form <host>:<guest>[/<tcp|udp>] and returns a PublishedPort structure
type VBNetworks ¶
type VBNetworks []VBNetwork
VBNetworks is the type for a list of VBNetwork
func (*VBNetworks) Set ¶
func (l *VBNetworks) Set(value string) error
Set is used by flag to configure value from CLI
func (*VBNetworks) String ¶
func (l *VBNetworks) String() string
func (*VBNetworks) Type ¶
func (l *VBNetworks) Type() string
Click to show internal directories.
Click to hide internal directories.