goconf

package module
v0.0.0-...-3eab89b Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MkDB

func MkDB(config *Config) (*sql.DB, error)

MkDB is a function that takes a config struct and returns a pointer to a database.

Types

type Config

type Config struct {
	DB struct {
		User     string `default:"covid19scraper"`
		Password string `required:"true" env:"DBPassword" default:"ThatsWhatICallInfected"`
		Port     string `default:"5432"`
		IP       string `default:"127.0.0.1"`
	}
}

Config is a struct intended to be loaded with the Configor package

Jump to

Keyboard shortcuts

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