Revert "feature: added offline support for infisical export"

This reverts commit 88a4fb84e6.
This commit is contained in:
Sheen Capadngan
2024-06-11 00:52:59 +08:00
parent 6c252b4bfb
commit a1b41ca454
3 changed files with 43 additions and 73 deletions
-18
View File
@@ -426,24 +426,6 @@ func getSecretsByKeys(secrets []models.SingleEnvironmentVariable) map[string]mod
return secretMapByName
}
func GetBackupSecretsIfDisconnected(workspaceId string, environment string, encryptionKey []byte) ([]models.SingleEnvironmentVariable) {
isConnected := CheckIsConnectedToInfisicalAPI()
if !isConnected {
secrets, err := ReadBackupSecrets(workspaceId, environment, encryptionKey)
if err != nil {
HandleError(err)
}
if len(secrets) > 0 {
PrintWarning("Unable to fetch latest secret(s) due to connection error, serving secrets from last successful fetch. For more info, run with --debug")
}
return secrets
}
return nil
}
func ExpandSecrets(secrets []models.SingleEnvironmentVariable, auth models.ExpandSecretsAuthentication, projectConfigPathDir string) []models.SingleEnvironmentVariable {
expandedSecs := make(map[string]string)
interpolatedSecs := make(map[string]string)