types

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var StorageTypes = []StorageType{Local, Alist, Webdav, StorageAll}

Functions

This section is empty.

Types

type StorageType

type StorageType string
var (
	StorageAll StorageType = "all"
	Local      StorageType = "local"
	Webdav     StorageType = "webdav"
	Alist      StorageType = "alist"
)

type Task

type Task struct {
	Ctx         context.Context
	FileID      string
	Error       error
	Status      TaskStatus
	FilePath    string // telegram File object's FilePath
	FileName    string
	Storage     StorageType
	StoragePath string

	// For track progress
	ChatID         int64
	ReplyMessageID int
}

func (*Task) String

func (t *Task) String() string

type TaskStatus

type TaskStatus string
var (
	Pending   TaskStatus = "pending"
	Succeeded TaskStatus = "succeeded"
	Failed    TaskStatus = "failed"
	Canceled  TaskStatus = "canceled"
)

Jump to

Keyboard shortcuts

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