Documentation ¶
Index ¶
- func Download(url, path string) error
- func EcsdaPrivateKey()
- func EcsdaPublicKey()
- func EnsureSSHDir() error
- func EnvVarName()
- func Exec(sh string, args ...interface{}) error
- func ExecNoOutput(sh string, args ...interface{}) error
- func FileCopy(src string, dst string) error
- func FileExists(path string) bool
- func GET(url string, args ...interface{}) ([]byte, error)
- func GenerateSSHKeys(prefix string) (string, string, error)
- func GetBaseName(filename string) string
- func GetEnvOrDefault(names ...string) string
- func Greenf(msg string, args ...interface{}) string
- func GzipFile(path string) ([]byte, error)
- func IniToMap(path string) map[string]string
- func Interpolate(arg string, vars interface{}) string
- func InterpolateStrings(arg []string, vars interface{}) []string
- func IsSlice(arg interface{}) bool
- func IsTTY() bool
- func LightCyanf(msg string, args ...interface{}) string
- func LightGreenf(msg string, args ...interface{}) string
- func LookupFile()
- func MapToIni(Map map[string]string) string
- func PrivateKey()
- func PublicKey()
- func RandomString(length int) string
- func Redf(msg string, args ...interface{}) string
- func ReplaceAllInSlice(a []string, find string, replacement string) (replaced []string)
- func RsaPrivateKey()
- func RsaPublicKey()
- func RunSSHCommand(host, user, privateKeyFile, cmd string) ([]byte, error)
- func RunSSHScript(host, user, privateKeyFile, script string) ([]byte, error)
- func SSHKey()
- func SafeExec(sh string, args ...interface{}) (string, bool)
- func SafeRead(path string) string
- func ShortTimestamp() string
- func SplitAllInSlice(a []string, split string, index int) (replaced []string)
- func StructToIni(s interface{}) string
- func StructToMap(s interface{}) map[string]interface{}
- func ToGenericMap(m map[string]string) map[string]interface{}
- func ToString(i interface{}) string
- func ToStringMap(m map[string]interface{}) map[string]string
- func X509Cert()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EcsdaPrivateKey ¶
func EcsdaPrivateKey()
func EcsdaPublicKey ¶
func EcsdaPublicKey()
func EnsureSSHDir ¶ added in v0.9.9
func EnsureSSHDir() error
func EnvVarName ¶
func EnvVarName()
func ExecNoOutput ¶ added in v0.9.9
Exec runs the sh script and forwards stderr/stdout to the console
func FileExists ¶
func GetBaseName ¶
func GetEnvOrDefault ¶
func Interpolate ¶
func InterpolateStrings ¶
func LightCyanf ¶
func LightGreenf ¶
func LookupFile ¶
func LookupFile()
func PrivateKey ¶
func PrivateKey()
func RandomString ¶
RandString returns a random string consisting of the characters in randomChars, with the length customized by the parameter
func ReplaceAllInSlice ¶
ReplaceAllInSlice runs strings.Replace on all elements in a slice and returns the result
func RsaPrivateKey ¶
func RsaPrivateKey()
func RsaPublicKey ¶
func RsaPublicKey()
func RunSSHCommand ¶ added in v0.9.9
func RunSSHScript ¶ added in v0.9.9
func SafeExec ¶
SafeExec executes the sh script and returns the stdout and stderr, errors will result in a nil return only.
func ShortTimestamp ¶
func ShortTimestamp() string
ShortTimestamp returns a shortened timestamp using week of year + day of week to represent a day of the e.g. 1st of Jan on a Tuesday is 13
func SplitAllInSlice ¶
SplitAllInSlice runs strings.Split on all elements in a slice and returns the results at the given index
func StructToIni ¶
func StructToIni(s interface{}) string
StructToIni takes an object and serializes it's fields in INI format
func StructToMap ¶
func StructToMap(s interface{}) map[string]interface{}
StructToMap takes an object and returns all it's field in a map
func ToGenericMap ¶
func ToString ¶
func ToString(i interface{}) string
ToString takes an object and tries to convert it to a string
func ToStringMap ¶
Types ¶
This section is empty.