Documentation ¶
Index ¶
- func EvalPass(pass string) (passEncodedAlgo, evaluated string)
- func IsDirectServer(server string) bool
- func ParseProps(fields []string) map[string][]string
- func Split2BySeps(s string, seps ...string) (s1, s2, sep string)
- func SplitHostPort(addr string) (string, string)
- func SubstituteProps(s string, props map[string][]string) string
- type Host
- type ServerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsDirectServer ¶
IsDirectServer tells that the server is a direct server address like user:pass@host:port.
func ParseProps ¶
func Split2BySeps ¶
func SplitHostPort ¶
Types ¶
type Host ¶
type Host struct { ID string Addr string Port string User string Password string // empty when using public key Props map[string][]string Raw string // register the raw template line like `user:pass@host:port` }
Host represents the structure of remote host information for ssh.
func ParseHostFile ¶
type ServerConfig ¶
type ServerConfig struct { Props map[string][]string User string Pass string Addr string Port string }
func ParseDirectServer ¶
func ParseDirectServer(server string) (ServerConfig, bool)
ParseDirectServer parses a direct server address.
func (*ServerConfig) GetProp ¶
func (c *ServerConfig) GetProp(k string) string
Click to show internal directories.
Click to hide internal directories.