Documentation
¶
Overview ¶
Package config implements the config interface for the viper config backend.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Databases []Database `mapstructure:"databases"` Zitadel ZitadelConfig `mapstructure:"zitadel"` Env string `mapstructure:"env"` TimeZone string `mapstructure:"timezone"` UploadsPath string `mapstructure:"uploads_path"` }
Config represents the overall configuration structure
type Database ¶
type Database struct { Host string `mapstructure:"host"` Port int `mapstructure:"port"` Username string `mapstructure:"username"` Password string `mapstructure:"password"` Type string `mapstructure:"type"` Name string `mapstructure:"name"` Database string `mapstructure:"database"` Tables map[string]string `mapstructure:"tables"` }
Database holds the configuration for database connections
type ViperConfig ¶
type ViperConfig struct {
// contains filtered or unexported fields
}
ViperConfig is the viper config backend.
func NewViperConfig ¶
func NewViperConfig(logger logger.ILogger) *ViperConfig
NewViperConfig creates a new viper config backend.
func (*ViperConfig) BindAllEnv ¶
func (vc *ViperConfig) BindAllEnv() (err error)
func (*ViperConfig) GetConfig ¶
func (vc *ViperConfig) GetConfig() (Config, error)
GetConfig reads the config file and unmarshals it into the config struct.
func (*ViperConfig) ReadFile ¶
func (vc *ViperConfig) ReadFile(path string)
ReadFile reads the config file from the path.
Click to show internal directories.
Click to hide internal directories.