cmd

package
v0.0.0-...-8aeb8a1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute(tag string)

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type DummyProgressBar

type DummyProgressBar struct {
}

func (*DummyProgressBar) ProxyReader

func (d *DummyProgressBar) ProxyReader(r io.Reader) io.ReadCloser

func (*DummyProgressBar) SetCurrent

func (d *DummyProgressBar) SetCurrent(current int64)

func (*DummyProgressBar) SetErrorState

func (d *DummyProgressBar) SetErrorState()

func (*DummyProgressBar) Type

func (d *DummyProgressBar) Type() string

func (*DummyProgressBar) Wait

func (d *DummyProgressBar) Wait()

type MultiProgressBar

type MultiProgressBar struct {
	// contains filtered or unexported fields
}

func NewParentMultiProgressBar

func NewParentMultiProgressBar(capacity int64) *MultiProgressBar

func (*MultiProgressBar) ProxyReader

func (mp *MultiProgressBar) ProxyReader(r io.Reader) io.ReadCloser

func (*MultiProgressBar) SetCurrent

func (mp *MultiProgressBar) SetCurrent(current int64)

func (*MultiProgressBar) SetErrorState

func (mp *MultiProgressBar) SetErrorState()

func (*MultiProgressBar) Type

func (mp *MultiProgressBar) Type() string

func (*MultiProgressBar) Wait

func (mp *MultiProgressBar) Wait()

type ProgressBar

type ProgressBar interface {
	SetCurrent(current int64)
	SetErrorState()

	ProxyReader(r io.Reader) io.ReadCloser

	Type() string
	Wait()
	// contains filtered or unexported methods
}

type StateManager

type StateManager struct {
	// contains filtered or unexported fields
}

StateManager is a file uploading state manager

func (*StateManager) Close

func (sm *StateManager) Close()

func (*StateManager) IsUploaded

func (sm *StateManager) IsUploaded(fileName string) bool

IsUploaded returns true if input file has already been uploaded

func (*StateManager) Success

func (sm *StateManager) Success(fileName string)

Jump to

Keyboard shortcuts

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