config

package
v0.0.0-...-171d8e8 Latest Latest
Warning

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

Go to latest
Published: May 2, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitConfig

func InitConfig() error

Types

type Config

type Config struct {
	// fiber
	ServerPort        int    `env:"SERVER_PORT" envDefault:"5000"`
	ServerHost        string `env:"SERVER_HOST" envDefault:"0.0.0.0"`
	ServerReadTimeout int    `env:"SERVER_READ_TIMEOUT" envDefault:"5"`

	// codepod
	CPStorage int `env:"CP_STORAGE" envDefault:"5Gi"`

	// kubernetes
	Kubeconfig string `env:"KUBECONFIG"` // optional
	Namespace  string `env:"NAMESPACE" envDefault:"codepod"`

	// database
	DBHost     string `env:"DB_HOST"`
	DBUser     string `env:"DB_USER"`
	DBPassword string `env:"DB_PASSWORD,unset"`
	DBPort     int    `env:"DB_PORT"`
	DBName     string `env:"DB_NAME" envDefault:"codepod"`
	DBSSLMode  bool   `env:"DB_SSL_MODE" envDefault:"false"`

	// keycloak
	KCHost         string `env:"KC_HOST"`
	KCClientName   string `env:"KC_CLIENT_NAME"`
	KCClientSecret string `env:"KC_CLIENT_SECRET,unset"`
	KCRealm        string `env:"KC_REALM"`
}
var Cfg *Config

Jump to

Keyboard shortcuts

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