database

package
v1.21.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MySQLDatabase      string = "mysql"
	PostgreSQLDatabase string = "postgres"
)

Variables

This section is empty.

Functions

func GetTypeFromConnectionString added in v1.12.0

func GetTypeFromConnectionString(connectionString string) string

Types

type Info

type Info struct {
	SecretName       string
	DatabaseName     string
	ExternalDBType   string
	External         bool
	ReaderEndpoints  bool
	DatabaseCheckURL bool
	// contains filtered or unexported fields
}

Info contains information on a database connection.

func GenerateDatabaseInfoFromSecret

func GenerateDatabaseInfoFromSecret(secret *corev1.Secret) *Info

GenerateDatabaseInfoFromSecret takes a secret and returns database based on the characteristics of the secret.

func (*Info) HasDatabaseCheckURL

func (db *Info) HasDatabaseCheckURL() bool

HasDatabaseCheckURL returns if the database has an endpoint check defined.

func (*Info) HasReaderEndpoints added in v1.8.0

func (db *Info) HasReaderEndpoints() bool

HasReaderEndpoints returns if the database has reader endpoints defined.

func (*Info) IsExternal

func (db *Info) IsExternal() bool

IsExternal defines if the database is external or not.

func (*Info) IsValid

func (db *Info) IsValid() error

IsValid returns if the database Info is valid or not.

Directories

Path Synopsis
mysql_operator
v1alpha1
Package v1alpha1 contains API Schema definitions for the mysql v1alpha1 API group +kubebuilder:object:generate:=true +groupName=mysql.presslabs.org
Package v1alpha1 contains API Schema definitions for the mysql v1alpha1 API group +kubebuilder:object:generate:=true +groupName=mysql.presslabs.org

Jump to

Keyboard shortcuts

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