feat(admin): очистка всех сканов — POST /api/admin/purge-scans + UI (NETTOPO_RESET_DB_SECRET)
Made-with: Cursor
This commit is contained in:
@@ -1,14 +1,18 @@
|
||||
package config
|
||||
|
||||
import "os"
|
||||
import (
|
||||
"os"
|
||||
"strings"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
HTTPAddr string
|
||||
DBDSN string
|
||||
StoreBackend string
|
||||
RunMigrations bool
|
||||
SNMPEnabled bool
|
||||
SNMPCommunity string
|
||||
HTTPAddr string
|
||||
DBDSN string
|
||||
StoreBackend string
|
||||
RunMigrations bool
|
||||
SNMPEnabled bool
|
||||
SNMPCommunity string
|
||||
ResetDBSecret string // NETTOPO_RESET_DB_SECRET — секрет для POST /api/admin/purge-scans
|
||||
}
|
||||
|
||||
func FromEnv() Config {
|
||||
@@ -47,5 +51,6 @@ func FromEnv() Config {
|
||||
RunMigrations: runMigrations,
|
||||
SNMPEnabled: snmpEnabled,
|
||||
SNMPCommunity: snmpCommunity,
|
||||
ResetDBSecret: strings.TrimSpace(os.Getenv("NETTOPO_RESET_DB_SECRET")),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user