Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { App AppConfig `envPrefix:"APP_"` Server ServerConfig `envPrefix:"SERVER_"` Db db.DbConfig `envPrefix:"DB_"` Redis redis.RedisConfig `envPrefix:"REDIS_"` Auth auth.AuthConfig `envPrefix:"AUTH_"` }
type ConfigService ¶
type ConfigService struct {
// contains filtered or unexported fields
}
func NewConfigService ¶
func NewConfigService(logger logr.Logger) (*ConfigService, error)
func (*ConfigService) Config ¶
func (configService *ConfigService) Config() *Config
type ConfigServicer ¶
type ConfigServicer interface {
Config() *Config
}
type Loader ¶
type Loader interface {
Load() error
}
Loader has a Load function that is called for each config struct.
type ServerConfig ¶
type ServerConfig struct { Host string `env:"HOST" envDefault:"0.0.0.0"` Port string `env:"PORT" envDefault:"4000"` }
func (ServerConfig) Validate ¶
func (serverConfig ServerConfig) Validate() error
Click to show internal directories.
Click to hide internal directories.