config

package
v0.0.0-...-627e969 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: MIT Imports: 3 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 {
	PostgresUser                  string `envconfig:"POSTGRES_USER" required:"true"`
	PostgresPassword              string `envconfig:"POSTGRES_PASSWORD" required:"true"`
	PostgresDb                    string `envconfig:"POSTGRES_DB" required:"true"`
	PostgresHost                  string `envconfig:"POSTGRES_HOST" required:"true"`
	PostgresDatabaseContainerName string `envconfig:"POSTGRES_DATABASE_CONTAINER_NAME" required:"true"`
}

Config holds all configuration needed by this app.

func Read

func Read() (*Config, error)

Read reads configuration from environment variables. It assumes that an '.env' file is present at current path.

func ReadFromEnvFile

func ReadFromEnvFile(envFilePath string) (*Config, error)

ReadFromEnvFile reads configuration from the specified environment file.

Jump to

Keyboard shortcuts

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