diff --git a/cmd/resizer/resizer.go b/cmd/resizer/resizer.go index c26fb0f..664c0f1 100644 --- a/cmd/resizer/resizer.go +++ b/cmd/resizer/resizer.go @@ -2,7 +2,7 @@ package main import ( "image-resize-service/cmd" - "image-resize-service/internal/pkg/app" + "image-resize-service/internal/app" ) func main() { diff --git a/cmd/root.go b/cmd/root.go index 6a09ffa..12cc320 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -5,7 +5,7 @@ import ( "os" "github.com/spf13/cobra" - "image-resize-service/internal/pkg/config" + "image-resize-service/internal/config" ) var rootCmd = &cobra.Command{ diff --git a/internal/pkg/app/app.go b/internal/app/app.go similarity index 81% rename from internal/pkg/app/app.go rename to internal/app/app.go index 7064974..5991e64 100644 --- a/internal/pkg/app/app.go +++ b/internal/app/app.go @@ -7,11 +7,11 @@ import ( "os/signal" "syscall" - "image-resize-service/internal/app/cache" - "image-resize-service/internal/app/resizer" - "image-resize-service/internal/app/server" - "image-resize-service/internal/app/storage" - "image-resize-service/internal/pkg/config" + "image-resize-service/internal/cache" + "image-resize-service/internal/config" + "image-resize-service/internal/resizer" + "image-resize-service/internal/server" + "image-resize-service/internal/storage" ) type App struct { diff --git a/internal/app/cache/cache.go b/internal/cache/cache.go similarity index 94% rename from internal/app/cache/cache.go rename to internal/cache/cache.go index ef948ce..9a7d607 100644 --- a/internal/app/cache/cache.go +++ b/internal/cache/cache.go @@ -4,7 +4,7 @@ import ( "time" "github.com/hashicorp/golang-lru/v2/expirable" - "image-resize-service/internal/pkg/config" + "image-resize-service/internal/config" ) type Memcache struct { diff --git a/internal/app/cache/public.go b/internal/cache/public.go similarity index 86% rename from internal/app/cache/public.go rename to internal/cache/public.go index b12fc31..f868e8e 100644 --- a/internal/app/cache/public.go +++ b/internal/cache/public.go @@ -1,7 +1,7 @@ package cache import ( - "image-resize-service/internal/pkg/config" + "image-resize-service/internal/config" ) type Cache interface { diff --git a/internal/pkg/config/config.go b/internal/config/config.go similarity index 100% rename from internal/pkg/config/config.go rename to internal/config/config.go diff --git a/internal/app/resizer/public.go b/internal/resizer/public.go similarity index 84% rename from internal/app/resizer/public.go rename to internal/resizer/public.go index 570bebb..087f64b 100644 --- a/internal/app/resizer/public.go +++ b/internal/resizer/public.go @@ -1,6 +1,8 @@ package resizer -import "image-resize-service/internal/pkg/config" +import ( + "image-resize-service/internal/config" +) type Resizer interface { ResizeService diff --git a/internal/app/resizer/resizer.go b/internal/resizer/resizer.go similarity index 96% rename from internal/app/resizer/resizer.go rename to internal/resizer/resizer.go index d1722eb..ed8fce8 100644 --- a/internal/app/resizer/resizer.go +++ b/internal/resizer/resizer.go @@ -6,7 +6,7 @@ import ( "image" "github.com/disintegration/imaging" - "image-resize-service/internal/pkg/config" + "image-resize-service/internal/config" ) type Service struct { diff --git a/internal/app/server/forms.go b/internal/server/forms.go similarity index 100% rename from internal/app/server/forms.go rename to internal/server/forms.go diff --git a/internal/app/server/mws.go b/internal/server/mws.go similarity index 100% rename from internal/app/server/mws.go rename to internal/server/mws.go diff --git a/internal/app/server/routers.go b/internal/server/routers.go similarity index 100% rename from internal/app/server/routers.go rename to internal/server/routers.go diff --git a/internal/app/server/server.go b/internal/server/server.go similarity index 87% rename from internal/app/server/server.go rename to internal/server/server.go index 7261504..cedbbed 100644 --- a/internal/app/server/server.go +++ b/internal/server/server.go @@ -6,10 +6,10 @@ import ( "github.com/labstack/echo/v4" "github.com/labstack/echo/v4/middleware" - "image-resize-service/internal/app/cache" - "image-resize-service/internal/app/resizer" - "image-resize-service/internal/app/storage" - "image-resize-service/internal/pkg/config" + "image-resize-service/internal/cache" + "image-resize-service/internal/config" + "image-resize-service/internal/resizer" + "image-resize-service/internal/storage" ) // @title Swagger Example API diff --git a/internal/app/storage/error.go b/internal/storage/error.go similarity index 100% rename from internal/app/storage/error.go rename to internal/storage/error.go diff --git a/internal/app/storage/public.go b/internal/storage/public.go similarity index 91% rename from internal/app/storage/public.go rename to internal/storage/public.go index bd13a01..d5428e0 100644 --- a/internal/app/storage/public.go +++ b/internal/storage/public.go @@ -3,7 +3,7 @@ package storage import ( "net/http" - "image-resize-service/internal/pkg/config" + "image-resize-service/internal/config" ) type Storage interface { diff --git a/internal/app/storage/storage.go b/internal/storage/storage.go similarity index 97% rename from internal/app/storage/storage.go rename to internal/storage/storage.go index df8c599..fbf9e77 100644 --- a/internal/app/storage/storage.go +++ b/internal/storage/storage.go @@ -9,7 +9,7 @@ import ( "strings" "github.com/google/uuid" - "image-resize-service/internal/pkg/config" + "image-resize-service/internal/config" ) type Service struct { diff --git a/tests/integration/server_test.go b/tests/integration/server_test.go index 1742ca0..951150c 100644 --- a/tests/integration/server_test.go +++ b/tests/integration/server_test.go @@ -9,11 +9,11 @@ import ( "time" "github.com/stretchr/testify/require" - "image-resize-service/internal/app/cache" - "image-resize-service/internal/app/resizer" - "image-resize-service/internal/app/server" - "image-resize-service/internal/app/storage" - "image-resize-service/internal/pkg/config" + "image-resize-service/internal/cache" + "image-resize-service/internal/config" + "image-resize-service/internal/resizer" + "image-resize-service/internal/server" + "image-resize-service/internal/storage" "image-resize-service/tests/integration/service" ) diff --git a/tests/unit/cacher/cacher_test.go b/tests/unit/cacher/cacher_test.go index 44092c7..6aa1805 100644 --- a/tests/unit/cacher/cacher_test.go +++ b/tests/unit/cacher/cacher_test.go @@ -6,8 +6,8 @@ import ( "time" "github.com/magiconair/properties/assert" - "image-resize-service/internal/app/cache" - "image-resize-service/internal/pkg/config" + "image-resize-service/internal/cache" + "image-resize-service/internal/config" ) const ( diff --git a/tests/unit/resizer/resizer_test.go b/tests/unit/resizer/resizer_test.go index a617a82..6928d6b 100644 --- a/tests/unit/resizer/resizer_test.go +++ b/tests/unit/resizer/resizer_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "image-resize-service/internal/app/resizer" - "image-resize-service/internal/pkg/config" + "image-resize-service/internal/config" + "image-resize-service/internal/resizer" ) func TestResizer(t *testing.T) { diff --git a/tests/unit/storage/storage_test.go b/tests/unit/storage/storage_test.go index 33dd776..6cf5185 100644 --- a/tests/unit/storage/storage_test.go +++ b/tests/unit/storage/storage_test.go @@ -5,8 +5,8 @@ import ( "testing" "github.com/stretchr/testify/assert" - "image-resize-service/internal/app/storage" - "image-resize-service/internal/pkg/config" + "image-resize-service/internal/config" + "image-resize-service/internal/storage" ) const (