backend

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectArchLinux

func DetectArchLinux(fs afero.Fs) bool

func DetectDarwin

func DetectDarwin(execIF exec.Interface) bool

func NewExecInterface

func NewExecInterface() exec.Interface

func NewFs

func NewFs() afero.Fs

Types

type ArchLinuxBackend

type ArchLinuxBackend struct {
	Backend
	*BaseBackend
	Exec exec.Interface
}

func (*ArchLinuxBackend) CheckInstall

func (b *ArchLinuxBackend) CheckInstall(ctx context.Context, name string) bool

func (*ArchLinuxBackend) Command

func (b *ArchLinuxBackend) Command(ctx context.Context, dryrun bool, p *handlers.CommandParams) error

func (*ArchLinuxBackend) CreateDirectory added in v0.0.10

func (b *ArchLinuxBackend) CreateDirectory(ctx context.Context, dryrun bool, p *handlers.CreateDirectoryParams) error

func (*ArchLinuxBackend) FileCopy

func (b *ArchLinuxBackend) FileCopy(ctx context.Context, dryrun bool, p *handlers.FileCopyParams) error

func (*ArchLinuxBackend) FileMove

func (b *ArchLinuxBackend) FileMove(ctx context.Context, dryrun bool, p *handlers.FileMoveParams) error

func (*ArchLinuxBackend) FishSetPath

func (b *ArchLinuxBackend) FishSetPath(ctx context.Context, dryrun bool, p *handlers.FishSetPathParams) error

func (*ArchLinuxBackend) FishSetVariable

func (b *ArchLinuxBackend) FishSetVariable(ctx context.Context, dryrun bool, p *handlers.FishSetVariableParams) error

func (*ArchLinuxBackend) HTTPRequest

func (b *ArchLinuxBackend) HTTPRequest(ctx context.Context, dryrun bool, p *handlers.HTTPRequestParams) error

func (*ArchLinuxBackend) Install

func (b *ArchLinuxBackend) Install(ctx context.Context, dryrun bool, p *handlers.InstallParams) error
func (b *ArchLinuxBackend) Symlink(ctx context.Context, dryrun bool, p *handlers.SymlinkParams) error

func (*ArchLinuxBackend) Uninstall

func (b *ArchLinuxBackend) Uninstall(ctx context.Context, dryrun bool, p *handlers.UninstallParams) error

type BaseBackend

type BaseBackend struct {
	Exec        exec.Interface
	Fs          afero.Fs
	Client      *http.Client
	FnCallCount int
}

func (*BaseBackend) CheckInstall

func (b *BaseBackend) CheckInstall(ctx context.Context, name string) bool

func (*BaseBackend) Command

func (b *BaseBackend) Command(ctx context.Context, dryrun bool, p *handlers.CommandParams) error

func (*BaseBackend) CreateDirectory added in v0.0.10

func (b *BaseBackend) CreateDirectory(ctx context.Context, dryrun bool, p *handlers.CreateDirectoryParams) error

func (*BaseBackend) FileCopy

func (b *BaseBackend) FileCopy(ctx context.Context, dryrun bool, p *handlers.FileCopyParams) error

func (*BaseBackend) FileMove

func (b *BaseBackend) FileMove(ctx context.Context, dryrun bool, p *handlers.FileMoveParams) error

func (*BaseBackend) FishSetPath

func (b *BaseBackend) FishSetPath(ctx context.Context, dryrun bool, p *handlers.FishSetPathParams) error

func (*BaseBackend) FishSetVariable

func (b *BaseBackend) FishSetVariable(ctx context.Context, dryrun bool, p *handlers.FishSetVariableParams) error

func (*BaseBackend) FunctionCallCount

func (b *BaseBackend) FunctionCallCount() int

func (*BaseBackend) HTTPRequest

func (b *BaseBackend) HTTPRequest(ctx context.Context, dryrun bool, p *handlers.HTTPRequestParams) error

func (*BaseBackend) Install

func (b *BaseBackend) Install(ctx context.Context, dryrun bool, p *handlers.InstallParams) error
func (b *BaseBackend) Symlink(ctx context.Context, dryrun bool, p *handlers.SymlinkParams) error

func (*BaseBackend) Uninstall

func (b *BaseBackend) Uninstall(ctx context.Context, dryrun bool, p *handlers.UninstallParams) error

type DarwinBackend

type DarwinBackend struct {
	Backend
	*BaseBackend
	Exec exec.Interface
	Fs   afero.Fs
}

func (*DarwinBackend) CheckInstall

func (b *DarwinBackend) CheckInstall(ctx context.Context, name string) bool

func (*DarwinBackend) Command

func (b *DarwinBackend) Command(ctx context.Context, dryrun bool, p *handlers.CommandParams) error

func (*DarwinBackend) CreateDirectory added in v0.0.10

func (b *DarwinBackend) CreateDirectory(ctx context.Context, dryrun bool, p *handlers.CreateDirectoryParams) error

func (*DarwinBackend) FileCopy

func (b *DarwinBackend) FileCopy(ctx context.Context, dryrun bool, p *handlers.FileCopyParams) error

func (*DarwinBackend) FileMove

func (b *DarwinBackend) FileMove(ctx context.Context, dryrun bool, p *handlers.FileMoveParams) error

func (*DarwinBackend) FishSetPath

func (b *DarwinBackend) FishSetPath(ctx context.Context, dryrun bool, p *handlers.FishSetPathParams) error

func (*DarwinBackend) FishSetVariable

func (b *DarwinBackend) FishSetVariable(ctx context.Context, dryrun bool, p *handlers.FishSetVariableParams) error

func (*DarwinBackend) HTTPRequest

func (b *DarwinBackend) HTTPRequest(ctx context.Context, dryrun bool, p *handlers.HTTPRequestParams) error

func (*DarwinBackend) Install

func (b *DarwinBackend) Install(ctx context.Context, dryrun bool, p *handlers.InstallParams) error
func (b *DarwinBackend) Symlink(ctx context.Context, dryrun bool, p *handlers.SymlinkParams) error

func (*DarwinBackend) Uninstall

func (b *DarwinBackend) Uninstall(ctx context.Context, dryrun bool, p *handlers.UninstallParams) error

type OS

type OS int
const (
	Unknown OS = iota + 1
	Darwin
	Arch
)

func DetectOS

func DetectOS(execIF exec.Interface, fs afero.Fs) OS

Jump to

Keyboard shortcuts

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