Skip to content

PostgreSQL backup tool with Point-In-Time-Recovery and restore verification

REFACTOR (storages & notifiers): Rename inner folders with implementations to models

Rostislav Duginccbc6a8039c5
diff --git a/backend/internal/features/notifiers/model.go b/backend/internal/features/notifiers/model.go
index e3a18771..b0838857 100644
--- a/backend/internal/features/notifiers/model.go
+++ b/backend/internal/features/notifiers/model.go
@@ -3,9 +3,9 @@ package notifiers
import (
"errors"
"log/slog"
- "postgresus-backend/internal/features/notifiers/notifiers/email_notifier"
- telegram_notifier "postgresus-backend/internal/features/notifiers/notifiers/telegram"
- webhook_notifier "postgresus-backend/internal/features/notifiers/notifiers/webhook"
+ "postgresus-backend/internal/features/notifiers/models/email_notifier"
+ telegram_notifier "postgresus-backend/internal/features/notifiers/models/telegram"
+ webhook_notifier "postgresus-backend/internal/features/notifiers/models/webhook"
"github.com/google/uuid"
)
diff --git a/backend/internal/features/notifiers/notifiers/email_notifier/model.go b/backend/internal/features/notifiers/models/email_notifier/model.go
similarity index 100%
rename from backend/internal/features/notifiers/notifiers/email_notifier/model.go
rename to backend/internal/features/notifiers/models/email_notifier/model.go
diff --git a/backend/internal/features/notifiers/notifiers/telegram/model.go b/backend/internal/features/notifiers/models/telegram/model.go
similarity index 100%
rename from backend/internal/features/notifiers/notifiers/telegram/model.go
rename to backend/internal/features/notifiers/models/telegram/model.go
diff --git a/backend/internal/features/notifiers/notifiers/webhook/enums.go b/backend/internal/features/notifiers/models/webhook/enums.go
similarity index 100%
rename from backend/internal/features/notifiers/notifiers/webhook/enums.go
rename to backend/internal/features/notifiers/models/webhook/enums.go
diff --git a/backend/internal/features/notifiers/notifiers/webhook/model.go b/backend/internal/features/notifiers/models/webhook/model.go
similarity index 100%
rename from backend/internal/features/notifiers/notifiers/webhook/model.go
rename to backend/internal/features/notifiers/models/webhook/model.go
diff --git a/backend/internal/features/storages/controller_test.go b/backend/internal/features/storages/controller_test.go
index fce0b938..0b79034d 100644
--- a/backend/internal/features/storages/controller_test.go
+++ b/backend/internal/features/storages/controller_test.go
@@ -2,7 +2,7 @@ package storages
import (
"net/http"
- local_storage "postgresus-backend/internal/features/storages/storages/local"
+ local_storage "postgresus-backend/internal/features/storages/models/local"
"postgresus-backend/internal/features/users"
test_utils "postgresus-backend/internal/util/testing"
"testing"
diff --git a/backend/internal/features/storages/model.go b/backend/internal/features/storages/model.go
index d24326cb..17c207ff 100644
--- a/backend/internal/features/storages/model.go
+++ b/backend/internal/features/storages/model.go
@@ -4,8 +4,8 @@ import (
"errors"
"io"
"log/slog"
- local_storage "postgresus-backend/internal/features/storages/storages/local"
- s3_storage "postgresus-backend/internal/features/storages/storages/s3"
+ local_storage "postgresus-backend/internal/features/storages/models/local"
+ s3_storage "postgresus-backend/internal/features/storages/models/s3"
"github.com/google/uuid"
)
diff --git a/backend/internal/features/storages/model_test.go b/backend/internal/features/storages/model_test.go
index 534516e2..50b4afed 100644
--- a/backend/internal/features/storages/model_test.go
+++ b/backend/internal/features/storages/model_test.go
@@ -7,8 +7,8 @@ import (
"io"
"os"
"path/filepath"
- local_storage "postgresus-backend/internal/features/storages/storages/local"
- s3_storage "postgresus-backend/internal/features/storages/storages/s3"
+ local_storage "postgresus-backend/internal/features/storages/models/local"
+ s3_storage "postgresus-backend/internal/features/storages/models/s3"
"postgresus-backend/internal/util/logger"
"testing"
"time"
diff --git a/backend/internal/features/storages/storages/local/model.go b/backend/internal/features/storages/models/local/model.go
similarity index 100%
rename from backend/internal/features/storages/storages/local/model.go
rename to backend/internal/features/storages/models/local/model.go
diff --git a/backend/internal/features/storages/storages/s3/model.go b/backend/internal/features/storages/models/s3/model.go
similarity index 100%
rename from backend/internal/features/storages/storages/s3/model.go
rename to backend/internal/features/storages/models/s3/model.go
diff --git a/backend/internal/features/tests/postgresql_backup_restore_test.go b/backend/internal/features/tests/postgresql_backup_restore_test.go
index 9dff630b..f078f41d 100644
--- a/backend/internal/features/tests/postgresql_backup_restore_test.go
+++ b/backend/internal/features/tests/postgresql_backup_restore_test.go
@@ -13,7 +13,7 @@ import (
"postgresus-backend/internal/features/restores/models"
usecases_postgresql_restore "postgresus-backend/internal/features/restores/usecases/postgresql"
"postgresus-backend/internal/features/storages"
- local_storage "postgresus-backend/internal/features/storages/storages/local"
+ local_storage "postgresus-backend/internal/features/storages/models/local"
"postgresus-backend/internal/util/tools"
"strconv"
"testing"