status

package
v3.2.103 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Null          = Status{"", -1}
	Indexed       = Status{"indexed", 0}
	Retrying      = Status{"retrying", 0}
	Queued        = Status{"queued", 1}
	Compared      = Status{"compared", 1}
	Downloading   = Status{"downloading", 2}
	Uploading     = Status{"uploading", 2}
	Skipped       = Status{"skipped", 3}
	FileExists    = Status{"file_exists", 3}
	Ignored       = Status{"ignored", 3}
	Complete      = Status{"complete", 4}
	FolderCreated = Status{"folder_created", 4}
	Canceled      = Status{"canceled", 5}
	Errored       = Status{"errored", 5}

	Included = []GetStatus{Indexed, Queued, Compared, Retrying, Downloading, Uploading, Complete, Canceled, Errored, FolderCreated}
	Excluded = []GetStatus{Skipped, Ignored, FileExists}
	Valid    = []GetStatus{Indexed, Queued, Compared, Retrying, Downloading, Uploading, Complete, FolderCreated}
	Invalid  = []GetStatus{Null, Canceled, Errored, Skipped, Ignored, FileExists}
	Running  = []GetStatus{Downloading, Uploading}
	Ended    = []GetStatus{Complete, Canceled, Errored, Skipped, Ignored, FileExists, FolderCreated}
)

Functions

This section is empty.

Types

type Change

type Change struct {
	Status
	time.Time
	Err error
}

type Changes

type Changes []Change

func (Changes) Count

func (c Changes) Count(s Status) (count int)

type GetStatus

type GetStatus interface {
	Status() Status
}

type Log

type Log struct {
	Path   string
	Action string
}

type Status

type Status struct {
	Name  string
	Value int
}

func SetStatus

func SetStatus(old GetStatus, new GetStatus, err error) (Status, bool)

func (Status) Any

func (e Status) Any(statuses ...GetStatus) bool

func (Status) Has

func (e Status) Has(statuses ...GetStatus) bool

func (Status) Is

func (e Status) Is(statuses ...GetStatus) bool

func (Status) IsNot

func (e Status) IsNot(statuses ...GetStatus) bool

func (Status) Status

func (e Status) Status() Status

func (Status) String

func (e Status) String() string

Jump to

Keyboard shortcuts

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