func DecryptedAppDepData(data *types.AppDep) (map[string]interface{}, error) { // decrypt Data decryptedBytes := crypto.Decrypt([]byte(data.EncryptedData)) dataMap := map[string]interface{}{} // Unmarshal JSON return dataMap, json.Unmarshal(decryptedBytes, &dataMap) }
func DecryptDependerEnvData(data *types.DependerEnvData) error { // decrypt Data to DataMap // decrypt Data decryptedBytes := crypto.Decrypt([]byte(data.EncryptedData)) data.DataMap = map[string]interface{}{} // Unmarshal JSON to DataMap if err := json.Unmarshal(decryptedBytes, &data.DataMap); err != nil { return err } return nil }