types

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2025 License: AGPL-3.0 Imports: 5 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 File added in v0.4.0

type File struct {
	Location tg.InputFileLocationClass
	FileSize int64
	FileName string
}

type ReceivedFile added in v0.4.0

type ReceivedFile struct {
	gorm.Model
	Processing     bool
	ChatID         int64 `gorm:"uniqueIndex:idx_chat_id_message_id;not null"`
	MessageID      int   `gorm:"uniqueIndex:idx_chat_id_message_id;not null"`
	ReplyMessageID int
	ReplyChatID    int64
	FileName       string
}

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
	Error       error
	Status      TaskStatus
	File        *File
	Storage     StorageType
	StoragePath string
	StartTime   time.Time

	FileMessageID  int
	FileChatID     int64
	ReplyMessageID int
	ReplyChatID    int64
}

func (Task) FileName

func (t Task) FileName() string

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"
)

type User added in v0.4.0

type User struct {
	gorm.Model
	UserID         int64 `gorm:"uniqueIndex"`
	Silent         bool
	DefaultStorage string
}

Jump to

Keyboard shortcuts

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