placer

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyPreset added in v0.7.0

func ApplyPreset(cfg *config.Config, name string) error

func ApplyPresets added in v0.7.0

func ApplyPresets(cfg *config.Config, names []string) error

func ComputeTargets

func ComputeTargets(cfg *config.Config, artifactType string) ([]string, error)

ComputeTargets returns absolute destination directories for an artifact type according to the placement.mapping rules in config.

func ParsePresetList added in v0.7.0

func ParsePresetList(raw string) []string

func Place

func Place(cfg *config.Config, srcPath, artifactType, mode string) ([]string, error)

Place copies/symlinks/hardlinks a file into the mapped directories. mode: "symlink" | "hardlink" | "copy" If artifactType is empty, it will be detected.

func PresetNames added in v0.7.0

func PresetNames() []string

func Presets added in v0.7.0

func Presets() map[string]Preset

Types

type Preset added in v0.7.0

type Preset struct {
	Name        string
	Description string
	Apps        map[string]config.AppPlacement
	Mapping     []config.MappingRule
}

Jump to

Keyboard shortcuts

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