Documentation
¶
Index ¶
Constants ¶
const ConfigVersion = 2
ConfigVersion is the current config schema version. Increment this when making breaking changes to the config format and add a corresponding migration note in the migrations package.
const EnvPrefix = "MMDOT_"
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Age ¶ added in v0.2.0
type AgeFile ¶ added in v0.4.0
type Brews ¶ added in v0.2.0
type Brews struct {
Remove bool `yaml:"remove"`
Includes []string `yaml:"includes"`
Brews []string `yaml:"brews"`
Taps []string `yaml:"taps"`
Casks []string `yaml:"casks"`
MAS []string `yaml:"mas"`
}
func (*Brews) Diff ¶ added in v0.2.0
func (c *Brews) Diff() (*DiffResult, error)
Diff returns a comparison between the brews in the Config and those installed on the machine. It categorizes brews into: - Present: Items in config and installed on the machine - Absent: Items in config but not installed on the machine - Extra: Items installed on the machine but not in the config (drift detection)
type ConfigFile ¶ added in v0.2.0
type ConfigFile struct {
Version int `yaml:"version"`
Macros map[string]string `yaml:"macros"`
Exec Exec `yaml:"exec"`
Age Age `yaml:"age"`
Brews ConfigMap `yaml:"brews"`
Variables Variables `yaml:"variables"`
Templates []Template `yaml:"templates"`
ConfigDir string `yaml:"-"` // Directory containing the config file (not serialized)
}
func SetupEnv ¶ added in v0.2.0
func SetupEnv(cfgpath string) (ConfigFile, error)
func (ConfigFile) EncryptedFiles ¶ added in v0.2.0
func (c ConfigFile) EncryptedFiles() []string
Returns a list of all files that should to be encrypted
type DiffResult ¶ added in v0.2.0
type PathResolver ¶ added in v0.2.0
type PathResolver struct {
// contains filtered or unexported fields
}
PathResolver provides a resolving service for paths that turns a relative or paths with '~' type symbols into absolute paths.
type Template ¶ added in v0.2.0
type Template struct {
Name string `yaml:"name"`
Tags []string `yaml:"tags"`
Template string `yaml:"template"` // File or Template
Output string `yaml:"output"`
Permissions string `yaml:"perm"` // Must be valid permissions
Vars map[string]any `yaml:"vars"`
Trim *bool `yaml:"trim"` // Trim leading/trailing whitespace from output (default: true)
}