db

package
v0.0.0-...-a35bd06 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFromEnv

func GetFromEnv() (*sqlx.DB, error)

GetFromEnv will return the database connection based on the enviroment variables

func InitDb

func InitDb(config Config) (*sqlx.DB, error)

InitDb faz a conexão com o banco

Types

type Config

type Config struct {
	User     string
	Passwd   string
	DBName   string
	DBHost   string
	DBPort   string
	Attempts int
}

Config informs the data needed for connecting to the database

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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