model

package
v0.2.25 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TASK_CREATED  UploadStatus = "created"
	TASK_FINISHED              = "ok"
	TASK_PAUSED                = "paused"
	TASK_FAILED                = "failed"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Task

type Task struct {
	Status     UploadStatus `toml:"status" mapstructure:"status"`
	TaskId     int          `toml:"task_id" mapstructure:"task_id"`
	LocalPath  string       `toml:"local_path" mapstructure:"local_path"`
	TargetDir  string       `toml:"target_dir" mapstructure:"target_dir"`
	TargetPath string       `toml:"target_path" mapstructure:"target_path"`
	Ignored    bool         `toml:"ignored" mapstructure:"ignored"`
	RawUrl     string       `toml:"raw_url" mapstructure:"raw_url"`
	Url        string       `toml:"url" mapstructure:"url"`
	CreateTime time.Time    `toml:"create_time" mapstructure:"create_time"`
	FinishTime time.Time    `toml:"finish_time" mapstructure:"finish_time"`
}

type UploadStatus

type UploadStatus string

type Uploader

type Uploader interface {
	Upload(task *Task) error
}

Jump to

Keyboard shortcuts

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