proxyfile

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2018 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCommandName added in v0.5.1

func GetCommandName() string

GetCommandName returns the filename of the droxy binary

func GetCommandNameFilename added in v0.5.1

func GetCommandNameFilename(commandName string) string

GetCommandNameFilename returns the binary filename of the given proxy command name

func ParseCommandNameFromCommandLine added in v0.5.1

func ParseCommandNameFromCommandLine() string

ParseCommandNameFromCommandLine returns the called proxy command from cli args

Types

type ClonesStrategy

type ClonesStrategy struct {
	// contains filtered or unexported fields
}

ClonesStrategy contains the implementation of creating clones of droxy execuable

func (*ClonesStrategy) CreateProxyFile

func (s *ClonesStrategy) CreateProxyFile(commandBinaryFilePath, commandNameFilePath string) error

CreateProxyFile creates a clone of the given commandBinaryFilePath to commandNameFilePath

type Creator

type Creator struct {
	// contains filtered or unexported fields
}

Creator creates commands

func New

func New(creationStrategy FileCreationStrategy, configLoader config.Loader) *Creator

New creates a new proxy file creator

func (*Creator) CreateProxyFiles

func (pfc *Creator) CreateProxyFiles(isForced bool) error

CreateProxyFiles creates droxy commands

type FileCreationStrategy

type FileCreationStrategy interface {
	CreateProxyFile(string, string) error
}

FileCreationStrategy defines the interface for creation of a droxy commands in filesystem

func NewClonesStrategy

func NewClonesStrategy() FileCreationStrategy

NewClonesStrategy creates a new FileCreationStrategy that produces clones of droxy command

func NewHardlinkStrategy

func NewHardlinkStrategy() FileCreationStrategy

NewHardlinkStrategy creates a new FileCreationStrategy that produces hardlinks of droxy command

func NewSymlinkStrategy

func NewSymlinkStrategy() FileCreationStrategy

NewSymlinkStrategy creates a new FileCreationStrategy that produces symlinks of droxy command

type HardlinkStrategy

type HardlinkStrategy struct {
	// contains filtered or unexported fields
}

HardlinkStrategy contains the implementation of creating a hardlink to droxy execuable

func (*HardlinkStrategy) CreateProxyFile

func (s *HardlinkStrategy) CreateProxyFile(commandBinaryFilePath, commandNameFilePath string) error

CreateProxyFile creates a hardlink from commandNameFilePath to commandBinaryFilePath

type SymlinkStrategy

type SymlinkStrategy struct {
	// contains filtered or unexported fields
}

SymlinkStrategy contains the implementation of creating a symlink to droxy execuable

func (*SymlinkStrategy) CreateProxyFile

func (s *SymlinkStrategy) CreateProxyFile(commandBinaryFilePath, commandNameFilePath string) error

CreateProxyFile creates a symlink from commandNameFilePath to commandBinaryFilePath

Jump to

Keyboard shortcuts

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