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 Zitadel ZitadelConfig `mapstructure:"zitadel"` Env string `mapstructure:"env"` JwtSecretKey string `mapstructure:"jwt_secret_key"` TimeZone string `mapstructure:"timezone"` }
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"` }
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) 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.
type ZitadelConfig ¶
type ZitadelConfig struct { Domain string `mapstructure:"domain"` Port uint8 `mapstructure:"port"` KeyPath string `mapstructure:"key_path"` }
ZitadelConfig holds the configuration for Zitadel
Click to show internal directories.
Click to hide internal directories.