config

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildConfig

type BuildConfig struct {
	Builder      string `toml:"builder"`
	BuildCommand string `toml:"build_command"`
}

BuildConfig holds build configuration

type Config

type Config struct {
	Meta    MetaConfig               `toml:"meta"`
	Build   BuildConfig              `toml:"build"`
	Deploy  DeployConfig             `toml:"deploy"`
	Run     RunConfig                `toml:"run"`
	Env     map[string]string        `toml:"env"`
	Machine map[string]MachineConfig `toml:"machine"`
}

Config represents the structure of vers.toml

func FindConfig

func FindConfig() (string, *Config, error)

FindConfig looks for vers.toml in the current directory or parent directories

func LoadConfig

func LoadConfig(path string) (*Config, error)

LoadConfig loads the vers.toml configuration file

type DeployConfig

type DeployConfig struct {
	Platform string `toml:"platform"`
}

DeployConfig holds deployment configuration

type MachineConfig

type MachineConfig struct {
	Name  string `toml:"name"`
	Image string `toml:"image"`
	IP    string `toml:"ip"`
	Port  string `toml:"port"`
}

MachineConfig holds configuration for a specific machine

type MetaConfig

type MetaConfig struct {
	Project string `toml:"project"`
	Type    string `toml:"type"`
}

MetaConfig holds project metadata

type RunConfig

type RunConfig struct {
	Command     string   `toml:"command"`
	EntryPoints []string `toml:"entry_points"`
}

RunConfig holds runtime configuration

Jump to

Keyboard shortcuts

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