lpmintegration

package
v1.22.6 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2026 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Overview

Package lpmintegration provides integration with the Lux Package Manager (LPM).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRepo

func AddRepo(app *application.Lux, repoURL *url.URL, branch string) (string, error)

AddRepo adds a new LPM repository and returns its alias.

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 MakeKey

func MakeKey(alias, subnet string) string

MakeKey creates an LPM key from an alias and subnet name.

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

type Credential struct {
	Username string `yaml:"username"`
	Password string `yaml:"password"`
}

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.

type VMWrapper

type VMWrapper struct {
	VM VM `yaml:"vm"`
}

VMWrapper wraps a VM for YAML parsing.

Jump to

Keyboard shortcuts

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