Documentation
¶
Index ¶
- Constants
- func FindSSHKey() (string, error)
- func NormalizeHost(host string) string
- func ParseHostPort(hostPort string) (host string, port int, err error)
- func ValidateContainerName(name string) error
- func ValidateDockerImage(image string) error
- func ValidateEnvironmentVariable(envVar string) error
- func ValidateHostname(hostname string) error
- func ValidatePortMapping(portMapping string) error
- func ValidateRestartPolicy(policy string) error
- func ValidateSSHKey(keyPath string) error
- func ValidateSynologyPath(path string) error
- func ValidateVolumeMapping(volumeMapping string) error
Constants ¶
const ( // DefaultSSHKeyName is the default SSH key filename DefaultSSHKeyName = "id_rsa" // DefaultSSHPort is the default SSH port DefaultSSHPort = 22 )
Variables ¶
This section is empty.
Functions ¶
func FindSSHKey ¶
FindSSHKey finds the first available SSH key in the user's .ssh directory
func NormalizeHost ¶
NormalizeHost normalizes a hostname by removing protocols and extra characters
func ParseHostPort ¶
ParseHostPort parses a host:port string and returns the host and port
func ValidateContainerName ¶
ValidateContainerName validates a Docker container name format
func ValidateDockerImage ¶
ValidateDockerImage validates a Docker image name format
func ValidateEnvironmentVariable ¶
ValidateEnvironmentVariable validates an environment variable (KEY=value format)
func ValidateHostname ¶
ValidateHostname validates a hostname or IP address format
func ValidatePortMapping ¶
ValidatePortMapping validates a port mapping string (host:container format)
func ValidateRestartPolicy ¶
ValidateRestartPolicy validates a Docker restart policy
func ValidateSSHKey ¶
ValidateSSHKey validates that an SSH key file exists and is parseable
func ValidateSynologyPath ¶
ValidateSynologyPath validates that a path is under a valid Synology volume
func ValidateVolumeMapping ¶
ValidateVolumeMapping validates a volume mapping string (host:container format)
Types ¶
This section is empty.