db

package
v0.0.0-...-bd0deb0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSupportedDatabaseOEMs

func GetSupportedDatabaseOEMs() []string

Types

type DBClient

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

func NewDBClient

func NewDBClient() (*DBClient, error)

func NewDBClientWithConfig

func NewDBClientWithConfig(conf *DBConfig) *DBClient

func (*DBClient) RunMigrations

func (d *DBClient) RunMigrations(data map[string][]byte) error

func (*DBClient) SetupDatabase

func (d *DBClient) SetupDatabase() (string, error)

type DBConfig

type DBConfig struct {
	PluginName        string  `envconfig:"PLUGIN_NAME" required:"true"`
	DbOemName         OemName `envconfig:"DB_OEM_NAME" required:"true"`
	DbName            string  `envconfig:"DB_NAME" required:"true"`
	DbServiceUserName string  `envconfig:"DB_SERVICE_USER_NAME" required:"true"`
}

type OemName

type OemName int
const (
	UNKNOWN OemName = iota + 1

	// Postgres
	POSTGRES
)

func GetEnum

func GetEnum(key string) (OemName, bool)

func (OemName) EnumIndex

func (o OemName) EnumIndex() int

func (OemName) String

func (o OemName) String() string

Jump to

Keyboard shortcuts

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