config

package
v1.13.3 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitLog added in v1.13.0

func InitLog(cmd *cobra.Command)

func LoadViper added in v1.13.0

func LoadViper() error

func LogFormat added in v1.13.0

func LogFormat(out io.Writer, format string) io.Writer

func LogLevel added in v1.13.0

func LogLevel(level string) zerolog.Level

Types

type Database added in v1.8.0

type Database interface {
	Name() string
	PrettyName() string
	PodFilters() filter.Filter
}

type DatabaseAliases added in v1.12.0

type DatabaseAliases interface {
	Aliases() []string
}

type DatabaseAnalyze added in v1.12.0

type DatabaseAnalyze interface {
	AnalyzeQuery() string
}

type DatabaseDB added in v1.12.0

type DatabaseDB interface {
	DatabaseEnvNames() kubernetes.ConfigLookups
}

type DatabaseDBDrop added in v1.12.0

type DatabaseDBDrop interface {
	DropDatabaseQuery(database string) string
}

type DatabaseDBList added in v1.12.0

type DatabaseDBList interface {
	ListDatabasesQuery() string
}

type DatabaseDisableJob added in v1.12.0

type DatabaseDisableJob interface {
	DisableJob() bool
}

type DatabaseDump added in v1.12.0

type DatabaseDump interface {
	Database
	DumpCommand(conf Dump) *command.Builder
	DatabaseFile
}

type DatabaseExec added in v1.12.0

type DatabaseExec interface {
	Database
	ExecCommand(conf Exec) *command.Builder
}

type DatabaseFile added in v1.12.0

type DatabaseFile interface {
	Formats() map[sqlformat.Format]string
}

type DatabaseFilter added in v1.12.0

type DatabaseFilter interface {
	FilterPods(ctx context.Context, client kubernetes.KubeClient, pods []v1.Pod) ([]v1.Pod, error)
}

type DatabasePassword added in v1.12.0

type DatabasePassword interface {
	PasswordEnvNames(conf Global) kubernetes.ConfigLookups
}

type DatabasePort added in v1.12.0

type DatabasePort interface {
	DefaultPort() uint16
	PortEnvNames() kubernetes.ConfigLookups
}

type DatabasePriority added in v1.13.0

type DatabasePriority interface {
	Priority() uint8
}

type DatabaseRestore added in v1.12.0

type DatabaseRestore interface {
	Database
	RestoreCommand(conf Restore, inputFormat sqlformat.Format) *command.Builder
	DatabaseFile
}

type DatabaseTables added in v1.12.0

type DatabaseTables interface {
	ListTablesQuery() string
}

type DatabaseUsername added in v1.12.0

type DatabaseUsername interface {
	UserEnvNames() kubernetes.ConfigLookups
	DefaultUser() string
}

type Dump

type Dump struct {
	Global `mapstructure:",squash"`
	Files
	Directory        string
	IfExists         bool
	Clean            bool
	NoOwner          bool
	Tables           []string
	ExcludeTable     []string
	ExcludeTableData []string
	Spinner          string
}

type Exec

type Exec struct {
	Global         `mapstructure:",squash"`
	DisableHeaders bool
	Command        string
}

type Files

type Files struct {
	Filename string `mapstructure:"name"`
	Format   sqlformat.Format
}

type Global

type Global struct {
	Kubernetes
	Client  kubernetes.KubeClient
	Dialect Database `mapstructure:"-"`

	Job    *batchv1.Job
	JobPod v1.Pod `mapstructure:"-"`
	DBPod  v1.Pod `mapstructure:"-"`

	Host       string
	Port       uint16
	Database   string
	Username   string
	Password   string
	Quiet      bool
	RemoteGzip bool `mapstructure:"remote-gzip"`
}

type Kubernetes added in v1.4.3

type Kubernetes struct {
	Kubeconfig string
	Context    string
	Namespace  string
	Client     kubernetes.KubeClient
}

type PortForward

type PortForward struct {
	Global    `mapstructure:",squash"`
	Addresses []string
	LocalPort uint16
}

type Restore

type Restore struct {
	Global `mapstructure:",squash"`
	Files
	SingleTransaction bool
	Clean             bool
	NoOwner           bool
	Force             bool
	Spinner           string
	HaltOnError       bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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