Documentation
¶
Overview ¶
Package lpmintegration provides integration with the Lux Package Manager (LPM).
Index ¶
- func AddRepo(app *application.Lux, repoURL *url.URL, branch string) (string, error)
- func GetRepos(app *application.Lux) ([]string, error)
- func GetSubnets(app *application.Lux, repoAlias string) ([]string, error)
- func InstallVM(app *application.Lux, subnetKey string) error
- func MakeKey(alias, subnet string) string
- func SetupLpm(app *application.Lux, lpmBaseDir string) error
- func UpdateRepos(app *application.Lux) error
- type Credential
- type Subnet
- type SubnetWrapper
- type VM
- type VMWrapper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRepos ¶
func GetRepos(app *application.Lux) ([]string, error)
GetRepos returns a list of all available LPM repositories.
func GetSubnets ¶
func GetSubnets(app *application.Lux, repoAlias string) ([]string, error)
GetSubnets returns a list of subnets available in a repository.
func InstallVM ¶
func InstallVM(app *application.Lux, subnetKey string) error
InstallVM installs all VMs for a given subnet from LPM.
func SetupLpm ¶
func SetupLpm(app *application.Lux, lpmBaseDir string) error
SetupLpm initializes the LPM client. Note: can only be called once per run.
func UpdateRepos ¶
func UpdateRepos(app *application.Lux) error
UpdateRepos updates all LPM repositories.
Types ¶
type Credential ¶
Credential represents git authentication credentials
type Subnet ¶
type Subnet struct {
ID string `yaml:"id"`
Alias string `yaml:"alias"`
VM string `yaml:"vm"`
VMs []string `yaml:"vms"`
Config string `yaml:"config"`
Genesis string `yaml:"genesis"`
Description string `yaml:"description"`
}
Subnet represents an LPM subnet configuration.
func LoadSubnetFile ¶
func LoadSubnetFile(app *application.Lux, subnetKey string) (Subnet, error)
LoadSubnetFile loads a subnet configuration from a YAML file.
type SubnetWrapper ¶
type SubnetWrapper struct {
Subnet Subnet `yaml:"subnet"`
}
SubnetWrapper wraps a Subnet for YAML parsing.
type VM ¶
type VM struct {
ID string `yaml:"id"`
Alias string `yaml:"alias"`
VMType string `yaml:"vm_type"`
Binary string `yaml:"binary"`
ChainConfig string `yaml:"chain_config"`
Subnet string `yaml:"subnet"`
Genesis string `yaml:"genesis"`
Version string `yaml:"version"`
URL string `yaml:"url"`
Checksum string `yaml:"checksum"`
Runtime string `yaml:"runtime"`
Description string `yaml:"description"`
}
VM represents an LPM virtual machine configuration.
func LoadVMFile ¶
func LoadVMFile(app *application.Lux, repo, vm string) (VM, error)
LoadVMFile loads a VM configuration from a YAML file.