core

package
v0.0.0-...-e0c1a3a Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasAtLeastOneGroup

func HasAtLeastOneGroup(name string, dependencyGroups GroupList, checkGroups GroupList) bool

Types

type Command

type Command struct {
	Program string   `yaml:"program"`
	Args    []string `yaml:"args"`
}

type Config

type Config struct {
	ReposDirectory string `yaml:"repos_directory"`
	EnvFilename    string `yaml:"env_file"`
	RcFilename     string `yaml:"rc_file"`
	FishFilename   string `yaml:"fish_file"`
}

type Dependency

type Dependency interface {
	Name() string
	EnsureInstallation(config Config)
	Exists() bool
	HasAtLeastOneGroup(checkGroups GroupList) bool
}

type DependencyInfo

type DependencyInfo struct {
	Env     DotFile   `yaml:".env"`
	Rc      DotFile   `yaml:".rc"`
	Fish    FishFile  `yaml:".fish"`
	Command string    `yaml:"command"`
	Groups  GroupList `yaml:"groups"`
}

func (DependencyInfo) Exists

func (dependencyInfo DependencyInfo) Exists() bool

func (DependencyInfo) HasAtLeastOneGroup

func (dependencyInfo DependencyInfo) HasAtLeastOneGroup(checkGroups GroupList) bool

func (DependencyInfo) Name

func (dependencyInfo DependencyInfo) Name() string

func (DependencyInfo) WriteFiles

func (dependencyInfo DependencyInfo) WriteFiles(config Config, relativeBase string)

type DotFile

type DotFile struct {
	AbsoluteSourceDirectives []string `yaml:"absolute_source_directives"`
	RelativeSourceDirectives []string `yaml:"relative_source_directives"`
	AbsolutePaths            []string `yaml:"absolute_paths"`
	RelativePaths            []string `yaml:"relative_paths"`
}

type FileWriter

type FileWriter interface {
	WriteFiles(config Config, relativeBase string)
	RelativeBase(config Config) string
}

type FishFile

type FishFile struct {
	AbsolutePaths []string `yaml:"absolute_paths"`
	RelativePaths []string `yaml:"relative_paths"`
}

type GroupList

type GroupList []string

func (*GroupList) Set

func (gl *GroupList) Set(group string) error

func (*GroupList) String

func (gl *GroupList) String() string

Jump to

Keyboard shortcuts

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