Documentation ¶
Index ¶
- Constants
- Variables
- func ArchiveDataFolder() error
- func BackupDataForever()
- func BackupDataOnce() error
- func DeleteExtraBackupFiles() error
- func GetBackupFileList() ([]string, error)
- func GetBackupFileName() string
- func GetLastBackupFileName() (string, error)
- func SendLastBackupFile() error
- type SendFileResponse
Constants ¶
View Source
const ( DataFolder = "./data" BackupFolder = "./data_backup" MaxBackupFiles = 48 BackupEvery = 1 * time.Hour )
View Source
const ( SendFileMethod = "sendDocument" BackupChatID = -1002180492270 )
Variables ¶
View Source
var BackupBotToken = util.GetBotToken()
View Source
var BackupFileRegexp = regexp.MustCompile(`^data-.*-.*\.tar\.gz$`)
Functions ¶
func ArchiveDataFolder ¶
func ArchiveDataFolder() error
func BackupDataForever ¶
func BackupDataForever()
func BackupDataOnce ¶
func BackupDataOnce() error
func DeleteExtraBackupFiles ¶
func DeleteExtraBackupFiles() error
func GetBackupFileList ¶
func GetBackupFileName ¶
func GetBackupFileName() string
func GetLastBackupFileName ¶
func SendLastBackupFile ¶
func SendLastBackupFile() error
Types ¶
type SendFileResponse ¶
Click to show internal directories.
Click to hide internal directories.