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"`
	RETRIES int    `env:"APP_REQUEST_RETRIES" envDefault:"4"`
}

type Config

type Config struct {
	APP
	DB
	GATEWAY
}

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:"club_hub"`
	PASSWORD  string `env:"DB_PASSWORD" envDefault:""`
	DBNAME    string `env:"DB_NAME" envDefault:"club_hub"`
	PORT      string `env:"DB_PORT" envDefault:"3306"`
	SSLMODE   string `env:"DB_SSL_MODE" envDefault:"disable"`
	TIMEZONE  string `env:"DB_TIME_ZONE"  envDefault:"America/Bogota"`
	RELATIONS string `env:"DB_METADATA_RELATIONS"  envDefault:""`
}

type GATEWAY

type GATEWAY struct {
	URL string `env:"GATEWAY_METADATA_URL" envDefault:""`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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