action

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2017 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorPreventUsingSingleQuotesOnWindows = 1
	ErrorPositionalArgumentCount           = 2
	ErrorLocateSourceFiles                 = 3
	ErrorStartingServer                    = 4
	ErrorCopyFiles                         = 5
	ErrorMoveFiles                         = 6
	ErrorPrepareDestination                = 7
	//ErrorNoGraftServerAvailable            = 8
	//ErrorFailedToInitializeResolver        = 9
	ErrorDeleteFiles = 10
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AbstractAction

type AbstractAction struct {
	CliParameters *CliParameters
	CliContext    *cli.Context

	PositionalArguments cli.Args
	// contains filtered or unexported fields
}

func (*AbstractAction) ParseCliContext

func (action *AbstractAction) ParseCliContext(c *cli.Context)

func (*AbstractAction) PrepareExecution

func (action *AbstractAction) PrepareExecution(c *cli.Context, positionalArgumentsCount int, positionalDefaultsIfUnset ...string) error

func (*AbstractAction) ShowMatchesForPath

func (action *AbstractAction) ShowMatchesForPath(path string)

type AbstractTransferAction

type AbstractTransferAction struct {
	AbstractAction
	// contains filtered or unexported fields
}

type CliActionInterface

type CliActionInterface interface {
	Execute(c *cli.Context) error
}

func NewActionFactory

func NewActionFactory(action string) CliActionInterface

type CliParameters

type CliParameters struct {
	Quiet         bool   `arg:"help:do not show any output"`
	Force         bool   `arg:"help:force the requested action - even if it might be not a good idea"`
	Debug         bool   `arg:"-d,help:debug mode with logging to Stdout and into $HOME/.graft/application.log"`
	Regex         bool   `arg:"help:use a real regex instead of glob patterns (e.g. src/.*\\.jpg)"`
	CaseSensitive bool   `arg:"--case-sensitive,help:be case sensitive when matching files and folders"`
	MaxAge        string `arg:"--max-age,help:maximum age (e.g. 2d / 8w / 2016-12-24 / etc. )"`
	MinAge        string `arg:"--min-age,help:minimum age (e.g. 2d / 8w / 2016-12-24 / etc. )"`
	MaxSize       string `arg:"--max-size,help:maximum size in bytes or format string (e.g. 2G / 8M / 1000K etc. )"`
	MinSize       string `arg:"--min-size,help:minimum size in bytes or format string (e.g. 2G / 8M / 1000K etc. )"`
	ExportTo      string `arg:"--export-to,help:export found matches to a text file - one line per item"`
	FilesFrom     string `arg:"--files-from,help:import found matches from file - one line per item"`

	Client bool
	Host   string
	Port   int
}

type ConnectionInterface

type ConnectionInterface interface {
	Connect(url string)
	Disconnect() error
}

type CopyAction

type CopyAction struct {
	AbstractTransferAction
}

func (*CopyAction) CopyFiles

func (action *CopyAction) CopyFiles() error

func (*CopyAction) Execute

func (action *CopyAction) Execute(c *cli.Context) error

type DeleteAction

type DeleteAction struct {
	AbstractAction
}

func (*DeleteAction) DeleteFiles

func (action *DeleteAction) DeleteFiles() error

func (*DeleteAction) Execute

func (action *DeleteAction) Execute(c *cli.Context) error

type FindAction

type FindAction struct {
	AbstractAction
}

func (*FindAction) Execute

func (action *FindAction) Execute(c *cli.Context) error

func (*FindAction) ShowFoundFiles

func (action *FindAction) ShowFoundFiles()

type MoveAction

type MoveAction struct {
	AbstractTransferAction
}

func (*MoveAction) Execute

func (action *MoveAction) Execute(c *cli.Context) error

func (*MoveAction) MoveFiles

func (action *MoveAction) MoveFiles() error

type ReceiveAction

type ReceiveAction struct {
	AbstractTransferAction
	// contains filtered or unexported fields
}

func (*ReceiveAction) Execute

func (action *ReceiveAction) Execute(c *cli.Context) error

type ServeAction

type ServeAction struct {
	AbstractAction
}

func (*ServeAction) Execute

func (action *ServeAction) Execute(c *cli.Context) error

func (*ServeAction) ServeFoundFiles

func (action *ServeAction) ServeFoundFiles() error

Jump to

Keyboard shortcuts

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