diff --git a/.github/labeler.yml b/.github/labeler.yml index b292ead..35e71ba 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -22,7 +22,7 @@ pkg: - pkg/**/* mocks: -- internal/app/mocks/* +- internal/mocks/* changelog: - CHANGELOG.md diff --git a/Makefile b/Makefile index a27f4ed..6e3aaf1 100644 --- a/Makefile +++ b/Makefile @@ -20,19 +20,19 @@ decrypt-gpg: @gpg -d .env.gpg mock-gen: - @mockgen -source=./internal/app/ports/auth_ports.go -destination=./internal/app/mocks/mocks_auth.go -package=mocks - @mockgen -source=./internal/app/ports/user_ports.go -destination=./internal/app/mocks/mocks_user.go -package=mocks + @mockgen -source=./internal/app/ports/auth_ports.go -destination=./internal/mocks/mocks_auth.go -package=mocks + @mockgen -source=./internal/app/ports/user_ports.go -destination=./internal/mocks/mocks_user.go -package=mocks changelog-gen: @auto-changelog # Target to apply migrations up: - @goose -dir=./database/migrations mysql "root@tcp(localhost:3306)/db_pos?parseTime=true" up + @goose -dir=./internal/database/migrations mysql "root@tcp(localhost:3306)/db_pos?parseTime=true" up # Target to reset migrations (if needed) down: - @goose -dir=./database/migrations mysql "root@tcp(localhost:3306)/db_pos?parseTime=true" reset + @goose -dir=./internal/database/migrations mysql "root@tcp(localhost:3306)/db_pos?parseTime=true" reset status: - @goose -dir=./database/migrations mysql "root@tcp(localhost:3306)/db_pos?parseTime=true" status + @goose -dir=./internal/database/migrations mysql "root@tcp(localhost:3306)/db_pos?parseTime=true" status diff --git a/cmd/main.go b/cmd/main.go index cd08674..4072cc1 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -8,7 +8,6 @@ import ( "syscall" "github.com/voltgizerz/POS-restaurant/config" - "github.com/voltgizerz/POS-restaurant/database" "github.com/voltgizerz/POS-restaurant/internal/app/api" "github.com/voltgizerz/POS-restaurant/internal/app/api/handler" "github.com/voltgizerz/POS-restaurant/internal/app/api/middleware" @@ -16,6 +15,7 @@ import ( "github.com/voltgizerz/POS-restaurant/internal/app/interactor" "github.com/voltgizerz/POS-restaurant/internal/app/repository" "github.com/voltgizerz/POS-restaurant/internal/app/service" + "github.com/voltgizerz/POS-restaurant/internal/database" "github.com/voltgizerz/POS-restaurant/pkg/jeager" "github.com/voltgizerz/POS-restaurant/pkg/logger" ) diff --git a/internal/app/api/handler/response.go b/internal/app/api/common/response.go similarity index 83% rename from internal/app/api/handler/response.go rename to internal/app/api/common/response.go index f2d7ee1..8c226d7 100644 --- a/internal/app/api/handler/response.go +++ b/internal/app/api/common/response.go @@ -1,18 +1,18 @@ -package handler +package common import ( "github.com/gofiber/fiber/v3" - "github.com/voltgizerz/POS-restaurant/internal/app/constants" + "github.com/voltgizerz/POS-restaurant/internal/constants" ) type ( - errorResponse struct { + ErrorResponse struct { Success bool `json:"success"` Message string `json:"message"` RequestID string `json:"request_id"` } - successResponse struct { + SuccessResponse struct { Success bool `json:"success"` Message string `json:"message"` Data interface{} `json:"data"` @@ -22,7 +22,7 @@ type ( // SendErrorResp generates and sends error response func SendErrorResp(c fiber.Ctx, statusCode int, errorMessage string) error { - response := errorResponse{ + response := ErrorResponse{ Success: false, Message: errorMessage, RequestID: c.Locals(constants.CTXKeyRequestID).(string), @@ -33,7 +33,7 @@ func SendErrorResp(c fiber.Ctx, statusCode int, errorMessage string) error { // SendSuccessResp generates and sends success response with dynamic data func SendSuccessResp(c fiber.Ctx, statusCode int, message string, data interface{}) error { - response := successResponse{ + response := SuccessResponse{ Success: true, Message: message, Data: data, diff --git a/internal/app/api/handler/auth_handler.go b/internal/app/api/handler/auth_handler.go index 975735c..b56542b 100644 --- a/internal/app/api/handler/auth_handler.go +++ b/internal/app/api/handler/auth_handler.go @@ -7,10 +7,11 @@ import ( "github.com/gofiber/fiber/v3" "github.com/opentracing/opentracing-go" - "github.com/voltgizerz/POS-restaurant/internal/app/constants" + "github.com/voltgizerz/POS-restaurant/internal/app/api/common" "github.com/voltgizerz/POS-restaurant/internal/app/entity" "github.com/voltgizerz/POS-restaurant/internal/app/interactor" "github.com/voltgizerz/POS-restaurant/internal/app/ports" + "github.com/voltgizerz/POS-restaurant/internal/constants" "github.com/voltgizerz/POS-restaurant/internal/utils" ) @@ -32,26 +33,26 @@ func (h *AuthHandler) Login(c fiber.Ctx) error { err := c.Bind().Body(req) if err != nil { - return SendErrorResp(c, fiber.StatusBadRequest, constants.ErrMsgInvalidUsernameAndPassword) + return common.SendErrorResp(c, fiber.StatusBadRequest, constants.ErrMsgInvalidUsernameAndPassword) } err = validator.New().StructCtx(ctx, req) if err != nil { err = utils.GetFirstValidatorError(err) - return SendErrorResp(c, fiber.StatusBadRequest, err.Error()) + return common.SendErrorResp(c, fiber.StatusBadRequest, err.Error()) } dataLogin, err := h.authService.Login(ctx, req.Username, req.Password) if err != nil { if err == sql.ErrNoRows { - return SendErrorResp(c, fiber.StatusUnauthorized, constants.ErrMsgUsernameNotFound) + return common.SendErrorResp(c, fiber.StatusUnauthorized, constants.ErrMsgUsernameNotFound) } - return SendErrorResp(c, fiber.StatusUnauthorized, constants.ErrMsgInvalidUsernameOrPassword) + return common.SendErrorResp(c, fiber.StatusUnauthorized, constants.ErrMsgInvalidUsernameOrPassword) } - return SendSuccessResp(c, fiber.StatusOK, "Success", dataLogin) + return common.SendSuccessResp(c, fiber.StatusOK, "Success", dataLogin) } func (h *AuthHandler) Register(c fiber.Ctx) error { @@ -62,18 +63,18 @@ func (h *AuthHandler) Register(c fiber.Ctx) error { err := c.Bind().Body(req) if err != nil { - return SendErrorResp(c, fiber.StatusBadRequest, "Invalid request body.") + return common.SendErrorResp(c, fiber.StatusBadRequest, "Invalid request body.") } err = validator.New().StructCtx(ctx, req) if err != nil { err = utils.GetFirstValidatorError(err) - return SendErrorResp(c, fiber.StatusBadRequest, err.Error()) + return common.SendErrorResp(c, fiber.StatusBadRequest, err.Error()) } if req.Password != req.ConfirmPassword { - return SendErrorResp(c, fiber.StatusBadRequest, "Password mismatch") + return common.SendErrorResp(c, fiber.StatusBadRequest, "Password mismatch") } userData := &entity.User{ @@ -85,12 +86,12 @@ func (h *AuthHandler) Register(c fiber.Ctx) error { result, err := h.authService.Register(ctx, *userData) if err != nil { - return SendErrorResp(c, fiber.StatusBadRequest, err.Error()) + return common.SendErrorResp(c, fiber.StatusBadRequest, err.Error()) } res := map[string]int64{ "user_id": result, } - return SendSuccessResp(c, fiber.StatusCreated, "Account created succesfully.", res) + return common.SendSuccessResp(c, fiber.StatusCreated, "Account created succesfully.", res) } diff --git a/internal/app/api/handler/auth_handler_test.go b/internal/app/api/handler/auth_handler_test.go index 89c5220..22ba453 100644 --- a/internal/app/api/handler/auth_handler_test.go +++ b/internal/app/api/handler/auth_handler_test.go @@ -9,9 +9,9 @@ import ( "github.com/bytedance/sonic" "github.com/gofiber/fiber/v3" "github.com/valyala/fasthttp" - "github.com/voltgizerz/POS-restaurant/internal/app/constants" "github.com/voltgizerz/POS-restaurant/internal/app/entity" "github.com/voltgizerz/POS-restaurant/internal/app/interactor" + "github.com/voltgizerz/POS-restaurant/internal/constants" "go.uber.org/mock/gomock" ) diff --git a/internal/app/api/handler/init_test.go b/internal/app/api/handler/init_test.go index a6b3408..e6a5331 100644 --- a/internal/app/api/handler/init_test.go +++ b/internal/app/api/handler/init_test.go @@ -6,7 +6,7 @@ import ( "go.uber.org/mock/gomock" - "github.com/voltgizerz/POS-restaurant/internal/app/mocks" + "github.com/voltgizerz/POS-restaurant/internal/mocks" "github.com/voltgizerz/POS-restaurant/pkg/logger" ) diff --git a/internal/app/api/handler/menu_handler.go b/internal/app/api/handler/menu_handler.go index 493ba5a..0300590 100644 --- a/internal/app/api/handler/menu_handler.go +++ b/internal/app/api/handler/menu_handler.go @@ -6,10 +6,11 @@ import ( "github.com/gofiber/fiber/v3" "github.com/opentracing/opentracing-go" - "github.com/voltgizerz/POS-restaurant/internal/app/constants" + "github.com/voltgizerz/POS-restaurant/internal/app/api/common" "github.com/voltgizerz/POS-restaurant/internal/app/entity" "github.com/voltgizerz/POS-restaurant/internal/app/interactor" "github.com/voltgizerz/POS-restaurant/internal/app/ports" + "github.com/voltgizerz/POS-restaurant/internal/constants" ) type MenuHandler struct { @@ -30,12 +31,12 @@ func (h *MenuHandler) AddMenu(c fiber.Ctx) error { err := c.Bind().Body(req) if err != nil { - return SendErrorResp(c, fiber.StatusBadRequest, "Error data menu") + return common.SendErrorResp(c, fiber.StatusBadRequest, "Error data menu") } priceConvert, err := strconv.ParseFloat(req.Price, 64) if err != nil { - return SendErrorResp(c, fiber.StatusBadRequest, err.Error()) + return common.SendErrorResp(c, fiber.StatusBadRequest, err.Error()) } menuData := &entity.Menu{ @@ -48,14 +49,14 @@ func (h *MenuHandler) AddMenu(c fiber.Ctx) error { result, err := h.menuService.RegisterMenu(ctx, *menuData) if err != nil { - return SendErrorResp(c, fiber.StatusUnauthorized, err.Error()) + return common.SendErrorResp(c, fiber.StatusUnauthorized, err.Error()) } responseMsg := map[string]int64{ "menu_id": result, } - return SendSuccessResp(c, fiber.StatusOK, "Success", responseMsg) + return common.SendSuccessResp(c, fiber.StatusOK, "Success", responseMsg) } func (h *MenuHandler) GetMenuByUserID(c fiber.Ctx) error { @@ -65,15 +66,15 @@ func (h *MenuHandler) GetMenuByUserID(c fiber.Ctx) error { userID := c.Params("user_id") convertUserIDtoInt, err := strconv.Atoi(userID) if err != nil { - return SendErrorResp(c, fiber.StatusBadRequest, err.Error()) + return common.SendErrorResp(c, fiber.StatusBadRequest, err.Error()) } result, err := h.menuService.GetMenu(ctx, int64(convertUserIDtoInt)) if err != nil { - return SendErrorResp(c, fiber.StatusBadRequest, constants.ErrMsgMenuNotFound) + return common.SendErrorResp(c, fiber.StatusBadRequest, constants.ErrMsgMenuNotFound) } - return SendSuccessResp(c, fiber.StatusOK, "Success", result) + return common.SendSuccessResp(c, fiber.StatusOK, "Success", result) } func (h *MenuHandler) UpdateMenuByMenuID(c fiber.Ctx) error { @@ -83,18 +84,18 @@ func (h *MenuHandler) UpdateMenuByMenuID(c fiber.Ctx) error { req := &updateMenuRequest{} err := c.Bind().Body(req) if err != nil { - return SendErrorResp(c, fiber.StatusBadRequest, "Invalid request body.") + return common.SendErrorResp(c, fiber.StatusBadRequest, "Invalid request body.") } menuID := c.Params("menu_id") convertMenuIDtoInt, err := strconv.Atoi(menuID) if err != nil { - return SendErrorResp(c, fiber.StatusBadRequest, err.Error()) + return common.SendErrorResp(c, fiber.StatusBadRequest, err.Error()) } priceConvert, err := strconv.ParseFloat(req.Price, 64) if err != nil { - return SendErrorResp(c, fiber.StatusBadRequest, err.Error()) + return common.SendErrorResp(c, fiber.StatusBadRequest, err.Error()) } menuData := entity.Menu{ @@ -108,10 +109,10 @@ func (h *MenuHandler) UpdateMenuByMenuID(c fiber.Ctx) error { result, err := h.menuService.UpdateMenuID(ctx, menuData) if err != nil { - return SendErrorResp(c, fiber.StatusBadRequest, constants.ErrMsgFailedUpdateMenu) + return common.SendErrorResp(c, fiber.StatusBadRequest, constants.ErrMsgFailedUpdateMenu) } - return SendSuccessResp(c, fiber.StatusOK, "Success", result) + return common.SendSuccessResp(c, fiber.StatusOK, "Success", result) } func (h *MenuHandler) UpdateActiveMenuBatchByUserID(c fiber.Ctx) error { @@ -121,15 +122,15 @@ func (h *MenuHandler) UpdateActiveMenuBatchByUserID(c fiber.Ctx) error { userID := c.Params("user_id") convertUserIDtoInt, err := strconv.Atoi(userID) if err != nil { - return SendErrorResp(c, fiber.StatusBadRequest, err.Error()) + return common.SendErrorResp(c, fiber.StatusBadRequest, err.Error()) } result, err := h.menuService.UpdateActiveMenuBatchUserID(ctx, int64(convertUserIDtoInt)) if err != nil { - return SendErrorResp(c, fiber.StatusBadRequest, fmt.Sprintf(constants.ErrMsgFailedDeleteMenu, " delete batch by user id")) + return common.SendErrorResp(c, fiber.StatusBadRequest, fmt.Sprintf(constants.ErrMsgFailedDeleteMenu, " delete batch by user id")) } - return SendSuccessResp(c, fiber.StatusOK, "Success", result) + return common.SendSuccessResp(c, fiber.StatusOK, "Success", result) } func (h *MenuHandler) UpdateActiveMenuByMenuID(c fiber.Ctx) error { @@ -139,13 +140,13 @@ func (h *MenuHandler) UpdateActiveMenuByMenuID(c fiber.Ctx) error { menuID := c.Params("menu_id") convertMenuIDtoInt, err := strconv.Atoi(menuID) if err != nil { - return SendErrorResp(c, fiber.StatusBadRequest, err.Error()) + return common.SendErrorResp(c, fiber.StatusBadRequest, err.Error()) } result, err := h.menuService.UpdateActiveMenuID(ctx, int64(convertMenuIDtoInt)) if err != nil { - return SendErrorResp(c, fiber.StatusBadRequest, fmt.Sprintf(constants.ErrMsgFailedDeleteMenu, " delete by menu id")) + return common.SendErrorResp(c, fiber.StatusBadRequest, fmt.Sprintf(constants.ErrMsgFailedDeleteMenu, " delete by menu id")) } - return SendSuccessResp(c, fiber.StatusOK, "Success", result) + return common.SendSuccessResp(c, fiber.StatusOK, "Success", result) } diff --git a/internal/app/api/init_test.go b/internal/app/api/init_test.go index 6d2df17..7a2969b 100644 --- a/internal/app/api/init_test.go +++ b/internal/app/api/init_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - "github.com/voltgizerz/POS-restaurant/internal/app/mocks" + "github.com/voltgizerz/POS-restaurant/internal/mocks" "github.com/voltgizerz/POS-restaurant/pkg/logger" "go.uber.org/mock/gomock" ) diff --git a/internal/app/api/middleware/initialization.go b/internal/app/api/middleware/initialization.go index bec8943..193dd2f 100644 --- a/internal/app/api/middleware/initialization.go +++ b/internal/app/api/middleware/initialization.go @@ -5,7 +5,7 @@ import ( "github.com/gofiber/fiber/v3" "github.com/google/uuid" - "github.com/voltgizerz/POS-restaurant/internal/app/constants" + "github.com/voltgizerz/POS-restaurant/internal/constants" ) // All request go here first diff --git a/internal/app/api/middleware/jwt_auth.go b/internal/app/api/middleware/jwt_auth.go index 45195da..7eaf22b 100644 --- a/internal/app/api/middleware/jwt_auth.go +++ b/internal/app/api/middleware/jwt_auth.go @@ -7,9 +7,9 @@ import ( "github.com/gofiber/fiber/v3" "github.com/google/uuid" "github.com/opentracing/opentracing-go" - "github.com/voltgizerz/POS-restaurant/internal/app/api/handler" - "github.com/voltgizerz/POS-restaurant/internal/app/constants" + "github.com/voltgizerz/POS-restaurant/internal/app/api/common" "github.com/voltgizerz/POS-restaurant/internal/app/ports" + "github.com/voltgizerz/POS-restaurant/internal/constants" ) const ( @@ -34,19 +34,19 @@ func (m *JWTAuth) AuthorizeAccess() fiber.Handler { return func(c fiber.Ctx) error { authHeader := c.Get(headerAuthName) if authHeader == "" { - return handler.SendErrorResp(c, fiber.StatusUnauthorized, "Missing Authorization header") + return common.SendErrorResp(c, fiber.StatusUnauthorized, "Missing Authorization header") } // Check if the token type is Bearer tokenType, tokenValue, err := parseAuthHeader(authHeader) if err != nil || tokenType != tokenTypeJWT { - return handler.SendErrorResp(c, fiber.StatusUnauthorized, "Invalid authorization header format") + return common.SendErrorResp(c, fiber.StatusUnauthorized, "Invalid authorization header format") } // Verify JWT token using AuthService.VerifyToken _, claims, err := m.AuthService.VerifyToken(c.UserContext(), tokenValue) if err != nil { - return handler.SendErrorResp(c, fiber.StatusUnauthorized, "Invalid token") + return common.SendErrorResp(c, fiber.StatusUnauthorized, "Invalid token") } requestID := uuid.New().String() diff --git a/internal/app/auth/auth.go b/internal/app/auth/auth.go index f878d1f..2f0a9b8 100644 --- a/internal/app/auth/auth.go +++ b/internal/app/auth/auth.go @@ -4,7 +4,7 @@ import ( "context" "errors" - "github.com/voltgizerz/POS-restaurant/internal/app/constants" + "github.com/voltgizerz/POS-restaurant/internal/constants" ) type Auth struct { diff --git a/internal/app/auth/auth_test.go b/internal/app/auth/auth_test.go index 19fa068..1668c48 100644 --- a/internal/app/auth/auth_test.go +++ b/internal/app/auth/auth_test.go @@ -5,7 +5,7 @@ import ( "reflect" "testing" - "github.com/voltgizerz/POS-restaurant/internal/app/constants" + "github.com/voltgizerz/POS-restaurant/internal/constants" ) func TestGetUserLoginFromCtx(t *testing.T) { diff --git a/internal/app/ports/auth_ports.go b/internal/app/ports/auth_ports.go index 19002cf..b0124e5 100644 --- a/internal/app/ports/auth_ports.go +++ b/internal/app/ports/auth_ports.go @@ -8,7 +8,7 @@ import ( "github.com/voltgizerz/POS-restaurant/internal/app/entity" ) -//go:generate mockgen -source=./internal/app/ports/auth_ports.go -destination=./internal/app/mocks/mocks_auth.go -package=mocks +//go:generate mockgen -source=./internal/app/ports/auth_ports.go -destination=./internal/mocks/mocks_auth.go -package=mocks type IJWTAuth interface { CreateToken(ctx context.Context, user entity.UserORM) (*entity.CreateTokenResponse, error) VerifyToken(ctx context.Context, tokenString string) (*jwt.Token, jwt.MapClaims, error) diff --git a/internal/app/ports/menu_ports.go b/internal/app/ports/menu_ports.go index bd202ef..2482775 100644 --- a/internal/app/ports/menu_ports.go +++ b/internal/app/ports/menu_ports.go @@ -8,7 +8,7 @@ import ( "github.com/voltgizerz/POS-restaurant/internal/app/entity" ) -//go:generate mockgen -source=./internal/app/ports/menu_ports.go -destination=./internal/app/mocks/mocks_menu.go -package=mocks +//go:generate mockgen -source=./internal/app/ports/menu_ports.go -destination=./internal/mocks/mocks_menu.go -package=mocks type IMenuHandler interface { AddMenu(c fiber.Ctx) error GetMenuByUserID(c fiber.Ctx) error diff --git a/internal/app/ports/tx_ports.go b/internal/app/ports/tx_ports.go index 4092dc9..5cf4970 100644 --- a/internal/app/ports/tx_ports.go +++ b/internal/app/ports/tx_ports.go @@ -5,7 +5,7 @@ import ( "database/sql" ) -//go:generate mockgen -source=./internal/app/ports/tx_ports.go -destination=./internal/app/mocks/mocks_tx.go -package=mocks +//go:generate mockgen -source=./internal/app/ports/tx_ports.go -destination=./internal/mocks/mocks_tx.go -package=mocks // IRepositoryTx defines the transaction methods. type ITxRepository interface { diff --git a/internal/app/ports/user_ports.go b/internal/app/ports/user_ports.go index a7def8b..21f8e22 100644 --- a/internal/app/ports/user_ports.go +++ b/internal/app/ports/user_ports.go @@ -6,7 +6,7 @@ import ( "github.com/voltgizerz/POS-restaurant/internal/app/entity" ) -//go:generate mockgen -source=./internal/app/ports/user_ports.go -destination=./internal/app/mocks/mocks_user.go -package=mocks +//go:generate mockgen -source=./internal/app/ports/user_ports.go -destination=./internal/mocks/mocks_user.go -package=mocks type IUserRepository interface { GetUserByUsernameAndPassword(ctx context.Context, username string, hashPassword string) (*entity.UserORM, error) GetUserByUsername(ctx context.Context, username string) (*entity.UserORM, error) diff --git a/internal/app/repository/init.go b/internal/app/repository/init.go index b2685d7..948ed7d 100644 --- a/internal/app/repository/init.go +++ b/internal/app/repository/init.go @@ -1,7 +1,7 @@ package repository import ( - "github.com/voltgizerz/POS-restaurant/database" + "github.com/voltgizerz/POS-restaurant/internal/database" ) type RepositoryOpts struct { diff --git a/internal/app/service/init_test.go b/internal/app/service/init_test.go index a602439..f2fa4dd 100644 --- a/internal/app/service/init_test.go +++ b/internal/app/service/init_test.go @@ -4,7 +4,7 @@ import ( "os" "testing" - "github.com/voltgizerz/POS-restaurant/internal/app/mocks" + "github.com/voltgizerz/POS-restaurant/internal/mocks" "github.com/voltgizerz/POS-restaurant/pkg/logger" "go.uber.org/mock/gomock" ) diff --git a/internal/app/constants/context.go b/internal/constants/context.go similarity index 100% rename from internal/app/constants/context.go rename to internal/constants/context.go diff --git a/internal/app/constants/errors.go b/internal/constants/errors.go similarity index 100% rename from internal/app/constants/errors.go rename to internal/constants/errors.go diff --git a/database/database.go b/internal/database/database.go similarity index 100% rename from database/database.go rename to internal/database/database.go diff --git a/database/database_test.go b/internal/database/database_test.go similarity index 100% rename from database/database_test.go rename to internal/database/database_test.go diff --git a/database/migrations/00001_food_menus_table.sql b/internal/database/migrations/00001_food_menus_table.sql similarity index 100% rename from database/migrations/00001_food_menus_table.sql rename to internal/database/migrations/00001_food_menus_table.sql diff --git a/database/migrations/20240622125106_add_users_table.sql b/internal/database/migrations/20240622125106_add_users_table.sql similarity index 100% rename from database/migrations/20240622125106_add_users_table.sql rename to internal/database/migrations/20240622125106_add_users_table.sql diff --git a/internal/mocks/init_test.go b/internal/mocks/init_test.go new file mode 100644 index 0000000..d9bff3f --- /dev/null +++ b/internal/mocks/init_test.go @@ -0,0 +1 @@ +package mocks \ No newline at end of file diff --git a/internal/app/mocks/mocks_auth.go b/internal/mocks/mocks_auth.go similarity index 99% rename from internal/app/mocks/mocks_auth.go rename to internal/mocks/mocks_auth.go index 4a76d6e..08ab4eb 100644 --- a/internal/app/mocks/mocks_auth.go +++ b/internal/mocks/mocks_auth.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -source=./internal/app/ports/auth_ports.go -destination=./internal/app/mocks/mocks_auth.go -package=mocks +// mockgen -source=./internal/app/ports/auth_ports.go -destination=./internal/mocks/mocks_auth.go -package=mocks // // Package mocks is a generated GoMock package. diff --git a/internal/app/mocks/mocks_menu.go b/internal/mocks/mocks_menu.go similarity index 99% rename from internal/app/mocks/mocks_menu.go rename to internal/mocks/mocks_menu.go index 970fd07..89a81df 100644 --- a/internal/app/mocks/mocks_menu.go +++ b/internal/mocks/mocks_menu.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -source=./internal/app/ports/menu_ports.go -destination=./internal/app/mocks/mocks_menu.go -package=mocks +// mockgen -source=./internal/app/ports/menu_ports.go -destination=./internal/mocks/mocks_menu.go -package=mocks // // Package mocks is a generated GoMock package. diff --git a/internal/app/mocks/mocks_tx.go b/internal/mocks/mocks_tx.go similarity index 98% rename from internal/app/mocks/mocks_tx.go rename to internal/mocks/mocks_tx.go index 5760cfa..a02fd6c 100644 --- a/internal/app/mocks/mocks_tx.go +++ b/internal/mocks/mocks_tx.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -source=./internal/app/ports/tx_ports.go -destination=./internal/app/mocks/mocks_tx.go -package=mocks +// mockgen -source=./internal/app/ports/tx_ports.go -destination=./internal/mocks/mocks_tx.go -package=mocks // // Package mocks is a generated GoMock package. diff --git a/internal/app/mocks/mocks_user.go b/internal/mocks/mocks_user.go similarity index 98% rename from internal/app/mocks/mocks_user.go rename to internal/mocks/mocks_user.go index 4dad1e8..9b5356d 100644 --- a/internal/app/mocks/mocks_user.go +++ b/internal/mocks/mocks_user.go @@ -3,7 +3,7 @@ // // Generated by this command: // -// mockgen -source=./internal/app/ports/user_ports.go -destination=./internal/app/mocks/mocks_user.go -package=mocks +// mockgen -source=./internal/app/ports/user_ports.go -destination=./internal/mocks/mocks_user.go -package=mocks // // Package mocks is a generated GoMock package.