config

package
v1.15.2 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadViper added in v1.13.0

func LoadViper() error

func SetViperDefaults added in v1.14.0

func SetViperDefaults()

Types

type DBAliaser added in v1.15.0

type DBAliaser interface {
	Aliases() []string
}

type DBAnalyzer added in v1.15.0

type DBAnalyzer interface {
	AnalyzeQuery() string
}

type DBCanDisableJob added in v1.15.0

type DBCanDisableJob interface {
	DisableJob() bool
}

type DBDatabaseDropper added in v1.15.0

type DBDatabaseDropper interface {
	DatabaseDropQuery(database string) string
}

type DBDatabaseLister added in v1.15.0

type DBDatabaseLister interface {
	DatabaseListQuery() string
}

type DBDumper added in v1.15.0

type DBDumper interface {
	Database
	DumpCommand(conf Dump) *command.Builder
	DBFiler
}

type DBExecer added in v1.15.0

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

type DBFiler added in v1.15.0

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

type DBFilterer added in v1.15.0

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

type DBHasDatabase added in v1.15.0

type DBHasDatabase interface {
	DatabaseEnvs(conf Global) kubernetes.ConfigLookups
}

type DBHasPassword added in v1.15.0

type DBHasPassword interface {
	PasswordEnvs(conf Global) kubernetes.ConfigLookups
}

type DBHasPort added in v1.15.0

type DBHasPort interface {
	PortEnvs(conf Global) kubernetes.ConfigLookups
	PortDefault() uint16
}

type DBHasUser added in v1.15.0

type DBHasUser interface {
	UserEnvs(conf Global) kubernetes.ConfigLookups
	UserDefault() string
}

type DBOrderer added in v1.15.0

type DBOrderer interface {
	Priority() uint8
}

type DBRestorer added in v1.15.0

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

type DBTableLister added in v1.15.0

type DBTableLister interface {
	TableListQuery() string
}

type Database added in v1.8.0

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

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"`

	Progress bool
}

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