feat: add Go SSH config management functions and type
7 funciones Go del dominio infra para gestion programatica de ~/.ssh/config: ssh_config_parse (parser de bloques Host/Match), ssh_config_read (lectura del archivo), ssh_config_find (busqueda por host), ssh_config_add_entry y ssh_config_remove_entry (CRUD), ssh_config_render (serializacion a texto), ssh_config_write (escritura atomica). Incluye tipo SshConfigEntry (product type) y tests unitarios del parser.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
---
|
||||
name: ssh_config_entry
|
||||
lang: go
|
||||
domain: infra
|
||||
version: "1.0.0"
|
||||
algebraic: product
|
||||
definition: |
|
||||
type SSHConfigEntry struct {
|
||||
Alias string
|
||||
HostName string
|
||||
User string
|
||||
Port int
|
||||
IdentityFile string
|
||||
Options map[string]string
|
||||
}
|
||||
description: "Bloque Host de ~/.ssh/config. Contiene alias, hostname, usuario, puerto, clave y opciones extra."
|
||||
tags: [ssh, config, remote, infra]
|
||||
uses_types: []
|
||||
file_path: "functions/infra/ssh_config_entry.go"
|
||||
---
|
||||
|
||||
## Notas
|
||||
|
||||
Tipo producto — modela un bloque `Host` del archivo `~/.ssh/config`. Port=0 significa que no se especifica (el SSH client usa 22 por defecto). Options contiene pares clave-valor para directivas SSH adicionales como ForwardAgent, ProxyJump, ServerAliveInterval, etc.
|
||||
|
||||
Incluye metodo `ToSSHConn()` para convertir a `SSHConn` y poder usar las funciones SSH operativas del registry (ssh_exec, ssh_check, etc.).
|
||||
Reference in New Issue
Block a user