Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Log *Log `yaml:"log"` RootDir string `yaml:"root-dir"` Authorization string `yaml:"authorization"` TelegramBot *TelegramBot `yaml:"telegram-bot"` }
type FileModel ¶
type FileModel struct { gorm.Model // 转发消息的 ID MessageID int64 `gorm:"index"` // 原消息发送时间 (同一 Date 的消息被认为是同一批消息) ForwardDate int64 `gorm:"not null"` // 转发者 UserId UserID int64 `gorm:"index"` // 转发者 UserName UserName string `gorm:"default:''"` // 同一批次消息中由 From 用户发送的文本 Text string `gorm:"default:''"` // 转发消息的原 json 格式数据 Json datatypes.JSONType[*tgbotapi.Message] `gorm:"not null"` // 文件类型 nullable FileType FileType `gorm:"default:''"` // 文件本地储存路径 nullable FilePath string `gorm:"default:''"` // 文件大小 FileSize int64 `gorm:"default:0"` // 文件ID FileID string `gorm:"default:''"` }
func (*FileModel) GetForwardFrom ¶
GetForwardFrom 获取原消息发送者的信息
type FileType ¶
type FileType string
type TelegramBot ¶
Click to show internal directories.
Click to hide internal directories.