Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ItemAction ¶
type ItemAction string
const ( ActionDirRestored ItemAction = "dir restored" ActionFileRestored ItemAction = "file restored" ActionFileUpdated ItemAction = "file updated" ActionFileUnchanged ItemAction = "file unchanged" ActionDeleted ItemAction = "deleted" )
Constants for the different CompleteItem actions.
type Progress ¶
type Progress struct {
// contains filtered or unexported fields
}
func NewProgress ¶
func NewProgress(printer ProgressPrinter, interval time.Duration) *Progress
func (*Progress) AddProgress ¶
func (p *Progress) AddProgress(name string, action ItemAction, bytesWrittenPortion uint64, bytesTotal uint64)
AddProgress accumulates the number of bytes written for a file
func (*Progress) AddSkippedFile ¶
func (*Progress) ReportDeletedFile ¶
type ProgressPrinter ¶
type ProgressPrinter interface { Update(progress State, duration time.Duration) CompleteItem(action ItemAction, item string, size uint64) Finish(progress State, duration time.Duration) }
func NewJSONProgress ¶
func NewJSONProgress(terminal term, verbosity uint) ProgressPrinter
func NewTextProgress ¶
func NewTextProgress(terminal term, verbosity uint) ProgressPrinter
Click to show internal directories.
Click to hide internal directories.