Documentation ¶
Index ¶
- func BoolPoint(b bool) *bool
- func Contains(arry []string, val string) (index int, flag bool)
- func ConvertMapToJSONString(inputMap map[string]interface{}) string
- func ConvertStringToInt(mystring string) int
- func ConvertStructToMap(s interface{}) map[string]interface{}
- func ConvertStructToString(s interface{}) string
- func DeleteFile(filename string) error
- func Dig(object interface{}, keys []interface{}) interface{}
- func DigArray(object interface{}, keys ...interface{}) []interface{}
- func DigArrayToString(object interface{}, keys ...interface{}) []string
- func DigBool(object interface{}, keys ...interface{}) bool
- func DigInt(object interface{}, keys ...interface{}) int
- func DigObject(object interface{}, keys ...interface{}) interface{}
- func DigString(object interface{}, keys ...interface{}) string
- func DigStringArray(object interface{}, keys ...interface{}) []string
- func EndsWith(st string, substring string) (flag bool)
- func GenerateClusterName(profileName string) string
- func GenerateRandomStringWithSymbols(length int) string
- func GetClusterAdminPassword() string
- func GetProfile(profileName string, fileName string) *profile
- func GetResource(manifestDir string, resourceType string, resoureName string) (interface{}, error)
- func IniConnection(filename string) (*ini.File, error)
- func IsInMap(inputMap map[string]interface{}, key string) bool
- func IsSorted(arry []string, mode string) (flag bool)
- func Join(s ...string) string
- func JoinStringWithArray(s string, strArray []string) []string
- func Lstrip(st string, substring string) string
- func MakeSureDefaultMachinePoolImported() (imported bool, err error)
- func MapStructure(m map[string]interface{}, i interface{}) error
- func Max(a int, b int) int
- func MergeMaps(map1, map2 m) m
- func Min(a int, b int) int
- func NeedFiltered(filterList []string, key string) bool
- func NegateBoolToString(value bool) string
- func NewRand() *rand.Rand
- func Parse(data []byte) map[string]interface{}
- func ParseProfiles(fileName string) map[string]*profile
- func ParseStringToMap(input string) (map[string]string, error)
- func Rstrip(st string, substring string) string
- func RunCMD(cmd string) (stdout string, stderr string, err error)
- func StartsWith(st string, substring string) (flag bool)
- func Strip(st string, substring string) string
- func Subfix(length int) string
- func TouchFile(filename string) (*os.File, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶ added in v1.3.0
Contains will return bool balue that whether the arry contains string val
func ConvertMapToJSONString ¶ added in v1.3.0
ConvertMapToJSONString converts the map to a json string.
func ConvertStringToInt ¶ added in v1.3.0
func ConvertStructToMap ¶ added in v1.3.0
func ConvertStructToMap(s interface{}) map[string]interface{}
func ConvertStructToString ¶ added in v1.3.0
func ConvertStructToString(s interface{}) string
func DigArray ¶ added in v1.3.0
func DigArray(object interface{}, keys ...interface{}) []interface{}
DigArray tries to find an array inside the given object with the given path, and returns its value. If there is no attribute with the given path then the test will be aborted with an error.
func DigArrayToString ¶ added in v1.4.0
func DigArrayToString(object interface{}, keys ...interface{}) []string
func DigInt ¶ added in v1.3.0
func DigInt(object interface{}, keys ...interface{}) int
DigInt tries to find an attribute inside the given object with the given path, and returns its value, assuming that it is an integer. If there is no attribute with the given path then the test will be aborted with an error.
func DigObject ¶ added in v1.3.0
func DigObject(object interface{}, keys ...interface{}) interface{}
func DigString ¶ added in v1.3.0
func DigString(object interface{}, keys ...interface{}) string
If there is no attribute with the given path then the return value will be an empty string.
func DigStringArray ¶ added in v1.3.0
func DigStringArray(object interface{}, keys ...interface{}) []string
DigStringArray tries to find an array inside the given object with the given path, and returns its value. If there is no attribute with the given path then the test will be aborted with an error.
func EndsWith ¶ added in v1.3.0
EndsWith will return the bool value that whether the st is end with substring
func GenerateClusterName ¶ added in v1.4.0
func GenerateRandomStringWithSymbols ¶ added in v1.5.0
func GetClusterAdminPassword ¶ added in v1.5.0
func GetClusterAdminPassword() string
func GetProfile ¶ added in v1.4.0
func GetResource ¶ added in v1.5.0
Get the resoources state from the terraform.tfstate file by resource type and name
func IniConnection ¶ added in v1.5.0
IniConnection builds the connection of the ini file
func JoinStringWithArray ¶ added in v1.5.0
func MakeSureDefaultMachinePoolImported ¶ added in v1.5.0
Make sure the default machinepool imported by checking if there is terraform.tfstate in DefaultMachinePoolDir
func MapStructure ¶ added in v1.3.0
MapStructure will map the map to the address of the structre *i
func MergeMaps ¶ added in v1.5.0
func MergeMaps(map1, map2 m) m
combine two strings maps to one, if key already exists - do nothing
func NeedFiltered ¶ added in v1.4.0
NeedFiltered will return the attribute that should be filtered filterList should be array with regex like ["excluded\..+","excluded_[\s\S]+"]
func NegateBoolToString ¶ added in v1.3.0
NegateBoolToString reverts the boolean to its oppositely value as a string.
func Parse ¶ added in v1.3.0
Parse parses the given JSON data and returns a map of strings containing the result.
func ParseProfiles ¶ added in v1.4.0
func ParseStringToMap ¶ added in v1.5.0
func StartsWith ¶ added in v1.3.0
StartsWith return bool whether st start with substring
Types ¶
This section is empty.