feat: build wahrwelt A/D toolkit
This commit is contained in:
1 parent
303438d206
commit
653924d8c6
564 files changed
+36310
-49998
No files matched your search
@@ -0,0 +1,23 @@
|
||||
package client
|
||||
|
||||
import (
|
||||
"github.com/sirupsen/logrus"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
func MustUnmarshalConfig() *Config {
|
||||
cfg := new(Config)
|
||||
if err := viper.Unmarshal(&cfg); err != nil {
|
||||
logrus.Fatalf("Не удалось разобрать структуру конфигурации: %v", err)
|
||||
}
|
||||
return cfg
|
||||
}
|
||||
|
||||
type Config struct {
|
||||
Host string `mapstructure:"host"`
|
||||
MetricsHost string `mapstructure:"metrics_host"`
|
||||
ExploitDir string `mapstructure:"exploit_dir"`
|
||||
GrpcAuthKey string `mapstructure:"grpc_auth_key"`
|
||||
UseTLS bool `mapstructure:"use_tls"`
|
||||
AllowBroadcastCommands bool `mapstructure:"allow_broadcast_commands"`
|
||||
}
|
||||
Reference in new issue
Block a user