command

package
v0.38.1 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2025 License: MIT Imports: 11 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(restore *mariadbv1alpha1.Restore,
	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 WithBackupCompression added in v0.34.0

func WithBackupCompression(c mariadbv1alpha1.CompressAlgorithm) 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 WithCleanupTargetFile added in v0.35.0

func WithCleanupTargetFile(shoudlCleanup bool) BackupOpt

func WithS3 added in v0.0.24

func WithS3(bucket, endpoint, region, prefix string) BackupOpt

func WithS3CACertPath added in v0.0.27

func WithS3CACertPath(caCertPath string) BackupOpt

func WithS3TLS added in v0.0.24

func WithS3TLS(tls bool) BackupOpt

type BackupOpts added in v0.0.24

type BackupOpts struct {
	CommandOpts
	Path                 string
	TargetFilePath       string
	CleanupTargetFile    bool
	MaxRetentionDuration time.Duration
	TargetTime           time.Time
	Compression          mariadbv1alpha1.CompressAlgorithm
	S3                   bool
	S3Bucket             string
	S3Endpoint           string
	S3Region             string
	S3TLS                bool
	S3CACertPath         string
	S3Prefix             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

func (*SqlCommand) SqlFlags added in v0.37.0

func (s *SqlCommand) SqlFlags(mdb *mariadbv1alpha1.MariaDB) string

type SqlOpt added in v0.0.24

type SqlOpt func(*SqlOpts)

func WithSSL added in v0.37.0

func WithSSL(caPath, certPath, keyPath string) SqlOpt

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
	SSLCAPath   *string
	SSLCertPath *string
	SSLKeyPath  *string
	SqlFile     string
}

Jump to

Keyboard shortcuts

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

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy