Ajout wazuh

This commit is contained in:
2025-04-17 11:52:47 +02:00
parent 4cafa6f784
commit 10e326b4b1
9 changed files with 172 additions and 0 deletions

View File

@ -0,0 +1,20 @@
package config
import (
"github.com/caarlos0/env/v11"
"log"
)
type Config struct {
BaseURL string `env:"WAZUH_MANAGER_BASE_URL,required,notEmpty"`
}
func NewConfig() (*Config, error) {
cfg := &Config{}
if err := env.Parse(cfg); err != nil {
log.Print(err)
return nil, err
}
return cfg, nil
}