Toggle
This commit is contained in:
+11
-10
@@ -24,16 +24,17 @@ var (
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
Server Server `mapstructure:"server"`
|
||||
Database Database `mapstructure:"postgresql"`
|
||||
Jwt Jwt `mapstructure:"jwt"`
|
||||
OSSConfig OSSConfig `mapstructure:"oss"`
|
||||
Midtrans Midtrans `mapstructure:"midtrans"`
|
||||
Brevo Brevo `mapstructure:"brevo"`
|
||||
Email Email `mapstructure:"email"`
|
||||
Withdraw Withdraw `mapstructure:"withdrawal"`
|
||||
Discovery Discovery `mapstructure:"discovery"`
|
||||
Order Order `mapstructure:"order"`
|
||||
Server Server `mapstructure:"server"`
|
||||
Database Database `mapstructure:"postgresql"`
|
||||
Jwt Jwt `mapstructure:"jwt"`
|
||||
OSSConfig OSSConfig `mapstructure:"oss"`
|
||||
Midtrans Midtrans `mapstructure:"midtrans"`
|
||||
Brevo Brevo `mapstructure:"brevo"`
|
||||
Email Email `mapstructure:"email"`
|
||||
Withdraw Withdraw `mapstructure:"withdrawal"`
|
||||
Discovery Discovery `mapstructure:"discovery"`
|
||||
Order Order `mapstructure:"order"`
|
||||
FeatureToggle FeatureToggle `mapstructure:"feature_toggle"`
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package config
|
||||
|
||||
type FeatureToggle struct {
|
||||
LoggerEnabled bool `mapstructure:"logger_enabled"`
|
||||
}
|
||||
|
||||
func (f *FeatureToggle) IsLoggerEnabled() bool {
|
||||
return f.LoggerEnabled
|
||||
}
|
||||
Reference in New Issue
Block a user