diff --git a/.gitmodules b/.gitmodules index b358abe..6fd0375 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "proto"] - path = proto + path = contracts url = https://git.sch9.ru/new_gate/contracts diff --git a/Makefile b/Makefile index a9e3195..0d69a43 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ tag = latest gen: - @oapi-codegen --config=config.yaml ./proto/user/v1/openapi.yaml + @oapi-codegen --config=config.yaml ./contracts/user/v1/openapi.yaml dev: gen @go run cmd/ms-auth/main.go build: gen diff --git a/cmd/ms-auth/main.go b/cmd/ms-auth/main.go index 8ee4c62..8661824 100644 --- a/cmd/ms-auth/main.go +++ b/cmd/ms-auth/main.go @@ -4,12 +4,12 @@ import ( "context" "fmt" "git.sch9.ru/new_gate/ms-auth/config" + userv1 "git.sch9.ru/new_gate/ms-auth/contracts/user/v1" "git.sch9.ru/new_gate/ms-auth/internal/models" "git.sch9.ru/new_gate/ms-auth/internal/users/delivery/rest" usersRepository "git.sch9.ru/new_gate/ms-auth/internal/users/repository" usersUseCase "git.sch9.ru/new_gate/ms-auth/internal/users/usecase" "git.sch9.ru/new_gate/ms-auth/pkg" - userv1 "git.sch9.ru/new_gate/ms-auth/proto/user/v1" "github.com/gofiber/fiber/v2" fiberlogger "github.com/gofiber/fiber/v2/middleware/logger" "github.com/ilyakaznacheev/cleanenv" diff --git a/config.yaml b/config.yaml index 3228d1d..8b772f5 100644 --- a/config.yaml +++ b/config.yaml @@ -2,4 +2,4 @@ package: userv1 generate: fiber-server: true models: true -output: ./proto/user/v1/user.go \ No newline at end of file +output: ./contracts/user/v1/user.go \ No newline at end of file diff --git a/proto b/contracts similarity index 100% rename from proto rename to contracts diff --git a/internal/users/delivery/rest/handlers.go b/internal/users/delivery/rest/handlers.go index 40f085c..dcb012f 100644 --- a/internal/users/delivery/rest/handlers.go +++ b/internal/users/delivery/rest/handlers.go @@ -3,10 +3,10 @@ package rest import ( "encoding/base64" "errors" + userv1 "git.sch9.ru/new_gate/ms-auth/contracts/user/v1" "git.sch9.ru/new_gate/ms-auth/internal/models" "git.sch9.ru/new_gate/ms-auth/internal/users" "git.sch9.ru/new_gate/ms-auth/pkg" - userv1 "git.sch9.ru/new_gate/ms-auth/proto/user/v1" "github.com/gofiber/fiber/v2" "github.com/golang-jwt/jwt/v4" "strings"