conftypes

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2025 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBAliaser

type DBAliaser interface {
	Aliases() []string
}

type DBAnalyzer

type DBAnalyzer interface {
	AnalyzeQuery() string
}

type DBCanDisableJob

type DBCanDisableJob interface {
	DisableJob() bool
}

type DBDatabaseDropper

type DBDatabaseDropper interface {
	DatabaseDropQuery(database string) string
}

type DBDatabaseLister

type DBDatabaseLister interface {
	DatabaseListQuery() string
}

type DBDumper

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

type DBExecer

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

type DBFiler

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

type DBFilterer

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

type DBHasDatabase

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

type DBHasPassword

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

type DBHasPort

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

type DBHasUser

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

type DBOrderer

type DBOrderer interface {
	Priority() uint8
}

type DBRestorer

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

type DBTableLister

type DBTableLister interface {
	TableListQuery() string
}

type Database

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

type Dump

type Dump struct {
	*Global          `koanf:"-"`
	Output           string           `koanf:"output"`
	Format           sqlformat.Format `koanf:"format"`
	IfExists         bool             `koanf:"if-exists"`
	Clean            bool             `koanf:"clean"`
	NoOwner          bool             `koanf:"no-owner"`
	Table            []string         `koanf:"table"`
	ExcludeTable     []string         `koanf:"exclude-table"`
	ExcludeTableData []string         `koanf:"exclude-table-data"`
}

type Exec

type Exec struct {
	*Global        `koanf:"-"`
	DisableHeaders bool   `koanf:"disable-headers"`
	Command        string `koanf:"command"`
}

type Global

type Global struct {
	Log        Log  `koanf:",squash"`
	SkipSurvey bool `koanf:"-"`

	Kubernetes  `koanf:",squash"`
	DialectName string   `koanf:"dialect"`
	Dialect     Database `koanf:"-"`

	CreateJob           bool              `koanf:"create-job"`
	CreateNetworkPolicy bool              `koanf:"create-network-policy"`
	PodName             string            `koanf:"pod"`
	Job                 *batchv1.Job      `koanf:"-"`
	JobPod              corev1.Pod        `koanf:"-"`
	JobPodLabels        map[string]string `koanf:"job-pod-labels"`
	DBPod               corev1.Pod        `koanf:"-"`

	Host       string `koanf:"-"`
	Port       uint16 `koanf:"port"`
	Database   string `koanf:"dbname"`
	Username   string `koanf:"username"`
	Password   string `koanf:"password"`
	Quiet      bool   `koanf:"quiet"`
	RemoteGzip bool   `koanf:"remote-gzip"`
	Opts       string `koanf:"opts"`
	Spinner    string `koanf:"spinner"`

	Progress            bool   `koanf:"progress"`
	HealthchecksPingURL string `koanf:"healthchecks-ping-url"`

	NamespaceColors map[string]string `koanf:"namespace-colors"`
}

type Kubernetes

type Kubernetes struct {
	Kubeconfig string                `koanf:"kubeconfig"`
	Context    string                `koanf:"context"`
	Namespace  string                `koanf:"namespace"`
	Client     kubernetes.KubeClient `koanf:"-"`
}

type Log

type Log struct {
	Level  slogx.Level  `koanf:"log-level"`
	Format slogx.Format `koanf:"log-format"`
	Mask   bool         `koanf:"log-mask"`
}

type PortForward

type PortForward struct {
	*Global    `koanf:"-"`
	Address    []string `koanf:"address"`
	ListenPort uint16   `koanf:"listen-port"`
}

type Restore

type Restore struct {
	*Global           `koanf:"-"`
	Input             string           `koanf:"input"`
	Format            sqlformat.Format `koanf:"format"`
	SingleTransaction bool             `koanf:"single-transaction"`
	Clean             bool             `koanf:"clean"`
	NoOwner           bool             `koanf:"no-owner"`
	Force             bool             `koanf:"force"`
	Spinner           string           `koanf:"spinner"`
	HaltOnError       bool             `koanf:"halt-on-error"`
}

Jump to

Keyboard shortcuts

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