command

package
v0.0.24 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectionFlags

func ConnectionFlags(co *CommandOpts, mariadb *mariadbv1alpha1.MariaDB) string

Types

type BackupCommand added in v0.0.24

type BackupCommand struct {
	*BackupOpts
}

func NewBackupCommand added in v0.0.24

func NewBackupCommand(userOpts ...BackupOpt) (*BackupCommand, error)

func (*BackupCommand) MariadbDump added in v0.0.24

func (b *BackupCommand) MariadbDump(backup *mariadbv1alpha1.Backup,
	mariadb *mariadbv1alpha1.MariaDB) *Command

func (*BackupCommand) MariadbOperatorBackup added in v0.0.24

func (b *BackupCommand) MariadbOperatorBackup() *Command

func (*BackupCommand) MariadbOperatorRestore added in v0.0.24

func (b *BackupCommand) MariadbOperatorRestore() *Command

func (*BackupCommand) MariadbRestore added in v0.0.24

func (b *BackupCommand) MariadbRestore(mariadb *mariadbv1alpha1.MariaDB) *Command

type BackupOpt added in v0.0.24

type BackupOpt func(*BackupOpts)

func WithBackup added in v0.0.24

func WithBackup(path string, targetFilePath string) BackupOpt

func WithBackupDatabase added in v0.0.24

func WithBackupDatabase(d string) BackupOpt

func WithBackupDumpOpts added in v0.0.24

func WithBackupDumpOpts(opts []string) BackupOpt

func WithBackupLogLevel added in v0.0.24

func WithBackupLogLevel(l string) BackupOpt

func WithBackupMaxRetention added in v0.0.24

func WithBackupMaxRetention(d time.Duration) BackupOpt

func WithBackupPasswordEnv added in v0.0.24

func WithBackupPasswordEnv(p string) BackupOpt

func WithBackupTargetTime added in v0.0.24

func WithBackupTargetTime(t time.Time) BackupOpt

func WithBackupUserEnv added in v0.0.24

func WithBackupUserEnv(u string) BackupOpt

func WithS3 added in v0.0.24

func WithS3(bucket, endpoint, region string) BackupOpt

func WithS3TLS added in v0.0.24

func WithS3TLS(caCertPath string) BackupOpt

type BackupOpts added in v0.0.24

type BackupOpts struct {
	CommandOpts
	Path                 string
	TargetFilePath       string
	MaxRetentionDuration time.Duration
	TargetTime           time.Time
	S3                   bool
	S3Bucket             string
	S3Endpoint           string
	S3Region             string
	S3TLS                bool
	S3CACertPath         string
	LogLevel             string
	DumpOpts             []string
}

type Command

type Command struct {
	Command []string
	Args    []string
}

func NewBashCommand added in v0.0.24

func NewBashCommand(args []string) *Command

func NewCommand added in v0.0.24

func NewCommand(cmd, args []string) *Command

type CommandOpts

type CommandOpts struct {
	UserEnv     string
	PasswordEnv string
	Database    *string
}

type SqlCommand added in v0.0.24

type SqlCommand struct {
	*SqlOpts
}

func NewSqlCommand added in v0.0.24

func NewSqlCommand(userOpts ...SqlOpt) (*SqlCommand, error)

func (*SqlCommand) ExecCommand added in v0.0.24

func (s *SqlCommand) ExecCommand(mariadb *mariadbv1alpha1.MariaDB) *Command

type SqlOpt added in v0.0.24

type SqlOpt func(*SqlOpts)

func WithSqlDatabase added in v0.0.24

func WithSqlDatabase(d string) SqlOpt

func WithSqlFile added in v0.0.24

func WithSqlFile(f string) SqlOpt

func WithSqlPasswordEnv added in v0.0.24

func WithSqlPasswordEnv(p string) SqlOpt

func WithSqlUserEnv added in v0.0.24

func WithSqlUserEnv(u string) SqlOpt

type SqlOpts added in v0.0.24

type SqlOpts struct {
	CommandOpts
	SqlFile string
}

Jump to

Keyboard shortcuts

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