local

package
v0.0.0-...-7659e5b Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Progress

type Progress struct {
	TotalSize int64
	BytesRead int64
}

Progress is used to track the progress of a file upload. It implements the io.Writer interface so it can be passed to an io.TeeReader()

func (*Progress) Print

func (pr *Progress) Print()

Print displays the current progress of the file upload

func (*Progress) Write

func (pr *Progress) Write(p []byte) (n int, err error)

Write is used to satisfy the io.Writer interface. Instead of writing somewhere, it simply aggregates the total bytes on each read

type ProviderLocal

type ProviderLocal struct {
}

func NewLocalBucket

func NewLocalBucket(ctx context.Context) (*ProviderLocal, error)

func (*ProviderLocal) Upload

func (b *ProviderLocal) Upload(ctx context.Context, fh *multipart.FileHeader, uniqueName string, extension string) (string, error)

Jump to

Keyboard shortcuts

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