indexer support

This commit is contained in:
Sotirios Pupakis
2025-09-06 02:24:49 +02:00
parent 092c1a4080
commit 1dd8b1105e
9 changed files with 191 additions and 4 deletions

View File

@@ -15,6 +15,7 @@ var PORT string
var IP string
var SECRET string
var DB_NAME string
var DiscordWebhook string
func ConnectToDB() {
db, err := gorm.Open(sqlite.Open(DB_NAME), &gorm.Config{})
@@ -32,6 +33,7 @@ type Configuration struct {
IP string `yaml:"ip"`
Secret string `yaml:"secret"`
DB string `yaml:"db"`
DiscordWebhook string `yaml:"discordWebhook"`
}
func Load() {
@@ -52,4 +54,5 @@ file, err := os.ReadFile("config.yaml")
IP = configuration.IP
SECRET = configuration.Secret
DB_NAME = configuration.DB
DiscordWebhook = configuration.DiscordWebhook
}