storage

package
v0.0.0-...-79c9adf Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2023 License: MIT Imports: 5 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 {
	Host     string `envconfig:"HOST"`
	Port     int    `envconfig:"PORT"`
	User     string `envconfig:"USER"`
	Password string `envconfig:"PASS"`
	DbName   string `envconfig:"NAME"`
	DbDriver string `default:"pgx" envconfig:"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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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