command

package
v0.0.0-...-eedcae6 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2015 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version string

Functions

func Attach

func Attach(c Command, e *Environment, cmds ...*cobra.Command) (res *cobra.Command)

Attach command to backend

func Run

func Run(args []string, stdin io.Reader, stdout, stderr io.Writer) (err error)

Types

type Command

type Command interface {

	// Init flags
	Init(c *cobra.Command)

	// Run command
	Run(args ...string) (err error)
}

type CommonOptions

type CommonOptions struct {
	LoggingLevel string
	WD           string

	Endpoint   string
	ChunkSize  int64
	PoolSize   int
	BufferSize int
}

Common bar options

type DownCmd

type DownCmd struct {
	*Environment
	*CommonOptions

	UseGit bool
}

func (*DownCmd) Init

func (c *DownCmd) Init(cc *cobra.Command)

func (*DownCmd) Run

func (c *DownCmd) Run(args ...string) (err error)

type Environment

type Environment struct {
	Stdin  io.Reader
	Stdout io.Writer
	Stderr io.Writer
}

Command environment

type GitCleanCmd

type GitCleanCmd struct {
	*Environment
	*CommonOptions

	// Installable logging lenel
	Id bool
}

func (*GitCleanCmd) Init

func (c *GitCleanCmd) Init(cc *cobra.Command)

func (*GitCleanCmd) Run

func (c *GitCleanCmd) Run(args ...string) (err error)

type GitCmd

type GitCmd struct{}

git root cmd

func (*GitCmd) Init

func (c *GitCmd) Init(cc *cobra.Command)

func (*GitCmd) Run

func (c *GitCmd) Run(args ...string) (err error)

type GitDivertAbortCmd

type GitDivertAbortCmd struct {
	*Environment
	*CommonOptions
}

func (*GitDivertAbortCmd) Init

func (c *GitDivertAbortCmd) Init(cc *cobra.Command)

func (*GitDivertAbortCmd) Run

func (c *GitDivertAbortCmd) Run(args ...string) (err error)

type GitDivertBeginCmd

type GitDivertBeginCmd struct {
	*Environment
	*CommonOptions
}

func (*GitDivertBeginCmd) Init

func (c *GitDivertBeginCmd) Init(cc *cobra.Command)

func (*GitDivertBeginCmd) Run

func (c *GitDivertBeginCmd) Run(args ...string) (err error)

type GitDivertFinishCmd

type GitDivertFinishCmd struct {
	*Environment
	*CommonOptions

	Message string
}

func (*GitDivertFinishCmd) Init

func (c *GitDivertFinishCmd) Init(cc *cobra.Command)

func (*GitDivertFinishCmd) Run

func (c *GitDivertFinishCmd) Run(args ...string) (err error)

type GitDivertPushCmd

type GitDivertPushCmd struct {
	*Environment
	*CommonOptions
}

func (*GitDivertPushCmd) Init

func (c *GitDivertPushCmd) Init(cc *cobra.Command)

func (*GitDivertPushCmd) Run

func (c *GitDivertPushCmd) Run(args ...string) (err error)

type GitDivertRootCmd

type GitDivertRootCmd struct {
}

func (*GitDivertRootCmd) Init

func (c *GitDivertRootCmd) Init(cc *cobra.Command)

func (*GitDivertRootCmd) Run

func (c *GitDivertRootCmd) Run(args ...string) (err error)

type GitDivertStatusCmd

type GitDivertStatusCmd struct {
	*Environment
	*CommonOptions
}

func (*GitDivertStatusCmd) Init

func (c *GitDivertStatusCmd) Init(cc *cobra.Command)

func (*GitDivertStatusCmd) Run

func (c *GitDivertStatusCmd) Run(args ...string) (err error)

type GitInstallCmd

type GitInstallCmd struct {
	*Environment
	*CommonOptions

	// Installable logging level
	Log string
}

func (*GitInstallCmd) Init

func (c *GitInstallCmd) Init(cc *cobra.Command)

func (*GitInstallCmd) Run

func (c *GitInstallCmd) Run(args ...string) (err error)

type GitPreCommitCmd

type GitPreCommitCmd struct {
	*Environment
	*CommonOptions
}

func (*GitPreCommitCmd) Init

func (c *GitPreCommitCmd) Init(cc *cobra.Command)

func (*GitPreCommitCmd) Run

