Documentation ¶
Index ¶
- Variables
- func Add(packageManager string, packages []string) (NewPMList []string, err error)
- func AddPackagesToEnvFile(packageManagerName string, packages []string)
- func CopyFile(src, dst string) (err error)
- func EnsureDotfilesDir(dotfilesDirPath string) (err error)
- func EnsureDotfilesRepository(dotfilesRepository string, dotfilesDirPath string) (err error)
- func ImportIntoDotfilesDir(dotfilesToSave []string, dotfilesDirPath string) (err error)
- func InstallPackages(PackageManager pm.PackageManager, packages []string)
- func MoveFile(src, dst string) (err error)
- func PersistDotfiles(message string, dotfilesDirPath string) (err error)
- func Remove(packageManager string, packages []string) (NewPMList []string, err error)
- func RemovePackagesFromEnvFile(packageManagerName string, packages []string)
- func Restore(OSPackageManager pm.PackageManager)
- func Save(dotfilesToSave []string) (err error)
- func SetupDotFiles(dotfilesRepository string, dotfilesDirPath string)
Constants ¶
This section is empty.
Variables ¶
var AppFs = afero.NewOsFs()
AppFs is a wrapper to OS package
var ErrCannotInteractWithGit = errors.New("Cannot interact with Git")
ErrCannotInteractWithGit is returned when trying to interact with Git
var ErrCannotMoveDotfile = errors.New("Couldn't move dotfile")
ErrCannotMoveDotfile is returned when trying create or write without permissions
var ErrCannotStatFile = errors.New("Cannot open file")
ErrCannotStatFile occurs when stating a non-existing file
var ErrCannotSymlink = errors.New("Couldn't create symlink")
ErrCannotSymlink is returned when trying to create a Symlink and fails
var ErrDotfilesRepository = errors.New("dotfiles repository doesn't exists or is not reachable")
ErrDotfilesRepository is returned when failing to stat a repository
var ErrHTTPError = errors.New("Cannot reach endpoint")
ErrHTTPError is returned when failing to reach an endpoint with HTTP
var ErrJSONPayloadInvalidFormat = errors.New("Invalid JSON format")
ErrJSONPayloadInvalidFormat is returned when the JSON payload format is invalid
var ErrOperationNotPermitted = errors.New("Operation not permitted")
ErrOperationNotPermitted is returned when trying create or write without permissions
var IPCheckerURL = "http://httpbin.org/ip"
IPCheckerURL is the endpoint to call to get IP data
Functions ¶
func AddPackagesToEnvFile ¶
AddPackagesToEnvFile adds packages to the env.yml file.
func CopyFile ¶
CopyFile copies a file from src to dst. If src and dst files exist, and are the same, then return success. Otherise, attempt to create a hard link between the two files. If that fail, copy the file contents from src to dst.
func EnsureDotfilesDir ¶
EnsureDotfilesDir create the ~/.dotfiles directory if not exists.
func EnsureDotfilesRepository ¶
EnsureDotfilesRepository create Dotfiles repository if not exists.
func ImportIntoDotfilesDir ¶
ImportIntoDotfilesDir moves dotfiles into dotfiles directory and create symlinks.
func InstallPackages ¶
func InstallPackages(PackageManager pm.PackageManager, packages []string)
InstallPackages installs listed CLI packages.
func PersistDotfiles ¶
PersistDotfiles local dotfiles to remote.
func RemovePackagesFromEnvFile ¶
RemovePackagesFromEnvFile removes packages from the env.yml file.
func Restore ¶
func Restore(OSPackageManager pm.PackageManager)
Restore installs Ian and configuration Ian's environment.
func SetupDotFiles ¶
SetupDotFiles ask and retrieve a dotfiles repository.
Types ¶
This section is empty.