backup_data

package module
v0.0.0-...-d2d25ab Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2024 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

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 GetBackupFileList() ([]string, error)

func GetBackupFileName

func GetBackupFileName() string

func GetLastBackupFileName

func GetLastBackupFileName() (string, error)

func SendLastBackupFile

func SendLastBackupFile() error

Types

type SendFileResponse

type SendFileResponse struct {
	OK          bool   `json:"ok"`
	ErrorCode   int64  `json:"error_code"`
	Description string `json:"description"`
}

Jump to

Keyboard shortcuts

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