db

package
v0.0.0-...-7398596 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 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(migrationsPath string) error

func (*DBClient) SetupDatabase

func (d *DBClient) SetupDatabase() error

type DBConfig

type DBConfig struct {
	DbOemName  OemName `envconfig:"DB_OEM_NAME" required:"true"`
	Parameters *DBParameters
}

type DBParameters

type DBParameters struct {
	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

type SdkDbClient

type SdkDbClient interface {
}

Jump to

Keyboard shortcuts

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