storage

package
v0.0.0-...-fdfbeb9 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	POSTGIS_EXTENSION string = "postgis"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host     string `envconfig:"DB_HOST"`
	Port     int    `envconfig:"DB_PORT"`
	User     string `envconfig:"DB_USER"`
	Password string `envconfig:"DB_PASS"`
	DbName   string `envconfig:"DB_NAME"`
	DbDriver string `default:"pgx" envconfig:"DB_DRIVER"`
}

func LoadConfig

func LoadConfig() *Config

func (Config) GetDataSourceName

func (config Config) GetDataSourceName() string

type Database

type Database struct {
	*sqlx.DB
}

func Connect

func Connect(config *Config) (*Database, error)

Jump to

Keyboard shortcuts

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