Documentation
¶
Index ¶
- Constants
- func CertificateDownloader(url string) (string, error)
- func CheckFileFolderExists(folderFilePath string) bool
- func CheckIfEmpty(values ...interface{}) bool
- func CheckUrlExists(url string) (bool, error)
- func CreateTempFile(data string) (string, error)
- func DecodeBase64String(base64Data string) (string, error)
- func EncodeToBase64(input []byte) string
- func ExecCommand(commandName, stdinInput string, args ...string) (string, error)
- func FetchEncryptionCertificate(version, encryptionCertificate string) (string, error)
- func GenerateSha256(input string) string
- func GenerateTgzBase64(folderFilesPath []string) (string, error)
- func GetDataFromLatestVersion(jsonData, version string) (string, string, error)
- func GetEncryptPassWorkload(encryptedData string) (string, string)
- func GetOpenSSLPath() string
- func IsJSON(str string) bool
- func KeyValueInjector(contract, key, value string) (string, error)
- func ListFoldersAndFiles(folderPath string) ([]string, error)
- func MapToYaml(m map[string]interface{}) (string, error)
- func ReadDataFromFile(filePath string) (string, error)
- func RemoveTempFile(filePath string) error
- func VerifyContractWithSchema(contract, version string) error
- func VerifyNetworkSchema(Network_Config_File string) error
- func YamlToJson(str string) (string, error)
- type Contract
Constants ¶
const ( TempFolderNamePrefix = "hpvs-" HyperProtectOsHpvs = "hpvs" HyperProtectOsHpcrRhvs = "hpcr-rhvs" )
Variables ¶
This section is empty.
Functions ¶
func CertificateDownloader ¶
CertificateDownloader - function to download encryption certificate
func CheckFileFolderExists ¶
CheckFileFolderExists - function to check if file or folder exists
func CheckIfEmpty ¶
func CheckIfEmpty(values ...interface{}) bool
CheckIfEmpty - function to check if given arguments are not empty
func CheckUrlExists ¶
CheckUrlExists - function to check if URL exists or not
func CreateTempFile ¶
CreateTempFile - function to create temp file
func DecodeBase64String ¶
DecodeBase64String - function to decode base64 string
func EncodeToBase64 ¶
EncodeToBase64 - function to encode string as base64
func ExecCommand ¶
ExecCommand - function to run os commands
func FetchEncryptionCertificate ¶
FetchEncryptionCertificate - function to get encryption certificate
func GenerateSha256 ¶
GenerateSha256 - function to generate SHA256 of a string
func GenerateTgzBase64 ¶
GenerateTgzBase64 - function to generate tgz and return it as base64
func GetDataFromLatestVersion ¶
GetDataFromLatestVersion - function to get the value based on constraints
func GetEncryptPassWorkload ¶
GetEncryptPassWorkload - function to get encrypted password and encrypted workload from data
func GetOpenSSLPath ¶ added in v1.12.0
func GetOpenSSLPath() string
GetOpenSSLPath check if OPENSSL_BIN is set If set → returns its value If not set → defaults to "openssl"
func KeyValueInjector ¶
KeyValueInjector - function to inject key value pair in YAML
func ListFoldersAndFiles ¶
ListFoldersAndFiles - function to list files and folder under a folder
func ReadDataFromFile ¶
ReadDataFromFile - function to read data from file
func RemoveTempFile ¶
RemoveTempFile - function to remove temp file
func VerifyContractWithSchema ¶
VerifyContractWithSchema - function to verify if contract matches schema
func VerifyNetworkSchema ¶ added in v1.13.3
VerifyNetworkSchema - function to validates a network-config YAML file
func YamlToJson ¶
YamlToJson - function to convert YAML to JSON