manager

package
v0.0.0-...-0e92a63 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2021 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(path string, user string)

func RunHooks

func RunHooks(hooks []string)

Types

type Dotfile

type Dotfile struct {
	Source string
	Target string
	Hooks  []string
}

func (Dotfile) Operation

func (d Dotfile) Operation(user string, operation OperationType) error

type Dotfiles

type Dotfiles map[string]Dotfile

type Manager

type Manager struct {
	User     string
	Profiles Profiles
	Dotfiles Dotfiles
}

func NewManager

func NewManager() Manager

func (*Manager) Operation

func (m *Manager) Operation(dotfiles string, profiles string, operation OperationType)

type OperationType

type OperationType int
const (
	Link OperationType = iota
	Unlink
	Unknown
)

func NewOperationType

func NewOperationType(rawType string) OperationType

func (OperationType) String

func (d OperationType) String() string

type Profile

type Profile struct {
	Dotfiles []string
}

func (Profile) ProfileOperation

func (p Profile) ProfileOperation(user string, operation OperationType, dotfiles Dotfiles) error

type Profiles

type Profiles map[string]Profile

Jump to

Keyboard shortcuts

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