feat: Kamera/PII-Trigger differenziert + CE × Compliance FAQ

- HP059 Trigger: "DSFA erforderlich" → "zu pruefen" mit Entscheidungslogik
  (Edge-Processing ohne Speicherung/Personenerkennung = keine DSFA)
- 6 FAQ-Eintraege: Kamera-PII, zugekaufte Baugruppen, Herstellererklaerung,
  KI-Hochrisiko, CRA OTA-Updates, verkettete Produktionslinien
- GET /compliance-faq Endpoint mit Kategorie-Filter

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Benjamin Admin
2026-05-09 07:25:39 +02:00
parent 0fcb3ee488
commit 1502ac6d8f
4 changed files with 153 additions and 4 deletions
@@ -77,6 +77,26 @@ func (h *IACEHandler) GetComplianceTriggers(c *gin.Context) {
c.JSON(http.StatusOK, summary)
}
// GetComplianceFAQ handles GET /compliance-faq
// Returns CE × Compliance FAQ entries, optionally filtered by ?category=
func (h *IACEHandler) GetComplianceFAQ(c *gin.Context) {
category := c.Query("category")
all := iace.GetComplianceFAQ()
if category != "" {
var filtered []iace.ComplianceFAQEntry
for _, f := range all {
if f.Category == category {
filtered = append(filtered, f)
}
}
c.JSON(http.StatusOK, gin.H{"faq": filtered, "total": len(filtered)})
return
}
c.JSON(http.StatusOK, gin.H{"faq": all, "total": len(all)})
}
// firstOrEmpty returns the first element of a string slice or "".
func firstOrEmpty(ss []string) string {
if len(ss) > 0 {