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,24 @@
|
||||
package cybersecurity
|
||||
|
||||
// PortResult is a sum type for TCP port scan results.
|
||||
type PortResult interface{ portResult() }
|
||||
|
||||
// PortOpen indicates the port accepted a connection.
|
||||
type PortOpen struct {
|
||||
Port int
|
||||
Banner string
|
||||
}
|
||||
|
||||
// PortClosed indicates the port refused the connection.
|
||||
type PortClosed struct {
|
||||
Port int
|
||||
}
|
||||
|
||||
// PortFiltered indicates the port did not respond (timeout).
|
||||
type PortFiltered struct {
|
||||
Port int
|
||||
}
|
||||
|
||||
func (PortOpen) portResult() {}
|
||||
func (PortClosed) portResult() {}
|
||||
func (PortFiltered) portResult() {}
|
||||
Reference in New Issue
Block a user