config

package
v0.0.0-...-f9697bf Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APP

type APP struct {
	PORT string `env:"APP_PORT" envDefault:"8080"`
}

type Config

type Config struct {
	APP
	DB
}

func NewConfig

func NewConfig() (*Config, error)

func (*Config) ConnectionString

func (c *Config) ConnectionString() string

type DB

type DB struct {
	HOST     string `env:"DB_HOST" envDefault:"localhost"`
	USER     string `env:"DB_USER" envDefault:"bia"`
	PASSWORD string `env:"DB_PASSWORD" envDefault:""`
	DBNAME   string `env:"DB_NAME" envDefault:"power_consumption"`
	PORT     string `env:"DB_PORT" envDefault:"3306"`
	SSLMODE  string `env:"DB_SSL_MODE" envDefault:"disable"`
	TIMEZONE string `env:"DB_TIME_ZONE"  envDefault:"America/Bogota"`
}

Jump to

Keyboard shortcuts

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