Documentation
¶
Index ¶
- Variables
- func BuildRootfs(config *Config) error
- func DebugPrint(format string, args ...interface{})
- func Execute()
- func StartCluster(config *Config, args []string) error
- func StartClusterFromCommit(config *Config, commitKey string) error
- type BuilderConfig
- type Config
- type GitHubRelease
- type KernelConfig
- type LogStyles
- type MachineConfig
- type MetadataInfo
- type RootfsConfig
Constants ¶
This section is empty.
Variables ¶
var ( // Core version info Version = "dev" GitCommit = "unknown" BuildDate = "unknown" // Manifest info Name = "vers-cli" Description = "A CLI tool for version management" Author = "the VERS team" Repository = "https://github.com/hdresearch/vers-cli" License = "MIT" )
These variables are set at build time using ldflags
Functions ¶
func BuildRootfs ¶
BuildRootfs builds a rootfs image according to the provided configuration
func DebugPrint ¶
func DebugPrint(format string, args ...interface{})
DebugPrint prints debug information only when verbose mode is enabled
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func StartCluster ¶
StartCluster starts a development environment according to the provided configuration
func StartClusterFromCommit ¶
StartClusterFromCommit starts a development environment from an existing commit
Types ¶
type BuilderConfig ¶
type Config ¶
type Config struct {
Machine MachineConfig `toml:"machine"`
Rootfs RootfsConfig `toml:"rootfs"`
Builder BuilderConfig `toml:"builder"`
Kernel KernelConfig `toml:"kernel"`
}
Config represents the structure of vers.toml
func DefaultConfig ¶
func DefaultConfig() *Config
DefaultConfig returns a config with default values
type GitHubRelease ¶
type GitHubRelease struct {
TagName string `json:"tag_name"`
Name string `json:"name"`
Body string `json:"body"`
Draft bool `json:"draft"`
Prerelease bool `json:"prerelease"`
Assets []struct {
Name string `json:"name"`
BrowserDownloadURL string `json:"browser_download_url"`
Size int64 `json:"size"`
} `json:"assets"`
PublishedAt time.Time `json:"published_at"`
}
GitHubRelease represents a GitHub release
type KernelConfig ¶
type KernelConfig struct {
Name string `toml:"name"`
}
type LogStyles ¶
type LogStyles struct {
Container lipgloss.Style
Header lipgloss.Style
CommitID lipgloss.Style
CommitMsg lipgloss.Style
Author lipgloss.Style
Date lipgloss.Style
Tag lipgloss.Style
VMID lipgloss.Style
NoData lipgloss.Style
Divider lipgloss.Style
Alias lipgloss.Style
}
LogStyles contains all styles used in the log command
func NewLogStyles ¶
func NewLogStyles() LogStyles
NewLogStyles initializes and returns all styles used in the log command
type MachineConfig ¶
type MetadataInfo ¶
type MetadataInfo struct {
Name string `json:"name"`
Version string `json:"version"`
Description string `json:"description"`
GitCommit string `json:"gitCommit"`
BuildDate string `json:"buildDate"`
Author string `json:"author"`
Repository string `json:"repository"`
License string `json:"license"`
GoVersion string `json:"goVersion"`
Platform string `json:"platform"`
Arch string `json:"arch"`
Timestamp string `json:"timestamp"`
}
MetadataInfo represents the complete version information
type RootfsConfig ¶
type RootfsConfig struct {
Name string `toml:"name"`
}