Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var StorageTypeDisplay = map[StorageType]string{ StorageTypeLocal: "本地磁盘", StorageTypeWebdav: "WebDAV", StorageTypeAlist: "Alist", StorageTypeMinio: "Minio", }
View Source
var StorageTypes = []StorageType{StorageTypeLocal, StorageTypeAlist, StorageTypeWebdav, StorageTypeMinio}
Functions ¶
This section is empty.
Types ¶
type ContextKey ¶ added in v0.19.0
type ContextKey string
const (
ContextKeyContentLength ContextKey = "content-length"
)
type File ¶ added in v0.4.0
type File struct {
Location tg.InputFileLocationClass
FileSize int64
FileName string
}
type StorageType ¶
type StorageType string
const ( StorageTypeLocal StorageType = "local" StorageTypeWebdav StorageType = "webdav" StorageTypeAlist StorageType = "alist" StorageTypeMinio StorageType = "minio" )
type Task ¶
type Task struct {
Ctx context.Context
Cancel context.CancelFunc
Error error
Status TaskStatus
StorageName string
StoragePath string
StartTime time.Time
File *File
FileMessageID int
FileChatID int64
IsTelegraph bool
TelegraphURL string
// to track the reply message
ReplyMessageID int
ReplyChatID int64
UserID int64
}
type TaskStatus ¶
type TaskStatus string
const ( Pending TaskStatus = "pending" Succeeded TaskStatus = "succeeded" Failed TaskStatus = "failed" Canceled TaskStatus = "canceled" )
Click to show internal directories.
Click to hide internal directories.