cmd

package
v0.0.0-...-8ad423e Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2025 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute() error

Execute executa o comando raiz

Types

type AppConfig

type AppConfig struct {
	Main    MainConfig    `ini:"main"`
	Network NetworkConfig `ini:"network"`
	Images  ImagesConfig  `ini:"images"`
}

AppConfig representa as configurações globais da aplicação

type Config

type Config struct {
	VMs []VM `yaml:",inline"`
}

Config representa o arquivo de configuração completo

type DistroInfo

type DistroInfo struct {
	URL       string
	Source    string
	OSVariant string
}

DistroInfo representa informações de uma distribuição

type ImagesConfig

type ImagesConfig struct {
	PathUpstreamImages string `ini:"path_upstream_images"`
	PathVMImages       string `ini:"path_vm_images"`
}

ImagesConfig representa configurações de imagens

type KVMCompose

type KVMCompose struct {
	// contains filtered or unexported fields
}

KVMCompose é a estrutura principal do aplicativo

func NewKVMCompose

func NewKVMCompose(composeFile string) *KVMCompose

NewKVMCompose cria uma nova instância do KVMCompose

func (*KVMCompose) Down

func (kvm *KVMCompose) Down() error

Down destrói todas as VMs

func (*KVMCompose) List

func (kvm *KVMCompose) List() error

List lista todas as VMs com seus status

func (*KVMCompose) Start

func (kvm *KVMCompose) Start() error

Start inicia todas as VMs

func (*KVMCompose) Stop

func (kvm *KVMCompose) Stop() error

Stop para todas as VMs

func (*KVMCompose) Up

func (kvm *KVMCompose) Up() error

Up cria e inicia todas as VMs

type MainConfig

type MainConfig struct {
	Username   string `ini:"username"`
	SSHKeyFile string `ini:"ssh_key_file"`
}

MainConfig representa configurações principais

type Network

type Network struct {
	HostBridge       string   `yaml:"host_bridge"`
	GuestIPv4        string   `yaml:"guest_ipv4"`
	GuestGateway4    string   `yaml:"guest_gateway4"`
	GuestNameservers []string `yaml:"guest_nameservers"`
}

Network representa a configuração de rede de uma VM

type NetworkConfig

type NetworkConfig struct {
	Gateway     string `ini:"gateway"`
	Nameservers string `ini:"nameservers"`
}

NetworkConfig representa configurações de rede

type VM

type VM struct {
	Name       string    `yaml:"name"`
	Distro     string    `yaml:"distro"`
	Memory     int       `yaml:"memory"`
	VCPUs      int       `yaml:"vcpus"`
	DiskSize   int       `yaml:"disk_size"`
	Username   string    `yaml:"username"`
	Group      []string  `yaml:"group"`
	SSHKeyFile string    `yaml:"ssh_key_file"`
	Networks   []Network `yaml:"networks"`
}

VM representa uma máquina virtual no arquivo de configuração

Jump to

Keyboard shortcuts

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