Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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) 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
Click to show internal directories.
Click to hide internal directories.