sql_config

package
v0.0.0-...-35a4376 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Driver         Driver `json:"driver"`
	DataSourceName string `json:"data_source_name"`
}

func (Config) DB

func (c Config) DB() (*sql.DB, error)

func (Config) DatabaseName

func (c Config) DatabaseName() (string, error)

func (Config) ValidateConfigFields

func (c Config) ValidateConfigFields() error

type Driver

type Driver string
const (
	PostgresDriver  Driver = "postgres"
	CockroachDriver Driver = "cockroach"
	SQLLite         Driver = "sql_lite"
)

Jump to

Keyboard shortcuts

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