utils

package
v1.0.34 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Progress added in v1.0.23

type Progress struct {
	BytesRead      int64
	BytesPerSecond int64
	Completed      bool
}

func NewProgress added in v1.0.23

func NewProgress(bytesRead int64, bytesPerSecond int64, completed bool) *Progress

type ProgressBar added in v1.0.23

type ProgressBar struct {
	Logger log.Logger
	// contains filtered or unexported fields
}

func NewProgressBar added in v1.0.23

func NewProgressBar(logger log.Logger) *ProgressBar

func (*ProgressBar) Remove added in v1.0.23

func (b *ProgressBar) Remove()

func (*ProgressBar) Update added in v1.0.23

func (b *ProgressBar) Update(text string, current int64, total int64, bytesPerSecond int64)

type ProgressReader added in v1.0.23

type ProgressReader struct {
	io.Reader
	ProgressFunc func(progress Progress)
	// contains filtered or unexported fields
}

func NewProgressReader added in v1.0.23

func NewProgressReader(reader io.Reader, progressFunc func(progress Progress)) *ProgressReader

func (*ProgressReader) Read added in v1.0.23

func (r *ProgressReader) Read(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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