From 018fd310cbcfdf099a6432809377f48d3d57034c Mon Sep 17 00:00:00 2001 From: Eden Kirin Date: Sun, 14 Jan 2024 12:45:30 +0100 Subject: [PATCH] Add envoy proxy --- docker-compose.yml | 30 +- machines/app/api/router.go | 9 +- media/demo-overview.excalidraw | 1476 +++++++++++++++++--------------- products/app/api/router.go | 9 +- proxy/envoy.yaml | 65 ++ 5 files changed, 896 insertions(+), 693 deletions(-) create mode 100644 proxy/envoy.yaml diff --git a/docker-compose.yml b/docker-compose.yml index ca37414..be7cb69 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,7 +13,7 @@ services: interval: 1s timeout: 5s retries: 10 - machines-app: + machines-service: build: context: ./machines dockerfile: Dockerfile @@ -23,8 +23,32 @@ services: - DBNAME=komponiranje - DBUSER=pero - DBPASSWORD=pero.000 - ports: - - 3000:3000 + # ports: + # - 3000:3000 depends_on: db: condition: service_healthy + products-service: + build: + context: ./products + dockerfile: Dockerfile + environment: + - DBHOST=db + - DBPORT=5432 + - DBNAME=komponiranje + - DBUSER=pero + - DBPASSWORD=pero.000 + # ports: + # - 3000:3000 + depends_on: + db: + condition: service_healthy + proxy: + image: envoyproxy/envoy:v1.28-latest + ports: + - "10000:10000" + volumes: + - ./proxy/envoy.yaml:/etc/envoy/envoy.yaml + depends_on: + - machines-service + - products-service diff --git a/machines/app/api/router.go b/machines/app/api/router.go index 683bcfe..5bdcc54 100644 --- a/machines/app/api/router.go +++ b/machines/app/api/router.go @@ -60,9 +60,12 @@ func initRouter(dbConn *gorm.DB) *gin.Engine { gin.SetMode(gin.ReleaseMode) router := gin.Default() - router.GET("/ping", handlePing) - router.GET("/", handleGetMachines(dbConn)) - router.GET("/:machineId", handleGetMachine(dbConn)) + routes := router.Group("/machines") + { + routes.GET("/ping", handlePing) + routes.GET("", handleGetMachines(dbConn)) + routes.GET("/:machineId", handleGetMachine(dbConn)) + } return router } diff --git a/media/demo-overview.excalidraw b/media/demo-overview.excalidraw index 983ab0f..1a35792 100644 --- a/media/demo-overview.excalidraw +++ b/media/demo-overview.excalidraw @@ -4,20 +4,24 @@ "source": "https://excalidraw.com", "elements": [ { - "id": "NjKI1N2j0SeaaMS4uiFZX", "type": "rectangle", - "x": 3729.2508030226, - "y": -11020.067187744567, - "width": 441.67839738100747, - "height": 266.50651489918164, - "angle": 0, - "strokeColor": "#1971c2", - "backgroundColor": "#a5d8ff", + "version": 517, + "versionNonce": 799640464, + "isDeleted": false, + "id": "NjKI1N2j0SeaaMS4uiFZX", "fillStyle": "cross-hatch", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 2, "opacity": 60, + "angle": 0, + "x": 3729.2508030226, + "y": -11020.067187744567, + "strokeColor": "#1971c2", + "backgroundColor": "#a5d8ff", + "width": 441.67839738100747, + "height": 266.50651489918164, + "seed": 1628488080, "groupIds": [ "Rss4LyC8ihqpwbTPQwIOv" ], @@ -25,10 +29,6 @@ "roundness": { "type": 3 }, - "seed": 1628488080, - "version": 517, - "versionNonce": 799640464, - "isDeleted": false, "boundElements": [ { "type": "text", @@ -40,58 +40,62 @@ "locked": false }, { - "id": "FgquJ-KdrqEEVWEGfq6LP", "type": "text", - "x": 3841.785550724334, - "y": -11015.067187744567, - "width": 216.60890197753906, - "height": 35, - "angle": 0, - "strokeColor": "#1971c2", - "backgroundColor": "#a5d8ff", + "version": 472, + "versionNonce": 1469159824, + "isDeleted": false, + "id": "FgquJ-KdrqEEVWEGfq6LP", "fillStyle": "cross-hatch", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 2, "opacity": 60, + "angle": 0, + "x": 3841.785550724334, + "y": -11015.067187744567, + "strokeColor": "#1971c2", + "backgroundColor": "#a5d8ff", + "width": 216.60890197753906, + "height": 35, + "seed": 109174640, "groupIds": [ "Rss4LyC8ihqpwbTPQwIOv" ], "frameId": null, "roundness": null, - "seed": 109174640, - "version": 472, - "versionNonce": 1469159824, - "isDeleted": false, - "boundElements": null, + "boundElements": [], "updated": 1705138387380, "link": null, "locked": false, - "text": "Proxy Container", "fontSize": 28, "fontFamily": 1, + "text": "Proxy Container", "textAlign": "center", "verticalAlign": "top", - "baseline": 23, "containerId": "NjKI1N2j0SeaaMS4uiFZX", "originalText": "Proxy Container", - "lineHeight": 1.25 + "lineHeight": 1.25, + "baseline": 26 }, { - "id": "IdWgQ7K35j_LT3pdoxDq0", "type": "rectangle", - "x": 3764.743302048994, - "y": -10936.619110793583, - "width": 370.6933993282196, - "height": 135.96159433301, - "angle": 0, - "strokeColor": "#2f9e44", - "backgroundColor": "#b2f2bb", + "version": 398, + "versionNonce": 591914896, + "isDeleted": false, + "id": "IdWgQ7K35j_LT3pdoxDq0", "fillStyle": "solid", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 2, "opacity": 60, + "angle": 0, + "x": 3764.743302048994, + "y": -10936.619110793583, + "strokeColor": "#2f9e44", + "backgroundColor": "#b2f2bb", + "width": 370.6933993282196, + "height": 135.96159433301, + "seed": 224848272, "groupIds": [ "Rss4LyC8ihqpwbTPQwIOv" ], @@ -99,10 +103,6 @@ "roundness": { "type": 3 }, - "seed": 224848272, - "version": 398, - "versionNonce": 591914896, - "isDeleted": false, "boundElements": [ { "type": "text", @@ -126,58 +126,62 @@ "locked": false }, { - "id": "ZHqsaRuDQUewUhGNV7xf5", "type": "text", - "x": 3914.2498527873227, - "y": -10886.138313627078, - "width": 71.6802978515625, - "height": 35, - "angle": 0, - "strokeColor": "#2f9e44", - "backgroundColor": "transparent", + "version": 321, + "versionNonce": 1882392976, + "isDeleted": false, + "id": "ZHqsaRuDQUewUhGNV7xf5", "fillStyle": "cross-hatch", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 2, "opacity": 60, + "angle": 0, + "x": 3914.2498527873227, + "y": -10886.138313627078, + "strokeColor": "#2f9e44", + "backgroundColor": "transparent", + "width": 71.6802978515625, + "height": 35, + "seed": 268580720, "groupIds": [ "Rss4LyC8ihqpwbTPQwIOv" ], "frameId": null, "roundness": null, - "seed": 268580720, - "version": 321, - "versionNonce": 1882392976, - "isDeleted": false, - "boundElements": null, + "boundElements": [], "updated": 1705138387381, "link": null, "locked": false, - "text": "envoy", "fontSize": 28, "fontFamily": 1, + "text": "envoy", "textAlign": "center", "verticalAlign": "middle", - "baseline": 23, "containerId": "IdWgQ7K35j_LT3pdoxDq0", "originalText": "envoy", - "lineHeight": 1.25 + "lineHeight": 1.25, + "baseline": 26 }, { - "id": "6E6wDhNqpJFrTFY11GZ54", "type": "rectangle", - "x": 3131.786193538034, - "y": -11196.756490587553, - "width": 421.17726338120815, - "height": 592.2986532661115, - "angle": 0, - "strokeColor": "#1971c2", - "backgroundColor": "#a5d8ff", + "version": 811, + "versionNonce": 1842723696, + "isDeleted": false, + "id": "6E6wDhNqpJFrTFY11GZ54", "fillStyle": "cross-hatch", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 2, "opacity": 60, + "angle": 0, + "x": 3131.786193538034, + "y": -11196.756490587553, + "strokeColor": "#1971c2", + "backgroundColor": "#a5d8ff", + "width": 421.17726338120815, + "height": 592.2986532661115, + "seed": 1076789648, "groupIds": [ "jydhSxUP-MDXYxXro2un2" ], @@ -185,10 +189,6 @@ "roundness": { "type": 3 }, - "seed": 1076789648, - "version": 811, - "versionNonce": 1842723696, - "isDeleted": false, "boundElements": [ { "type": "text", @@ -200,58 +200,62 @@ "locked": false }, { - "id": "APtWZdd2UdzfqVj-6Onar", "type": "text", - "x": 3213.1122825040284, - "y": -11191.756490587553, - "width": 258.52508544921875, - "height": 35, - "angle": 0, - "strokeColor": "#1971c2", - "backgroundColor": "#ffec99", + "version": 612, + "versionNonce": 74239344, + "isDeleted": false, + "id": "APtWZdd2UdzfqVj-6Onar", "fillStyle": "cross-hatch", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 2, "opacity": 60, + "angle": 0, + "x": 3213.1122825040284, + "y": -11191.756490587553, + "strokeColor": "#1971c2", + "backgroundColor": "#ffec99", + "width": 258.52508544921875, + "height": 35, + "seed": 961689968, "groupIds": [ "jydhSxUP-MDXYxXro2un2" ], "frameId": null, "roundness": null, - "seed": 961689968, - "version": 612, - "versionNonce": 74239344, - "isDeleted": false, - "boundElements": null, + "boundElements": [], "updated": 1705138571550, "link": null, "locked": false, - "text": "Frontend Container", "fontSize": 28, "fontFamily": 1, + "text": "Frontend Container", "textAlign": "center", "verticalAlign": "top", - "baseline": 23, "containerId": "6E6wDhNqpJFrTFY11GZ54", "originalText": "Frontend Container", - "lineHeight": 1.25 + "lineHeight": 1.25, + "baseline": 26 }, { - "id": "saBhGH3RJvBZz1GlGAQMa", "type": "rectangle", - "x": 3157.028125564528, - "y": -11117.701363076803, - "width": 370.6933993282196, - "height": 135.96159433301, - "angle": 0, - "strokeColor": "#2f9e44", - "backgroundColor": "#b2f2bb", + "version": 261, + "versionNonce": 1506915216, + "isDeleted": false, + "id": "saBhGH3RJvBZz1GlGAQMa", "fillStyle": "solid", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 2, "opacity": 60, + "angle": 0, + "x": 3157.028125564528, + "y": -11117.701363076803, + "strokeColor": "#2f9e44", + "backgroundColor": "#b2f2bb", + "width": 370.6933993282196, + "height": 135.96159433301, + "seed": 341998992, "groupIds": [ "jydhSxUP-MDXYxXro2un2" ], @@ -259,10 +263,6 @@ "roundness": { "type": 3 }, - "seed": 341998992, - "version": 261, - "versionNonce": 1506915216, - "isDeleted": false, "boundElements": [ { "type": "text", @@ -278,58 +278,62 @@ "locked": false }, { - "id": "ptwVLLo2a-d1Z7-pTsN-D", "type": "text", - "x": 3311.35070108313, - "y": -11067.220565910298, - "width": 62.048248291015625, - "height": 35, - "angle": 0, - "strokeColor": "#2f9e44", - "backgroundColor": "transparent", + "version": 179, + "versionNonce": 2144088432, + "isDeleted": false, + "id": "ptwVLLo2a-d1Z7-pTsN-D", "fillStyle": "cross-hatch", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 2, "opacity": 60, + "angle": 0, + "x": 3311.35070108313, + "y": -11067.220565910298, + "strokeColor": "#2f9e44", + "backgroundColor": "transparent", + "width": 62.048248291015625, + "height": 35, + "seed": 1062518672, "groupIds": [ "jydhSxUP-MDXYxXro2un2" ], "frameId": null, "roundness": null, - "seed": 1062518672, - "version": 179, - "versionNonce": 2144088432, - "isDeleted": false, - "boundElements": null, + "boundElements": [], "updated": 1705138571550, "link": null, "locked": false, - "text": "nginx", "fontSize": 28, "fontFamily": 1, + "text": "nginx", "textAlign": "center", "verticalAlign": "middle", - "baseline": 23, "containerId": "saBhGH3RJvBZz1GlGAQMa", "originalText": "nginx", - "lineHeight": 1.25 + "lineHeight": 1.25, + "baseline": 26 }, { - "id": "pdbXtWG_f1H-RY-Vk0RNy", "type": "rectangle", - "x": 3157.028125564528, - "y": -10943.084260027339, - "width": 370.6933993282196, - "height": 135.96159433301, - "angle": 0, - "strokeColor": "#2f9e44", - "backgroundColor": "#b2f2bb", + "version": 309, + "versionNonce": 1009025904, + "isDeleted": false, + "id": "pdbXtWG_f1H-RY-Vk0RNy", "fillStyle": "solid", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 2, "opacity": 60, + "angle": 0, + "x": 3157.028125564528, + "y": -10943.084260027339, + "strokeColor": "#2f9e44", + "backgroundColor": "#b2f2bb", + "width": 370.6933993282196, + "height": 135.96159433301, + "seed": 412538256, "groupIds": [ "jydhSxUP-MDXYxXro2un2" ], @@ -337,10 +341,6 @@ "roundness": { "type": 3 }, - "seed": 412538256, - "version": 309, - "versionNonce": 1009025904, - "isDeleted": false, "boundElements": [ { "type": "text", @@ -356,58 +356,62 @@ "locked": false }, { - "id": "VXRZ0cMB_qeYCphBoY4o4", "type": "text", - "x": 3255.0424506558843, - "y": -10892.603462860834, - "width": 174.6647491455078, - "height": 35, - "angle": 0, - "strokeColor": "#2f9e44", - "backgroundColor": "transparent", + "version": 237, + "versionNonce": 472906096, + "isDeleted": false, + "id": "VXRZ0cMB_qeYCphBoY4o4", "fillStyle": "cross-hatch", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 2, "opacity": 60, + "angle": 0, + "x": 3255.0424506558843, + "y": -10892.603462860834, + "strokeColor": "#2f9e44", + "backgroundColor": "transparent", + "width": 174.6647491455078, + "height": 35, + "seed": 18287472, "groupIds": [ "jydhSxUP-MDXYxXro2un2" ], "frameId": null, "roundness": null, - "seed": 18287472, - "version": 237, - "versionNonce": 472906096, - "isDeleted": false, - "boundElements": null, + "boundElements": [], "updated": 1705138571550, "link": null, "locked": false, - "text": "frontend app", "fontSize": 28, "fontFamily": 1, + "text": "frontend app", "textAlign": "center", "verticalAlign": "middle", - "baseline": 23, "containerId": "pdbXtWG_f1H-RY-Vk0RNy", "originalText": "frontend app", - "lineHeight": 1.25 + "lineHeight": 1.25, + "baseline": 26 }, { - "id": "ORueF6Kvlp_qrMcizUQT1", "type": "rectangle", - "x": 3157.028125564528, - "y": -10768.467156977877, - "width": 370.6933993282196, - "height": 135.96159433301, - "angle": 0, - "strokeColor": "#2f9e44", - "backgroundColor": "#b2f2bb", + "version": 319, + "versionNonce": 684673904, + "isDeleted": false, + "id": "ORueF6Kvlp_qrMcizUQT1", "fillStyle": "solid", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 2, "opacity": 60, + "angle": 0, + "x": 3157.028125564528, + "y": -10768.467156977877, + "strokeColor": "#2f9e44", + "backgroundColor": "#b2f2bb", + "width": 370.6933993282196, + "height": 135.96159433301, + "seed": 54054288, "groupIds": [ "jydhSxUP-MDXYxXro2un2" ], @@ -415,10 +419,6 @@ "roundness": { "type": 3 }, - "seed": 54054288, - "version": 319, - "versionNonce": 684673904, - "isDeleted": false, "boundElements": [ { "type": "text", @@ -430,58 +430,62 @@ "locked": false }, { - "id": "M6K658jWQbf0cXeKXyTvd", "type": "text", - "x": 3227.532356966919, - "y": -10735.486359811372, - "width": 229.6849365234375, - "height": 70, - "angle": 0, - "strokeColor": "#2f9e44", - "backgroundColor": "transparent", + "version": 286, + "versionNonce": 1236557168, + "isDeleted": false, + "id": "M6K658jWQbf0cXeKXyTvd", "fillStyle": "cross-hatch", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 2, "opacity": 60, + "angle": 0, + "x": 3227.532356966919, + "y": -10735.486359811372, + "strokeColor": "#2f9e44", + "backgroundColor": "transparent", + "width": 229.6849365234375, + "height": 70, + "seed": 61903728, "groupIds": [ "jydhSxUP-MDXYxXro2un2" ], "frameId": null, "roundness": null, - "seed": 61903728, - "version": 286, - "versionNonce": 1236557168, - "isDeleted": false, - "boundElements": null, + "boundElements": [], "updated": 1705138571550, "link": null, "locked": false, - "text": "static content\n(html, js, images)", "fontSize": 28, "fontFamily": 1, + "text": "static content\n(html, js, images)", "textAlign": "center", "verticalAlign": "middle", - "baseline": 58, "containerId": "ORueF6Kvlp_qrMcizUQT1", "originalText": "static content\n(html, js, images)", - "lineHeight": 1.25 + "lineHeight": 1.25, + "baseline": 61 }, { - "id": "ai0osAWJ1RBoQ4JBro3L0", "type": "rectangle", - "x": 4932.045318203683, - "y": -10965.772824160624, - "width": 441.67839738100747, - "height": 244.0136658116589, - "angle": 0, - "strokeColor": "#1971c2", - "backgroundColor": "#a5d8ff", + "version": 281, + "versionNonce": 1695751536, + "isDeleted": false, + "id": "ai0osAWJ1RBoQ4JBro3L0", "fillStyle": "cross-hatch", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 2, "opacity": 60, + "angle": 0, + "x": 4932.045318203683, + "y": -10965.772824160624, + "strokeColor": "#1971c2", + "backgroundColor": "#a5d8ff", + "width": 441.67839738100747, + "height": 244.0136658116589, + "seed": 2090954096, "groupIds": [ "klXiiV91k8ywNVZuonIb9" ], @@ -489,10 +493,6 @@ "roundness": { "type": 3 }, - "seed": 2090954096, - "version": 281, - "versionNonce": 1695751536, - "isDeleted": false, "boundElements": [ { "type": "text", @@ -504,58 +504,62 @@ "locked": false }, { - "id": "Lcioux1OAkfxYsRwg7tPh", "type": "text", - "x": 5012.827937304342, - "y": -10960.772824160624, - "width": 280.1131591796875, - "height": 35, - "angle": 0, - "strokeColor": "#1971c2", - "backgroundColor": "#a5d8ff", + "version": 216, + "versionNonce": 833482608, + "isDeleted": false, + "id": "Lcioux1OAkfxYsRwg7tPh", "fillStyle": "cross-hatch", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 2, "opacity": 60, + "angle": 0, + "x": 5012.827937304342, + "y": -10960.772824160624, + "strokeColor": "#1971c2", + "backgroundColor": "#a5d8ff", + "width": 280.1131591796875, + "height": 35, + "seed": 590011248, "groupIds": [ "klXiiV91k8ywNVZuonIb9" ], "frameId": null, "roundness": null, - "seed": 590011248, - "version": 216, - "versionNonce": 833482608, - "isDeleted": false, - "boundElements": null, + "boundElements": [], "updated": 1705138706089, "link": null, "locked": false, - "text": "Database Container", "fontSize": 28, "fontFamily": 1, + "text": "Database Container", "textAlign": "center", "verticalAlign": "top", - "baseline": 23, "containerId": "ai0osAWJ1RBoQ4JBro3L0", "originalText": "Database Container", - "lineHeight": 1.25 + "lineHeight": 1.25, + "baseline": 26 }, { - "id": "wUuH6P3y0n2bIbcULauqL", "type": "rectangle", - "x": 4967.537817230076, - "y": -10892.081485608365, - "width": 370.6933993282196, - "height": 135.96159433301, - "angle": 0, - "strokeColor": "#2f9e44", - "backgroundColor": "#b2f2bb", + "version": 445, + "versionNonce": 119439728, + "isDeleted": false, + "id": "wUuH6P3y0n2bIbcULauqL", "fillStyle": "solid", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 2, "opacity": 60, + "angle": 0, + "x": 4967.537817230076, + "y": -10892.081485608365, + "strokeColor": "#2f9e44", + "backgroundColor": "#b2f2bb", + "width": 370.6933993282196, + "height": 135.96159433301, + "seed": 66818960, "groupIds": [ "klXiiV91k8ywNVZuonIb9" ], @@ -563,10 +567,6 @@ "roundness": { "type": 3 }, - "seed": 66818960, - "version": 445, - "versionNonce": 119439728, - "isDeleted": false, "boundElements": [ { "type": "text", @@ -586,82 +586,71 @@ "locked": false }, { - "id": "TtJzzXuOaQrik6UMq4Jrt", "type": "text", - "x": 5094.42026823696, - "y": -10841.60068844186, - "width": 116.92849731445312, - "height": 35, - "angle": 0, - "strokeColor": "#2f9e44", - "backgroundColor": "transparent", + "version": 397, + "versionNonce": 1118804848, + "isDeleted": false, + "id": "TtJzzXuOaQrik6UMq4Jrt", "fillStyle": "cross-hatch", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 2, "opacity": 60, + "angle": 0, + "x": 5094.42026823696, + "y": -10841.60068844186, + "strokeColor": "#2f9e44", + "backgroundColor": "transparent", + "width": 116.92849731445312, + "height": 35, + "seed": 2045062512, "groupIds": [ "klXiiV91k8ywNVZuonIb9" ], "frameId": null, "roundness": null, - "seed": 2045062512, - "version": 397, - "versionNonce": 1118804848, - "isDeleted": false, - "boundElements": null, + "boundElements": [], "updated": 1705138706089, "link": null, "locked": false, - "text": "postgres", "fontSize": 28, "fontFamily": 1, + "text": "postgres", "textAlign": "center", "verticalAlign": "middle", - "baseline": 23, "containerId": "wUuH6P3y0n2bIbcULauqL", "originalText": "postgres", - "lineHeight": 1.25 + "lineHeight": 1.25, + "baseline": 26 }, { - "id": "NBzbo9X5gNwq6Cu8UQiyf", "type": "arrow", - "x": 3529.3074382989093, - "y": -10887.49918430747, - "width": 232.42631524626904, - "height": 19.460264122171793, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "#a5d8ff", + "version": 631, + "versionNonce": 1867871632, + "isDeleted": false, + "id": "NBzbo9X5gNwq6Cu8UQiyf", "fillStyle": "cross-hatch", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 2, "opacity": 60, + "angle": 0, + "x": 3529.3074382989093, + "y": -10887.49918430747, + "strokeColor": "#1e1e1e", + "backgroundColor": "#a5d8ff", + "width": 232.42631524626904, + "height": 19.460264122171793, + "seed": 413570960, "groupIds": [], "frameId": null, "roundness": { "type": 2 }, - "seed": 413570960, - "version": 631, - "versionNonce": 1867871632, - "isDeleted": false, - "boundElements": null, + "boundElements": [], "updated": 1705138576811, "link": null, "locked": false, - "points": [ - [ - 0, - 0 - ], - [ - 232.42631524626904, - 19.460264122171793 - ] - ], - "lastCommittedPoint": null, "startBinding": { "elementId": "pdbXtWG_f1H-RY-Vk0RNy", "focus": -0.33589468555228497, @@ -672,48 +661,48 @@ "focus": -0.19604753081828988, "gap": 3.0095485038152674 }, + "lastCommittedPoint": null, "startArrowhead": null, - "endArrowhead": "arrow" - }, - { - "id": "RhRkQFd2AVMdyJzXPC51f", - "type": "arrow", - "x": 4137.978483765599, - "y": -10886.663585084398, - "width": 200.39096969426646, - "height": 270.5724076759434, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "#a5d8ff", - "fillStyle": "cross-hatch", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 2, - "opacity": 60, - "groupIds": [], - "frameId": null, - "roundness": { - "type": 2 - }, - "seed": 671174000, - "version": 503, - "versionNonce": 23827856, - "isDeleted": false, - "boundElements": null, - "updated": 1705138410406, - "link": null, - "locked": false, + "endArrowhead": "arrow", "points": [ [ 0, 0 ], [ - 200.39096969426646, - -270.5724076759434 + 232.42631524626904, + 19.460264122171793 ] - ], - "lastCommittedPoint": null, + ] + }, + { + "type": "arrow", + "version": 503, + "versionNonce": 23827856, + "isDeleted": false, + "id": "RhRkQFd2AVMdyJzXPC51f", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 60, + "angle": 0, + "x": 4137.978483765599, + "y": -10886.663585084398, + "strokeColor": "#1e1e1e", + "backgroundColor": "#a5d8ff", + "width": 200.39096969426646, + "height": 270.5724076759434, + "seed": 671174000, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1705138410406, + "link": null, + "locked": false, "startBinding": { "elementId": "IdWgQ7K35j_LT3pdoxDq0", "focus": 0.7410092967442677, @@ -724,48 +713,48 @@ "focus": 0.8237294536588164, "gap": 1.1884448860569137 }, + "lastCommittedPoint": null, "startArrowhead": null, - "endArrowhead": "arrow" - }, - { - "id": "GxvBGakscR8qvQ3hBN8J-", - "type": "arrow", - "x": 4136.4367013772135, - "y": -10835.8121085344, - "width": 204.6235286040628, - "height": 361.30222411908835, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "#a5d8ff", - "fillStyle": "cross-hatch", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 2, - "opacity": 60, - "groupIds": [], - "frameId": null, - "roundness": { - "type": 2 - }, - "seed": 675507056, - "version": 785, - "versionNonce": 1012781968, - "isDeleted": false, - "boundElements": null, - "updated": 1705138396190, - "link": null, - "locked": false, + "endArrowhead": "arrow", "points": [ [ 0, 0 ], [ - 204.6235286040628, - 361.30222411908835 + 200.39096969426646, + -270.5724076759434 ] - ], - "lastCommittedPoint": null, + ] + }, + { + "type": "arrow", + "version": 785, + "versionNonce": 1012781968, + "isDeleted": false, + "id": "GxvBGakscR8qvQ3hBN8J-", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 60, + "angle": 0, + "x": 4136.4367013772135, + "y": -10835.8121085344, + "strokeColor": "#1e1e1e", + "backgroundColor": "#a5d8ff", + "width": 204.6235286040628, + "height": 361.30222411908835, + "seed": 675507056, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1705138396190, + "link": null, + "locked": false, "startBinding": { "elementId": "IdWgQ7K35j_LT3pdoxDq0", "focus": -0.7500072016304519, @@ -776,48 +765,48 @@ "focus": -0.7857291317579581, "gap": 1 }, + "lastCommittedPoint": null, "startArrowhead": null, - "endArrowhead": "arrow" - }, - { - "id": "waoFatUFaAnlvBo9y6yfH", - "type": "arrow", - "x": 4711.887607541466, - "y": -11153.184282730974, - "width": 254.65020968860972, - "height": 303.628671022434, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "#a5d8ff", - "fillStyle": "cross-hatch", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 2, - "opacity": 60, - "groupIds": [], - "frameId": null, - "roundness": { - "type": 2 - }, - "seed": 593343376, - "version": 267, - "versionNonce": 547415408, - "isDeleted": false, - "boundElements": null, - "updated": 1705138706089, - "link": null, - "locked": false, + "endArrowhead": "arrow", "points": [ [ 0, 0 ], [ - 254.65020968860972, - 303.628671022434 + 204.6235286040628, + 361.30222411908835 ] - ], - "lastCommittedPoint": null, + ] + }, + { + "type": "arrow", + "version": 267, + "versionNonce": 547415408, + "isDeleted": false, + "id": "waoFatUFaAnlvBo9y6yfH", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 60, + "angle": 0, + "x": 4711.887607541466, + "y": -11153.184282730974, + "strokeColor": "#1e1e1e", + "backgroundColor": "#a5d8ff", + "width": 254.65020968860972, + "height": 303.628671022434, + "seed": 593343376, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1705138706089, + "link": null, + "locked": false, "startBinding": { "elementId": "n75eoynQQIjXOS72X19Jr", "focus": -0.7926657031299634, @@ -828,48 +817,48 @@ "focus": -0.6807926534852622, "gap": 1 }, + "lastCommittedPoint": null, "startArrowhead": null, - "endArrowhead": "arrow" - }, - { - "id": "kUvKwE5bb6v-aDmquYB91", - "type": "arrow", - "x": 4715.295619706436, - "y": -10452.89828224272, - "width": 251.24219752364024, - "height": 354.9802750337112, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "#a5d8ff", - "fillStyle": "cross-hatch", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 2, - "opacity": 60, - "groupIds": [], - "frameId": null, - "roundness": { - "type": 2 - }, - "seed": 2020535664, - "version": 446, - "versionNonce": 2145012080, - "isDeleted": false, - "boundElements": null, - "updated": 1705138706089, - "link": null, - "locked": false, + "endArrowhead": "arrow", "points": [ [ 0, 0 ], [ - 251.24219752364024, - -354.9802750337112 + 254.65020968860972, + 303.628671022434 ] - ], - "lastCommittedPoint": null, + ] + }, + { + "type": "arrow", + "version": 446, + "versionNonce": 2145012080, + "isDeleted": false, + "id": "kUvKwE5bb6v-aDmquYB91", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 60, + "angle": 0, + "x": 4715.295619706436, + "y": -10452.89828224272, + "strokeColor": "#1e1e1e", + "backgroundColor": "#a5d8ff", + "width": 251.24219752364024, + "height": 354.9802750337112, + "seed": 2020535664, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1705138706089, + "link": null, + "locked": false, "startBinding": { "elementId": "A7BseBs_mEzk9-lk1eJj_", "focus": 0.8139415579822314, @@ -880,48 +869,48 @@ "focus": 0.7490125782834043, "gap": 1 }, + "lastCommittedPoint": null, "startArrowhead": null, - "endArrowhead": "arrow" - }, - { - "id": "fz4-v3BbLpHUlDxmoU9oC", - "type": "arrow", - "x": 4524.226573006812, - "y": -11074.829265441811, - "width": 5.137432183983037, - "height": 541.8739342302797, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "#a5d8ff", - "fillStyle": "cross-hatch", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 2, - "opacity": 60, - "groupIds": [], - "frameId": null, - "roundness": { - "type": 2 - }, - "seed": 988591472, - "version": 158, - "versionNonce": 862735760, - "isDeleted": false, - "boundElements": null, - "updated": 1705138410406, - "link": null, - "locked": false, + "endArrowhead": "arrow", "points": [ [ 0, 0 ], [ - 5.137432183983037, - 541.8739342302797 + 251.24219752364024, + -354.9802750337112 ] - ], - "lastCommittedPoint": null, + ] + }, + { + "type": "arrow", + "version": 158, + "versionNonce": 862735760, + "isDeleted": false, + "id": "fz4-v3BbLpHUlDxmoU9oC", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 60, + "angle": 0, + "x": 4524.226573006812, + "y": -11074.829265441811, + "strokeColor": "#1e1e1e", + "backgroundColor": "#a5d8ff", + "width": 5.137432183983037, + "height": 541.8739342302797, + "seed": 988591472, + "groupIds": [], + "frameId": null, + "roundness": { + "type": 2 + }, + "boundElements": [], + "updated": 1705138410406, + "link": null, + "locked": false, "startBinding": { "elementId": "n75eoynQQIjXOS72X19Jr", "focus": 0.0073218695934150375, @@ -932,24 +921,39 @@ "focus": 0.01444339203977214, "gap": 8.93926342423947 }, + "lastCommittedPoint": null, "startArrowhead": null, - "endArrowhead": "arrow" + "endArrowhead": "arrow", + "points": [ + [ + 0, + 0 + ], + [ + 5.137432183983037, + 541.8739342302797 + ] + ] }, { - "id": "YPhfkjzNcQxaFwAcVmQUU", "type": "rectangle", - "x": 4304.065399319528, - "y": -11287.031362185682, - "width": 441.67839738100747, - "height": 334.6668362017918, - "angle": 0, - "strokeColor": "#1971c2", - "backgroundColor": "#a5d8ff", + "version": 396, + "versionNonce": 2073692528, + "isDeleted": false, + "id": "YPhfkjzNcQxaFwAcVmQUU", "fillStyle": "cross-hatch", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 2, "opacity": 60, + "angle": 0, + "x": 4304.065399319528, + "y": -11287.031362185682, + "strokeColor": "#1971c2", + "backgroundColor": "#a5d8ff", + "width": 441.67839738100747, + "height": 334.6668362017918, + "seed": 1230123408, "groupIds": [ "Gw5VTob31wsPZTh3M_9YO" ], @@ -957,10 +961,6 @@ "roundness": { "type": 3 }, - "seed": 1230123408, - "version": 396, - "versionNonce": 2073692528, - "isDeleted": false, "boundElements": [ { "type": "text", @@ -972,58 +972,62 @@ "locked": false }, { - "id": "3v1ShPfiBCgX1ECWIRrnP", "type": "text", - "x": 4395.194057238547, - "y": -11282.031362185682, - "width": 259.42108154296875, - "height": 35, - "angle": 0, - "strokeColor": "#1971c2", - "backgroundColor": "#a5d8ff", + "version": 300, + "versionNonce": 704218512, + "isDeleted": false, + "id": "3v1ShPfiBCgX1ECWIRrnP", "fillStyle": "cross-hatch", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 2, "opacity": 60, + "angle": 0, + "x": 4395.194057238547, + "y": -11282.031362185682, + "strokeColor": "#1971c2", + "backgroundColor": "#a5d8ff", + "width": 259.42108154296875, + "height": 35, + "seed": 1364160368, "groupIds": [ "Gw5VTob31wsPZTh3M_9YO" ], "frameId": null, "roundness": null, - "seed": 1364160368, - "version": 300, - "versionNonce": 704218512, - "isDeleted": false, - "boundElements": null, + "boundElements": [], "updated": 1705138671840, "link": null, "locked": false, - "text": "Machines Container", "fontSize": 28, "fontFamily": 1, + "text": "Machines Container", "textAlign": "center", "verticalAlign": "top", - "baseline": 23, "containerId": "YPhfkjzNcQxaFwAcVmQUU", "originalText": "Machines Container", - "lineHeight": 1.25 + "lineHeight": 1.25, + "baseline": 26 }, { - "id": "n75eoynQQIjXOS72X19Jr", "type": "rectangle", - "x": 4339.557898345922, - "y": -11214.937012753066, - "width": 370.6933993282196, - "height": 135.96159433301, - "angle": 0, - "strokeColor": "#2f9e44", - "backgroundColor": "#b2f2bb", + "version": 344, + "versionNonce": 813128560, + "isDeleted": false, + "id": "n75eoynQQIjXOS72X19Jr", "fillStyle": "solid", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 2, "opacity": 60, + "angle": 0, + "x": 4339.557898345922, + "y": -11214.937012753066, + "strokeColor": "#2f9e44", + "backgroundColor": "#b2f2bb", + "width": 370.6933993282196, + "height": 135.96159433301, + "seed": 1209410448, "groupIds": [ "Gw5VTob31wsPZTh3M_9YO" ], @@ -1031,10 +1035,6 @@ "roundness": { "type": 3 }, - "seed": 1209410448, - "version": 344, - "versionNonce": 813128560, - "isDeleted": false, "boundElements": [ { "type": "text", @@ -1058,96 +1058,100 @@ "locked": false }, { - "id": "tRbFn4eaW1fPFGHbh26_R", "type": "text", - "x": 4437.75423790261, - "y": -11164.45621558656, - "width": 174.30072021484375, - "height": 35, - "angle": 0, - "strokeColor": "#2f9e44", - "backgroundColor": "transparent", - "fillStyle": "cross-hatch", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 2, - "opacity": 60, - "groupIds": [ - "Gw5VTob31wsPZTh3M_9YO" - ], - "frameId": null, - "roundness": null, - "seed": 108764528, "version": 280, "versionNonce": 970085264, "isDeleted": false, - "boundElements": null, - "updated": 1705138671840, - "link": null, - "locked": false, - "text": "machines app", - "fontSize": 28, - "fontFamily": 1, - "textAlign": "center", - "verticalAlign": "middle", - "baseline": 23, - "containerId": "n75eoynQQIjXOS72X19Jr", - "originalText": "machines app", - "lineHeight": 1.25 - }, - { - "id": "RExyWP6iEbwZEwWGJ7ynn", - "type": "text", - "x": 4350.018998485362, - "y": -11049.523636914335, - "width": 339.84375, - "height": 72, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "#a5d8ff", + "id": "tRbFn4eaW1fPFGHbh26_R", "fillStyle": "cross-hatch", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 2, "opacity": 60, + "angle": 0, + "x": 4437.75423790261, + "y": -11164.45621558656, + "strokeColor": "#2f9e44", + "backgroundColor": "transparent", + "width": 174.30072021484375, + "height": 35, + "seed": 108764528, "groupIds": [ "Gw5VTob31wsPZTh3M_9YO" ], "frameId": null, "roundness": null, - "seed": 971405200, - "version": 245, - "versionNonce": 1104833904, - "isDeleted": false, - "boundElements": null, + "boundElements": [], "updated": 1705138671840, "link": null, "locked": false, - "text": "/machines\n/machines/:machineId\n/machines/:machineId/products", - "fontSize": 20, - "fontFamily": 3, - "textAlign": "left", - "verticalAlign": "top", - "baseline": 67, - "containerId": null, - "originalText": "/machines\n/machines/:machineId\n/machines/:machineId/products", - "lineHeight": 1.2 + "fontSize": 28, + "fontFamily": 1, + "text": "machines app", + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "n75eoynQQIjXOS72X19Jr", + "originalText": "machines app", + "lineHeight": 1.25, + "baseline": 26 }, { - "id": "VwKFGNiRjQbbSavZfiH7u", - "type": "rectangle", - "x": 4306.567730954883, - "y": -10602.926883568032, - "width": 441.67839738100747, - "height": 328.5320658905167, - "angle": 0, - "strokeColor": "#1971c2", - "backgroundColor": "#a5d8ff", + "type": "text", + "version": 246, + "versionNonce": 990974773, + "isDeleted": false, + "id": "RExyWP6iEbwZEwWGJ7ynn", "fillStyle": "cross-hatch", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 2, "opacity": 60, + "angle": 0, + "x": 4350.018998485362, + "y": -11049.523636914335, + "strokeColor": "#1e1e1e", + "backgroundColor": "#a5d8ff", + "width": 339.84375, + "height": 72, + "seed": 971405200, + "groupIds": [ + "Gw5VTob31wsPZTh3M_9YO" + ], + "frameId": null, + "roundness": null, + "boundElements": [], + "updated": 1705145571167, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": "/machines\n/machines/:machineId\n/machines/:machineId/products", + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "/machines\n/machines/:machineId\n/machines/:machineId/products", + "lineHeight": 1.2, + "baseline": 67 + }, + { + "type": "rectangle", + "version": 592, + "versionNonce": 1025580400, + "isDeleted": false, + "id": "VwKFGNiRjQbbSavZfiH7u", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 60, + "angle": 0, + "x": 4306.567730954883, + "y": -10602.926883568032, + "strokeColor": "#1971c2", + "backgroundColor": "#a5d8ff", + "width": 441.67839738100747, + "height": 328.5320658905167, + "seed": 623983504, "groupIds": [ "8yU8PRZMAyK29_pFsr0bo" ], @@ -1155,10 +1159,6 @@ "roundness": { "type": 3 }, - "seed": 623983504, - "version": 592, - "versionNonce": 1025580400, - "isDeleted": false, "boundElements": [ { "type": "text", @@ -1170,58 +1170,62 @@ "locked": false }, { - "id": "65GKihY2pwS9D03KoVJx7", "type": "text", - "x": 4395.078377399293, - "y": -10597.926883568032, - "width": 264.6571044921875, - "height": 35, - "angle": 0, - "strokeColor": "#1971c2", - "backgroundColor": "#a5d8ff", + "version": 531, + "versionNonce": 1998434704, + "isDeleted": false, + "id": "65GKihY2pwS9D03KoVJx7", "fillStyle": "cross-hatch", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 2, "opacity": 60, + "angle": 0, + "x": 4395.078377399293, + "y": -10597.926883568032, + "strokeColor": "#1971c2", + "backgroundColor": "#a5d8ff", + "width": 264.6571044921875, + "height": 35, + "seed": 1849558384, "groupIds": [ "8yU8PRZMAyK29_pFsr0bo" ], "frameId": null, "roundness": null, - "seed": 1849558384, - "version": 531, - "versionNonce": 1998434704, - "isDeleted": false, - "boundElements": null, + "boundElements": [], "updated": 1705138674276, "link": null, "locked": false, - "text": "Products Container", "fontSize": 28, "fontFamily": 1, + "text": "Products Container", "textAlign": "center", "verticalAlign": "top", - "baseline": 23, "containerId": "VwKFGNiRjQbbSavZfiH7u", "originalText": "Products Container", - "lineHeight": 1.25 + "lineHeight": 1.25, + "baseline": 26 }, { - "id": "A7BseBs_mEzk9-lk1eJj_", "type": "rectangle", - "x": 4342.060229981276, - "y": -10524.016067787292, - "width": 370.6933993282196, - "height": 135.96159433301, - "angle": 0, - "strokeColor": "#2f9e44", - "backgroundColor": "#b2f2bb", + "version": 542, + "versionNonce": 1476128624, + "isDeleted": false, + "id": "A7BseBs_mEzk9-lk1eJj_", "fillStyle": "solid", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 2, "opacity": 60, + "angle": 0, + "x": 4342.060229981276, + "y": -10524.016067787292, + "strokeColor": "#2f9e44", + "backgroundColor": "#b2f2bb", + "width": 370.6933993282196, + "height": 135.96159433301, + "seed": 665767280, "groupIds": [ "8yU8PRZMAyK29_pFsr0bo" ], @@ -1229,10 +1233,6 @@ "roundness": { "type": 3 }, - "seed": 665767280, - "version": 542, - "versionNonce": 1476128624, - "isDeleted": false, "boundElements": [ { "type": "text", @@ -1256,181 +1256,190 @@ "locked": false }, { - "id": "OqcOXay_DWRyOtRdobP08", "type": "text", - "x": 4438.12854829773, - "y": -10473.535270620787, - "width": 178.5567626953125, - "height": 35, - "angle": 0, - "strokeColor": "#2f9e44", - "backgroundColor": "transparent", - "fillStyle": "cross-hatch", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 2, - "opacity": 60, - "groupIds": [ - "8yU8PRZMAyK29_pFsr0bo" - ], - "frameId": null, - "roundness": null, - "seed": 159580560, "version": 475, "versionNonce": 697368464, "isDeleted": false, - "boundElements": null, - "updated": 1705138674276, - "link": null, - "locked": false, - "text": "products app", - "fontSize": 28, - "fontFamily": 1, - "textAlign": "center", - "verticalAlign": "middle", - "baseline": 23, - "containerId": "A7BseBs_mEzk9-lk1eJj_", - "originalText": "products app", - "lineHeight": 1.25 - }, - { - "id": "FCRGzjxk1UBzWmGqDlFB5", - "type": "text", - "x": 4360.01910248964, - "y": -10357.268285652257, - "width": 234.375, - "height": 48, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "#a5d8ff", + "id": "OqcOXay_DWRyOtRdobP08", "fillStyle": "cross-hatch", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 2, "opacity": 60, + "angle": 0, + "x": 4438.12854829773, + "y": -10473.535270620787, + "strokeColor": "#2f9e44", + "backgroundColor": "transparent", + "width": 178.5567626953125, + "height": 35, + "seed": 159580560, "groupIds": [ "8yU8PRZMAyK29_pFsr0bo" ], "frameId": null, "roundness": null, - "seed": 1540564880, - "version": 287, - "versionNonce": 866943344, - "isDeleted": false, - "boundElements": null, + "boundElements": [], "updated": 1705138674276, "link": null, "locked": false, - "text": "/products\n/products/:productId", + "fontSize": 28, + "fontFamily": 1, + "text": "products app", + "textAlign": "center", + "verticalAlign": "middle", + "containerId": "A7BseBs_mEzk9-lk1eJj_", + "originalText": "products app", + "lineHeight": 1.25, + "baseline": 26 + }, + { + "type": "text", + "version": 288, + "versionNonce": 145008283, + "isDeleted": false, + "id": "FCRGzjxk1UBzWmGqDlFB5", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 60, + "angle": 0, + "x": 4360.01910248964, + "y": -10357.268285652257, + "strokeColor": "#1e1e1e", + "backgroundColor": "#a5d8ff", + "width": 234.375, + "height": 48, + "seed": 1540564880, + "groupIds": [ + "8yU8PRZMAyK29_pFsr0bo" + ], + "frameId": null, + "roundness": null, + "boundElements": [], + "updated": 1705145571167, + "link": null, + "locked": false, "fontSize": 20, "fontFamily": 3, + "text": "/products\n/products/:productId", "textAlign": "left", "verticalAlign": "top", - "baseline": 43, "containerId": null, "originalText": "/products\n/products/:productId", - "lineHeight": 1.2 + "lineHeight": 1.2, + "baseline": 43 }, { - "id": "puauPPmatsxiYK7nuxUmV", "type": "text", + "version": 34, + "versionNonce": 1301018997, + "isDeleted": false, + "id": "puauPPmatsxiYK7nuxUmV", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 60, + "angle": 0, "x": 4849.571590218243, "y": -11045.520314021142, - "width": 93.75, - "height": 24, - "angle": 0, "strokeColor": "#1e1e1e", "backgroundColor": "#a5d8ff", + "width": 164.0625, + "height": 24, + "seed": 710222224, + "groupIds": [], + "frameId": null, + "roundness": null, + "boundElements": [], + "updated": 1705232206804, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": "table:machines", + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": "table:machines", + "lineHeight": 1.2, + "baseline": 19 + }, + { + "type": "text", + "version": 84, + "versionNonce": 945004187, + "isDeleted": false, + "id": "ZR8aurk5K826Erslgmf7s", "fillStyle": "cross-hatch", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 2, "opacity": 60, - "groupIds": [], - "frameId": null, - "roundness": null, - "seed": 710222224, - "version": 27, - "versionNonce": 1132936592, - "isDeleted": false, - "boundElements": null, - "updated": 1705138735768, - "link": null, - "locked": false, - "text": "machines", - "fontSize": 20, - "fontFamily": 3, - "textAlign": "left", - "verticalAlign": "top", - "baseline": 19, - "containerId": null, - "originalText": "machines", - "lineHeight": 1.2 - }, - { - "id": "ZR8aurk5K826Erslgmf7s", - "type": "text", + "angle": 0, "x": 4865.024326478773, "y": -10635.419732655551, - "width": 93.75, - "height": 24, - "angle": 0, "strokeColor": "#1e1e1e", "backgroundColor": "#a5d8ff", - "fillStyle": "cross-hatch", - "strokeWidth": 2, - "strokeStyle": "solid", - "roughness": 2, - "opacity": 60, + "width": 164.0625, + "height": 24, + "seed": 1977564048, "groupIds": [], "frameId": null, "roundness": null, - "seed": 1977564048, - "version": 75, - "versionNonce": 1931209584, - "isDeleted": false, - "boundElements": null, - "updated": 1705138737392, + "boundElements": [], + "updated": 1705232213847, "link": null, "locked": false, - "text": "products", "fontSize": 20, "fontFamily": 3, + "text": "table:products", "textAlign": "left", "verticalAlign": "top", - "baseline": 19, "containerId": null, - "originalText": "products", - "lineHeight": 1.2 + "originalText": "table:products", + "lineHeight": 1.2, + "baseline": 19 }, { - "id": "ZZgL4iqaeBdmxgWn_J1i_", "type": "arrow", - "x": 2966.692678223038, - "y": -11047.665213264567, - "width": 188.2900481649599, - "height": 0, - "angle": 0, - "strokeColor": "#1e1e1e", - "backgroundColor": "#a5d8ff", + "version": 71, + "versionNonce": 778364304, + "isDeleted": false, + "id": "ZZgL4iqaeBdmxgWn_J1i_", "fillStyle": "cross-hatch", "strokeWidth": 2, "strokeStyle": "solid", "roughness": 2, "opacity": 60, + "angle": 0, + "x": 2966.692678223038, + "y": -11047.665213264567, + "strokeColor": "#1e1e1e", + "backgroundColor": "#a5d8ff", + "width": 188.2900481649599, + "height": 0, + "seed": 1204539248, "groupIds": [], "frameId": null, "roundness": { "type": 2 }, - "seed": 1204539248, - "version": 71, - "versionNonce": 778364304, - "isDeleted": false, - "boundElements": null, + "boundElements": [], "updated": 1705138822915, "link": null, "locked": false, + "startBinding": null, + "endBinding": { + "elementId": "saBhGH3RJvBZz1GlGAQMa", + "focus": -0.030234312208745978, + "gap": 2.0453991765300543 + }, + "lastCommittedPoint": null, + "startArrowhead": null, + "endArrowhead": "arrow", "points": [ [ 0, @@ -1440,24 +1449,51 @@ 188.2900481649599, 0 ] - ], - "lastCommittedPoint": null, - "startBinding": null, - "endBinding": { - "elementId": "saBhGH3RJvBZz1GlGAQMa", - "focus": -0.030234312208745978, - "gap": 2.0453991765300543 - }, - "startArrowhead": null, - "endArrowhead": "arrow" + ] }, { - "id": "nN4zD0iptScrivQUob483", "type": "text", + "version": 41, + "versionNonce": 269715957, + "isDeleted": false, + "id": "nN4zD0iptScrivQUob483", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 60, + "angle": 0, "x": 3020.147874228986, "y": -11091.546364301486, + "strokeColor": "#1e1e1e", + "backgroundColor": "#a5d8ff", "width": 58.59375, "height": 24, + "seed": 1517601168, + "groupIds": [], + "frameId": null, + "roundness": null, + "boundElements": [], + "updated": 1705145571167, + "link": null, + "locked": false, + "fontSize": 20, + "fontFamily": 3, + "text": ":8080", + "textAlign": "left", + "verticalAlign": "top", + "containerId": null, + "originalText": ":8080", + "lineHeight": 1.2, + "baseline": 19 + }, + { + "id": "EDr7aM0sLSQAwc4dMr2bn", + "type": "text", + "x": 3612.942418000686, + "y": -10916.819587089509, + "width": 70.3125, + "height": 24, "angle": 0, "strokeColor": "#1e1e1e", "backgroundColor": "#a5d8ff", @@ -1469,22 +1505,94 @@ "groupIds": [], "frameId": null, "roundness": null, - "seed": 1517601168, - "version": 40, - "versionNonce": 1688158096, + "seed": 559448917, + "version": 29, + "versionNonce": 1557811349, "isDeleted": false, "boundElements": null, - "updated": 1705138836972, + "updated": 1705232159376, "link": null, "locked": false, - "text": ":8080", + "text": ":10000", "fontSize": 20, "fontFamily": 3, "textAlign": "left", "verticalAlign": "top", "baseline": 19, "containerId": null, - "originalText": ":8080", + "originalText": ":10000", + "lineHeight": 1.2 + }, + { + "id": "mexveX3hsuycJnV_xFlwn", + "type": "text", + "x": 4031.8079506258237, + "y": -11116.279364530052, + "width": 246.09375, + "height": 24, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "#a5d8ff", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 60, + "groupIds": [], + "frameId": null, + "roundness": null, + "seed": 1039462229, + "version": 58, + "versionNonce": 77836405, + "isDeleted": false, + "boundElements": null, + "updated": 1705232180224, + "link": null, + "locked": false, + "text": "machines-service:3000", + "fontSize": 20, + "fontFamily": 3, + "textAlign": "left", + "verticalAlign": "top", + "baseline": 19, + "containerId": null, + "originalText": "machines-service:3000", + "lineHeight": 1.2 + }, + { + "id": "nWQ6dNawezlmi4uYfgWBy", + "type": "text", + "x": 4029.8403639793914, + "y": -10541.40925047032, + "width": 246.09375, + "height": 24, + "angle": 0, + "strokeColor": "#1e1e1e", + "backgroundColor": "#a5d8ff", + "fillStyle": "cross-hatch", + "strokeWidth": 2, + "strokeStyle": "solid", + "roughness": 2, + "opacity": 60, + "groupIds": [], + "frameId": null, + "roundness": null, + "seed": 1203968507, + "version": 133, + "versionNonce": 1897752853, + "isDeleted": false, + "boundElements": null, + "updated": 1705232191215, + "link": null, + "locked": false, + "text": "products-service:3000", + "fontSize": 20, + "fontFamily": 3, + "textAlign": "left", + "verticalAlign": "top", + "baseline": 19, + "containerId": null, + "originalText": "products-service:3000", "lineHeight": 1.2 } ], diff --git a/products/app/api/router.go b/products/app/api/router.go index 36f1a45..765e37a 100644 --- a/products/app/api/router.go +++ b/products/app/api/router.go @@ -60,9 +60,12 @@ func initRouter(dbConn *gorm.DB) *gin.Engine { gin.SetMode(gin.ReleaseMode) router := gin.Default() - router.GET("/ping", handlePing) - router.GET("/", handleGetProducts(dbConn)) - router.GET("/:productId", handleGetProduct(dbConn)) + routes := router.Group("/products") + { + routes.GET("/ping", handlePing) + routes.GET("", handleGetProducts(dbConn)) + routes.GET("/:productId", handleGetProduct(dbConn)) + } return router } diff --git a/proxy/envoy.yaml b/proxy/envoy.yaml new file mode 100644 index 0000000..2064f9b --- /dev/null +++ b/proxy/envoy.yaml @@ -0,0 +1,65 @@ +static_resources: + listeners: + - address: + socket_address: + address: 0.0.0.0 + port_value: 10000 + filter_chains: + - filters: + - name: envoy.filters.network.http_connection_manager + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager + codec_type: auto + stat_prefix: ingress_http + route_config: + name: local_route + virtual_hosts: + - name: backend + domains: + - "*" + routes: + - match: + prefix: "/machines" + route: + cluster: machines-app-service + - match: + prefix: "/products" + route: + cluster: products-app-service + http_filters: + - name: envoy.filters.http.router + typed_config: + "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router + clusters: + - name: machines-app-service + connect_timeout: 0.25s + type: strict_dns + lb_policy: round_robin + load_assignment: + cluster_name: machines-app-service + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: machines-service + port_value: 3000 + - name: products-app-service + connect_timeout: 0.25s + type: strict_dns + lb_policy: round_robin + load_assignment: + cluster_name: products-app-service + endpoints: + - lb_endpoints: + - endpoint: + address: + socket_address: + address: products-service + port_value: 3000 +admin: + access_log_path: "/dev/null" + address: + socket_address: + address: 0.0.0.0 + port_value: 800