Documentation
¶
Index ¶
- func AddToKnownHost(pemFilePath, publicIp, username string) error
- func Contains(mapSet map[string]struct{}, item string) bool
- func CreateFolder(filePath string) error
- func CreateFolderIfNotExist(filePath string) error
- func CreateUniqIdBaseOnUnixTime() string
- func DownloadFile(client *ssh.Client, toFilePath string, fromFilePath string) error
- func DurationString(from time.Time) string
- func ExistCheck(path string) bool
- func FirstRuneToLower(s string) string
- func GenerateSSHKeyPair(bits int, privKeyPath, pubKeyPath string) error
- func GetClient(publicIp, port, username, privateKeyName string) (*ssh.Client, error)
- func GetFirstPart(input, delim string) string
- func InlineCmd(cmdStr string) error
- func InlineCmdAsync(cmdStr string) error
- func InterfaceToString(value interface{}) string
- func JoinRootPathWith(path string) string
- func NilSafeStr(o *string) string
- func PrintJsonPretty(v interface{})
- func ReadCSV(filename string) (*[][]string, error)
- func ReadToString(path string) (string, error)
- func ReplaceAtIndex(from string, newValue string, delim string, index int) (string, error)
- func RootPath() string
- func Script(scriptPath string, envs []string, args ...string) error
- func SliceToMap(slice []string) map[string]struct{}
- func StructToMap(obj interface{}) map[string]interface{}
- func VerifyHost(host string, remote net.Addr, key ssh.PublicKey) error
- func WritePropertiesFile(filePath string, properties map[string]interface{}, emptyOmit bool) error
- type Worker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddToKnownHost ¶
func CreateFolder ¶
func CreateFolderIfNotExist ¶
func CreateUniqIdBaseOnUnixTime ¶
func CreateUniqIdBaseOnUnixTime() string
func DownloadFile ¶
func DurationString ¶
func ExistCheck ¶
func FirstRuneToLower ¶
func GenerateSSHKeyPair ¶
GenerateSSHKeyPair generates an RSA SSH key pair of the specified bits.
func GetFirstPart ¶
func InlineCmdAsync ¶
func InterfaceToString ¶
func InterfaceToString(value interface{}) string
func JoinRootPathWith ¶
func NilSafeStr ¶ added in v0.2.2
func PrintJsonPretty ¶
func PrintJsonPretty(v interface{})
func ReadToString ¶
func ReplaceAtIndex ¶
replaceAtIndex replaces the value at the specified index in the given from string.
func SliceToMap ¶
func StructToMap ¶
func StructToMap(obj interface{}) map[string]interface{}
Types ¶
Click to show internal directories.
Click to hide internal directories.