upload

package
v0.54.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: AGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(root *cobra.Command)

func Upload

func Upload(cmd *cobra.Command, args []string) error

Types

type UploadProgress

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

UploadProgress manages the progress UI for uploads

func NewUploadProgress

func NewUploadProgress(ctx context.Context, fileName string, fileSize int64) *UploadProgress

NewUploadProgress creates a new upload progress tracker

func (*UploadProgress) Done

func (up *UploadProgress) Done()

Done signals that the upload is complete

func (*UploadProgress) Quit

func (up *UploadProgress) Quit()

Quit quits the progress UI

func (*UploadProgress) SetError

func (up *UploadProgress) SetError(err error)

SetError sets an error and quits the progress UI

func (*UploadProgress) Start

func (up *UploadProgress) Start()

Start starts the progress UI in a goroutine and returns immediately

func (*UploadProgress) UpdateProgress

func (up *UploadProgress) UpdateProgress(percent float64)

UpdateProgress updates the progress bar with a new percentage (0.0 - 1.0)

func (*UploadProgress) Wait

func (up *UploadProgress) Wait()

Wait waits for the progress UI to finish

Jump to

Keyboard shortcuts

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