config

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReadWrite = iota
	ReadOnly
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessLevel

type AccessLevel uint8

type ConfigMap added in v1.4.1

type ConfigMap struct {
	Permission Permission
}

type Databaser

type Databaser interface {
	Name() string
	DefaultPort() uint16

	DatabaseEnvNames() []string
	ListDatabasesQuery() string
	ListTablesQuery() string

	UserEnvNames() []string
	DefaultUser() string

	DropDatabaseQuery(database string) string
	AnalyzeQuery() string
	PodLabels() []kubernetes.LabelQueryable
	FilterPods(ctx context.Context, client kubernetes.KubeClient, pods []v1.Pod) ([]v1.Pod, error)
	PasswordEnvNames(conf Global) []string

	ExecCommand(conf Exec) *command.Builder
	DumpCommand(conf Dump) *command.Builder
	RestoreCommand(conf Restore, inputFormat sqlformat.Format) *command.Builder

	Formats() map[sqlformat.Format]string
	FormatFromFilename(filename string) sqlformat.Format
	DumpExtension(format sqlformat.Format) string
}

type Dump

type Dump struct {
	Global `mapstructure:",squash"`
	Files
	Directory        string
	IfExists         bool
	Clean            bool
	NoOwner          bool
	Tables           []string
	ExcludeTable     []string
	ExcludeTableData []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 Databaser `mapstructure:"-"`

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

	Host       string
	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 NamespaceRegexp

type NamespaceRegexp struct {
	// contains filtered or unexported fields
}

func NewNamespaceRegexp

func NewNamespaceRegexp(accessLevel string) NamespaceRegexp

func (NamespaceRegexp) Match

func (level NamespaceRegexp) Match(namespace string) bool

type Permission added in v1.4.1

type Permission struct {
	Read  bool
	Write bool
}

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
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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