mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
chore: introduce hashes for heartbeats
This commit is contained in:
parent
e4b38d3f51
commit
dc1a0c7983
@ -1,4 +1,9 @@
|
|||||||
mode: set
|
mode: set
|
||||||
|
github.com/muety/wakapi/models/alias.go:12.32,14.2 1 0
|
||||||
|
github.com/muety/wakapi/models/alias.go:16.37,17.35 1 0
|
||||||
|
github.com/muety/wakapi/models/alias.go:22.2,22.14 1 0
|
||||||
|
github.com/muety/wakapi/models/alias.go:17.35,18.18 1 0
|
||||||
|
github.com/muety/wakapi/models/alias.go:18.18,20.4 1 0
|
||||||
github.com/muety/wakapi/models/filters.go:16.56,17.16 1 0
|
github.com/muety/wakapi/models/filters.go:16.56,17.16 1 0
|
||||||
github.com/muety/wakapi/models/filters.go:29.2,29.19 1 0
|
github.com/muety/wakapi/models/filters.go:29.2,29.19 1 0
|
||||||
github.com/muety/wakapi/models/filters.go:18.22,19.32 1 0
|
github.com/muety/wakapi/models/filters.go:18.22,19.32 1 0
|
||||||
@ -17,26 +22,6 @@ github.com/muety/wakapi/models/filters.go:39.8,39.27 1 1
|
|||||||
github.com/muety/wakapi/models/filters.go:39.27,41.3 1 0
|
github.com/muety/wakapi/models/filters.go:39.27,41.3 1 0
|
||||||
github.com/muety/wakapi/models/filters.go:41.8,41.28 1 1
|
github.com/muety/wakapi/models/filters.go:41.8,41.28 1 1
|
||||||
github.com/muety/wakapi/models/filters.go:41.28,43.3 1 0
|
github.com/muety/wakapi/models/filters.go:41.28,43.3 1 0
|
||||||
github.com/muety/wakapi/models/models.go:3.14,5.2 0 1
|
|
||||||
github.com/muety/wakapi/models/user.go:35.43,38.2 1 0
|
|
||||||
github.com/muety/wakapi/models/user.go:40.33,44.2 1 0
|
|
||||||
github.com/muety/wakapi/models/user.go:46.45,48.2 1 0
|
|
||||||
github.com/muety/wakapi/models/user.go:50.45,52.2 1 0
|
|
||||||
github.com/muety/wakapi/models/alias.go:12.32,14.2 1 0
|
|
||||||
github.com/muety/wakapi/models/alias.go:16.37,17.35 1 0
|
|
||||||
github.com/muety/wakapi/models/alias.go:22.2,22.14 1 0
|
|
||||||
github.com/muety/wakapi/models/alias.go:17.35,18.18 1 0
|
|
||||||
github.com/muety/wakapi/models/alias.go:18.18,20.4 1 0
|
|
||||||
github.com/muety/wakapi/models/heartbeats.go:7.31,9.2 1 0
|
|
||||||
github.com/muety/wakapi/models/heartbeats.go:11.41,13.2 1 0
|
|
||||||
github.com/muety/wakapi/models/heartbeats.go:15.36,17.2 1 0
|
|
||||||
github.com/muety/wakapi/models/heartbeats.go:19.43,22.2 2 0
|
|
||||||
github.com/muety/wakapi/models/heartbeats.go:24.41,26.18 1 0
|
|
||||||
github.com/muety/wakapi/models/heartbeats.go:29.2,29.16 1 0
|
|
||||||
github.com/muety/wakapi/models/heartbeats.go:26.18,28.3 1 0
|
|
||||||
github.com/muety/wakapi/models/heartbeats.go:32.40,34.18 1 0
|
|
||||||
github.com/muety/wakapi/models/heartbeats.go:37.2,37.24 1 0
|
|
||||||
github.com/muety/wakapi/models/heartbeats.go:34.18,36.3 1 0
|
|
||||||
github.com/muety/wakapi/models/language_mapping.go:11.42,13.2 1 0
|
github.com/muety/wakapi/models/language_mapping.go:11.42,13.2 1 0
|
||||||
github.com/muety/wakapi/models/language_mapping.go:15.51,17.2 1 0
|
github.com/muety/wakapi/models/language_mapping.go:15.51,17.2 1 0
|
||||||
github.com/muety/wakapi/models/language_mapping.go:19.52,21.2 1 0
|
github.com/muety/wakapi/models/language_mapping.go:19.52,21.2 1 0
|
||||||
@ -54,6 +39,41 @@ github.com/muety/wakapi/models/shared.go:74.51,77.2 2 0
|
|||||||
github.com/muety/wakapi/models/shared.go:79.37,82.2 2 0
|
github.com/muety/wakapi/models/shared.go:79.37,82.2 2 0
|
||||||
github.com/muety/wakapi/models/shared.go:84.35,86.2 1 0
|
github.com/muety/wakapi/models/shared.go:84.35,86.2 1 0
|
||||||
github.com/muety/wakapi/models/shared.go:88.34,90.2 1 0
|
github.com/muety/wakapi/models/shared.go:88.34,90.2 1 0
|
||||||
|
github.com/muety/wakapi/models/user.go:35.43,38.2 1 0
|
||||||
|
github.com/muety/wakapi/models/user.go:40.33,44.2 1 0
|
||||||
|
github.com/muety/wakapi/models/user.go:46.45,48.2 1 0
|
||||||
|
github.com/muety/wakapi/models/user.go:50.45,52.2 1 0
|
||||||
|
github.com/muety/wakapi/models/heartbeat.go:30.34,32.2 1 1
|
||||||
|
github.com/muety/wakapi/models/heartbeat.go:34.65,35.28 1 1
|
||||||
|
github.com/muety/wakapi/models/heartbeat.go:38.2,39.45 2 1
|
||||||
|
github.com/muety/wakapi/models/heartbeat.go:42.2,43.44 2 1
|
||||||
|
github.com/muety/wakapi/models/heartbeat.go:46.2,46.42 1 1
|
||||||
|
github.com/muety/wakapi/models/heartbeat.go:35.28,37.3 1 1
|
||||||
|
github.com/muety/wakapi/models/heartbeat.go:39.45,41.3 1 0
|
||||||
|
github.com/muety/wakapi/models/heartbeat.go:43.44,45.3 1 0
|
||||||
|
github.com/muety/wakapi/models/heartbeat.go:49.50,50.11 1 1
|
||||||
|
github.com/muety/wakapi/models/heartbeat.go:63.2,63.15 1 1
|
||||||
|
github.com/muety/wakapi/models/heartbeat.go:67.2,67.12 1 1
|
||||||
|
github.com/muety/wakapi/models/heartbeat.go:51.22,52.18 1 1
|
||||||
|
github.com/muety/wakapi/models/heartbeat.go:53.21,54.17 1 1
|
||||||
|
github.com/muety/wakapi/models/heartbeat.go:55.23,56.19 1 1
|
||||||
|
github.com/muety/wakapi/models/heartbeat.go:57.17,58.26 1 1
|
||||||
|
github.com/muety/wakapi/models/heartbeat.go:59.22,60.18 1 1
|
||||||
|
github.com/muety/wakapi/models/heartbeat.go:63.15,65.3 1 1
|
||||||
|
github.com/muety/wakapi/models/heartbeat.go:76.41,78.16 2 0
|
||||||
|
github.com/muety/wakapi/models/heartbeat.go:81.2,82.10 2 0
|
||||||
|
github.com/muety/wakapi/models/heartbeat.go:78.16,80.3 1 0
|
||||||
|
github.com/muety/wakapi/models/heartbeats.go:7.31,9.2 1 0
|
||||||
|
github.com/muety/wakapi/models/heartbeats.go:11.41,13.2 1 0
|
||||||
|
github.com/muety/wakapi/models/heartbeats.go:15.36,17.2 1 0
|
||||||
|
github.com/muety/wakapi/models/heartbeats.go:19.43,22.2 2 0
|
||||||
|
github.com/muety/wakapi/models/heartbeats.go:24.41,26.18 1 0
|
||||||
|
github.com/muety/wakapi/models/heartbeats.go:29.2,29.16 1 0
|
||||||
|
github.com/muety/wakapi/models/heartbeats.go:26.18,28.3 1 0
|
||||||
|
github.com/muety/wakapi/models/heartbeats.go:32.40,34.18 1 0
|
||||||
|
github.com/muety/wakapi/models/heartbeats.go:37.2,37.24 1 0
|
||||||
|
github.com/muety/wakapi/models/heartbeats.go:34.18,36.3 1 0
|
||||||
|
github.com/muety/wakapi/models/models.go:3.14,5.2 0 1
|
||||||
github.com/muety/wakapi/models/summary.go:41.27,45.2 1 0
|
github.com/muety/wakapi/models/summary.go:41.27,45.2 1 0
|
||||||
github.com/muety/wakapi/models/summary.go:97.29,99.2 1 1
|
github.com/muety/wakapi/models/summary.go:97.29,99.2 1 1
|
||||||
github.com/muety/wakapi/models/summary.go:101.37,108.2 6 1
|
github.com/muety/wakapi/models/summary.go:101.37,108.2 6 1
|
||||||
@ -104,25 +124,6 @@ github.com/muety/wakapi/models/summary.go:236.11,244.6 1 1
|
|||||||
github.com/muety/wakapi/models/summary.go:261.33,263.2 1 1
|
github.com/muety/wakapi/models/summary.go:261.33,263.2 1 1
|
||||||
github.com/muety/wakapi/models/summary.go:265.43,267.2 1 1
|
github.com/muety/wakapi/models/summary.go:265.43,267.2 1 1
|
||||||
github.com/muety/wakapi/models/summary.go:269.38,271.2 1 1
|
github.com/muety/wakapi/models/summary.go:269.38,271.2 1 1
|
||||||
github.com/muety/wakapi/models/heartbeat.go:26.34,28.2 1 1
|
|
||||||
github.com/muety/wakapi/models/heartbeat.go:30.65,31.28 1 1
|
|
||||||
github.com/muety/wakapi/models/heartbeat.go:34.2,35.45 2 1
|
|
||||||
github.com/muety/wakapi/models/heartbeat.go:38.2,39.44 2 1
|
|
||||||
github.com/muety/wakapi/models/heartbeat.go:42.2,42.42 1 1
|
|
||||||
github.com/muety/wakapi/models/heartbeat.go:31.28,33.3 1 1
|
|
||||||
github.com/muety/wakapi/models/heartbeat.go:35.45,37.3 1 0
|
|
||||||
github.com/muety/wakapi/models/heartbeat.go:39.44,41.3 1 0
|
|
||||||
github.com/muety/wakapi/models/heartbeat.go:45.50,46.11 1 1
|
|
||||||
github.com/muety/wakapi/models/heartbeat.go:59.2,59.15 1 1
|
|
||||||
github.com/muety/wakapi/models/heartbeat.go:63.2,63.12 1 1
|
|
||||||
github.com/muety/wakapi/models/heartbeat.go:47.22,48.18 1 1
|
|
||||||
github.com/muety/wakapi/models/heartbeat.go:49.21,50.17 1 1
|
|
||||||
github.com/muety/wakapi/models/heartbeat.go:51.23,52.19 1 1
|
|
||||||
github.com/muety/wakapi/models/heartbeat.go:53.17,54.26 1 1
|
|
||||||
github.com/muety/wakapi/models/heartbeat.go:55.22,56.18 1 1
|
|
||||||
github.com/muety/wakapi/models/heartbeat.go:59.15,61.3 1 1
|
|
||||||
github.com/muety/wakapi/utils/http.go:9.73,12.58 3 0
|
|
||||||
github.com/muety/wakapi/utils/http.go:12.58,14.3 1 0
|
|
||||||
github.com/muety/wakapi/utils/strings.go:8.34,10.2 1 0
|
github.com/muety/wakapi/utils/strings.go:8.34,10.2 1 0
|
||||||
github.com/muety/wakapi/utils/strings.go:12.77,13.29 1 0
|
github.com/muety/wakapi/utils/strings.go:12.77,13.29 1 0
|
||||||
github.com/muety/wakapi/utils/strings.go:18.2,18.19 1 0
|
github.com/muety/wakapi/utils/strings.go:18.2,18.19 1 0
|
||||||
@ -205,46 +206,13 @@ github.com/muety/wakapi/utils/date.go:71.2,71.13 1 0
|
|||||||
github.com/muety/wakapi/utils/date.go:59.36,62.3 2 0
|
github.com/muety/wakapi/utils/date.go:59.36,62.3 2 0
|
||||||
github.com/muety/wakapi/utils/date.go:63.21,66.3 2 0
|
github.com/muety/wakapi/utils/date.go:63.21,66.3 2 0
|
||||||
github.com/muety/wakapi/utils/date.go:67.21,70.3 2 0
|
github.com/muety/wakapi/utils/date.go:67.21,70.3 2 0
|
||||||
github.com/muety/wakapi/middlewares/authenticate.go:20.116,26.2 1 1
|
github.com/muety/wakapi/utils/http.go:9.73,12.58 3 0
|
||||||
github.com/muety/wakapi/middlewares/authenticate.go:28.71,29.71 1 0
|
github.com/muety/wakapi/utils/http.go:12.58,14.3 1 0
|
||||||
github.com/muety/wakapi/middlewares/authenticate.go:29.71,31.3 1 0
|
github.com/muety/wakapi/config/utils.go:5.78,7.22 2 0
|
||||||
github.com/muety/wakapi/middlewares/authenticate.go:34.107,35.37 1 0
|
github.com/muety/wakapi/config/utils.go:13.2,13.11 1 0
|
||||||
github.com/muety/wakapi/middlewares/authenticate.go:42.2,45.16 3 0
|
github.com/muety/wakapi/config/utils.go:7.22,8.18 1 0
|
||||||
github.com/muety/wakapi/middlewares/authenticate.go:49.2,49.16 1 0
|
github.com/muety/wakapi/config/utils.go:11.3,11.12 1 0
|
||||||
github.com/muety/wakapi/middlewares/authenticate.go:59.2,60.29 2 0
|
github.com/muety/wakapi/config/utils.go:8.18,10.4 1 0
|
||||||
github.com/muety/wakapi/middlewares/authenticate.go:35.37,36.58 1 0
|
|
||||||
github.com/muety/wakapi/middlewares/authenticate.go:36.58,39.4 2 0
|
|
||||||
github.com/muety/wakapi/middlewares/authenticate.go:45.16,47.3 1 0
|
|
||||||
github.com/muety/wakapi/middlewares/authenticate.go:49.16,50.44 1 0
|
|
||||||
github.com/muety/wakapi/middlewares/authenticate.go:56.3,56.9 1 0
|
|
||||||
github.com/muety/wakapi/middlewares/authenticate.go:50.44,52.4 1 0
|
|
||||||
github.com/muety/wakapi/middlewares/authenticate.go:52.9,55.4 2 0
|
|
||||||
github.com/muety/wakapi/middlewares/authenticate.go:63.92,65.16 2 1
|
|
||||||
github.com/muety/wakapi/middlewares/authenticate.go:69.2,72.16 4 1
|
|
||||||
github.com/muety/wakapi/middlewares/authenticate.go:75.2,75.18 1 1
|
|
||||||
github.com/muety/wakapi/middlewares/authenticate.go:65.16,67.3 1 1
|
|
||||||
github.com/muety/wakapi/middlewares/authenticate.go:72.16,74.3 1 0
|
|
||||||
github.com/muety/wakapi/middlewares/authenticate.go:78.92,80.16 2 0
|
|
||||||
github.com/muety/wakapi/middlewares/authenticate.go:84.2,85.16 2 0
|
|
||||||
github.com/muety/wakapi/middlewares/authenticate.go:92.2,92.18 1 0
|
|
||||||
github.com/muety/wakapi/middlewares/authenticate.go:80.16,82.3 1 0
|
|
||||||
github.com/muety/wakapi/middlewares/authenticate.go:85.16,87.3 1 0
|
|
||||||
github.com/muety/wakapi/middlewares/logging.go:17.79,18.43 1 0
|
|
||||||
github.com/muety/wakapi/middlewares/logging.go:18.43,23.3 1 0
|
|
||||||
github.com/muety/wakapi/middlewares/logging.go:26.80,44.2 6 0
|
|
||||||
github.com/muety/wakapi/middlewares/logging.go:74.52,76.2 1 0
|
|
||||||
github.com/muety/wakapi/middlewares/logging.go:88.45,89.20 1 0
|
|
||||||
github.com/muety/wakapi/middlewares/logging.go:89.20,93.3 3 0
|
|
||||||
github.com/muety/wakapi/middlewares/logging.go:95.54,98.18 3 0
|
|
||||||
github.com/muety/wakapi/middlewares/logging.go:105.2,106.15 2 0
|
|
||||||
github.com/muety/wakapi/middlewares/logging.go:98.18,101.17 2 0
|
|
||||||
github.com/muety/wakapi/middlewares/logging.go:101.17,103.4 1 0
|
|
||||||
github.com/muety/wakapi/middlewares/logging.go:108.42,109.20 1 0
|
|
||||||
github.com/muety/wakapi/middlewares/logging.go:109.20,111.3 1 0
|
|
||||||
github.com/muety/wakapi/middlewares/logging.go:113.36,115.2 1 0
|
|
||||||
github.com/muety/wakapi/middlewares/logging.go:116.42,118.2 1 0
|
|
||||||
github.com/muety/wakapi/middlewares/logging.go:119.40,121.2 1 0
|
|
||||||
github.com/muety/wakapi/middlewares/logging.go:122.52,124.2 1 0
|
|
||||||
github.com/muety/wakapi/config/config.go:88.70,90.2 1 0
|
github.com/muety/wakapi/config/config.go:88.70,90.2 1 0
|
||||||
github.com/muety/wakapi/config/config.go:92.65,94.2 1 0
|
github.com/muety/wakapi/config/config.go:92.65,94.2 1 0
|
||||||
github.com/muety/wakapi/config/config.go:96.82,106.2 1 0
|
github.com/muety/wakapi/config/config.go:96.82,106.2 1 0
|
||||||
@ -302,86 +270,46 @@ github.com/muety/wakapi/config/config.go:301.52,303.3 1 0
|
|||||||
github.com/muety/wakapi/config/config.go:305.47,306.14 1 0
|
github.com/muety/wakapi/config/config.go:305.47,306.14 1 0
|
||||||
github.com/muety/wakapi/config/config.go:306.14,308.4 1 0
|
github.com/muety/wakapi/config/config.go:306.14,308.4 1 0
|
||||||
github.com/muety/wakapi/config/config.go:311.70,313.3 1 0
|
github.com/muety/wakapi/config/config.go:311.70,313.3 1 0
|
||||||
github.com/muety/wakapi/config/utils.go:5.78,7.22 2 0
|
github.com/muety/wakapi/middlewares/authenticate.go:20.116,26.2 1 1
|
||||||
github.com/muety/wakapi/config/utils.go:13.2,13.11 1 0
|
github.com/muety/wakapi/middlewares/authenticate.go:28.71,29.71 1 0
|
||||||
github.com/muety/wakapi/config/utils.go:7.22,8.18 1 0
|
github.com/muety/wakapi/middlewares/authenticate.go:29.71,31.3 1 0
|
||||||
github.com/muety/wakapi/config/utils.go:11.3,11.12 1 0
|
github.com/muety/wakapi/middlewares/authenticate.go:34.107,35.37 1 0
|
||||||
github.com/muety/wakapi/config/utils.go:8.18,10.4 1 0
|
github.com/muety/wakapi/middlewares/authenticate.go:42.2,45.16 3 0
|
||||||
github.com/muety/wakapi/services/aggregation.go:24.142,31.2 1 0
|
github.com/muety/wakapi/middlewares/authenticate.go:49.2,49.16 1 0
|
||||||
github.com/muety/wakapi/services/aggregation.go:40.43,42.37 1 0
|
github.com/muety/wakapi/middlewares/authenticate.go:59.2,60.29 2 0
|
||||||
github.com/muety/wakapi/services/aggregation.go:46.2,48.19 3 0
|
github.com/muety/wakapi/middlewares/authenticate.go:35.37,36.58 1 0
|
||||||
github.com/muety/wakapi/services/aggregation.go:42.37,44.3 1 0
|
github.com/muety/wakapi/middlewares/authenticate.go:36.58,39.4 2 0
|
||||||
github.com/muety/wakapi/services/aggregation.go:51.67,55.40 3 0
|
github.com/muety/wakapi/middlewares/authenticate.go:45.16,47.3 1 0
|
||||||
github.com/muety/wakapi/services/aggregation.go:59.2,59.50 1 0
|
github.com/muety/wakapi/middlewares/authenticate.go:49.16,50.44 1 0
|
||||||
github.com/muety/wakapi/services/aggregation.go:64.2,64.60 1 0
|
github.com/muety/wakapi/middlewares/authenticate.go:56.3,56.9 1 0
|
||||||
github.com/muety/wakapi/services/aggregation.go:70.2,70.35 1 0
|
github.com/muety/wakapi/middlewares/authenticate.go:50.44,52.4 1 0
|
||||||
github.com/muety/wakapi/services/aggregation.go:55.40,57.3 1 0
|
github.com/muety/wakapi/middlewares/authenticate.go:52.9,55.4 2 0
|
||||||
github.com/muety/wakapi/services/aggregation.go:59.50,61.3 1 0
|
github.com/muety/wakapi/middlewares/authenticate.go:63.92,65.16 2 1
|
||||||
github.com/muety/wakapi/services/aggregation.go:64.60,68.3 3 0
|
github.com/muety/wakapi/middlewares/authenticate.go:69.2,72.16 4 1
|
||||||
github.com/muety/wakapi/services/aggregation.go:73.109,74.24 1 0
|
github.com/muety/wakapi/middlewares/authenticate.go:75.2,75.18 1 1
|
||||||
github.com/muety/wakapi/services/aggregation.go:74.24,75.111 1 0
|
github.com/muety/wakapi/middlewares/authenticate.go:65.16,67.3 1 1
|
||||||
github.com/muety/wakapi/services/aggregation.go:75.111,77.4 1 0
|
github.com/muety/wakapi/middlewares/authenticate.go:72.16,74.3 1 0
|
||||||
github.com/muety/wakapi/services/aggregation.go:77.9,80.4 2 0
|
github.com/muety/wakapi/middlewares/authenticate.go:78.92,80.16 2 0
|
||||||
github.com/muety/wakapi/services/aggregation.go:84.80,85.33 1 0
|
github.com/muety/wakapi/middlewares/authenticate.go:84.2,85.16 2 0
|
||||||
github.com/muety/wakapi/services/aggregation.go:85.33,86.60 1 0
|
github.com/muety/wakapi/middlewares/authenticate.go:92.2,92.18 1 0
|
||||||
github.com/muety/wakapi/services/aggregation.go:86.60,88.4 1 0
|
github.com/muety/wakapi/middlewares/authenticate.go:80.16,82.3 1 0
|
||||||
github.com/muety/wakapi/services/aggregation.go:92.100,96.59 3 0
|
github.com/muety/wakapi/middlewares/authenticate.go:85.16,87.3 1 0
|
||||||
github.com/muety/wakapi/services/aggregation.go:111.2,112.16 2 0
|
github.com/muety/wakapi/middlewares/logging.go:17.79,18.43 1 0
|
||||||
github.com/muety/wakapi/services/aggregation.go:118.2,119.16 2 0
|
github.com/muety/wakapi/middlewares/logging.go:18.43,23.3 1 0
|
||||||
github.com/muety/wakapi/services/aggregation.go:125.2,126.44 2 0
|
github.com/muety/wakapi/middlewares/logging.go:26.80,44.2 6 0
|
||||||
github.com/muety/wakapi/services/aggregation.go:131.2,131.41 1 0
|
github.com/muety/wakapi/middlewares/logging.go:74.52,76.2 1 0
|
||||||
github.com/muety/wakapi/services/aggregation.go:145.2,145.12 1 0
|
github.com/muety/wakapi/middlewares/logging.go:88.45,89.20 1 0
|
||||||
github.com/muety/wakapi/services/aggregation.go:96.59,99.3 2 0
|
github.com/muety/wakapi/middlewares/logging.go:89.20,93.3 3 0
|
||||||
github.com/muety/wakapi/services/aggregation.go:99.8,99.47 1 0
|
github.com/muety/wakapi/middlewares/logging.go:95.54,98.18 3 0
|
||||||
github.com/muety/wakapi/services/aggregation.go:99.47,101.30 2 0
|
github.com/muety/wakapi/middlewares/logging.go:105.2,106.15 2 0
|
||||||
github.com/muety/wakapi/services/aggregation.go:101.30,102.43 1 0
|
github.com/muety/wakapi/middlewares/logging.go:98.18,101.17 2 0
|
||||||
github.com/muety/wakapi/services/aggregation.go:102.43,104.5 1 0
|
github.com/muety/wakapi/middlewares/logging.go:101.17,103.4 1 0
|
||||||
github.com/muety/wakapi/services/aggregation.go:106.8,108.3 1 0
|
github.com/muety/wakapi/middlewares/logging.go:108.42,109.20 1 0
|
||||||
github.com/muety/wakapi/services/aggregation.go:112.16,115.3 2 0
|
github.com/muety/wakapi/middlewares/logging.go:109.20,111.3 1 0
|
||||||
github.com/muety/wakapi/services/aggregation.go:119.16,122.3 2 0
|
github.com/muety/wakapi/middlewares/logging.go:113.36,115.2 1 0
|
||||||
github.com/muety/wakapi/services/aggregation.go:126.44,128.3 1 0
|
github.com/muety/wakapi/middlewares/logging.go:116.42,118.2 1 0
|
||||||
github.com/muety/wakapi/services/aggregation.go:131.41,132.21 1 0
|
github.com/muety/wakapi/middlewares/logging.go:119.40,121.2 1 0
|
||||||
github.com/muety/wakapi/services/aggregation.go:132.21,136.4 1 0
|
github.com/muety/wakapi/middlewares/logging.go:122.52,124.2 1 0
|
||||||
github.com/muety/wakapi/services/aggregation.go:136.9,136.62 1 0
|
|
||||||
github.com/muety/wakapi/services/aggregation.go:136.62,140.4 1 0
|
|
||||||
github.com/muety/wakapi/services/aggregation.go:148.83,163.41 5 0
|
|
||||||
github.com/muety/wakapi/services/aggregation.go:163.41,173.3 3 0
|
|
||||||
github.com/muety/wakapi/services/aggregation.go:176.34,179.2 2 0
|
|
||||||
github.com/muety/wakapi/services/heartbeat.go:17.141,23.2 1 0
|
|
||||||
github.com/muety/wakapi/services/heartbeat.go:25.80,27.2 1 0
|
|
||||||
github.com/muety/wakapi/services/heartbeat.go:29.111,31.16 2 0
|
|
||||||
github.com/muety/wakapi/services/heartbeat.go:34.2,34.43 1 0
|
|
||||||
github.com/muety/wakapi/services/heartbeat.go:31.16,33.3 1 0
|
|
||||||
github.com/muety/wakapi/services/heartbeat.go:37.78,39.2 1 0
|
|
||||||
github.com/muety/wakapi/services/heartbeat.go:41.62,43.2 1 0
|
|
||||||
github.com/muety/wakapi/services/heartbeat.go:45.116,47.16 2 0
|
|
||||||
github.com/muety/wakapi/services/heartbeat.go:51.2,51.28 1 0
|
|
||||||
github.com/muety/wakapi/services/heartbeat.go:55.2,55.24 1 0
|
|
||||||
github.com/muety/wakapi/services/heartbeat.go:47.16,49.3 1 0
|
|
||||||
github.com/muety/wakapi/services/heartbeat.go:51.28,53.3 1 0
|
|
||||||
github.com/muety/wakapi/services/key_value.go:14.89,19.2 1 0
|
|
||||||
github.com/muety/wakapi/services/key_value.go:21.83,23.2 1 0
|
|
||||||
github.com/muety/wakapi/services/key_value.go:25.72,27.2 1 0
|
|
||||||
github.com/muety/wakapi/services/key_value.go:29.60,31.2 1 0
|
|
||||||
github.com/muety/wakapi/services/language_mapping.go:18.118,24.2 1 0
|
|
||||||
github.com/muety/wakapi/services/language_mapping.go:26.86,28.2 1 0
|
|
||||||
github.com/muety/wakapi/services/language_mapping.go:30.96,31.53 1 0
|
|
||||||
github.com/muety/wakapi/services/language_mapping.go:35.2,36.16 2 0
|
|
||||||
github.com/muety/wakapi/services/language_mapping.go:39.2,40.22 2 0
|
|
||||||
github.com/muety/wakapi/services/language_mapping.go:31.53,33.3 1 0
|
|
||||||
github.com/muety/wakapi/services/language_mapping.go:36.16,38.3 1 0
|
|
||||||
github.com/muety/wakapi/services/language_mapping.go:43.92,46.16 3 0
|
|
||||||
github.com/muety/wakapi/services/language_mapping.go:50.2,50.33 1 0
|
|
||||||
github.com/muety/wakapi/services/language_mapping.go:53.2,53.22 1 0
|
|
||||||
github.com/muety/wakapi/services/language_mapping.go:46.16,48.3 1 0
|
|
||||||
github.com/muety/wakapi/services/language_mapping.go:50.33,52.3 1 0
|
|
||||||
github.com/muety/wakapi/services/language_mapping.go:56.109,58.16 2 0
|
|
||||||
github.com/muety/wakapi/services/language_mapping.go:62.2,63.20 2 0
|
|
||||||
github.com/muety/wakapi/services/language_mapping.go:58.16,60.3 1 0
|
|
||||||
github.com/muety/wakapi/services/language_mapping.go:66.82,67.26 1 0
|
|
||||||
github.com/muety/wakapi/services/language_mapping.go:70.2,72.12 3 0
|
|
||||||
github.com/muety/wakapi/services/language_mapping.go:67.26,69.3 1 0
|
|
||||||
github.com/muety/wakapi/services/language_mapping.go:75.74,78.2 1 0
|
|
||||||
github.com/muety/wakapi/services/misc.go:23.126,30.2 1 0
|
github.com/muety/wakapi/services/misc.go:23.126,30.2 1 0
|
||||||
github.com/muety/wakapi/services/misc.go:42.50,44.48 1 0
|
github.com/muety/wakapi/services/misc.go:42.50,44.48 1 0
|
||||||
github.com/muety/wakapi/services/misc.go:48.2,50.19 3 0
|
github.com/muety/wakapi/services/misc.go:48.2,50.19 3 0
|
||||||
@ -494,30 +422,81 @@ github.com/muety/wakapi/services/summary.go:324.54,326.3 1 1
|
|||||||
github.com/muety/wakapi/services/summary.go:331.59,333.25 2 1
|
github.com/muety/wakapi/services/summary.go:331.59,333.25 2 1
|
||||||
github.com/muety/wakapi/services/summary.go:336.2,336.32 1 1
|
github.com/muety/wakapi/services/summary.go:336.2,336.32 1 1
|
||||||
github.com/muety/wakapi/services/summary.go:333.25,335.3 1 1
|
github.com/muety/wakapi/services/summary.go:333.25,335.3 1 1
|
||||||
github.com/muety/wakapi/services/user.go:19.73,25.2 1 0
|
github.com/muety/wakapi/services/heartbeat.go:17.141,23.2 1 0
|
||||||
github.com/muety/wakapi/services/user.go:27.74,28.40 1 0
|
github.com/muety/wakapi/services/heartbeat.go:25.80,27.2 1 0
|
||||||
github.com/muety/wakapi/services/user.go:32.2,33.16 2 0
|
github.com/muety/wakapi/services/heartbeat.go:29.111,31.16 2 0
|
||||||
github.com/muety/wakapi/services/user.go:37.2,38.15 2 0
|
github.com/muety/wakapi/services/heartbeat.go:34.2,34.43 1 0
|
||||||
github.com/muety/wakapi/services/user.go:28.40,30.3 1 0
|
github.com/muety/wakapi/services/heartbeat.go:31.16,33.3 1 0
|
||||||
github.com/muety/wakapi/services/user.go:33.16,35.3 1 0
|
github.com/muety/wakapi/services/heartbeat.go:37.78,39.2 1 0
|
||||||
github.com/muety/wakapi/services/user.go:41.72,42.37 1 0
|
github.com/muety/wakapi/services/heartbeat.go:41.62,43.2 1 0
|
||||||
github.com/muety/wakapi/services/user.go:46.2,47.16 2 0
|
github.com/muety/wakapi/services/heartbeat.go:45.116,47.16 2 0
|
||||||
github.com/muety/wakapi/services/user.go:51.2,52.15 2 0
|
github.com/muety/wakapi/services/heartbeat.go:51.2,51.28 1 0
|
||||||
github.com/muety/wakapi/services/user.go:42.37,44.3 1 0
|
github.com/muety/wakapi/services/heartbeat.go:55.2,55.24 1 0
|
||||||
github.com/muety/wakapi/services/user.go:47.16,49.3 1 0
|
github.com/muety/wakapi/services/heartbeat.go:47.16,49.3 1 0
|
||||||
github.com/muety/wakapi/services/user.go:55.58,57.2 1 0
|
github.com/muety/wakapi/services/heartbeat.go:51.28,53.3 1 0
|
||||||
github.com/muety/wakapi/services/user.go:59.88,66.93 2 0
|
github.com/muety/wakapi/services/key_value.go:14.89,19.2 1 0
|
||||||
github.com/muety/wakapi/services/user.go:72.2,72.38 1 0
|
github.com/muety/wakapi/services/key_value.go:21.83,23.2 1 0
|
||||||
github.com/muety/wakapi/services/user.go:66.93,68.3 1 0
|
github.com/muety/wakapi/services/key_value.go:25.72,27.2 1 0
|
||||||
github.com/muety/wakapi/services/user.go:68.8,70.3 1 0
|
github.com/muety/wakapi/services/key_value.go:29.60,31.2 1 0
|
||||||
github.com/muety/wakapi/services/user.go:75.73,78.2 2 0
|
github.com/muety/wakapi/services/language_mapping.go:18.118,24.2 1 0
|
||||||
github.com/muety/wakapi/services/user.go:80.78,84.2 3 0
|
github.com/muety/wakapi/services/language_mapping.go:26.86,28.2 1 0
|
||||||
github.com/muety/wakapi/services/user.go:86.79,89.2 2 0
|
github.com/muety/wakapi/services/language_mapping.go:30.96,31.53 1 0
|
||||||
github.com/muety/wakapi/services/user.go:91.99,94.2 2 0
|
github.com/muety/wakapi/services/language_mapping.go:35.2,36.16 2 0
|
||||||
github.com/muety/wakapi/services/user.go:96.106,99.96 3 0
|
github.com/muety/wakapi/services/language_mapping.go:39.2,40.22 2 0
|
||||||
github.com/muety/wakapi/services/user.go:104.2,104.68 1 0
|
github.com/muety/wakapi/services/language_mapping.go:31.53,33.3 1 0
|
||||||
github.com/muety/wakapi/services/user.go:99.96,101.3 1 0
|
github.com/muety/wakapi/services/language_mapping.go:36.16,38.3 1 0
|
||||||
github.com/muety/wakapi/services/user.go:101.8,103.3 1 0
|
github.com/muety/wakapi/services/language_mapping.go:43.92,46.16 3 0
|
||||||
|
github.com/muety/wakapi/services/language_mapping.go:50.2,50.33 1 0
|
||||||
|
github.com/muety/wakapi/services/language_mapping.go:53.2,53.22 1 0
|
||||||
|
github.com/muety/wakapi/services/language_mapping.go:46.16,48.3 1 0
|
||||||
|
github.com/muety/wakapi/services/language_mapping.go:50.33,52.3 1 0
|
||||||
|
github.com/muety/wakapi/services/language_mapping.go:56.109,58.16 2 0
|
||||||
|
github.com/muety/wakapi/services/language_mapping.go:62.2,63.20 2 0
|
||||||
|
github.com/muety/wakapi/services/language_mapping.go:58.16,60.3 1 0
|
||||||
|
github.com/muety/wakapi/services/language_mapping.go:66.82,67.26 1 0
|
||||||
|
github.com/muety/wakapi/services/language_mapping.go:70.2,72.12 3 0
|
||||||
|
github.com/muety/wakapi/services/language_mapping.go:67.26,69.3 1 0
|
||||||
|
github.com/muety/wakapi/services/language_mapping.go:75.74,78.2 1 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:24.142,31.2 1 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:40.43,42.37 1 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:46.2,48.19 3 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:42.37,44.3 1 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:51.67,55.40 3 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:59.2,59.50 1 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:64.2,64.60 1 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:70.2,70.35 1 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:55.40,57.3 1 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:59.50,61.3 1 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:64.60,68.3 3 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:73.109,74.24 1 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:74.24,75.111 1 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:75.111,77.4 1 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:77.9,80.4 2 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:84.80,85.33 1 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:85.33,86.60 1 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:86.60,88.4 1 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:92.100,96.59 3 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:111.2,112.16 2 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:118.2,119.16 2 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:125.2,126.44 2 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:131.2,131.41 1 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:145.2,145.12 1 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:96.59,99.3 2 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:99.8,99.47 1 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:99.47,101.30 2 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:101.30,102.43 1 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:102.43,104.5 1 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:106.8,108.3 1 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:112.16,115.3 2 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:119.16,122.3 2 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:126.44,128.3 1 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:131.41,132.21 1 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:132.21,136.4 1 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:136.9,136.62 1 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:136.62,140.4 1 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:148.83,163.41 5 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:163.41,173.3 3 0
|
||||||
|
github.com/muety/wakapi/services/aggregation.go:176.34,179.2 2 0
|
||||||
github.com/muety/wakapi/services/alias.go:17.77,22.2 1 1
|
github.com/muety/wakapi/services/alias.go:17.77,22.2 1 1
|
||||||
github.com/muety/wakapi/services/alias.go:26.60,27.43 1 1
|
github.com/muety/wakapi/services/alias.go:26.60,27.43 1 1
|
||||||
github.com/muety/wakapi/services/alias.go:30.2,30.14 1 1
|
github.com/muety/wakapi/services/alias.go:30.2,30.14 1 1
|
||||||
@ -553,3 +532,27 @@ github.com/muety/wakapi/services/alias.go:95.21,97.4 1 0
|
|||||||
github.com/muety/wakapi/services/alias.go:104.31,106.3 1 0
|
github.com/muety/wakapi/services/alias.go:104.31,106.3 1 0
|
||||||
github.com/muety/wakapi/services/alias.go:111.52,112.51 1 0
|
github.com/muety/wakapi/services/alias.go:111.52,112.51 1 0
|
||||||
github.com/muety/wakapi/services/alias.go:112.51,114.3 1 0
|
github.com/muety/wakapi/services/alias.go:112.51,114.3 1 0
|
||||||
|
github.com/muety/wakapi/services/user.go:19.73,25.2 1 0
|
||||||
|
github.com/muety/wakapi/services/user.go:27.74,28.40 1 0
|
||||||
|
github.com/muety/wakapi/services/user.go:32.2,33.16 2 0
|
||||||
|
github.com/muety/wakapi/services/user.go:37.2,38.15 2 0
|
||||||
|
github.com/muety/wakapi/services/user.go:28.40,30.3 1 0
|
||||||
|
github.com/muety/wakapi/services/user.go:33.16,35.3 1 0
|
||||||
|
github.com/muety/wakapi/services/user.go:41.72,42.37 1 0
|
||||||
|
github.com/muety/wakapi/services/user.go:46.2,47.16 2 0
|
||||||
|
github.com/muety/wakapi/services/user.go:51.2,52.15 2 0
|
||||||
|
github.com/muety/wakapi/services/user.go:42.37,44.3 1 0
|
||||||
|
github.com/muety/wakapi/services/user.go:47.16,49.3 1 0
|
||||||
|
github.com/muety/wakapi/services/user.go:55.58,57.2 1 0
|
||||||
|
github.com/muety/wakapi/services/user.go:59.88,66.93 2 0
|
||||||
|
github.com/muety/wakapi/services/user.go:72.2,72.38 1 0
|
||||||
|
github.com/muety/wakapi/services/user.go:66.93,68.3 1 0
|
||||||
|
github.com/muety/wakapi/services/user.go:68.8,70.3 1 0
|
||||||
|
github.com/muety/wakapi/services/user.go:75.73,78.2 2 0
|
||||||
|
github.com/muety/wakapi/services/user.go:80.78,84.2 3 0
|
||||||
|
github.com/muety/wakapi/services/user.go:86.79,89.2 2 0
|
||||||
|
github.com/muety/wakapi/services/user.go:91.99,94.2 2 0
|
||||||
|
github.com/muety/wakapi/services/user.go:96.106,99.96 3 0
|
||||||
|
github.com/muety/wakapi/services/user.go:104.2,104.68 1 0
|
||||||
|
github.com/muety/wakapi/services/user.go:99.96,101.3 1 0
|
||||||
|
github.com/muety/wakapi/services/user.go:101.8,103.3 1 0
|
||||||
|
1
go.mod
1
go.mod
@ -13,6 +13,7 @@ require (
|
|||||||
github.com/kr/text v0.2.0 // indirect
|
github.com/kr/text v0.2.0 // indirect
|
||||||
github.com/markbates/pkger v0.17.1
|
github.com/markbates/pkger v0.17.1
|
||||||
github.com/mattn/go-sqlite3 v2.0.3+incompatible // indirect
|
github.com/mattn/go-sqlite3 v2.0.3+incompatible // indirect
|
||||||
|
github.com/mitchellh/hashstructure/v2 v2.0.1
|
||||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
|
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
|
||||||
github.com/patrickmn/go-cache v2.1.0+incompatible
|
github.com/patrickmn/go-cache v2.1.0+incompatible
|
||||||
github.com/rubenv/sql-migrate v0.0.0-20200402132117-435005d389bc
|
github.com/rubenv/sql-migrate v0.0.0-20200402132117-435005d389bc
|
||||||
|
3
go.sum
3
go.sum
@ -273,6 +273,9 @@ github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrk
|
|||||||
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||||
github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
|
github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
|
||||||
github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
|
github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
|
||||||
|
github.com/mitchellh/hashstructure v1.1.0 h1:P6P1hdjqAAknpY/M1CGipelZgp+4y9ja9kmUZPXP+H0=
|
||||||
|
github.com/mitchellh/hashstructure/v2 v2.0.1 h1:L60q1+q7cXE4JeEJJKMnh2brFIe3rZxCihYAB61ypAY=
|
||||||
|
github.com/mitchellh/hashstructure/v2 v2.0.1/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE=
|
||||||
github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
|
github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
|
||||||
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||||
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
package models
|
package models
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
|
"github.com/emvi/logbuch"
|
||||||
|
"github.com/mitchellh/hashstructure/v2"
|
||||||
"regexp"
|
"regexp"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
@ -20,6 +23,7 @@ type Heartbeat struct {
|
|||||||
OperatingSystem string `json:"operating_system"`
|
OperatingSystem string `json:"operating_system"`
|
||||||
Machine string `json:"machine"`
|
Machine string `json:"machine"`
|
||||||
Time CustomTime `json:"time" gorm:"type:timestamp; default:CURRENT_TIMESTAMP; index:idx_time,idx_time_user"`
|
Time CustomTime `json:"time" gorm:"type:timestamp; default:CURRENT_TIMESTAMP; index:idx_time,idx_time_user"`
|
||||||
|
Hash string `json:"-" gorm:"type:varchar(17); uniqueIndex"`
|
||||||
languageRegex *regexp.Regexp
|
languageRegex *regexp.Regexp
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,3 +66,18 @@ func (h *Heartbeat) GetKey(t uint8) (key string) {
|
|||||||
|
|
||||||
return key
|
return key
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Hash is used to prevent duplicate heartbeats
|
||||||
|
// Using a UNIQUE INDEX over all relevant columns would be more straightforward,
|
||||||
|
// whereas manually computing this kind of hash is quite cumbersome. However,
|
||||||
|
// such a unique index would, according to https://stackoverflow.com/q/65980064/3112139,
|
||||||
|
// essentially double the space required for heartbeats, so we decided to go this way.
|
||||||
|
|
||||||
|
func (h *Heartbeat) Hashed() *Heartbeat {
|
||||||
|
hash, err := hashstructure.Hash(h, hashstructure.FormatV2, nil)
|
||||||
|
if err != nil {
|
||||||
|
logbuch.Error("CRITICAL ERROR: failed to hash struct – %v", err)
|
||||||
|
}
|
||||||
|
h.Hash = fmt.Sprintf("%x", hash) // "uint64 values with high bit set are not supported"
|
||||||
|
return h
|
||||||
|
}
|
||||||
|
@ -62,6 +62,8 @@ func (h *HeartbeatHandler) ApiPost(w http.ResponseWriter, r *http.Request) {
|
|||||||
w.Write([]byte("Invalid heartbeat object."))
|
w.Write([]byte("Invalid heartbeat object."))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hb.Hashed()
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := h.heartbeatSrvc.InsertBatch(heartbeats); err != nil {
|
if err := h.heartbeatSrvc.InsertBatch(heartbeats); err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user