module

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const ConfigFileName string = "module.toml"

Variables

View Source
var DefaultConfig []byte

Functions

This section is empty.

Types

type Conditions

type Conditions struct {
	OperatingSystem string   `toml:"os"`
	EnvRequired     []string `toml:"env_exists"`
}

type Config

type Config struct {
	Root               string            `toml:"root"`
	Ignore             []string          `toml:"ignore"`
	Dependencies       []string          `toml:"dependencies"`
	ModuleDependencies []string          `toml:"module_dependencies"`
	Conditions         Conditions        `toml:"conditions"`
	Hooks              Hooks             `toml:"hooks"`
	TemplateVariables  map[string]string `toml:"variables"`
}

func LoadConfig

func LoadConfig(dotfilesDir, moduleName string) (*Config, error)

func (*Config) DeepCopy

func (mCfg *Config) DeepCopy() *Config

func (*Config) GetPathFields

func (c *Config) GetPathFields() []PathField

type Hooks

type Hooks struct {
	PreDeploy  string `toml:"pre_deploy"`
	PostDeploy string `toml:"post_deploy"`
	PostRemove string `toml:"post_remove"`
}

type Module

type Module struct {
	Name   string
	Config *Config
	State  *state.ModuleState
}

func Load

func Load(dotfilesDir, moduleName string, moduleState *state.ModuleState) (*Module, error)

func LoadAll

func LoadAll(dotfilesDir string, appState *state.State) ([]*Module, error)

func (*Module) CheckBinaryDependencies

func (m *Module) CheckBinaryDependencies() error

func (*Module) CheckConditions

func (m *Module) CheckConditions() error

func (*Module) CheckModuleDependencies

func (m *Module) CheckModuleDependencies(appState *state.State) error

func (*Module) IsSymlinkManaged

func (m *Module) IsSymlinkManaged(path string) bool

func (*Module) ShouldDeploy

func (m *Module) ShouldDeploy(appState *state.State) bool

type PathField

type PathField struct {
	Name  string
	Value *string
}

Jump to

Keyboard shortcuts

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