29 lines
674 B
Go
29 lines
674 B
Go
package main
|
|
|
|
import (
|
|
"os"
|
|
|
|
"git.secnex.io/secnex/api-gateway/config"
|
|
"git.secnex.io/secnex/api-gateway/server"
|
|
"git.secnex.io/secnex/masterlog"
|
|
)
|
|
|
|
func main() {
|
|
masterlog.SetLevel(masterlog.LevelDebug)
|
|
masterlog.AddEncoder(&masterlog.JSONEncoder{})
|
|
pseudonymizer := masterlog.NewPseudonymizerFromString("your-secret-key")
|
|
masterlog.SetPseudonymizer(pseudonymizer)
|
|
masterlog.AddSensitiveFields("user_id", "email", "ip")
|
|
|
|
cfg, err := config.NewFile("../gateway.yaml")
|
|
if err != nil {
|
|
masterlog.Error("Failed to load config", map[string]interface{}{
|
|
"error": err,
|
|
})
|
|
os.Exit(1)
|
|
}
|
|
|
|
gateway := server.NewGateway(cfg.GetConfiguration())
|
|
gateway.Start()
|
|
}
|