config

package
v1.4.3 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2022 License: GPL-3.0 Imports: 7 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(client kubernetes.KubeClient, pods []v1.Pod) ([]v1.Pod, error)
	PasswordEnvNames() []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
	GitHubActions    bool
}

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:"-"`
	Pod      v1.Pod    `mapstructure:"-"`
	Database string
	Username string
	Password string
	Quiet    bool
}

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