proxyfile

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2018 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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) *Creator

New creates a new proxy file creator

func (*Creator) CreateProxyFiles

func (pfc *Creator) CreateProxyFiles(commandBinaryFilePath string, configuration *config.Configuration, 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