cli

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CatCommand

type CatCommand struct {
	Path string
	// contains filtered or unexported fields
}

CatCommand container for all 'cat' parameters

func NewCatCommand

func NewCatCommand(c *client.Client, stdout io.Writer, stderr io.Writer) *CatCommand

NewCatCommand creates a new CatCommand parameter container

func (*CatCommand) GetName

func (cmd *CatCommand) GetName() string

GetName returns the CatCommand's name identifier

func (*CatCommand) IsSane added in v0.1.1

func (cmd *CatCommand) IsSane() bool

IsSane returns true if command is sane

func (*CatCommand) Parse added in v0.1.1

func (cmd *CatCommand) Parse(args []string) (success bool)

Parse given arguments and return status

func (*CatCommand) Run

func (cmd *CatCommand) Run()

Run executes 'cat' with given CatCommand's parameters

type CdCommand

type CdCommand struct {
	Path string
	// contains filtered or unexported fields
}

CdCommand container for all 'cd' parameters

func NewCdCommand

func NewCdCommand(c *client.Client, stdout io.Writer, stderr io.Writer) *CdCommand

NewCdCommand creates a new CdCommand parameter container

func (*CdCommand) GetName

func (cmd *CdCommand) GetName() string

GetName returns the CdCommand's name identifier

func (*CdCommand) IsSane added in v0.1.1

func (cmd *CdCommand) IsSane() bool

IsSane returns true if command is sane

func (*CdCommand) Parse added in v0.1.1

func (cmd *CdCommand) Parse(args []string) (success bool)

Parse given arguments and return status

func (*CdCommand) Run

func (cmd *CdCommand) Run()

Run executes 'cd' with given CdCommand's parameters

type Command

type Command interface {
	Run()
	GetName() string
	IsSane() bool
	Parse(args []string) bool
}

Command interface to describe a command structure

type CopyCommand

type CopyCommand struct {
	Source string
	Target string
	// contains filtered or unexported fields
}

CopyCommand container for all 'cp' parameters

func NewCopyCommand

func NewCopyCommand(c *client.Client, stdout io.Writer, stderr io.Writer) *CopyCommand

NewCopyCommand creates a new CopyCommand parameter container

func (*CopyCommand) GetName

func (cmd *CopyCommand) GetName() string

GetName returns the CopyCommand's name identifier

func (*CopyCommand) IsSane added in v0.1.1

func (cmd *CopyCommand) IsSane() bool

IsSane returns true if command is sane

func (*CopyCommand) Parse added in v0.1.1

func (cmd *CopyCommand) Parse(args []string) (success bool)

Parse given arguments and return status

func (*CopyCommand) Run

func (cmd *CopyCommand) Run()

Run executes 'cp' with given CopyCommand's parameters

type ListCommand

type ListCommand struct {
	Path string
	// contains filtered or unexported fields
}

ListCommand container for 'ls' parameters

func NewListCommand

func NewListCommand(c *client.Client, stdout io.Writer, stderr io.Writer) *ListCommand

NewListCommand creates a new ListCommand parameter container

func (*ListCommand) GetName

func (cmd *ListCommand) GetName() string

GetName returns the ListCommand's name identifier

func (*ListCommand) IsSane added in v0.1.1

func (cmd *ListCommand) IsSane() bool

IsSane returns true if command is sane

func (*ListCommand) Parse added in v0.1.1

func (cmd *ListCommand) Parse(args []string) (success bool)

Parse given arguments and return status

func (*ListCommand) Run

func (cmd *ListCommand) Run()

Run executes 'ls' with given ListCommand's parameters

type MoveCommand

type MoveCommand struct {
	Source string
	Target string
	// contains filtered or unexported fields
}

MoveCommand container for all 'mv' parameters

func NewMoveCommand

func NewMoveCommand(c *client.Client, stdout io.Writer, stderr io.Writer) *MoveCommand

NewMoveCommand creates a new MoveCommand parameter container

func (*MoveCommand) GetName

func (cmd *MoveCommand) GetName() string

GetName returns the MoveCommand's name identifier

func (*MoveCommand) IsSane added in v0.1.1

func (cmd *MoveCommand) IsSane() bool

IsSane returns true if command is sane

func (*MoveCommand) Parse added in v0.1.1

func (cmd *MoveCommand) Parse(args []string) (success bool)

Parse given arguments and return status

func (*MoveCommand) Run

func (cmd *MoveCommand) Run()

Run executes 'mv' with given MoveCommand's parameters

type RemoveCommand

type RemoveCommand struct {
	Path string
	// contains filtered or unexported fields
}

RemoveCommand container for all 'rm' parameters

func NewRemoveCommand

func NewRemoveCommand(c *client.Client, stdout io.Writer, stderr io.Writer) *RemoveCommand

NewRemoveCommand creates a new RemoveCommand parameter container

func (*RemoveCommand) GetName

func (cmd *RemoveCommand) GetName() string

GetName returns the RemoveCommand's name identifier

func (*RemoveCommand) IsSane added in v0.1.1

func (cmd *RemoveCommand) IsSane() bool

IsSane returns true if command is sane

func (*RemoveCommand) Parse added in v0.1.1

func (cmd *RemoveCommand) Parse(args []string) (success bool)

Parse given arguments and return status

func (*RemoveCommand) Run

func (cmd *RemoveCommand) Run()

Run executes 'rm' with given RemoveCommand's parameters

Jump to

Keyboard shortcuts

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