Documentation ¶
Index ¶
- Variables
- func AlignRHCSSourceVersion(dir string) error
- func AssertWaitPollNoErr(e error, msg string)
- func AssertWaitPollWithErr(e error, msg string)
- func BoolPointer(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 CopyStringMap(originalMap m) m
- func CreateFileWithContent(fileAbsPath string, content interface{}) (string, error)
- func CreatePEMCertificate() (string, error)
- func CreateTempFileWithContent(fileContent string) (string, error)
- func CreateTempFileWithPrefixAndContent(prefix string, fileContent string) (string, error)
- func DeleteFile(filename string) error
- func Dig(object interface{}, keys []interface{}) interface{}
- func DigArray(object interface{}, keys ...interface{}) []interface{}
- func DigArrayToInt(object interface{}, keys ...interface{}) []int
- func DigArrayToString(object interface{}, keys ...interface{}) []string
- func DigBool(object interface{}, keys ...interface{}) bool
- func DigInt(object interface{}, keys ...interface{}) int
- func DigMapToString(object interface{}, keys ...interface{}) map[string]string
- 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 ExpectTFErrorContains(err error, substring string)
- func Float64Pointer(f float64) *float64
- func GenerateClusterName(profileName string) string
- func GenerateRandomName(prefix string, n int) string
- func GenerateRandomPassword(length int) string
- func GenerateRandomString(n int) string
- func GenerateRandomStringWithSymbols(length int) string
- func GetClusterAdminPassword() (string, error)
- func GetMajorVersion(rawVersion string) string
- func GetProfile(profileName string, profilesDir string) (*profile, error)
- func GetRegistries(ports ...int) (regs []string)
- func GetRegistry(port int) string
- func GetTFErrorMessage(err error) string
- func IntPointer(i int) *int
- func IntSlicePointer(f []int) *[]int
- func IsFileExists(filePath string) (bool, 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 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 ModuleSourceAlignment(manifestsFilePath string, source string, sourceLocal string, version string) error
- func NeedFiltered(filterList []string, key string) bool
- func NegateBoolToString(value bool) string
- func NewRand() *rand.Rand
- func NewTuningConfigSpecProfileData(vmDirtyRatio int) string
- func Parse(data []byte) map[string]interface{}
- func ParseProfiles(profilesDir string) (map[string]*profile, error)
- func ParseStringToMap(input string) (map[string]string, error)
- func Pointer(f interface{}) *interface{}
- func RHCSSourceAlignment(manifestsFilePath string, rhcsSource string, rhcsVersion string) error
- func RandomInt(max int) int
- func ReadFile(absPath string) (string, error)
- func ReplaceRegex(filePath string, regexP regexp.Regexp, replaceString string) error
- func Rstrip(st string, substring string) string
- func RunCMD(cmd string) (stdout string, stderr string, err error)
- func ScanManifestsDir(dir string) ([]string, error)
- func StartsWith(st string, substring string) (flag bool)
- func StringMapPointer(f map[string]string) *map[string]string
- func StringPointer(s string) *string
- func StringSlicePointer(f []string) *[]string
- func Strip(st string, substring string) string
- func Subfix(length int) string
- type IAMPolicy
- type IAMPolicyStatement
- type TuningConfigSpecProfile
- type TuningConfigSpecRecommend
- type TuningConfigSpecRoot
Constants ¶
This section is empty.
Variables ¶
var EmptyStringPointer = StringPointer(emptyStringValue)
var EmptyStringSlicePointer = StringSlicePointer(emptyStringSliceValue)
Functions ¶
func AlignRHCSSourceVersion ¶ added in v1.5.1
func AssertWaitPollNoErr ¶ added in v1.6.3
func AssertWaitPollWithErr ¶ added in v1.6.3
func BoolPointer ¶ added in v1.5.1
Return a bool pointer of the input bool value
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 CreateFileWithContent ¶ added in v1.6.4
Write string to a file
func CreatePEMCertificate ¶ added in v1.6.5
Create a PEM Certificate Code taken from https://shaneutt.com/blog/golang-ca-and-signed-cert-go/
func CreateTempFileWithContent ¶ added in v1.6.4
func CreateTempFileWithPrefixAndContent ¶ added in v1.6.4
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 DigArrayToInt ¶ added in v1.6.3
func DigArrayToInt(object interface{}, keys ...interface{}) []int
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 DigMapToString ¶ added in v1.6.3
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 ExpectTFErrorContains ¶ added in v1.6.3
func Float64Pointer ¶ added in v1.5.1
func GenerateClusterName ¶ added in v1.4.0
func GenerateRandomName ¶ added in v1.6.3
func GenerateRandomPassword ¶ added in v1.6.3
func GenerateRandomString ¶ added in v1.6.3
Generate random string
func GenerateRandomStringWithSymbols ¶ added in v1.5.0
func GetClusterAdminPassword ¶ added in v1.5.0
func GetMajorVersion ¶ added in v1.6.5
func GetProfile ¶ added in v1.4.0
func GetRegistries ¶ added in v1.6.5
func GetRegistry ¶ added in v1.6.5
func GetTFErrorMessage ¶ added in v1.6.3
func IntPointer ¶ added in v1.5.1
Return a pointer of the input int value
func IntSlicePointer ¶ added in v1.6.3
func IsFileExists ¶ added in v1.6.3
func JoinStringWithArray ¶ added in v1.5.0
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 ModuleSourceAlignment ¶ added in v1.6.3
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 NewTuningConfigSpecProfileData ¶ added in v1.6.4
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 RHCSSourceAlignment ¶ added in v1.5.1
func ReplaceRegex ¶ added in v1.5.1
func ScanManifestsDir ¶ added in v1.5.1
func StartsWith ¶ added in v1.3.0
StartsWith return bool whether st start with substring
func StringMapPointer ¶ added in v1.6.3
func StringPointer ¶ added in v1.5.1
Return a string pointer of the input string value
func StringSlicePointer ¶ added in v1.6.3
Types ¶
type IAMPolicy ¶ added in v1.6.3
type IAMPolicy struct { Version string Statement []IAMPolicyStatement }
func GetRoleAttachedPolicies ¶ added in v1.6.3
type IAMPolicyStatement ¶ added in v1.6.3
type IAMPolicyStatement struct { Effect string Action interface{} Resource interface{} }
type TuningConfigSpecProfile ¶ added in v1.6.4
type TuningConfigSpecRecommend ¶ added in v1.6.4
type TuningConfigSpecRoot ¶ added in v1.6.4
type TuningConfigSpecRoot struct { Profile []TuningConfigSpecProfile `json:"profile,omitempty" yaml:"profile,omitempty"` Recommend []TuningConfigSpecRecommend `json:"recommend,omitempty" yaml:"recommend,omitempty"` }
func NewTuningConfigSpecRootStub ¶ added in v1.6.4
func NewTuningConfigSpecRootStub(tcName string, vmDirtyRatio int, priority int) TuningConfigSpecRoot