Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Port string // The port to listen on
Host string // The host to listen on
Yaml string // The path to the YAML config file
YamlConfig YamlConfig // The YAML config
}
The config struct
type SSHConfiguration ¶
type SSHConfiguration struct {
Servers []SSHServerData `yaml:"servers"`
}
The SSH configuration struct
type SSHServerData ¶
type SSHServerData struct {
Name string `yaml:"name"`
Host string `yaml:"host"`
User string `yaml:"user"`
Password string `yaml:"password"`
PrivateKey string `yaml:"path_to_key"`
Passphrase string `yaml:"passphrase"`
// Optional
Port *uint `yaml:"port"`
KeepAlive *bool `yaml:"keep_alive"`
Retry *bool `yaml:"retry"`
RetryCount *int `yaml:"retry_count"`
RetryInterval *int `yaml:"retry_interval"`
Timeout *int `yaml:"timeout"`
}
The SSH server struct
type WebhookAuthData ¶
type WebhookAuthData struct {
IPWhitelist []string `yaml:"ip_whitelist"`
IPBlacklist []string `yaml:"ip_blacklist"`
IPFromHeader string `yaml:"ip_from_header"`
Headers map[string]string `yaml:"headers"`
}
The auth struct for the webhook
type WebhookData ¶
type WebhookData struct {
Path string `yaml:"path"`
SSHName string `yaml:"ssh_name"`
WhiteCMD []string `yaml:"cmd_whitelist"`
BlackCMD []string `yaml:"cmd_blacklist"`
Auth WebhookAuthData `yaml:"auth"`
}
The webhook struct
type YamlConfig ¶
type YamlConfig struct {
SSH SSHConfiguration `yaml:"ssh"`
Webhooks []WebhookData `yaml:"webhooks"`
}
The YAML config struct
func ParseConfig ¶
func ParseConfig(yamlByte []byte) (*YamlConfig, error)
Click to show internal directories.
Click to hide internal directories.