refactor: mover .go de tipos Go a functions/{domain}/ para compilación unificada
Los archivos .go de tipos ahora viven junto a las funciones en functions/{domain}/
(mismo paquete Go), resolviendo errores de compilación por tipos no encontrados
(Option, Pair, Result, etc.). Los .md de metadata permanecen en types/{domain}/
con file_path actualizado a functions/. Se elimina types.go duplicado de infra.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package cybersecurity
|
||||
|
||||
// ThreatResult is a sum type for SQL injection detection results.
|
||||
type ThreatResult interface{ threatResult() }
|
||||
|
||||
// Clean indicates no threat was detected.
|
||||
type Clean struct{}
|
||||
|
||||
// Suspicious indicates a possible threat with a reason.
|
||||
type Suspicious struct {
|
||||
Reason string
|
||||
}
|
||||
|
||||
// Malicious indicates a confirmed threat pattern.
|
||||
type Malicious struct {
|
||||
Pattern string
|
||||
}
|
||||
|
||||
func (Clean) threatResult() {}
|
||||
func (Suspicious) threatResult() {}
|
||||
func (Malicious) threatResult() {}
|
||||
Reference in New Issue
Block a user