config

package
v0.0.0-...-fb9fc09 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfiguration

func LoadConfiguration()

LoadConfiguration loads the configuration from the environment variables and command line flags.

Types

type AppConfig

type AppConfig struct {
	Debug               bool   `json:"debug"`
	MetricsPort         int    `json:"metricsPort"`
	ServerPort          int    `json:"serverPort"`
	Version             bool   `json:"version"`
	JWTSecret           string `json:"jwtSecret"`
	EncryptionKey       string `json:"encryptionKey"`
	S3Bucket            string `json:"s3Bucket"`
	S3Region            string `json:"s3Region"`
	S3Endpoint          string `json:"s3Endpoint"`
	S3AccessKey         string `json:"s3AccessKey"`
	S3SecretKey         string `json:"s3SecretKey"`
	DSN                 string `json:"dsn"`
	DBHost              string `json:"dbHost"`
	DBPort              int    `json:"dbPort"`
	DBUser              string `json:"dbUser"`
	DBPassword          string `json:"dbPassword"`
	DBName              string `json:"dbName"`
	AdminEmail          string `json:"adminEmail"`
	AdminPassword       string `json:"adminPassword"`
	SendGridAPIKey      string `json:"sendGridAPIKey"`
	SendGridSenderEmail string `json:"sendGridSenderEmail"`
	SendGridSenderName  string `json:"sendGridSenderName"`
}

AppConfig structure for environment-based configurations.

var CFG AppConfig

CFG is the global configuration instance populated by LoadConfiguration.

Jump to

Keyboard shortcuts

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