func (c *GitPreCommitCmd) Run(args ...string) (err error)

type GitSmudgeCmd

type GitSmudgeCmd struct {
	*Environment
	*CommonOptions
}

func (*GitSmudgeCmd) Init

func (c *GitSmudgeCmd) Init(cc *cobra.Command)

func (*GitSmudgeCmd) Run

func (c *GitSmudgeCmd) Run(args ...string) (err error)

type GitUninstallCmd

type GitUninstallCmd struct {
	*Environment
	*CommonOptions

	// Installable logging lenel
	Log string
}

func (*GitUninstallCmd) Init

func (c *GitUninstallCmd) Init(cc *cobra.Command)

func (*GitUninstallCmd) Run

func (c *GitUninstallCmd) Run(args ...string) (err error)

type LsCmd

type LsCmd struct {
	*Environment
	*CommonOptions

	UseGit bool

	NoHeader bool
	FullID   bool

	NoBlobs     bool
	NoManifests bool

	NoRemote bool
	NoName   bool
	NoID     bool
	NoSize   bool
}

func (*LsCmd) Init

func (c *LsCmd) Init(cc *cobra.Command)

func (*LsCmd) Run

func (c *LsCmd) Run(args ...string) (err error)

type PingCmd

type PingCmd struct {
	*Environment
	*CommonOptions
}

func (*PingCmd) Init

func (c *PingCmd) Init(cc *cobra.Command)

func (*PingCmd) Run

func (c *PingCmd) Run(args ...string) (err error)

type RootCmd

type RootCmd struct {
	*Environment
	*CommonOptions
}

func (*RootCmd) Init

func (c *RootCmd) Init(cc *cobra.Command)

func (*RootCmd) Run

func (c *RootCmd) Run(args ...string) (err error)

type ServerCmd

type ServerCmd struct {
}

func (*ServerCmd) Init

func (c *ServerCmd) Init(cc *cobra.Command)

func (*ServerCmd) Run

func (c *ServerCmd) Run(args ...string) (err error)

type ServerOptions

type ServerOptions struct {
	// Http bind `:3000`
	BindHTTP string

	// rpc bind `:3001`
	BindRPC string

	// HTTP endpoint
	HTTPEndpoint string

	// Binaries directory
	BinDir string

	// Storage init
	//
	//   <storage-type>:option=...,option=...
	//   block:root=data,split=2,max-files=32,pool=32
	//
	Storage string
}

type ServerRunCmd

type ServerRunCmd struct {
	*Environment
	*CommonOptions
	*ServerOptions
}

func (*ServerRunCmd) Init

func (c *ServerRunCmd) Init(cc *cobra.Command)

func (*ServerRunCmd) Run

func (c *ServerRunCmd) Run(args ...string) (err error)

type SpecExportCmd

type SpecExportCmd struct {
	*Environment
	*CommonOptions

	UseGit bool

	Upload bool
	DoCC   bool
}

func (*SpecExportCmd) Init

func (c *SpecExportCmd) Init(cc *cobra.Command)

func (*SpecExportCmd) Run

func (c *SpecExportCmd) Run(args ...string) (err error)

type SpecImportCmd

type SpecImportCmd struct {
	*Environment
	*CommonOptions

	UseGit bool
	Raw    bool
	Squash bool
}

func (*SpecImportCmd) Init

func (c *SpecImportCmd) Init(cc *cobra.Command)

func (*SpecImportCmd) Run

func (c *SpecImportCmd) Run(args ...string) (err error)

type SpecRootCmd

type SpecRootCmd struct{}

func (*SpecRootCmd) Init

func (c *SpecRootCmd) Init(cc *cobra.Command)

func (*SpecRootCmd) Run

func (c *SpecRootCmd) Run(args ...string) (err error)

type UpCmd

type UpCmd struct {
	*Environment
	*CommonOptions

	UseGit bool
	Squash bool
}

func (*UpCmd) Init

func (c *UpCmd) Init(cc *cobra.Command)

func (*UpCmd) Run

func (c *UpCmd) Run(args ...string) (err error)

type VersionCmd

type VersionCmd struct {
	*Environment
}

func (*VersionCmd) Init

func (c *VersionCmd) Init(cc *cobra.Command)

func (*VersionCmd) Run

func (c *VersionCmd) Run(args ...string) (err error)

Jump to

Keyboard shortcuts

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