utils

package
v0.0.0-...-664881c Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const BackupExample = "mongodb-bkup backup --dbname database --disable-compression\n" +
	"mongodb-bkup backup --dbname database --storage s3 --path /custom-path --disable-compression"
View Source
const MainExample = "mongodb-bkup backup --dbname database --disable-compression\n" +
	"mongodb-bkup backup --dbname database --storage s3 --path /custom-path\n" +
	"mongodb-bkup restore --dbname database --file "
View Source
const RestoreExample = "mysql-bkup restore --dbname database --file \n" +
	"bkup restore --dbname database --storage s3 --path /custom-path --file db_20231219_022941.sql.gz"

Variables

This section is empty.

Functions

func ChangePermission

func ChangePermission(filePath string, mod int)

func Done

func Done(v ...any)

func Fatal

func Fatal(v ...any)

func Fatalf

func Fatalf(msg string, v ...any)

func FileExists

func FileExists(filename string) bool

func FlagGetBool

func FlagGetBool(cmd *cobra.Command, flagName string) bool

func FlagGetString

func FlagGetString(cmd *cobra.Command, flagName string) string

func GetEnv

func GetEnv(cmd *cobra.Command, flagName, envName string) string

func Info

func Info(v ...any)

func IsDirEmpty

func IsDirEmpty(name string) (bool, error)

func SetEnv

func SetEnv(key, value string)

func ShowHistory

func ShowHistory()

func TestDatabaseConnection

func TestDatabaseConnection()

TestDatabaseConnection tests the database connection

func WriteToFile

func WriteToFile(filePath, content string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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