init: Initial commit

This commit is contained in:
Björn Benouarets
2026-01-21 06:36:38 +01:00
commit 346100feb6
27 changed files with 1126 additions and 0 deletions

13
app/database/exec.go Normal file
View File

@@ -0,0 +1,13 @@
package database
import "git.secnex.io/secnex/masterlog"
func Execute(query string) error {
masterlog.Debug("Executing database query", map[string]interface{}{"query": query})
if err := DB.Exec(query).Error; err != nil {
masterlog.Debug("Database query execution failed", map[string]interface{}{"error": err.Error(), "query": query})
return err
}
masterlog.Debug("Database query executed successfully", map[string]interface{}{"query": query})
return nil
}