status

package
v1.2.1218 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2021 License: MIT Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Queued      = Status{"queued", 0}
	Downloading = Status{"downloading", 1}
	Uploading   = Status{"uploading", 1}
	Skipped     = Status{"skipped", 2}
	Complete    = Status{"complete", 3}
	Canceled    = Status{"canceled", 4}
	Errored     = Status{"errored", 4}
)

Functions

This section is empty.

Types

type File added in v1.2.1147

type File struct {
	filesSDK.File
	*Job
	Status
	TransferBytes int64
	Cancel        context.CancelFunc
	LocalPath     string
	RemotePath    string
	Id            string
	Sync          bool
}

type Job

type Job struct {
	Id string
	context.CancelFunc
	// contains filtered or unexported fields
}

func (*Job) Add

func (r *Job) Add(report ToStatusFile)

func (Job) AllEnded

func (r Job) AllEnded() bool

func (Job) Cancel added in v1.2.1147

func (r Job) Cancel()

func (Job) Count

func (r Job) Count() int

func (Job) Files

func (r Job) Files() []filesSDK.File

func (Job) Init

func (r Job) Init(id ...string) *Job

func (Job) Job added in v1.2.1147

func (r Job) Job() Job

func (Job) TotalBytes

func (r Job) TotalBytes() int64

func (Job) TransferBytes

func (r Job) TransferBytes() int64

type Reporter added in v1.2.1147

type Reporter func(File, error)

type Status

type Status struct {
	Name  string
	Value int
}

func (Status) Canceled

func (e Status) Canceled() bool

func (Status) Compare

func (e Status) Compare(s Status) bool

func (Status) Completed

func (e Status) Completed() bool

func (Status) Downloading

func (e Status) Downloading() bool

func (Status) Ended

func (e Status) Ended() bool

func (Status) Errored

func (e Status) Errored() bool

func (Status) Invalid

func (e Status) Invalid() bool

func (Status) Queued

func (e Status) Queued() bool

func (Status) Running added in v1.2.1147

func (e Status) Running() bool

func (Status) Skipped

func (e Status) Skipped() bool

func (Status) String

func (e Status) String() string

func (Status) Uploading

func (e Status) Uploading() bool

func (Status) Valid

func (e Status) Valid() bool

type ToStatusFile added in v1.2.1147

type ToStatusFile interface {
	ToStatusFile() File
}

Jump to

Keyboard shortcuts

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