database

package
v1.19.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2022 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.

Jump to

Keyboard shortcuts

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