diff --git a/.golangci.yml b/.golangci.yml index 651c5be..8db5339 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -10,7 +10,7 @@ linters-settings: exclude-functions: - github.com/go-chi/render.Render goimports: - local-prefixes: "code.alt-gnome.ru/aides-infra/aides-repo-api" + local-prefixes: "code.aides.space/aides-infra/aides-repo-api" gofmt: simplify: true gofumpt: diff --git a/Makefile b/Makefile index 2ff2e4a..5b68073 100644 --- a/Makefile +++ b/Makefile @@ -22,13 +22,13 @@ swag: build: go build \ - -ldflags="-X 'code.alt-gnome.ru/aides-infra/aides-repo-api/internal/config.Version=$(APP_VERSION)'" \ + -ldflags="-X 'code.aides.space/aides-infra/aides-repo-api/internal/config.Version=$(APP_VERSION)'" \ -o aides-repo-api \ ./cmd/aides-repo-api/main.go release: go build \ - -ldflags="-s -w -X 'code.alt-gnome.ru/aides-infra/aides-repo-api/internal/config.Version=$(APP_VERSION)'" \ + -ldflags="-s -w -X 'code.aides.space/aides-infra/aides-repo-api/internal/config.Version=$(APP_VERSION)'" \ -o aides-repo-api \ ./cmd/aides-repo-api/main.go diff --git a/README.md b/README.md index 4ddd471..6ae9c9f 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # Aides repo API -[![Go Report Card](https://goreportcard.com/badge/code.alt-gnome.ru/aides-infra/aides-repo-api)](https://goreportcard.com/report/code.alt-gnome.ru/aides-infra/aides-repo-api) ![Coverage](./coverage-badge.svg) \ No newline at end of file +[![Go Report Card](https://goreportcard.com/badge/code.aides.space/aides-infra/aides-repo-api)](https://goreportcard.com/report/code.aides.space/aides-infra/aides-repo-api) ![Coverage](./coverage-badge.svg) \ No newline at end of file diff --git a/cmd/aides-repo-api/main.go b/cmd/aides-repo-api/main.go index bec75cf..1d76dee 100644 --- a/cmd/aides-repo-api/main.go +++ b/cmd/aides-repo-api/main.go @@ -1,7 +1,7 @@ package main import ( - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/app" + "code.aides.space/aides-infra/aides-repo-api/internal/app" ) // _ diff --git a/go.mod b/go.mod index ee88673..0a95133 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module code.alt-gnome.ru/aides-infra/aides-repo-api +module code.aides.space/aides-infra/aides-repo-api go 1.23.3 diff --git a/internal/app/app.go b/internal/app/app.go index 5ebe109..9c58916 100644 --- a/internal/app/app.go +++ b/internal/app/app.go @@ -9,14 +9,14 @@ import ( gormlogger "gorm.io/gorm/logger" "moul.io/zapgorm2" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/config" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/controllers/taskcontroller" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/logger" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/models" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/router" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/services/cronservice" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/services/reposervice" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/services/taskservice" + "code.aides.space/aides-infra/aides-repo-api/internal/config" + "code.aides.space/aides-infra/aides-repo-api/internal/controllers/taskcontroller" + "code.aides.space/aides-infra/aides-repo-api/internal/logger" + "code.aides.space/aides-infra/aides-repo-api/internal/models" + "code.aides.space/aides-infra/aides-repo-api/internal/router" + "code.aides.space/aides-infra/aides-repo-api/internal/services/cronservice" + "code.aides.space/aides-infra/aides-repo-api/internal/services/reposervice" + "code.aides.space/aides-infra/aides-repo-api/internal/services/taskservice" ) type App struct { diff --git a/internal/controllers/taskcontroller/controller.go b/internal/controllers/taskcontroller/controller.go index bc5eee3..2427de0 100644 --- a/internal/controllers/taskcontroller/controller.go +++ b/internal/controllers/taskcontroller/controller.go @@ -1,8 +1,8 @@ package taskcontroller import ( - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/models" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/services/taskservice" + "code.aides.space/aides-infra/aides-repo-api/internal/models" + "code.aides.space/aides-infra/aides-repo-api/internal/services/taskservice" ) type TaskService interface { diff --git a/internal/controllers/taskcontroller/controller_test.go b/internal/controllers/taskcontroller/controller_test.go index f00b9a7..0bacfe3 100644 --- a/internal/controllers/taskcontroller/controller_test.go +++ b/internal/controllers/taskcontroller/controller_test.go @@ -3,8 +3,8 @@ package taskcontroller_test import ( "errors" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/models" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/services/taskservice" + "code.aides.space/aides-infra/aides-repo-api/internal/models" + "code.aides.space/aides-infra/aides-repo-api/internal/services/taskservice" ) type TaskServiceMock struct { diff --git a/internal/controllers/taskcontroller/create.go b/internal/controllers/taskcontroller/create.go index 25324fa..cb223af 100644 --- a/internal/controllers/taskcontroller/create.go +++ b/internal/controllers/taskcontroller/create.go @@ -6,8 +6,8 @@ import ( "github.com/go-chi/render" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/common/errors" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/models" + "code.aides.space/aides-infra/aides-repo-api/internal/common/errors" + "code.aides.space/aides-infra/aides-repo-api/internal/models" ) type CreateTaskDTO struct { diff --git a/internal/controllers/taskcontroller/create_test.go b/internal/controllers/taskcontroller/create_test.go index 464290e..82189b0 100644 --- a/internal/controllers/taskcontroller/create_test.go +++ b/internal/controllers/taskcontroller/create_test.go @@ -10,8 +10,8 @@ import ( "gorm.io/gorm" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/controllers/taskcontroller" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/models" + "code.aides.space/aides-infra/aides-repo-api/internal/controllers/taskcontroller" + "code.aides.space/aides-infra/aides-repo-api/internal/models" ) func TestCreate(t *testing.T) { diff --git a/internal/controllers/taskcontroller/upload.go b/internal/controllers/taskcontroller/upload.go index e6c8a86..00fadd0 100644 --- a/internal/controllers/taskcontroller/upload.go +++ b/internal/controllers/taskcontroller/upload.go @@ -7,10 +7,10 @@ import ( "github.com/go-chi/chi/v5" "github.com/go-chi/render" - commonErrors "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/common/errors" + commonErrors "code.aides.space/aides-infra/aides-repo-api/internal/common/errors" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/logger" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/services/taskservice" + "code.aides.space/aides-infra/aides-repo-api/internal/logger" + "code.aides.space/aides-infra/aides-repo-api/internal/services/taskservice" ) type TaskUploadResponse struct { diff --git a/internal/controllers/taskcontroller/upload_test.go b/internal/controllers/taskcontroller/upload_test.go index 87a5030..b229737 100644 --- a/internal/controllers/taskcontroller/upload_test.go +++ b/internal/controllers/taskcontroller/upload_test.go @@ -10,8 +10,8 @@ import ( "github.com/go-chi/chi/v5" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/controllers/taskcontroller" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/services/taskservice" + "code.aides.space/aides-infra/aides-repo-api/internal/controllers/taskcontroller" + "code.aides.space/aides-infra/aides-repo-api/internal/services/taskservice" ) func TestUpload(t *testing.T) { diff --git a/internal/middlewares/auth.go b/internal/middlewares/auth.go index 251885a..daa2a87 100644 --- a/internal/middlewares/auth.go +++ b/internal/middlewares/auth.go @@ -5,8 +5,8 @@ import ( "github.com/go-chi/render" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/common/errors" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/config" + "code.aides.space/aides-infra/aides-repo-api/internal/common/errors" + "code.aides.space/aides-infra/aides-repo-api/internal/config" ) func CreateAuthGuard(cfg *config.Config) func(next http.Handler) http.Handler { diff --git a/internal/middlewares/logger.go b/internal/middlewares/logger.go index 1c2e524..4803071 100644 --- a/internal/middlewares/logger.go +++ b/internal/middlewares/logger.go @@ -3,7 +3,7 @@ package middlewares import ( "net/http" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/logger" + "code.aides.space/aides-infra/aides-repo-api/internal/logger" ) // CustomResponseWriter wraps http.ResponseWriter to capture status code and response size diff --git a/internal/router/router.go b/internal/router/router.go index e76b15c..67e0eec 100644 --- a/internal/router/router.go +++ b/internal/router/router.go @@ -4,11 +4,11 @@ import ( "github.com/go-chi/chi/v5" httpSwagger "github.com/swaggo/http-swagger" - docs "code.alt-gnome.ru/aides-infra/aides-repo-api/docs" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/config" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/controllers/taskcontroller" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/logger" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/middlewares" + docs "code.aides.space/aides-infra/aides-repo-api/docs" + "code.aides.space/aides-infra/aides-repo-api/internal/config" + "code.aides.space/aides-infra/aides-repo-api/internal/controllers/taskcontroller" + "code.aides.space/aides-infra/aides-repo-api/internal/logger" + "code.aides.space/aides-infra/aides-repo-api/internal/middlewares" ) type Router struct { diff --git a/internal/services/cronservice/service.go b/internal/services/cronservice/service.go index 33b20d8..a87802f 100644 --- a/internal/services/cronservice/service.go +++ b/internal/services/cronservice/service.go @@ -3,7 +3,7 @@ package cronservice import ( "github.com/go-co-op/gocron/v2" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/logger" + "code.aides.space/aides-infra/aides-repo-api/internal/logger" ) type RepoService interface { diff --git a/internal/services/reposervice/service.go b/internal/services/reposervice/service.go index 8726202..ee5835b 100644 --- a/internal/services/reposervice/service.go +++ b/internal/services/reposervice/service.go @@ -7,8 +7,8 @@ import ( "gorm.io/gorm" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/logger" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/models" + "code.aides.space/aides-infra/aides-repo-api/internal/logger" + "code.aides.space/aides-infra/aides-repo-api/internal/models" ) type Config interface { diff --git a/internal/services/reposervice/utils.go b/internal/services/reposervice/utils.go index 971ff95..e531f17 100644 --- a/internal/services/reposervice/utils.go +++ b/internal/services/reposervice/utils.go @@ -6,7 +6,7 @@ import ( "os/exec" "path" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/logger" + "code.aides.space/aides-infra/aides-repo-api/internal/logger" ) func createRepoDirs(repoDir, repoName, arch string) error { diff --git a/internal/services/taskservice/create.go b/internal/services/taskservice/create.go index d12c651..93e3ea8 100644 --- a/internal/services/taskservice/create.go +++ b/internal/services/taskservice/create.go @@ -1,7 +1,7 @@ package taskservice import ( - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/models" + "code.aides.space/aides-infra/aides-repo-api/internal/models" ) func (s *Service) Create(repo string) (*models.Task, error) { diff --git a/internal/services/taskservice/service.go b/internal/services/taskservice/service.go index 1e1bf69..a1d4f6d 100644 --- a/internal/services/taskservice/service.go +++ b/internal/services/taskservice/service.go @@ -7,7 +7,7 @@ import ( "gorm.io/gorm" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/models" + "code.aides.space/aides-infra/aides-repo-api/internal/models" ) type Config interface { diff --git a/internal/services/taskservice/upload.go b/internal/services/taskservice/upload.go index df2efa3..8bd54dd 100644 --- a/internal/services/taskservice/upload.go +++ b/internal/services/taskservice/upload.go @@ -13,8 +13,8 @@ import ( "github.com/cavaliergopher/rpm" "gorm.io/gorm" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/logger" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/models" + "code.aides.space/aides-infra/aides-repo-api/internal/logger" + "code.aides.space/aides-infra/aides-repo-api/internal/models" ) type TaskUploadInput struct { diff --git a/internal/services/taskservice/utils.go b/internal/services/taskservice/utils.go index 860b9c4..94d7a4d 100644 --- a/internal/services/taskservice/utils.go +++ b/internal/services/taskservice/utils.go @@ -1,6 +1,6 @@ package taskservice -import "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/models" +import "code.aides.space/aides-infra/aides-repo-api/internal/models" type WrapperRpmVersion struct { file *models.RPMFile diff --git a/tests/integration/reposervice_forceupdate_test.go b/tests/integration/reposervice_forceupdate_test.go index 6a9cc1c..1eebbdd 100644 --- a/tests/integration/reposervice_forceupdate_test.go +++ b/tests/integration/reposervice_forceupdate_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/models" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/services/reposervice" + "code.aides.space/aides-infra/aides-repo-api/internal/models" + "code.aides.space/aides-infra/aides-repo-api/internal/services/reposervice" ) func TestRepoService_ForceUpdate(t *testing.T) { diff --git a/tests/integration/taskservice_create_test.go b/tests/integration/taskservice_create_test.go index 3a644af..b0e1098 100644 --- a/tests/integration/taskservice_create_test.go +++ b/tests/integration/taskservice_create_test.go @@ -5,8 +5,8 @@ import ( "github.com/stretchr/testify/assert" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/models" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/services/taskservice" + "code.aides.space/aides-infra/aides-repo-api/internal/models" + "code.aides.space/aides-infra/aides-repo-api/internal/services/taskservice" ) func TestTaskService_Create(t *testing.T) { diff --git a/tests/integration/taskservice_upload_test.go b/tests/integration/taskservice_upload_test.go index d6899bd..5d656e0 100644 --- a/tests/integration/taskservice_upload_test.go +++ b/tests/integration/taskservice_upload_test.go @@ -13,8 +13,8 @@ import ( "github.com/stretchr/testify/assert" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/models" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/services/taskservice" + "code.aides.space/aides-infra/aides-repo-api/internal/models" + "code.aides.space/aides-infra/aides-repo-api/internal/services/taskservice" ) func createMultipartFileHeader(filePath string) *multipart.FileHeader { diff --git a/tests/integration/utils.go b/tests/integration/utils.go index 8b848fc..577a8c5 100644 --- a/tests/integration/utils.go +++ b/tests/integration/utils.go @@ -7,8 +7,8 @@ import ( "gorm.io/driver/sqlite" "gorm.io/gorm" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/config" - "code.alt-gnome.ru/aides-infra/aides-repo-api/internal/models" + "code.aides.space/aides-infra/aides-repo-api/internal/config" + "code.aides.space/aides-infra/aides-repo-api/internal/models" ) func prepareDb(t *testing.T) *gorm.DB {