pkg

package
v1.2.9 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Overview

Package pkg / **** @author Jonas Kaninda @license MIT License <https://opensource.org/licenses/MIT> @Copyright © 2024 Jonas Kaninda *

Package pkg / **** @author Jonas Kaninda @license MIT License <https://opensource.org/licenses/MIT> @Copyright © 2024 Jonas Kaninda *

Package pkg / **** @author Jonas Kaninda @license MIT License <https://opensource.org/licenses/MIT> @Copyright © 2024 Jonas Kaninda *

Package pkg / **** @author Jonas Kaninda @license MIT License <https://opensource.org/licenses/MIT> @Copyright © 2024 Jonas Kaninda *

Package pkg / **** @author Jonas Kaninda @license MIT License <https://opensource.org/licenses/MIT> @Copyright © 2024 Jonas Kaninda *

Package pkg / **** @author Jonas Kaninda @license MIT License <https://opensource.org/licenses/MIT> @Copyright © 2024 Jonas Kaninda *

Package utils / **** @author Jonas Kaninda @license MIT License <https://opensource.org/licenses/MIT> @Copyright © 2024 Jonas Kaninda *

Package pkg / **** @author Jonas Kaninda @license MIT License <https://opensource.org/licenses/MIT> @Copyright © 2024 Jonas Kaninda *

Package pkg / **** @author Jonas Kaninda @license MIT License <https://opensource.org/licenses/MIT> @Copyright © 2024 Jonas Kaninda *

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BackupDatabase

func BackupDatabase(db *dbConfig, backupFileName string, disableCompression bool)

BackupDatabase backup database

func BackupTask added in v1.2.8

func BackupTask(db *dbConfig, config *BackupConfig)

func CopyFromFTP added in v1.2.9

func CopyFromFTP(fileName, remotePath string) (err error)

CopyFromFTP downloads a file from the remote FTP server

func CopyFromRemote

func CopyFromRemote(fileName, remotePath string) error

func CopyToFTP added in v1.2.9

func CopyToFTP(fileName, remotePath string) (err error)

CopyToFTP uploads a file to the remote FTP server

func CopyToRemote

func CopyToRemote(fileName, remotePath string) error

func CreateSession added in v1.2.9

func CreateSession() (*session.Session, error)

CreateSession creates a new AWS session

func Decrypt

func Decrypt(inputFile string, passphrase string) error

func DeleteOldBackup added in v1.2.9

func DeleteOldBackup(bucket, prefix string, retention int) error

func DownloadFile added in v1.2.9

func DownloadFile(destinationPath, key, bucket, prefix string) error

func Encrypt

func Encrypt(inputFile string, passphrase string) error

func RemoveLastExtension

func RemoveLastExtension(filename string) string

func RestoreDatabase

func RestoreDatabase(db *dbConfig, file string)

RestoreDatabase restore database

func StartBackup

func StartBackup(cmd *cobra.Command)

func StartMigration added in v1.2.3

func StartMigration(cmd *cobra.Command)

func StartRestore

func StartRestore(cmd *cobra.Command)

func UploadFileToS3 added in v1.2.9

func UploadFileToS3(filePath, key, bucket, prefix string) error

UploadFileToS3 uploads a file to S3 with a given prefix

Types

type BackupConfig added in v1.2.8

type BackupConfig struct {
	// contains filtered or unexported fields
}

type Config

type Config struct {
}

type FTPConfig added in v1.2.9

type FTPConfig struct {
	// contains filtered or unexported fields
}

type RestoreConfig added in v1.2.8

type RestoreConfig struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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