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
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 ¶
CreateProxyFiles creates droxy commands
type FileCreationStrategy ¶
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