From 1beca82875c78208f40dc076f3ed1fcd88a3c109 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ferdinand=20M=C3=BCtsch?= Date: Fri, 30 Apr 2021 10:12:28 +0200 Subject: [PATCH] feat: implement wakatime users endpoint (resolve #193) --- coverage/coverage.out | 897 +++++++++++++------------ main.go | 2 + mocks/heartbeat_service.go | 5 + models/compat/wakatime/v1/heartbeat.go | 6 +- models/compat/wakatime/v1/user.go | 55 ++ repositories/heartbeart.go | 12 + repositories/repositories.go | 1 + routes/compat/wakatime/v1/stats.go | 10 + routes/compat/wakatime/v1/users.go | 63 ++ services/heartbeat.go | 4 + services/services.go | 1 + static/docs/docs.go | 223 ++++-- static/docs/swagger.json | 223 ++++-- static/docs/swagger.yaml | 154 +++-- version.txt | 2 +- 15 files changed, 1072 insertions(+), 586 deletions(-) create mode 100644 models/compat/wakatime/v1/user.go create mode 100644 routes/compat/wakatime/v1/users.go diff --git a/coverage/coverage.out b/coverage/coverage.out index cedf8ce..0510e7a 100644 --- a/coverage/coverage.out +++ b/coverage/coverage.out @@ -1,4 +1,23 @@ mode: set +github.com/muety/wakapi/models/mail_address.go:15.13,18.2 2 1 +github.com/muety/wakapi/models/mail_address.go:24.38,26.2 1 0 +github.com/muety/wakapi/models/mail_address.go:28.35,30.21 2 1 +github.com/muety/wakapi/models/mail_address.go:36.2,36.11 1 1 +github.com/muety/wakapi/models/mail_address.go:30.21,31.21 1 1 +github.com/muety/wakapi/models/mail_address.go:34.3,34.18 1 1 +github.com/muety/wakapi/models/mail_address.go:31.21,33.4 1 1 +github.com/muety/wakapi/models/mail_address.go:39.35,41.2 1 1 +github.com/muety/wakapi/models/mail_address.go:43.43,45.22 2 0 +github.com/muety/wakapi/models/mail_address.go:48.2,48.12 1 0 +github.com/muety/wakapi/models/mail_address.go:45.22,47.3 1 0 +github.com/muety/wakapi/models/mail_address.go:51.46,53.22 2 1 +github.com/muety/wakapi/models/mail_address.go:56.2,56.12 1 1 +github.com/muety/wakapi/models/mail_address.go:53.22,55.3 1 1 +github.com/muety/wakapi/models/mail_address.go:59.40,60.22 1 1 +github.com/muety/wakapi/models/mail_address.go:65.2,65.13 1 1 +github.com/muety/wakapi/models/mail_address.go:60.22,61.17 1 1 +github.com/muety/wakapi/models/mail_address.go:61.17,63.4 1 1 +github.com/muety/wakapi/models/models.go:3.14,5.2 0 1 github.com/muety/wakapi/models/user.go:8.13,10.2 1 1 github.com/muety/wakapi/models/user.go:76.36,77.22 1 1 github.com/muety/wakapi/models/user.go:80.2,81.16 2 1 @@ -19,47 +38,45 @@ 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: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:20.17,21.27 1 0 -github.com/muety/wakapi/models/filters.go:22.23,23.33 1 0 -github.com/muety/wakapi/models/filters.go:24.21,25.31 1 0 -github.com/muety/wakapi/models/filters.go:26.22,27.32 1 0 -github.com/muety/wakapi/models/filters.go:32.47,33.21 1 1 -github.com/muety/wakapi/models/filters.go:44.2,44.21 1 1 -github.com/muety/wakapi/models/filters.go:33.21,35.3 1 1 -github.com/muety/wakapi/models/filters.go:35.8,35.23 1 1 -github.com/muety/wakapi/models/filters.go:35.23,37.3 1 0 -github.com/muety/wakapi/models/filters.go:37.8,37.29 1 1 -github.com/muety/wakapi/models/filters.go:37.29,39.3 1 1 -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:41.8,41.28 1 1 -github.com/muety/wakapi/models/filters.go:41.28,43.3 1 0 +github.com/muety/wakapi/models/heartbeat.go:32.34,34.2 1 1 +github.com/muety/wakapi/models/heartbeat.go:36.65,38.46 2 1 +github.com/muety/wakapi/models/heartbeat.go:38.46,39.108 1 1 +github.com/muety/wakapi/models/heartbeat.go:39.108,42.4 2 1 +github.com/muety/wakapi/models/heartbeat.go:46.50,47.11 1 1 +github.com/muety/wakapi/models/heartbeat.go:60.2,60.15 1 1 +github.com/muety/wakapi/models/heartbeat.go:64.2,64.12 1 1 +github.com/muety/wakapi/models/heartbeat.go:48.22,49.18 1 1 +github.com/muety/wakapi/models/heartbeat.go:50.21,51.17 1 1 +github.com/muety/wakapi/models/heartbeat.go:52.23,53.19 1 1 +github.com/muety/wakapi/models/heartbeat.go:54.17,55.26 1 1 +github.com/muety/wakapi/models/heartbeat.go:56.22,57.18 1 1 +github.com/muety/wakapi/models/heartbeat.go:60.15,62.3 1 1 +github.com/muety/wakapi/models/heartbeat.go:67.37,83.2 1 0 +github.com/muety/wakapi/models/heartbeat.go:91.41,93.16 2 0 +github.com/muety/wakapi/models/heartbeat.go:96.2,97.10 2 0 +github.com/muety/wakapi/models/heartbeat.go:93.16,95.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: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/mail.go:16.44,20.2 3 0 github.com/muety/wakapi/models/mail.go:22.44,26.2 3 0 github.com/muety/wakapi/models/mail.go:28.32,41.2 1 0 github.com/muety/wakapi/models/mail.go:43.41,45.2 1 0 -github.com/muety/wakapi/models/mail_address.go:15.13,18.2 2 1 -github.com/muety/wakapi/models/mail_address.go:24.38,26.2 1 0 -github.com/muety/wakapi/models/mail_address.go:28.35,30.21 2 1 -github.com/muety/wakapi/models/mail_address.go:36.2,36.11 1 1 -github.com/muety/wakapi/models/mail_address.go:30.21,31.21 1 1 -github.com/muety/wakapi/models/mail_address.go:34.3,34.18 1 1 -github.com/muety/wakapi/models/mail_address.go:31.21,33.4 1 1 -github.com/muety/wakapi/models/mail_address.go:39.35,41.2 1 1 -github.com/muety/wakapi/models/mail_address.go:43.43,45.22 2 0 -github.com/muety/wakapi/models/mail_address.go:48.2,48.12 1 0 -github.com/muety/wakapi/models/mail_address.go:45.22,47.3 1 0 -github.com/muety/wakapi/models/mail_address.go:51.46,53.22 2 1 -github.com/muety/wakapi/models/mail_address.go:56.2,56.12 1 1 -github.com/muety/wakapi/models/mail_address.go:53.22,55.3 1 1 -github.com/muety/wakapi/models/mail_address.go:59.40,60.22 1 1 -github.com/muety/wakapi/models/mail_address.go:65.2,65.13 1 1 -github.com/muety/wakapi/models/mail_address.go:60.22,61.17 1 1 -github.com/muety/wakapi/models/mail_address.go:61.17,63.4 1 1 -github.com/muety/wakapi/models/models.go:3.14,5.2 0 1 +github.com/muety/wakapi/models/shared.go:35.52,37.2 1 0 +github.com/muety/wakapi/models/shared.go:39.52,42.16 3 0 +github.com/muety/wakapi/models/shared.go:45.2,47.12 3 0 +github.com/muety/wakapi/models/shared.go:42.16,44.3 1 0 +github.com/muety/wakapi/models/shared.go:50.52,56.22 2 0 +github.com/muety/wakapi/models/shared.go:71.2,74.12 3 0 +github.com/muety/wakapi/models/shared.go:57.14,61.17 2 0 +github.com/muety/wakapi/models/shared.go:64.17,66.8 2 0 +github.com/muety/wakapi/models/shared.go:67.10,68.64 1 0 +github.com/muety/wakapi/models/shared.go:61.17,63.4 1 0 +github.com/muety/wakapi/models/shared.go:77.51,80.2 2 0 +github.com/muety/wakapi/models/shared.go:82.45,84.2 1 0 +github.com/muety/wakapi/models/shared.go:86.37,88.2 1 0 +github.com/muety/wakapi/models/shared.go:90.35,92.2 1 0 +github.com/muety/wakapi/models/shared.go:94.34,96.2 1 0 github.com/muety/wakapi/models/summary.go:70.29,72.2 1 1 github.com/muety/wakapi/models/summary.go:74.37,81.2 6 1 github.com/muety/wakapi/models/summary.go:83.35,85.2 1 1 @@ -110,23 +127,24 @@ github.com/muety/wakapi/models/summary.go:213.11,221.6 1 1 github.com/muety/wakapi/models/summary.go:238.33,240.2 1 1 github.com/muety/wakapi/models/summary.go:242.43,244.2 1 1 github.com/muety/wakapi/models/summary.go:246.38,248.2 1 1 -github.com/muety/wakapi/models/heartbeat.go:32.34,34.2 1 1 -github.com/muety/wakapi/models/heartbeat.go:36.65,38.46 2 1 -github.com/muety/wakapi/models/heartbeat.go:38.46,39.108 1 1 -github.com/muety/wakapi/models/heartbeat.go:39.108,42.4 2 1 -github.com/muety/wakapi/models/heartbeat.go:46.50,47.11 1 1 -github.com/muety/wakapi/models/heartbeat.go:60.2,60.15 1 1 -github.com/muety/wakapi/models/heartbeat.go:64.2,64.12 1 1 -github.com/muety/wakapi/models/heartbeat.go:48.22,49.18 1 1 -github.com/muety/wakapi/models/heartbeat.go:50.21,51.17 1 1 -github.com/muety/wakapi/models/heartbeat.go:52.23,53.19 1 1 -github.com/muety/wakapi/models/heartbeat.go:54.17,55.26 1 1 -github.com/muety/wakapi/models/heartbeat.go:56.22,57.18 1 1 -github.com/muety/wakapi/models/heartbeat.go:60.15,62.3 1 1 -github.com/muety/wakapi/models/heartbeat.go:67.37,83.2 1 0 -github.com/muety/wakapi/models/heartbeat.go:91.41,93.16 2 0 -github.com/muety/wakapi/models/heartbeat.go:96.2,97.10 2 0 -github.com/muety/wakapi/models/heartbeat.go:93.16,95.3 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:18.22,19.32 1 0 +github.com/muety/wakapi/models/filters.go:20.17,21.27 1 0 +github.com/muety/wakapi/models/filters.go:22.23,23.33 1 0 +github.com/muety/wakapi/models/filters.go:24.21,25.31 1 0 +github.com/muety/wakapi/models/filters.go:26.22,27.32 1 0 +github.com/muety/wakapi/models/filters.go:32.47,33.21 1 1 +github.com/muety/wakapi/models/filters.go:44.2,44.21 1 1 +github.com/muety/wakapi/models/filters.go:33.21,35.3 1 1 +github.com/muety/wakapi/models/filters.go:35.8,35.23 1 1 +github.com/muety/wakapi/models/filters.go:35.23,37.3 1 0 +github.com/muety/wakapi/models/filters.go:37.8,37.29 1 1 +github.com/muety/wakapi/models/filters.go:37.29,39.3 1 1 +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:41.8,41.28 1 1 +github.com/muety/wakapi/models/filters.go:41.28,43.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 @@ -141,24 +159,19 @@ github.com/muety/wakapi/models/interval.go:39.47,40.23 1 0 github.com/muety/wakapi/models/interval.go:45.2,45.14 1 0 github.com/muety/wakapi/models/interval.go:40.23,41.13 1 0 github.com/muety/wakapi/models/interval.go:41.13,43.4 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:19.52,21.2 1 0 -github.com/muety/wakapi/models/shared.go:35.52,37.2 1 0 -github.com/muety/wakapi/models/shared.go:39.52,42.16 3 0 -github.com/muety/wakapi/models/shared.go:45.2,47.12 3 0 -github.com/muety/wakapi/models/shared.go:42.16,44.3 1 0 -github.com/muety/wakapi/models/shared.go:50.52,56.22 2 0 -github.com/muety/wakapi/models/shared.go:71.2,74.12 3 0 -github.com/muety/wakapi/models/shared.go:57.14,61.17 2 0 -github.com/muety/wakapi/models/shared.go:64.17,66.8 2 0 -github.com/muety/wakapi/models/shared.go:67.10,68.64 1 0 -github.com/muety/wakapi/models/shared.go:61.17,63.4 1 0 -github.com/muety/wakapi/models/shared.go:77.51,80.2 2 0 -github.com/muety/wakapi/models/shared.go:82.45,84.2 1 0 -github.com/muety/wakapi/models/shared.go:86.37,88.2 1 0 -github.com/muety/wakapi/models/shared.go:90.35,92.2 1 0 -github.com/muety/wakapi/models/shared.go:94.34,96.2 1 0 +github.com/muety/wakapi/config/db.go:39.50,40.19 1 0 +github.com/muety/wakapi/config/db.go:53.2,53.12 1 0 +github.com/muety/wakapi/config/db.go:41.23,45.5 1 0 +github.com/muety/wakapi/config/db.go:46.26,49.5 1 0 +github.com/muety/wakapi/config/db.go:50.24,51.48 1 0 +github.com/muety/wakapi/config/db.go:56.53,66.2 1 1 +github.com/muety/wakapi/config/db.go:68.56,70.16 2 1 +github.com/muety/wakapi/config/db.go:74.2,81.3 1 1 +github.com/muety/wakapi/config/db.go:70.16,72.3 1 0 +github.com/muety/wakapi/config/db.go:84.54,86.2 1 1 +github.com/muety/wakapi/config/fs.go:9.56,10.19 1 0 +github.com/muety/wakapi/config/fs.go:13.2,13.19 1 0 +github.com/muety/wakapi/config/fs.go:10.19,12.3 1 0 github.com/muety/wakapi/config/sentry.go:22.35,24.2 1 0 github.com/muety/wakapi/config/sentry.go:26.62,29.2 2 0 github.com/muety/wakapi/config/sentry.go:39.33,46.2 2 0 @@ -174,228 +187,91 @@ github.com/muety/wakapi/config/sentry.go:88.18,89.65 1 0 github.com/muety/wakapi/config/sentry.go:89.65,92.42 3 0 github.com/muety/wakapi/config/sentry.go:95.4,96.10 2 0 github.com/muety/wakapi/config/sentry.go:92.42,94.5 1 0 -github.com/muety/wakapi/config/sentry.go:103.50,107.91 1 0 -github.com/muety/wakapi/config/sentry.go:107.91,108.29 1 0 -github.com/muety/wakapi/config/sentry.go:112.4,115.96 3 0 -github.com/muety/wakapi/config/sentry.go:118.4,118.39 1 0 -github.com/muety/wakapi/config/sentry.go:121.4,121.69 1 0 -github.com/muety/wakapi/config/sentry.go:108.29,110.5 1 0 -github.com/muety/wakapi/config/sentry.go:115.96,117.5 1 0 -github.com/muety/wakapi/config/sentry.go:118.39,120.5 1 0 -github.com/muety/wakapi/config/sentry.go:123.79,124.27 1 0 -github.com/muety/wakapi/config/sentry.go:131.4,131.16 1 0 -github.com/muety/wakapi/config/sentry.go:124.27,125.84 1 0 -github.com/muety/wakapi/config/sentry.go:125.84,126.42 1 0 -github.com/muety/wakapi/config/sentry.go:126.42,128.7 1 0 -github.com/muety/wakapi/config/sentry.go:133.17,135.3 1 0 -github.com/muety/wakapi/config/sentry.go:138.49,142.51 2 0 -github.com/muety/wakapi/config/sentry.go:145.2,145.12 1 0 -github.com/muety/wakapi/config/sentry.go:142.51,144.3 1 0 +github.com/muety/wakapi/config/sentry.go:110.50,114.91 1 0 +github.com/muety/wakapi/config/sentry.go:114.91,115.29 1 0 +github.com/muety/wakapi/config/sentry.go:119.4,122.38 3 0 +github.com/muety/wakapi/config/sentry.go:127.4,127.39 1 0 +github.com/muety/wakapi/config/sentry.go:130.4,130.69 1 0 +github.com/muety/wakapi/config/sentry.go:115.29,117.5 1 0 +github.com/muety/wakapi/config/sentry.go:122.38,123.38 1 0 +github.com/muety/wakapi/config/sentry.go:123.38,125.6 1 0 +github.com/muety/wakapi/config/sentry.go:127.39,129.5 1 0 +github.com/muety/wakapi/config/sentry.go:132.79,133.27 1 0 +github.com/muety/wakapi/config/sentry.go:140.4,140.16 1 0 +github.com/muety/wakapi/config/sentry.go:133.27,134.84 1 0 +github.com/muety/wakapi/config/sentry.go:134.84,135.42 1 0 +github.com/muety/wakapi/config/sentry.go:135.42,137.7 1 0 +github.com/muety/wakapi/config/sentry.go:142.17,144.3 1 0 +github.com/muety/wakapi/config/sentry.go:147.49,151.51 2 0 +github.com/muety/wakapi/config/sentry.go:154.2,154.12 1 0 +github.com/muety/wakapi/config/sentry.go:151.51,153.3 1 0 github.com/muety/wakapi/config/utils.go:5.78,7.22 2 0 github.com/muety/wakapi/config/utils.go:13.2,13.11 1 0 github.com/muety/wakapi/config/utils.go:7.22,8.18 1 0 github.com/muety/wakapi/config/utils.go:11.3,11.12 1 0 github.com/muety/wakapi/config/utils.go:8.18,10.4 1 0 -github.com/muety/wakapi/config/config.go:148.70,150.2 1 0 -github.com/muety/wakapi/config/config.go:152.65,154.2 1 0 -github.com/muety/wakapi/config/config.go:156.82,166.2 1 0 -github.com/muety/wakapi/config/config.go:168.31,170.2 1 0 -github.com/muety/wakapi/config/config.go:172.32,174.2 1 0 -github.com/muety/wakapi/config/config.go:176.74,177.19 1 0 -github.com/muety/wakapi/config/config.go:178.10,179.34 1 0 -github.com/muety/wakapi/config/config.go:179.34,180.90 1 0 -github.com/muety/wakapi/config/config.go:183.4,183.100 1 0 -github.com/muety/wakapi/config/config.go:186.4,186.91 1 0 -github.com/muety/wakapi/config/config.go:189.4,189.95 1 0 -github.com/muety/wakapi/config/config.go:192.4,192.93 1 0 -github.com/muety/wakapi/config/config.go:195.4,195.97 1 0 -github.com/muety/wakapi/config/config.go:198.4,198.101 1 0 -github.com/muety/wakapi/config/config.go:201.4,201.14 1 0 -github.com/muety/wakapi/config/config.go:180.90,182.5 1 0 -github.com/muety/wakapi/config/config.go:183.100,185.5 1 0 -github.com/muety/wakapi/config/config.go:186.91,188.5 1 0 -github.com/muety/wakapi/config/config.go:189.95,191.5 1 0 -github.com/muety/wakapi/config/config.go:192.93,194.5 1 0 -github.com/muety/wakapi/config/config.go:195.97,197.5 1 0 -github.com/muety/wakapi/config/config.go:198.101,200.5 1 0 -github.com/muety/wakapi/config/config.go:206.50,207.19 1 0 -github.com/muety/wakapi/config/config.go:220.2,220.12 1 0 -github.com/muety/wakapi/config/config.go:208.23,212.5 1 0 -github.com/muety/wakapi/config/config.go:213.26,216.5 1 0 -github.com/muety/wakapi/config/config.go:217.24,218.48 1 0 -github.com/muety/wakapi/config/config.go:223.53,234.2 1 1 -github.com/muety/wakapi/config/config.go:236.56,238.16 2 1 -github.com/muety/wakapi/config/config.go:242.2,249.3 1 1 -github.com/muety/wakapi/config/config.go:238.16,240.3 1 0 -github.com/muety/wakapi/config/config.go:252.54,254.2 1 1 -github.com/muety/wakapi/config/config.go:256.60,258.2 1 0 -github.com/muety/wakapi/config/config.go:260.59,262.2 1 0 -github.com/muety/wakapi/config/config.go:264.57,266.2 1 0 -github.com/muety/wakapi/config/config.go:268.53,270.2 1 0 -github.com/muety/wakapi/config/config.go:272.46,274.2 1 0 -github.com/muety/wakapi/config/config.go:276.43,278.2 1 0 -github.com/muety/wakapi/config/config.go:280.29,282.2 1 1 -github.com/muety/wakapi/config/config.go:284.48,295.16 2 0 -github.com/muety/wakapi/config/config.go:299.2,300.53 2 0 -github.com/muety/wakapi/config/config.go:304.2,304.15 1 0 -github.com/muety/wakapi/config/config.go:295.16,297.3 1 0 -github.com/muety/wakapi/config/config.go:300.53,302.3 1 0 -github.com/muety/wakapi/config/config.go:307.38,308.43 1 0 -github.com/muety/wakapi/config/config.go:311.2,311.15 1 0 -github.com/muety/wakapi/config/config.go:308.43,310.3 1 0 -github.com/muety/wakapi/config/config.go:314.45,315.27 1 0 -github.com/muety/wakapi/config/config.go:318.2,318.15 1 0 -github.com/muety/wakapi/config/config.go:315.27,317.3 1 0 -github.com/muety/wakapi/config/config.go:321.77,322.29 1 0 -github.com/muety/wakapi/config/config.go:327.2,327.19 1 0 -github.com/muety/wakapi/config/config.go:322.29,323.18 1 0 -github.com/muety/wakapi/config/config.go:323.18,325.4 1 0 -github.com/muety/wakapi/config/config.go:330.26,332.2 1 0 -github.com/muety/wakapi/config/config.go:334.20,336.2 1 0 -github.com/muety/wakapi/config/config.go:338.35,343.96 3 0 -github.com/muety/wakapi/config/config.go:347.2,356.52 6 0 -github.com/muety/wakapi/config/config.go:360.2,360.47 1 0 -github.com/muety/wakapi/config/config.go:366.2,366.70 1 0 -github.com/muety/wakapi/config/config.go:370.2,370.28 1 0 -github.com/muety/wakapi/config/config.go:374.2,374.29 1 0 -github.com/muety/wakapi/config/config.go:379.2,379.94 1 0 -github.com/muety/wakapi/config/config.go:383.2,384.14 2 0 -github.com/muety/wakapi/config/config.go:343.96,345.3 1 0 -github.com/muety/wakapi/config/config.go:356.52,358.3 1 0 -github.com/muety/wakapi/config/config.go:360.47,361.14 1 0 -github.com/muety/wakapi/config/config.go:361.14,363.4 1 0 -github.com/muety/wakapi/config/config.go:366.70,368.3 1 0 -github.com/muety/wakapi/config/config.go:370.28,372.3 1 0 -github.com/muety/wakapi/config/config.go:374.29,377.3 2 0 -github.com/muety/wakapi/config/config.go:379.94,381.3 1 0 -github.com/muety/wakapi/config/fs.go:9.56,10.19 1 0 -github.com/muety/wakapi/config/fs.go:13.2,13.19 1 0 -github.com/muety/wakapi/config/fs.go:10.19,12.3 1 0 -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/summary.go:10.66,11.40 1 0 -github.com/muety/wakapi/utils/summary.go:16.2,16.48 1 0 -github.com/muety/wakapi/utils/summary.go:11.40,12.27 1 0 -github.com/muety/wakapi/utils/summary.go:12.27,14.4 1 0 -github.com/muety/wakapi/utils/summary.go:19.88,22.2 2 0 -github.com/muety/wakapi/utils/summary.go:24.95,26.16 2 0 -github.com/muety/wakapi/utils/summary.go:29.2,29.38 1 0 -github.com/muety/wakapi/utils/summary.go:26.16,28.3 1 0 -github.com/muety/wakapi/utils/summary.go:32.105,35.18 2 0 -github.com/muety/wakapi/utils/summary.go:70.2,70.22 1 0 -github.com/muety/wakapi/utils/summary.go:36.28,37.26 1 0 -github.com/muety/wakapi/utils/summary.go:38.32,40.24 2 0 -github.com/muety/wakapi/utils/summary.go:41.31,42.29 1 0 -github.com/muety/wakapi/utils/summary.go:43.31,45.27 2 0 -github.com/muety/wakapi/utils/summary.go:46.32,47.30 1 0 -github.com/muety/wakapi/utils/summary.go:48.32,50.28 2 0 -github.com/muety/wakapi/utils/summary.go:51.31,52.29 1 0 -github.com/muety/wakapi/utils/summary.go:53.32,54.44 1 0 -github.com/muety/wakapi/utils/summary.go:55.41,57.42 2 0 -github.com/muety/wakapi/utils/summary.go:58.33,59.45 1 0 -github.com/muety/wakapi/utils/summary.go:60.33,61.45 1 0 -github.com/muety/wakapi/utils/summary.go:62.35,63.45 1 0 -github.com/muety/wakapi/utils/summary.go:64.26,65.21 1 0 -github.com/muety/wakapi/utils/summary.go:66.10,67.39 1 0 -github.com/muety/wakapi/utils/summary.go:73.73,80.56 5 0 -github.com/muety/wakapi/utils/summary.go:96.2,103.8 2 0 -github.com/muety/wakapi/utils/summary.go:80.56,82.3 1 0 -github.com/muety/wakapi/utils/summary.go:82.8,82.54 1 0 -github.com/muety/wakapi/utils/summary.go:82.54,84.3 1 0 -github.com/muety/wakapi/utils/summary.go:84.8,86.17 2 0 -github.com/muety/wakapi/utils/summary.go:90.3,91.17 2 0 -github.com/muety/wakapi/utils/summary.go:86.17,88.4 1 0 -github.com/muety/wakapi/utils/summary.go:91.17,93.4 1 0 -github.com/muety/wakapi/utils/summary.go:106.48,110.51 2 0 -github.com/muety/wakapi/utils/summary.go:113.2,113.12 1 0 -github.com/muety/wakapi/utils/summary.go:110.51,112.3 1 0 -github.com/muety/wakapi/utils/auth.go:16.79,18.54 2 0 -github.com/muety/wakapi/utils/auth.go:22.2,24.16 3 0 -github.com/muety/wakapi/utils/auth.go:28.2,30.45 3 0 -github.com/muety/wakapi/utils/auth.go:33.2,34.32 2 0 -github.com/muety/wakapi/utils/auth.go:18.54,20.3 1 0 -github.com/muety/wakapi/utils/auth.go:24.16,26.3 1 0 -github.com/muety/wakapi/utils/auth.go:30.45,32.3 1 0 -github.com/muety/wakapi/utils/auth.go:37.65,39.85 2 0 -github.com/muety/wakapi/utils/auth.go:43.2,44.30 2 0 -github.com/muety/wakapi/utils/auth.go:39.85,41.3 1 0 -github.com/muety/wakapi/utils/auth.go:47.94,49.16 2 0 -github.com/muety/wakapi/utils/auth.go:53.2,53.107 1 0 -github.com/muety/wakapi/utils/auth.go:57.2,57.22 1 0 -github.com/muety/wakapi/utils/auth.go:49.16,51.3 1 0 -github.com/muety/wakapi/utils/auth.go:53.107,55.3 1 0 -github.com/muety/wakapi/utils/auth.go:60.56,64.2 3 0 -github.com/muety/wakapi/utils/auth.go:66.55,69.16 3 0 -github.com/muety/wakapi/utils/auth.go:72.2,72.16 1 0 -github.com/muety/wakapi/utils/auth.go:69.16,71.3 1 0 -github.com/muety/wakapi/utils/common.go:18.73,19.58 1 0 -github.com/muety/wakapi/utils/common.go:22.2,22.87 1 0 -github.com/muety/wakapi/utils/common.go:25.2,25.64 1 0 -github.com/muety/wakapi/utils/common.go:19.58,21.3 1 0 -github.com/muety/wakapi/utils/common.go:22.87,24.3 1 0 -github.com/muety/wakapi/utils/common.go:28.40,30.2 1 0 -github.com/muety/wakapi/utils/common.go:32.44,34.2 1 0 -github.com/muety/wakapi/utils/common.go:36.45,38.2 1 0 -github.com/muety/wakapi/utils/common.go:40.24,42.2 1 0 -github.com/muety/wakapi/utils/common.go:44.56,47.45 3 1 -github.com/muety/wakapi/utils/common.go:50.2,50.40 1 1 -github.com/muety/wakapi/utils/common.go:47.45,49.3 1 1 -github.com/muety/wakapi/utils/date.go:8.43,10.2 1 1 -github.com/muety/wakapi/utils/date.go:12.48,14.2 1 0 -github.com/muety/wakapi/utils/date.go:16.51,18.2 1 0 -github.com/muety/wakapi/utils/date.go:20.44,23.2 2 1 -github.com/muety/wakapi/utils/date.go:25.52,27.2 1 0 -github.com/muety/wakapi/utils/date.go:29.45,31.2 1 0 -github.com/muety/wakapi/utils/date.go:33.51,35.2 1 0 -github.com/muety/wakapi/utils/date.go:37.44,39.2 1 0 -github.com/muety/wakapi/utils/date.go:42.42,44.2 1 1 -github.com/muety/wakapi/utils/date.go:47.41,49.21 2 1 -github.com/muety/wakapi/utils/date.go:52.2,52.36 1 1 -github.com/muety/wakapi/utils/date.go:49.21,51.3 1 1 -github.com/muety/wakapi/utils/date.go:56.63,58.2 1 0 -github.com/muety/wakapi/utils/date.go:61.62,67.2 5 0 -github.com/muety/wakapi/utils/date.go:70.67,73.33 2 1 -github.com/muety/wakapi/utils/date.go:82.2,82.18 1 1 -github.com/muety/wakapi/utils/date.go:73.33,75.19 2 1 -github.com/muety/wakapi/utils/date.go:78.3,79.10 2 1 -github.com/muety/wakapi/utils/date.go:75.19,77.4 1 1 -github.com/muety/wakapi/utils/date.go:85.50,91.2 5 0 -github.com/muety/wakapi/utils/date.go:94.79,97.36 3 1 -github.com/muety/wakapi/utils/date.go:101.2,101.21 1 1 -github.com/muety/wakapi/utils/date.go:105.2,105.21 1 1 -github.com/muety/wakapi/utils/date.go:109.2,109.13 1 1 -github.com/muety/wakapi/utils/date.go:97.36,100.3 2 0 -github.com/muety/wakapi/utils/date.go:101.21,104.3 2 1 -github.com/muety/wakapi/utils/date.go:105.21,108.3 2 1 -github.com/muety/wakapi/utils/filesystem.go:14.68,16.16 2 0 -github.com/muety/wakapi/utils/filesystem.go:20.2,21.15 2 0 -github.com/muety/wakapi/utils/filesystem.go:33.2,33.15 1 0 -github.com/muety/wakapi/utils/filesystem.go:16.16,18.3 1 0 -github.com/muety/wakapi/utils/filesystem.go:21.15,23.47 2 0 -github.com/muety/wakapi/utils/filesystem.go:23.47,25.23 2 0 -github.com/muety/wakapi/utils/filesystem.go:29.4,29.19 1 0 -github.com/muety/wakapi/utils/filesystem.go:25.23,27.5 1 0 -github.com/muety/wakapi/utils/color.go:8.90,10.32 2 0 -github.com/muety/wakapi/utils/color.go:15.2,15.15 1 0 -github.com/muety/wakapi/utils/color.go:10.32,11.50 1 0 -github.com/muety/wakapi/utils/color.go:11.50,13.4 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:18.2,18.19 1 0 -github.com/muety/wakapi/utils/strings.go:13.29,14.18 1 0 -github.com/muety/wakapi/utils/strings.go:14.18,16.4 1 0 -github.com/muety/wakapi/utils/template.go:8.41,10.16 2 0 -github.com/muety/wakapi/utils/template.go:13.2,13.23 1 0 -github.com/muety/wakapi/utils/template.go:10.16,12.3 1 0 -github.com/muety/wakapi/utils/template.go:16.37,17.30 1 0 -github.com/muety/wakapi/utils/template.go:20.2,20.10 1 0 -github.com/muety/wakapi/utils/template.go:17.30,19.3 1 0 -github.com/muety/wakapi/middlewares/security.go:19.62,20.43 1 0 -github.com/muety/wakapi/middlewares/security.go:20.43,22.3 1 0 -github.com/muety/wakapi/middlewares/security.go:25.80,26.36 1 0 -github.com/muety/wakapi/middlewares/security.go:31.2,31.27 1 0 -github.com/muety/wakapi/middlewares/security.go:26.36,27.30 1 0 -github.com/muety/wakapi/middlewares/security.go:27.30,29.4 1 0 +github.com/muety/wakapi/config/config.go:145.70,147.2 1 0 +github.com/muety/wakapi/config/config.go:149.65,151.2 1 0 +github.com/muety/wakapi/config/config.go:153.82,163.2 1 0 +github.com/muety/wakapi/config/config.go:165.31,167.2 1 0 +github.com/muety/wakapi/config/config.go:169.32,171.2 1 0 +github.com/muety/wakapi/config/config.go:173.74,174.19 1 0 +github.com/muety/wakapi/config/config.go:175.10,176.34 1 0 +github.com/muety/wakapi/config/config.go:176.34,177.90 1 0 +github.com/muety/wakapi/config/config.go:180.4,180.100 1 0 +github.com/muety/wakapi/config/config.go:183.4,183.91 1 0 +github.com/muety/wakapi/config/config.go:186.4,186.95 1 0 +github.com/muety/wakapi/config/config.go:189.4,189.93 1 0 +github.com/muety/wakapi/config/config.go:192.4,192.97 1 0 +github.com/muety/wakapi/config/config.go:195.4,195.101 1 0 +github.com/muety/wakapi/config/config.go:198.4,198.14 1 0 +github.com/muety/wakapi/config/config.go:177.90,179.5 1 0 +github.com/muety/wakapi/config/config.go:180.100,182.5 1 0 +github.com/muety/wakapi/config/config.go:183.91,185.5 1 0 +github.com/muety/wakapi/config/config.go:186.95,188.5 1 0 +github.com/muety/wakapi/config/config.go:189.93,191.5 1 0 +github.com/muety/wakapi/config/config.go:192.97,194.5 1 0 +github.com/muety/wakapi/config/config.go:195.101,197.5 1 0 +github.com/muety/wakapi/config/config.go:203.60,205.2 1 0 +github.com/muety/wakapi/config/config.go:207.59,209.2 1 0 +github.com/muety/wakapi/config/config.go:211.57,213.2 1 0 +github.com/muety/wakapi/config/config.go:215.53,217.2 1 0 +github.com/muety/wakapi/config/config.go:219.46,221.2 1 0 +github.com/muety/wakapi/config/config.go:223.43,225.2 1 0 +github.com/muety/wakapi/config/config.go:227.29,229.2 1 1 +github.com/muety/wakapi/config/config.go:231.48,242.16 2 0 +github.com/muety/wakapi/config/config.go:246.2,247.53 2 0 +github.com/muety/wakapi/config/config.go:251.2,251.15 1 0 +github.com/muety/wakapi/config/config.go:242.16,244.3 1 0 +github.com/muety/wakapi/config/config.go:247.53,249.3 1 0 +github.com/muety/wakapi/config/config.go:254.38,255.43 1 0 +github.com/muety/wakapi/config/config.go:258.2,258.15 1 0 +github.com/muety/wakapi/config/config.go:255.43,257.3 1 0 +github.com/muety/wakapi/config/config.go:261.45,262.27 1 0 +github.com/muety/wakapi/config/config.go:265.2,265.15 1 0 +github.com/muety/wakapi/config/config.go:262.27,264.3 1 0 +github.com/muety/wakapi/config/config.go:268.77,269.29 1 0 +github.com/muety/wakapi/config/config.go:274.2,274.19 1 0 +github.com/muety/wakapi/config/config.go:269.29,270.18 1 0 +github.com/muety/wakapi/config/config.go:270.18,272.4 1 0 +github.com/muety/wakapi/config/config.go:277.26,279.2 1 0 +github.com/muety/wakapi/config/config.go:281.20,283.2 1 0 +github.com/muety/wakapi/config/config.go:285.35,290.96 3 0 +github.com/muety/wakapi/config/config.go:294.2,303.52 6 0 +github.com/muety/wakapi/config/config.go:307.2,307.47 1 0 +github.com/muety/wakapi/config/config.go:313.2,313.70 1 0 +github.com/muety/wakapi/config/config.go:317.2,317.28 1 0 +github.com/muety/wakapi/config/config.go:321.2,321.29 1 0 +github.com/muety/wakapi/config/config.go:326.2,326.94 1 0 +github.com/muety/wakapi/config/config.go:330.2,331.14 2 0 +github.com/muety/wakapi/config/config.go:290.96,292.3 1 0 +github.com/muety/wakapi/config/config.go:303.52,305.3 1 0 +github.com/muety/wakapi/config/config.go:307.47,308.14 1 0 +github.com/muety/wakapi/config/config.go:308.14,310.4 1 0 +github.com/muety/wakapi/config/config.go:313.70,315.3 1 0 +github.com/muety/wakapi/config/config.go:317.28,319.3 1 0 +github.com/muety/wakapi/config/config.go:321.29,324.3 2 0 +github.com/muety/wakapi/config/config.go:326.94,328.3 1 0 github.com/muety/wakapi/middlewares/authenticate.go:19.91,25.2 1 1 github.com/muety/wakapi/middlewares/authenticate.go:27.90,30.2 2 0 github.com/muety/wakapi/middlewares/authenticate.go:32.90,35.2 2 0 @@ -468,6 +344,295 @@ github.com/muety/wakapi/middlewares/principal.go:54.52,56.3 1 0 github.com/muety/wakapi/middlewares/principal.go:59.49,60.52 1 0 github.com/muety/wakapi/middlewares/principal.go:63.2,63.12 1 0 github.com/muety/wakapi/middlewares/principal.go:60.52,62.3 1 0 +github.com/muety/wakapi/middlewares/security.go:19.62,20.43 1 0 +github.com/muety/wakapi/middlewares/security.go:20.43,22.3 1 0 +github.com/muety/wakapi/middlewares/security.go:25.80,26.36 1 0 +github.com/muety/wakapi/middlewares/security.go:31.2,31.27 1 0 +github.com/muety/wakapi/middlewares/security.go:26.36,27.30 1 0 +github.com/muety/wakapi/middlewares/security.go:27.30,29.4 1 0 +github.com/muety/wakapi/middlewares/sentry.go:15.60,16.43 1 0 +github.com/muety/wakapi/middlewares/sentry.go:16.43,20.3 1 0 +github.com/muety/wakapi/middlewares/sentry.go:23.78,26.54 3 0 +github.com/muety/wakapi/middlewares/sentry.go:26.54,27.43 1 0 +github.com/muety/wakapi/middlewares/sentry.go:27.43,29.4 1 0 +github.com/muety/wakapi/utils/common.go:18.73,19.58 1 0 +github.com/muety/wakapi/utils/common.go:22.2,22.87 1 0 +github.com/muety/wakapi/utils/common.go:25.2,25.64 1 0 +github.com/muety/wakapi/utils/common.go:19.58,21.3 1 0 +github.com/muety/wakapi/utils/common.go:22.87,24.3 1 0 +github.com/muety/wakapi/utils/common.go:28.40,30.2 1 0 +github.com/muety/wakapi/utils/common.go:32.44,34.2 1 0 +github.com/muety/wakapi/utils/common.go:36.45,38.2 1 0 +github.com/muety/wakapi/utils/common.go:40.24,42.2 1 0 +github.com/muety/wakapi/utils/common.go:44.56,47.45 3 1 +github.com/muety/wakapi/utils/common.go:50.2,50.40 1 1 +github.com/muety/wakapi/utils/common.go:47.45,49.3 1 1 +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:18.2,18.19 1 0 +github.com/muety/wakapi/utils/strings.go:13.29,14.18 1 0 +github.com/muety/wakapi/utils/strings.go:14.18,16.4 1 0 +github.com/muety/wakapi/utils/auth.go:16.79,18.54 2 0 +github.com/muety/wakapi/utils/auth.go:22.2,24.16 3 0 +github.com/muety/wakapi/utils/auth.go:28.2,30.45 3 0 +github.com/muety/wakapi/utils/auth.go:33.2,34.32 2 0 +github.com/muety/wakapi/utils/auth.go:18.54,20.3 1 0 +github.com/muety/wakapi/utils/auth.go:24.16,26.3 1 0 +github.com/muety/wakapi/utils/auth.go:30.45,32.3 1 0 +github.com/muety/wakapi/utils/auth.go:37.65,39.85 2 0 +github.com/muety/wakapi/utils/auth.go:43.2,44.30 2 0 +github.com/muety/wakapi/utils/auth.go:39.85,41.3 1 0 +github.com/muety/wakapi/utils/auth.go:47.94,49.16 2 0 +github.com/muety/wakapi/utils/auth.go:53.2,53.107 1 0 +github.com/muety/wakapi/utils/auth.go:57.2,57.22 1 0 +github.com/muety/wakapi/utils/auth.go:49.16,51.3 1 0 +github.com/muety/wakapi/utils/auth.go:53.107,55.3 1 0 +github.com/muety/wakapi/utils/auth.go:60.56,64.2 3 0 +github.com/muety/wakapi/utils/auth.go:66.55,69.16 3 0 +github.com/muety/wakapi/utils/auth.go:72.2,72.16 1 0 +github.com/muety/wakapi/utils/auth.go:69.16,71.3 1 0 +github.com/muety/wakapi/utils/color.go:8.90,10.32 2 0 +github.com/muety/wakapi/utils/color.go:15.2,15.15 1 0 +github.com/muety/wakapi/utils/color.go:10.32,11.50 1 0 +github.com/muety/wakapi/utils/color.go:11.50,13.4 1 0 +github.com/muety/wakapi/utils/date.go:8.43,10.2 1 1 +github.com/muety/wakapi/utils/date.go:12.48,14.2 1 0 +github.com/muety/wakapi/utils/date.go:16.41,18.21 2 1 +github.com/muety/wakapi/utils/date.go:21.2,21.23 1 1 +github.com/muety/wakapi/utils/date.go:18.21,20.3 1 0 +github.com/muety/wakapi/utils/date.go:24.46,26.2 1 0 +github.com/muety/wakapi/utils/date.go:28.51,30.2 1 0 +github.com/muety/wakapi/utils/date.go:32.44,35.2 2 1 +github.com/muety/wakapi/utils/date.go:37.52,39.2 1 0 +github.com/muety/wakapi/utils/date.go:41.45,43.2 1 0 +github.com/muety/wakapi/utils/date.go:45.51,47.2 1 0 +github.com/muety/wakapi/utils/date.go:49.44,51.2 1 0 +github.com/muety/wakapi/utils/date.go:54.42,56.2 1 1 +github.com/muety/wakapi/utils/date.go:59.41,61.21 2 1 +github.com/muety/wakapi/utils/date.go:64.2,64.36 1 1 +github.com/muety/wakapi/utils/date.go:61.21,63.3 1 1 +github.com/muety/wakapi/utils/date.go:68.63,70.2 1 0 +github.com/muety/wakapi/utils/date.go:73.62,79.2 5 0 +github.com/muety/wakapi/utils/date.go:82.67,85.33 2 1 +github.com/muety/wakapi/utils/date.go:94.2,94.18 1 1 +github.com/muety/wakapi/utils/date.go:85.33,87.19 2 1 +github.com/muety/wakapi/utils/date.go:90.3,91.10 2 1 +github.com/muety/wakapi/utils/date.go:87.19,89.4 1 1 +github.com/muety/wakapi/utils/date.go:97.50,103.2 5 0 +github.com/muety/wakapi/utils/date.go:106.79,109.36 3 1 +github.com/muety/wakapi/utils/date.go:113.2,113.21 1 1 +github.com/muety/wakapi/utils/date.go:117.2,117.21 1 1 +github.com/muety/wakapi/utils/date.go:121.2,121.13 1 1 +github.com/muety/wakapi/utils/date.go:109.36,112.3 2 0 +github.com/muety/wakapi/utils/date.go:113.21,116.3 2 1 +github.com/muety/wakapi/utils/date.go:117.21,120.3 2 1 +github.com/muety/wakapi/utils/filesystem.go:14.68,16.16 2 0 +github.com/muety/wakapi/utils/filesystem.go:20.2,21.15 2 0 +github.com/muety/wakapi/utils/filesystem.go:33.2,33.15 1 0 +github.com/muety/wakapi/utils/filesystem.go:16.16,18.3 1 0 +github.com/muety/wakapi/utils/filesystem.go:21.15,23.47 2 0 +github.com/muety/wakapi/utils/filesystem.go:23.47,25.23 2 0 +github.com/muety/wakapi/utils/filesystem.go:29.4,29.19 1 0 +github.com/muety/wakapi/utils/filesystem.go:25.23,27.5 1 0 +github.com/muety/wakapi/utils/http.go:9.90,12.58 3 0 +github.com/muety/wakapi/utils/http.go:12.58,14.3 1 0 +github.com/muety/wakapi/utils/summary.go:10.66,11.40 1 0 +github.com/muety/wakapi/utils/summary.go:16.2,16.48 1 0 +github.com/muety/wakapi/utils/summary.go:11.40,12.27 1 0 +github.com/muety/wakapi/utils/summary.go:12.27,14.4 1 0 +github.com/muety/wakapi/utils/summary.go:19.88,22.2 2 0 +github.com/muety/wakapi/utils/summary.go:24.95,26.16 2 0 +github.com/muety/wakapi/utils/summary.go:29.2,29.38 1 0 +github.com/muety/wakapi/utils/summary.go:26.16,28.3 1 0 +github.com/muety/wakapi/utils/summary.go:32.105,35.18 2 0 +github.com/muety/wakapi/utils/summary.go:70.2,70.22 1 0 +github.com/muety/wakapi/utils/summary.go:36.28,37.26 1 0 +github.com/muety/wakapi/utils/summary.go:38.32,40.24 2 0 +github.com/muety/wakapi/utils/summary.go:41.31,42.29 1 0 +github.com/muety/wakapi/utils/summary.go:43.31,45.27 2 0 +github.com/muety/wakapi/utils/summary.go:46.32,47.30 1 0 +github.com/muety/wakapi/utils/summary.go:48.32,50.28 2 0 +github.com/muety/wakapi/utils/summary.go:51.31,52.29 1 0 +github.com/muety/wakapi/utils/summary.go:53.32,54.44 1 0 +github.com/muety/wakapi/utils/summary.go:55.41,57.42 2 0 +github.com/muety/wakapi/utils/summary.go:58.33,59.45 1 0 +github.com/muety/wakapi/utils/summary.go:60.33,61.45 1 0 +github.com/muety/wakapi/utils/summary.go:62.35,63.45 1 0 +github.com/muety/wakapi/utils/summary.go:64.26,65.21 1 0 +github.com/muety/wakapi/utils/summary.go:66.10,67.39 1 0 +github.com/muety/wakapi/utils/summary.go:73.73,80.56 5 0 +github.com/muety/wakapi/utils/summary.go:96.2,103.8 2 0 +github.com/muety/wakapi/utils/summary.go:80.56,82.3 1 0 +github.com/muety/wakapi/utils/summary.go:82.8,82.54 1 0 +github.com/muety/wakapi/utils/summary.go:82.54,84.3 1 0 +github.com/muety/wakapi/utils/summary.go:84.8,86.17 2 0 +github.com/muety/wakapi/utils/summary.go:90.3,91.17 2 0 +github.com/muety/wakapi/utils/summary.go:86.17,88.4 1 0 +github.com/muety/wakapi/utils/summary.go:91.17,93.4 1 0 +github.com/muety/wakapi/utils/summary.go:106.48,110.51 2 0 +github.com/muety/wakapi/utils/summary.go:113.2,113.12 1 0 +github.com/muety/wakapi/utils/summary.go:110.51,112.3 1 0 +github.com/muety/wakapi/utils/template.go:8.41,10.16 2 0 +github.com/muety/wakapi/utils/template.go:13.2,13.23 1 0 +github.com/muety/wakapi/utils/template.go:10.16,12.3 1 0 +github.com/muety/wakapi/utils/template.go:16.37,17.30 1 0 +github.com/muety/wakapi/utils/template.go:20.2,20.10 1 0 +github.com/muety/wakapi/utils/template.go:17.30,19.3 1 0 +github.com/muety/wakapi/services/aggregation.go:29.142,37.2 1 0 +github.com/muety/wakapi/services/aggregation.go:46.43,48.37 1 0 +github.com/muety/wakapi/services/aggregation.go:52.2,54.19 3 0 +github.com/muety/wakapi/services/aggregation.go:48.37,50.3 1 0 +github.com/muety/wakapi/services/aggregation.go:57.67,58.47 1 0 +github.com/muety/wakapi/services/aggregation.go:61.2,66.40 4 0 +github.com/muety/wakapi/services/aggregation.go:70.2,70.50 1 0 +github.com/muety/wakapi/services/aggregation.go:75.2,75.60 1 0 +github.com/muety/wakapi/services/aggregation.go:81.2,81.35 1 0 +github.com/muety/wakapi/services/aggregation.go:58.47,60.3 1 0 +github.com/muety/wakapi/services/aggregation.go:66.40,68.3 1 0 +github.com/muety/wakapi/services/aggregation.go:70.50,72.3 1 0 +github.com/muety/wakapi/services/aggregation.go:75.60,79.3 3 0 +github.com/muety/wakapi/services/aggregation.go:84.109,85.24 1 0 +github.com/muety/wakapi/services/aggregation.go:85.24,86.111 1 0 +github.com/muety/wakapi/services/aggregation.go:86.111,88.4 1 0 +github.com/muety/wakapi/services/aggregation.go:88.9,91.4 2 0 +github.com/muety/wakapi/services/aggregation.go:95.80,96.33 1 0 +github.com/muety/wakapi/services/aggregation.go:96.33,97.60 1 0 +github.com/muety/wakapi/services/aggregation.go:97.60,99.4 1 0 +github.com/muety/wakapi/services/aggregation.go:103.100,107.59 3 0 +github.com/muety/wakapi/services/aggregation.go:122.2,123.16 2 0 +github.com/muety/wakapi/services/aggregation.go:129.2,130.16 2 0 +github.com/muety/wakapi/services/aggregation.go:136.2,137.44 2 0 +github.com/muety/wakapi/services/aggregation.go:142.2,142.41 1 0 +github.com/muety/wakapi/services/aggregation.go:156.2,156.12 1 0 +github.com/muety/wakapi/services/aggregation.go:107.59,110.3 2 0 +github.com/muety/wakapi/services/aggregation.go:110.8,110.47 1 0 +github.com/muety/wakapi/services/aggregation.go:110.47,112.30 2 0 +github.com/muety/wakapi/services/aggregation.go:112.30,113.43 1 0 +github.com/muety/wakapi/services/aggregation.go:113.43,115.5 1 0 +github.com/muety/wakapi/services/aggregation.go:117.8,119.3 1 0 +github.com/muety/wakapi/services/aggregation.go:123.16,126.3 2 0 +github.com/muety/wakapi/services/aggregation.go:130.16,133.3 2 0 +github.com/muety/wakapi/services/aggregation.go:137.44,139.3 1 0 +github.com/muety/wakapi/services/aggregation.go:142.41,143.21 1 0 +github.com/muety/wakapi/services/aggregation.go:143.21,147.4 1 0 +github.com/muety/wakapi/services/aggregation.go:147.9,147.62 1 0 +github.com/muety/wakapi/services/aggregation.go:147.62,151.4 1 0 +github.com/muety/wakapi/services/aggregation.go:159.73,162.27 3 0 +github.com/muety/wakapi/services/aggregation.go:167.2,167.27 1 0 +github.com/muety/wakapi/services/aggregation.go:170.2,170.12 1 0 +github.com/muety/wakapi/services/aggregation.go:162.27,163.39 1 0 +github.com/muety/wakapi/services/aggregation.go:163.39,165.4 1 0 +github.com/muety/wakapi/services/aggregation.go:167.27,169.3 1 0 +github.com/muety/wakapi/services/aggregation.go:173.69,176.27 3 0 +github.com/muety/wakapi/services/aggregation.go:176.27,178.3 1 0 +github.com/muety/wakapi/services/aggregation.go:181.83,196.41 5 0 +github.com/muety/wakapi/services/aggregation.go:196.41,206.3 3 0 +github.com/muety/wakapi/services/aggregation.go:209.34,212.2 2 0 +github.com/muety/wakapi/services/heartbeat.go:17.141,23.2 1 0 +github.com/muety/wakapi/services/heartbeat.go:25.72,27.2 1 0 +github.com/muety/wakapi/services/heartbeat.go:29.80,34.32 3 0 +github.com/muety/wakapi/services/heartbeat.go:41.2,41.55 1 0 +github.com/muety/wakapi/services/heartbeat.go:34.32,35.36 1 0 +github.com/muety/wakapi/services/heartbeat.go:35.36,38.4 2 0 +github.com/muety/wakapi/services/heartbeat.go:44.53,46.2 1 0 +github.com/muety/wakapi/services/heartbeat.go:48.76,50.2 1 0 +github.com/muety/wakapi/services/heartbeat.go:52.96,54.2 1 0 +github.com/muety/wakapi/services/heartbeat.go:56.111,58.16 2 0 +github.com/muety/wakapi/services/heartbeat.go:61.2,61.43 1 0 +github.com/muety/wakapi/services/heartbeat.go:58.16,60.3 1 0 +github.com/muety/wakapi/services/heartbeat.go:64.92,66.2 1 0 +github.com/muety/wakapi/services/heartbeat.go:68.116,70.2 1 0 +github.com/muety/wakapi/services/heartbeat.go:72.78,74.2 1 0 +github.com/muety/wakapi/services/heartbeat.go:76.62,78.2 1 0 +github.com/muety/wakapi/services/heartbeat.go:80.116,82.16 2 0 +github.com/muety/wakapi/services/heartbeat.go:86.2,86.28 1 0 +github.com/muety/wakapi/services/heartbeat.go:90.2,90.24 1 0 +github.com/muety/wakapi/services/heartbeat.go:82.16,84.3 1 0 +github.com/muety/wakapi/services/heartbeat.go:86.28,88.3 1 0 +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:30.2,30.14 1 1 +github.com/muety/wakapi/services/alias.go:27.43,29.3 1 1 +github.com/muety/wakapi/services/alias.go:33.62,35.16 2 1 +github.com/muety/wakapi/services/alias.go:38.2,38.12 1 1 +github.com/muety/wakapi/services/alias.go:35.16,37.3 1 1 +github.com/muety/wakapi/services/alias.go:41.76,43.16 2 0 +github.com/muety/wakapi/services/alias.go:46.2,46.21 1 0 +github.com/muety/wakapi/services/alias.go:43.16,45.3 1 0 +github.com/muety/wakapi/services/alias.go:49.113,51.16 2 0 +github.com/muety/wakapi/services/alias.go:54.2,54.21 1 0 +github.com/muety/wakapi/services/alias.go:51.16,53.3 1 0 +github.com/muety/wakapi/services/alias.go:57.108,58.32 1 1 +github.com/muety/wakapi/services/alias.go:64.2,65.46 2 1 +github.com/muety/wakapi/services/alias.go:70.2,70.19 1 1 +github.com/muety/wakapi/services/alias.go:58.32,59.52 1 1 +github.com/muety/wakapi/services/alias.go:59.52,61.4 1 1 +github.com/muety/wakapi/services/alias.go:65.46,66.48 1 1 +github.com/muety/wakapi/services/alias.go:66.48,68.4 1 1 +github.com/muety/wakapi/services/alias.go:73.77,75.16 2 0 +github.com/muety/wakapi/services/alias.go:78.2,79.20 2 0 +github.com/muety/wakapi/services/alias.go:75.16,77.3 1 0 +github.com/muety/wakapi/services/alias.go:82.60,83.24 1 0 +github.com/muety/wakapi/services/alias.go:86.2,88.12 3 0 +github.com/muety/wakapi/services/alias.go:83.24,85.3 1 0 +github.com/muety/wakapi/services/alias.go:91.69,94.28 3 0 +github.com/muety/wakapi/services/alias.go:102.2,104.31 2 0 +github.com/muety/wakapi/services/alias.go:108.2,108.12 1 0 +github.com/muety/wakapi/services/alias.go:94.28,95.21 1 0 +github.com/muety/wakapi/services/alias.go:98.3,99.16 2 0 +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:111.52,112.51 1 0 +github.com/muety/wakapi/services/alias.go:112.51,114.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.78,27.16 2 0 +github.com/muety/wakapi/services/key_value.go:33.2,33.11 1 0 +github.com/muety/wakapi/services/key_value.go:27.16,32.3 1 0 +github.com/muety/wakapi/services/key_value.go:36.72,38.2 1 0 +github.com/muety/wakapi/services/key_value.go:40.60,42.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: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:44.48,46.3 1 0 +github.com/muety/wakapi/services/misc.go:53.51,59.40 4 0 +github.com/muety/wakapi/services/misc.go:63.2,66.56 2 0 +github.com/muety/wakapi/services/misc.go:77.2,77.12 1 0 +github.com/muety/wakapi/services/misc.go:59.40,61.3 1 0 +github.com/muety/wakapi/services/misc.go:66.56,67.27 1 0 +github.com/muety/wakapi/services/misc.go:67.27,72.4 1 0 +github.com/muety/wakapi/services/misc.go:73.8,75.3 1 0 +github.com/muety/wakapi/services/misc.go:80.116,81.24 1 0 +github.com/muety/wakapi/services/misc.go:81.24,82.151 1 0 +github.com/muety/wakapi/services/misc.go:91.3,91.48 1 0 +github.com/muety/wakapi/services/misc.go:82.151,84.4 1 0 +github.com/muety/wakapi/services/misc.go:84.9,90.4 2 0 +github.com/muety/wakapi/services/misc.go:91.48,94.4 2 0 +github.com/muety/wakapi/services/misc.go:98.86,101.30 3 0 +github.com/muety/wakapi/services/misc.go:106.2,109.17 1 0 +github.com/muety/wakapi/services/misc.go:113.2,116.17 1 0 +github.com/muety/wakapi/services/misc.go:101.30,104.3 2 0 +github.com/muety/wakapi/services/misc.go:109.17,111.3 1 0 +github.com/muety/wakapi/services/misc.go:116.17,118.3 1 0 github.com/muety/wakapi/services/summary.go:28.149,36.2 1 1 github.com/muety/wakapi/services/summary.go:40.136,43.66 2 1 github.com/muety/wakapi/services/summary.go:48.2,48.44 1 1 @@ -561,90 +726,6 @@ github.com/muety/wakapi/services/summary.go:344.54,346.3 1 1 github.com/muety/wakapi/services/summary.go:351.59,353.25 2 1 github.com/muety/wakapi/services/summary.go:356.2,356.32 1 1 github.com/muety/wakapi/services/summary.go:353.25,355.3 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:30.2,30.14 1 1 -github.com/muety/wakapi/services/alias.go:27.43,29.3 1 1 -github.com/muety/wakapi/services/alias.go:33.62,35.16 2 1 -github.com/muety/wakapi/services/alias.go:38.2,38.12 1 1 -github.com/muety/wakapi/services/alias.go:35.16,37.3 1 1 -github.com/muety/wakapi/services/alias.go:41.76,43.16 2 0 -github.com/muety/wakapi/services/alias.go:46.2,46.21 1 0 -github.com/muety/wakapi/services/alias.go:43.16,45.3 1 0 -github.com/muety/wakapi/services/alias.go:49.113,51.16 2 0 -github.com/muety/wakapi/services/alias.go:54.2,54.21 1 0 -github.com/muety/wakapi/services/alias.go:51.16,53.3 1 0 -github.com/muety/wakapi/services/alias.go:57.108,58.32 1 1 -github.com/muety/wakapi/services/alias.go:64.2,65.46 2 1 -github.com/muety/wakapi/services/alias.go:70.2,70.19 1 1 -github.com/muety/wakapi/services/alias.go:58.32,59.52 1 1 -github.com/muety/wakapi/services/alias.go:59.52,61.4 1 1 -github.com/muety/wakapi/services/alias.go:65.46,66.48 1 1 -github.com/muety/wakapi/services/alias.go:66.48,68.4 1 1 -github.com/muety/wakapi/services/alias.go:73.77,75.16 2 0 -github.com/muety/wakapi/services/alias.go:78.2,79.20 2 0 -github.com/muety/wakapi/services/alias.go:75.16,77.3 1 0 -github.com/muety/wakapi/services/alias.go:82.60,83.24 1 0 -github.com/muety/wakapi/services/alias.go:86.2,88.12 3 0 -github.com/muety/wakapi/services/alias.go:83.24,85.3 1 0 -github.com/muety/wakapi/services/alias.go:91.69,94.28 3 0 -github.com/muety/wakapi/services/alias.go:102.2,104.31 2 0 -github.com/muety/wakapi/services/alias.go:108.2,108.12 1 0 -github.com/muety/wakapi/services/alias.go:94.28,95.21 1 0 -github.com/muety/wakapi/services/alias.go:98.3,99.16 2 0 -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:111.52,112.51 1 0 -github.com/muety/wakapi/services/alias.go:112.51,114.3 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:48.2,50.19 3 0 -github.com/muety/wakapi/services/misc.go:44.48,46.3 1 0 -github.com/muety/wakapi/services/misc.go:53.51,59.40 4 0 -github.com/muety/wakapi/services/misc.go:63.2,66.56 2 0 -github.com/muety/wakapi/services/misc.go:77.2,77.12 1 0 -github.com/muety/wakapi/services/misc.go:59.40,61.3 1 0 -github.com/muety/wakapi/services/misc.go:66.56,67.27 1 0 -github.com/muety/wakapi/services/misc.go:67.27,72.4 1 0 -github.com/muety/wakapi/services/misc.go:73.8,75.3 1 0 -github.com/muety/wakapi/services/misc.go:80.116,81.24 1 0 -github.com/muety/wakapi/services/misc.go:81.24,82.151 1 0 -github.com/muety/wakapi/services/misc.go:91.3,91.48 1 0 -github.com/muety/wakapi/services/misc.go:82.151,84.4 1 0 -github.com/muety/wakapi/services/misc.go:84.9,90.4 2 0 -github.com/muety/wakapi/services/misc.go:91.48,94.4 2 0 -github.com/muety/wakapi/services/misc.go:98.86,101.30 3 0 -github.com/muety/wakapi/services/misc.go:106.2,109.17 1 0 -github.com/muety/wakapi/services/misc.go:113.2,116.17 1 0 -github.com/muety/wakapi/services/misc.go:101.30,104.3 2 0 -github.com/muety/wakapi/services/misc.go:109.17,111.3 1 0 -github.com/muety/wakapi/services/misc.go:116.17,118.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.78,27.16 2 0 -github.com/muety/wakapi/services/key_value.go:33.2,33.11 1 0 -github.com/muety/wakapi/services/key_value.go:27.16,32.3 1 0 -github.com/muety/wakapi/services/key_value.go:36.72,38.2 1 0 -github.com/muety/wakapi/services/key_value.go:40.60,42.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/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 @@ -675,73 +756,3 @@ github.com/muety/wakapi/services/user.go:116.8,118.3 1 0 github.com/muety/wakapi/services/user.go:122.85,124.2 1 0 github.com/muety/wakapi/services/user.go:126.57,129.2 2 0 github.com/muety/wakapi/services/user.go:131.38,133.2 1 0 -github.com/muety/wakapi/services/aggregation.go:29.142,37.2 1 0 -github.com/muety/wakapi/services/aggregation.go:46.43,48.37 1 0 -github.com/muety/wakapi/services/aggregation.go:52.2,54.19 3 0 -github.com/muety/wakapi/services/aggregation.go:48.37,50.3 1 0 -github.com/muety/wakapi/services/aggregation.go:57.67,58.47 1 0 -github.com/muety/wakapi/services/aggregation.go:61.2,66.40 4 0 -github.com/muety/wakapi/services/aggregation.go:70.2,70.50 1 0 -github.com/muety/wakapi/services/aggregation.go:75.2,75.60 1 0 -github.com/muety/wakapi/services/aggregation.go:81.2,81.35 1 0 -github.com/muety/wakapi/services/aggregation.go:58.47,60.3 1 0 -github.com/muety/wakapi/services/aggregation.go:66.40,68.3 1 0 -github.com/muety/wakapi/services/aggregation.go:70.50,72.3 1 0 -github.com/muety/wakapi/services/aggregation.go:75.60,79.3 3 0 -github.com/muety/wakapi/services/aggregation.go:84.109,85.24 1 0 -github.com/muety/wakapi/services/aggregation.go:85.24,86.111 1 0 -github.com/muety/wakapi/services/aggregation.go:86.111,88.4 1 0 -github.com/muety/wakapi/services/aggregation.go:88.9,91.4 2 0 -github.com/muety/wakapi/services/aggregation.go:95.80,96.33 1 0 -github.com/muety/wakapi/services/aggregation.go:96.33,97.60 1 0 -github.com/muety/wakapi/services/aggregation.go:97.60,99.4 1 0 -github.com/muety/wakapi/services/aggregation.go:103.100,107.59 3 0 -github.com/muety/wakapi/services/aggregation.go:122.2,123.16 2 0 -github.com/muety/wakapi/services/aggregation.go:129.2,130.16 2 0 -github.com/muety/wakapi/services/aggregation.go:136.2,137.44 2 0 -github.com/muety/wakapi/services/aggregation.go:142.2,142.41 1 0 -github.com/muety/wakapi/services/aggregation.go:156.2,156.12 1 0 -github.com/muety/wakapi/services/aggregation.go:107.59,110.3 2 0 -github.com/muety/wakapi/services/aggregation.go:110.8,110.47 1 0 -github.com/muety/wakapi/services/aggregation.go:110.47,112.30 2 0 -github.com/muety/wakapi/services/aggregation.go:112.30,113.43 1 0 -github.com/muety/wakapi/services/aggregation.go:113.43,115.5 1 0 -github.com/muety/wakapi/services/aggregation.go:117.8,119.3 1 0 -github.com/muety/wakapi/services/aggregation.go:123.16,126.3 2 0 -github.com/muety/wakapi/services/aggregation.go:130.16,133.3 2 0 -github.com/muety/wakapi/services/aggregation.go:137.44,139.3 1 0 -github.com/muety/wakapi/services/aggregation.go:142.41,143.21 1 0 -github.com/muety/wakapi/services/aggregation.go:143.21,147.4 1 0 -github.com/muety/wakapi/services/aggregation.go:147.9,147.62 1 0 -github.com/muety/wakapi/services/aggregation.go:147.62,151.4 1 0 -github.com/muety/wakapi/services/aggregation.go:159.73,162.27 3 0 -github.com/muety/wakapi/services/aggregation.go:167.2,167.27 1 0 -github.com/muety/wakapi/services/aggregation.go:170.2,170.12 1 0 -github.com/muety/wakapi/services/aggregation.go:162.27,163.39 1 0 -github.com/muety/wakapi/services/aggregation.go:163.39,165.4 1 0 -github.com/muety/wakapi/services/aggregation.go:167.27,169.3 1 0 -github.com/muety/wakapi/services/aggregation.go:173.69,176.27 3 0 -github.com/muety/wakapi/services/aggregation.go:176.27,178.3 1 0 -github.com/muety/wakapi/services/aggregation.go:181.83,196.41 5 0 -github.com/muety/wakapi/services/aggregation.go:196.41,206.3 3 0 -github.com/muety/wakapi/services/aggregation.go:209.34,212.2 2 0 -github.com/muety/wakapi/services/heartbeat.go:17.141,23.2 1 0 -github.com/muety/wakapi/services/heartbeat.go:25.72,27.2 1 0 -github.com/muety/wakapi/services/heartbeat.go:29.80,34.32 3 0 -github.com/muety/wakapi/services/heartbeat.go:41.2,41.55 1 0 -github.com/muety/wakapi/services/heartbeat.go:34.32,35.36 1 0 -github.com/muety/wakapi/services/heartbeat.go:35.36,38.4 2 0 -github.com/muety/wakapi/services/heartbeat.go:44.53,46.2 1 0 -github.com/muety/wakapi/services/heartbeat.go:48.76,50.2 1 0 -github.com/muety/wakapi/services/heartbeat.go:52.96,54.2 1 0 -github.com/muety/wakapi/services/heartbeat.go:56.111,58.16 2 0 -github.com/muety/wakapi/services/heartbeat.go:61.2,61.43 1 0 -github.com/muety/wakapi/services/heartbeat.go:58.16,60.3 1 0 -github.com/muety/wakapi/services/heartbeat.go:64.116,66.2 1 0 -github.com/muety/wakapi/services/heartbeat.go:68.78,70.2 1 0 -github.com/muety/wakapi/services/heartbeat.go:72.62,74.2 1 0 -github.com/muety/wakapi/services/heartbeat.go:76.116,78.16 2 0 -github.com/muety/wakapi/services/heartbeat.go:82.2,82.28 1 0 -github.com/muety/wakapi/services/heartbeat.go:86.2,86.24 1 0 -github.com/muety/wakapi/services/heartbeat.go:78.16,80.3 1 0 -github.com/muety/wakapi/services/heartbeat.go:82.28,84.3 1 0 diff --git a/main.go b/main.go index 16f15ce..1c8f63a 100644 --- a/main.go +++ b/main.go @@ -164,6 +164,7 @@ func main() { wakatimeV1AllHandler := wtV1Routes.NewAllTimeHandler(userService, summaryService) wakatimeV1SummariesHandler := wtV1Routes.NewSummariesHandler(userService, summaryService) wakatimeV1StatsHandler := wtV1Routes.NewStatsHandler(userService, summaryService) + wakatimeV1UsersHandler := wtV1Routes.NewUsersHandler(userService, heartbeatService) shieldV1BadgeHandler := shieldsV1Routes.NewBadgeHandler(summaryService, userService) // MVC Handlers @@ -202,6 +203,7 @@ func main() { wakatimeV1AllHandler.RegisterRoutes(apiRouter) wakatimeV1SummariesHandler.RegisterRoutes(apiRouter) wakatimeV1StatsHandler.RegisterRoutes(apiRouter) + wakatimeV1UsersHandler.RegisterRoutes(apiRouter) shieldV1BadgeHandler.RegisterRoutes(apiRouter) // Static Routes diff --git a/mocks/heartbeat_service.go b/mocks/heartbeat_service.go index 282d706..72b2515 100644 --- a/mocks/heartbeat_service.go +++ b/mocks/heartbeat_service.go @@ -45,6 +45,11 @@ func (m *HeartbeatServiceMock) GetFirstByUsers() ([]*models.TimeByUser, error) { return args.Get(0).([]*models.TimeByUser), args.Error(1) } +func (m *HeartbeatServiceMock) GetLatestByUser(user *models.User) (*models.Heartbeat, error) { + args := m.Called(user) + return args.Get(0).(*models.Heartbeat), args.Error(1) +} + func (m *HeartbeatServiceMock) GetLatestByOriginAndUser(s string, user *models.User) (*models.Heartbeat, error) { args := m.Called(s, user) return args.Get(0).(*models.Heartbeat), args.Error(1) diff --git a/models/compat/wakatime/v1/heartbeat.go b/models/compat/wakatime/v1/heartbeat.go index b192456..5a93bcd 100644 --- a/models/compat/wakatime/v1/heartbeat.go +++ b/models/compat/wakatime/v1/heartbeat.go @@ -1,6 +1,8 @@ package v1 -import "github.com/muety/wakapi/models" +import ( + "github.com/muety/wakapi/models" +) type HeartbeatsViewModel struct { Data []*HeartbeatEntry `json:"data"` @@ -22,4 +24,6 @@ type HeartbeatEntry struct { UserId string `json:"user_id"` MachineNameId string `json:"machine_name_id"` UserAgentId string `json:"user_agent_id"` + CreatedAt models.CustomTime `json:"created_at"` + ModifiedAt models.CustomTime `json:"created_at"` } diff --git a/models/compat/wakatime/v1/user.go b/models/compat/wakatime/v1/user.go new file mode 100644 index 0000000..a631478 --- /dev/null +++ b/models/compat/wakatime/v1/user.go @@ -0,0 +1,55 @@ +package v1 + +import ( + "github.com/muety/wakapi/models" + "time" +) + +const DefaultWakaUserDisplayName = "Anonymous User" + +// partially compatible with https://wakatime.com/developers#users + +type UserViewModel struct { + Data *User `json:"data"` +} + +type User struct { + ID string `json:"id"` + DisplayName string `json:"display_name"` + FullName string `json:"full_name"` + Email string `json:"email"` + IsEmailPublic bool `json:"is_email_public"` + IsEmailConfirmed bool `json:"is_email_confirmed"` + TimeZone string `json:"timezone"` + LastHeartbeatAt models.CustomTime `json:"last_heartbeat_at"` + LastProject string `json:"last_project"` + LastPluginName string `json:"last_plugin_name"` + Username string `json:"username"` + Website string `json:"website"` + CreatedAt models.CustomTime `json:"created_at"` + ModifiedAt models.CustomTime `json:"modified_at"` +} + +func NewFromUser(user *models.User) *User { + tz, _ := time.Now().Zone() + if user.Location != "" { + tz = user.Location + } + + return &User{ + ID: user.ID, + DisplayName: DefaultWakaUserDisplayName, + Email: user.Email, + TimeZone: tz, + Username: user.ID, + CreatedAt: user.CreatedAt, + ModifiedAt: user.CreatedAt, + } +} + +func (u *User) WithLatestHeartbeat(h *models.Heartbeat) *User { + u.LastHeartbeatAt = h.Time + u.LastProject = h.Project + u.LastPluginName = h.Editor + return u +} diff --git a/repositories/heartbeart.go b/repositories/heartbeart.go index bcccce7..0c86600 100644 --- a/repositories/heartbeart.go +++ b/repositories/heartbeart.go @@ -35,6 +35,18 @@ func (r *HeartbeatRepository) InsertBatch(heartbeats []*models.Heartbeat) error return nil } +func (r *HeartbeatRepository) GetLatestByUser(user *models.User) (*models.Heartbeat, error) { + var heartbeat models.Heartbeat + if err := r.db. + Model(&models.Heartbeat{}). + Where(&models.Heartbeat{UserID: user.ID}). + Order("time desc"). + First(&heartbeat).Error; err != nil { + return nil, err + } + return &heartbeat, nil +} + func (r *HeartbeatRepository) GetLatestByOriginAndUser(origin string, user *models.User) (*models.Heartbeat, error) { var heartbeat models.Heartbeat if err := r.db. diff --git a/repositories/repositories.go b/repositories/repositories.go index 4ade237..db4210c 100644 --- a/repositories/repositories.go +++ b/repositories/repositories.go @@ -22,6 +22,7 @@ type IHeartbeatRepository interface { GetAllWithin(time.Time, time.Time, *models.User) ([]*models.Heartbeat, error) GetFirstByUsers() ([]*models.TimeByUser, error) GetLastByUsers() ([]*models.TimeByUser, error) + GetLatestByUser(*models.User) (*models.Heartbeat, error) GetLatestByOriginAndUser(string, *models.User) (*models.Heartbeat, error) Count() (int64, error) CountByUser(*models.User) (int64, error) diff --git a/routes/compat/wakatime/v1/stats.go b/routes/compat/wakatime/v1/stats.go index ae75b89..d73d540 100644 --- a/routes/compat/wakatime/v1/stats.go +++ b/routes/compat/wakatime/v1/stats.go @@ -41,6 +41,16 @@ func (h *StatsHandler) RegisterRoutes(router *mux.Router) { // TODO: support filtering (requires https://github.com/muety/wakapi/issues/108) +// @Summary Retrieve statistics for a given user +// @Description Mimics https://wakatime.com/developers#stats +// @ID get-wakatimes-tats +// @Tags wakatime +// @Produce json +// @Param user path string true "User ID to fetch data for (or 'current')" +// @Param range query string false "Range interval identifier" Enums(today, yesterday, week, month, year, 7_days, last_7_days, 30_days, last_30_days, 12_months, last_12_months, any) +// @Security ApiKeyAuth +// @Success 200 {object} v1.StatsViewModel +// @Router /compat/wakatime/v1/users/{user}/stats/{range} [get] func (h *StatsHandler) Get(w http.ResponseWriter, r *http.Request) { var vars = mux.Vars(r) var authorizedUser, requestedUser *models.User diff --git a/routes/compat/wakatime/v1/users.go b/routes/compat/wakatime/v1/users.go new file mode 100644 index 0000000..b0464ec --- /dev/null +++ b/routes/compat/wakatime/v1/users.go @@ -0,0 +1,63 @@ +package v1 + +import ( + "github.com/gorilla/mux" + conf "github.com/muety/wakapi/config" + "github.com/muety/wakapi/middlewares" + v1 "github.com/muety/wakapi/models/compat/wakatime/v1" + "github.com/muety/wakapi/services" + "github.com/muety/wakapi/utils" + "net/http" +) + +type UsersHandler struct { + config *conf.Config + userSrvc services.IUserService + heartbeatSrvc services.IHeartbeatService +} + +func NewUsersHandler(userService services.IUserService, heartbeatService services.IHeartbeatService) *UsersHandler { + return &UsersHandler{ + userSrvc: userService, + heartbeatSrvc: heartbeatService, + config: conf.Get(), + } +} + +func (h *UsersHandler) RegisterRoutes(router *mux.Router) { + r := router.PathPrefix("/compat/wakatime/v1/users/{user}").Subrouter() + r.Use( + middlewares.NewAuthenticateMiddleware(h.userSrvc).Handler, + ) + r.Methods(http.MethodGet).HandlerFunc(h.Get) +} + +// @Summary Retrieve the given user +// @Description Mimics https://wakatime.com/developers#users +// @ID get-wakatime-user +// @Tags wakatime +// @Produce json +// @Param user path string true "User ID to fetch (or 'current')" +// @Security ApiKeyAuth +// @Success 200 {object} v1.UserViewModel +// @Router /compat/wakatime/v1/users/{user} [get] +func (h *UsersHandler) Get(w http.ResponseWriter, r *http.Request) { + vars := mux.Vars(r) + + requestedUser := vars["user"] + authorizedUser := middlewares.GetPrincipal(r) + + if requestedUser != authorizedUser.ID && requestedUser != "current" { + w.WriteHeader(http.StatusForbidden) + return + } + + user := v1.NewFromUser(authorizedUser) + if hb, err := h.heartbeatSrvc.GetLatestByUser(authorizedUser); err == nil { + user = user.WithLatestHeartbeat(hb) + } else { + conf.Log().Request(r).Error("%v", err) + } + + utils.RespondJSON(w, r, http.StatusOK, v1.UserViewModel{Data: user}) +} diff --git a/services/heartbeat.go b/services/heartbeat.go index e854b46..110572e 100644 --- a/services/heartbeat.go +++ b/services/heartbeat.go @@ -61,6 +61,10 @@ func (srv *HeartbeatService) GetAllWithin(from, to time.Time, user *models.User) return srv.augmented(heartbeats, user.ID) } +func (srv *HeartbeatService) GetLatestByUser(user *models.User) (*models.Heartbeat, error) { + return srv.repository.GetLatestByUser(user) +} + func (srv *HeartbeatService) GetLatestByOriginAndUser(origin string, user *models.User) (*models.Heartbeat, error) { return srv.repository.GetLatestByOriginAndUser(origin, user) } diff --git a/services/services.go b/services/services.go index 43c9d24..6bbec71 100644 --- a/services/services.go +++ b/services/services.go @@ -33,6 +33,7 @@ type IHeartbeatService interface { CountByUsers([]*models.User) ([]*models.CountByUser, error) GetAllWithin(time.Time, time.Time, *models.User) ([]*models.Heartbeat, error) GetFirstByUsers() ([]*models.TimeByUser, error) + GetLatestByUser(*models.User) (*models.Heartbeat, error) GetLatestByOriginAndUser(string, *models.User) (*models.Heartbeat, error) DeleteBefore(time.Time) error } diff --git a/static/docs/docs.go b/static/docs/docs.go index 71956b1..7414b63 100644 --- a/static/docs/docs.go +++ b/static/docs/docs.go @@ -90,6 +90,41 @@ var doc = `{ } } }, + "/compat/wakatime/v1/users/{user}": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "Mimics https://wakatime.com/developers#users", + "produces": [ + "application/json" + ], + "tags": [ + "wakatime" + ], + "summary": "Retrieve the given user", + "operationId": "get-wakatime-user", + "parameters": [ + { + "type": "string", + "description": "User ID to fetch (or 'current')", + "name": "user", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.UserViewModel" + } + } + } + } + }, "/compat/wakatime/v1/users/{user}/all_time_since_today": { "get": { "security": [ @@ -125,6 +160,61 @@ var doc = `{ } } }, + "/compat/wakatime/v1/users/{user}/stats/{range}": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "Mimics https://wakatime.com/developers#stats", + "produces": [ + "application/json" + ], + "tags": [ + "wakatime" + ], + "summary": "Retrieve statistics for a given user", + "operationId": "get-wakatimes-tats", + "parameters": [ + { + "type": "string", + "description": "User ID to fetch data for (or 'current')", + "name": "user", + "in": "path", + "required": true + }, + { + "enum": [ + "today", + "yesterday", + "week", + "month", + "year", + "7_days", + "last_7_days", + "30_days", + "last_30_days", + "12_months", + "last_12_months", + "any" + ], + "type": "string", + "description": "Range interval identifier", + "name": "range", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.StatsViewModel" + } + } + } + } + }, "/compat/wakatime/v1/users/{user}/summaries": { "get": { "security": [ @@ -309,57 +399,6 @@ var doc = `{ } } } - }, - "/v1/users/{user}/stats/{range}": { - "get": { - "description": "Mimics https://wakatime.com/developers#stats. Requires public data access to be allowed.", - "produces": [ - "application/json" - ], - "tags": [ - "wakatime" - ], - "summary": "Retrieve stats", - "operationId": "get-stats", - "parameters": [ - { - "type": "string", - "description": "User ID to fetch data for (or 'current')", - "name": "user", - "in": "path", - "required": true - }, - { - "enum": [ - "today", - "yesterday", - "week", - "month", - "year", - "7_days", - "last_7_days", - "30_days", - "last_30_days", - "12_months", - "last_12_months", - "any" - ], - "type": "string", - "description": "Range interval identifier", - "name": "range", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.StatsViewModel" - } - } - } - } } }, "definitions": { @@ -372,6 +411,10 @@ var doc = `{ "category": { "type": "string" }, + "created_at": { + "description": "https://gorm.io/docs/conventions.html#CreatedAt", + "type": "number" + }, "editor": { "description": "ignored because editor might be parsed differently by wakatime", "type": "string" @@ -473,6 +516,9 @@ var doc = `{ "description": "true if the stats are up to date; when false, a 202 response code is returned and stats will be refreshed soon\u003e", "type": "boolean" }, + "range": { + "$ref": "#/definitions/v1.AllTimeRange" + }, "text": { "description": "total time logged since account created as human readable string\u003e", "type": "string" @@ -483,6 +529,26 @@ var doc = `{ } } }, + "v1.AllTimeRange": { + "type": "object", + "properties": { + "end": { + "type": "string" + }, + "end_date": { + "type": "string" + }, + "start": { + "type": "string" + }, + "start_date": { + "type": "string" + }, + "timezone": { + "type": "string" + } + } + }, "v1.AllTimeViewModel": { "type": "object", "properties": { @@ -710,6 +776,61 @@ var doc = `{ "type": "string" } } + }, + "v1.User": { + "type": "object", + "properties": { + "created_at": { + "type": "string" + }, + "display_name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "id": { + "type": "string" + }, + "is_email_confirmed": { + "type": "boolean" + }, + "is_email_public": { + "type": "boolean" + }, + "last_heartbeat_at": { + "type": "string" + }, + "last_plugin_name": { + "type": "string" + }, + "last_project": { + "type": "string" + }, + "modified_at": { + "type": "string" + }, + "timezone": { + "type": "string" + }, + "username": { + "type": "string" + }, + "website": { + "type": "string" + } + } + }, + "v1.UserViewModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/v1.User" + } + } } }, "securityDefinitions": { diff --git a/static/docs/swagger.json b/static/docs/swagger.json index 7733f20..9c49006 100644 --- a/static/docs/swagger.json +++ b/static/docs/swagger.json @@ -74,6 +74,41 @@ } } }, + "/compat/wakatime/v1/users/{user}": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "Mimics https://wakatime.com/developers#users", + "produces": [ + "application/json" + ], + "tags": [ + "wakatime" + ], + "summary": "Retrieve the given user", + "operationId": "get-wakatime-user", + "parameters": [ + { + "type": "string", + "description": "User ID to fetch (or 'current')", + "name": "user", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.UserViewModel" + } + } + } + } + }, "/compat/wakatime/v1/users/{user}/all_time_since_today": { "get": { "security": [ @@ -109,6 +144,61 @@ } } }, + "/compat/wakatime/v1/users/{user}/stats/{range}": { + "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], + "description": "Mimics https://wakatime.com/developers#stats", + "produces": [ + "application/json" + ], + "tags": [ + "wakatime" + ], + "summary": "Retrieve statistics for a given user", + "operationId": "get-wakatimes-tats", + "parameters": [ + { + "type": "string", + "description": "User ID to fetch data for (or 'current')", + "name": "user", + "in": "path", + "required": true + }, + { + "enum": [ + "today", + "yesterday", + "week", + "month", + "year", + "7_days", + "last_7_days", + "30_days", + "last_30_days", + "12_months", + "last_12_months", + "any" + ], + "type": "string", + "description": "Range interval identifier", + "name": "range", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/v1.StatsViewModel" + } + } + } + } + }, "/compat/wakatime/v1/users/{user}/summaries": { "get": { "security": [ @@ -293,57 +383,6 @@ } } } - }, - "/v1/users/{user}/stats/{range}": { - "get": { - "description": "Mimics https://wakatime.com/developers#stats. Requires public data access to be allowed.", - "produces": [ - "application/json" - ], - "tags": [ - "wakatime" - ], - "summary": "Retrieve stats", - "operationId": "get-stats", - "parameters": [ - { - "type": "string", - "description": "User ID to fetch data for (or 'current')", - "name": "user", - "in": "path", - "required": true - }, - { - "enum": [ - "today", - "yesterday", - "week", - "month", - "year", - "7_days", - "last_7_days", - "30_days", - "last_30_days", - "12_months", - "last_12_months", - "any" - ], - "type": "string", - "description": "Range interval identifier", - "name": "range", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/v1.StatsViewModel" - } - } - } - } } }, "definitions": { @@ -356,6 +395,10 @@ "category": { "type": "string" }, + "created_at": { + "description": "https://gorm.io/docs/conventions.html#CreatedAt", + "type": "number" + }, "editor": { "description": "ignored because editor might be parsed differently by wakatime", "type": "string" @@ -457,6 +500,9 @@ "description": "true if the stats are up to date; when false, a 202 response code is returned and stats will be refreshed soon\u003e", "type": "boolean" }, + "range": { + "$ref": "#/definitions/v1.AllTimeRange" + }, "text": { "description": "total time logged since account created as human readable string\u003e", "type": "string" @@ -467,6 +513,26 @@ } } }, + "v1.AllTimeRange": { + "type": "object", + "properties": { + "end": { + "type": "string" + }, + "end_date": { + "type": "string" + }, + "start": { + "type": "string" + }, + "start_date": { + "type": "string" + }, + "timezone": { + "type": "string" + } + } + }, "v1.AllTimeViewModel": { "type": "object", "properties": { @@ -694,6 +760,61 @@ "type": "string" } } + }, + "v1.User": { + "type": "object", + "properties": { + "created_at": { + "type": "string" + }, + "display_name": { + "type": "string" + }, + "email": { + "type": "string" + }, + "full_name": { + "type": "string" + }, + "id": { + "type": "string" + }, + "is_email_confirmed": { + "type": "boolean" + }, + "is_email_public": { + "type": "boolean" + }, + "last_heartbeat_at": { + "type": "string" + }, + "last_plugin_name": { + "type": "string" + }, + "last_project": { + "type": "string" + }, + "modified_at": { + "type": "string" + }, + "timezone": { + "type": "string" + }, + "username": { + "type": "string" + }, + "website": { + "type": "string" + } + } + }, + "v1.UserViewModel": { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/v1.User" + } + } } }, "securityDefinitions": { diff --git a/static/docs/swagger.yaml b/static/docs/swagger.yaml index 608a922..12b0eae 100644 --- a/static/docs/swagger.yaml +++ b/static/docs/swagger.yaml @@ -6,6 +6,9 @@ definitions: type: string category: type: string + created_at: + description: https://gorm.io/docs/conventions.html#CreatedAt + type: number editor: description: ignored because editor might be parsed differently by wakatime type: string @@ -76,6 +79,8 @@ definitions: description: true if the stats are up to date; when false, a 202 response code is returned and stats will be refreshed soon> type: boolean + range: + $ref: '#/definitions/v1.AllTimeRange' text: description: total time logged since account created as human readable string> type: string @@ -83,6 +88,19 @@ definitions: description: total number of seconds logged since account created type: number type: object + v1.AllTimeRange: + properties: + end: + type: string + end_date: + type: string + start: + type: string + start_date: + type: string + timezone: + type: string + type: object v1.AllTimeViewModel: properties: data: @@ -232,6 +250,42 @@ definitions: start: type: string type: object + v1.User: + properties: + created_at: + type: string + display_name: + type: string + email: + type: string + full_name: + type: string + id: + type: string + is_email_confirmed: + type: boolean + is_email_public: + type: boolean + last_heartbeat_at: + type: string + last_plugin_name: + type: string + last_project: + type: string + modified_at: + type: string + timezone: + type: string + username: + type: string + website: + type: string + type: object + v1.UserViewModel: + properties: + data: + $ref: '#/definitions/v1.User' + type: object info: contact: email: ferdinand@muetsch.io @@ -294,6 +348,28 @@ paths: summary: Get badge data tags: - badges + /compat/wakatime/v1/users/{user}: + get: + description: Mimics https://wakatime.com/developers#users + operationId: get-wakatime-user + parameters: + - description: User ID to fetch (or 'current') + in: path + name: user + required: true + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/v1.UserViewModel' + security: + - ApiKeyAuth: [] + summary: Retrieve the given user + tags: + - wakatime /compat/wakatime/v1/users/{user}/all_time_since_today: get: description: Mimics https://wakatime.com/developers#all_time_since_today @@ -316,6 +392,45 @@ paths: summary: Retrieve summary for all time tags: - wakatime + /compat/wakatime/v1/users/{user}/stats/{range}: + get: + description: Mimics https://wakatime.com/developers#stats + operationId: get-wakatimes-tats + parameters: + - description: User ID to fetch data for (or 'current') + in: path + name: user + required: true + type: string + - description: Range interval identifier + enum: + - today + - yesterday + - week + - month + - year + - 7_days + - last_7_days + - 30_days + - last_30_days + - 12_months + - last_12_months + - any + in: query + name: range + type: string + produces: + - application/json + responses: + "200": + description: OK + schema: + $ref: '#/definitions/v1.StatsViewModel' + security: + - ApiKeyAuth: [] + summary: Retrieve statistics for a given user + tags: + - wakatime /compat/wakatime/v1/users/{user}/summaries: get: description: Mimics https://wakatime.com/developers#summaries. @@ -441,45 +556,6 @@ paths: summary: Retrieve a summary tags: - summary - /v1/users/{user}/stats/{range}: - get: - description: Mimics https://wakatime.com/developers#stats. Requires public data - access to be allowed. - operationId: get-stats - parameters: - - description: User ID to fetch data for (or 'current') - in: path - name: user - required: true - type: string - - description: Range interval identifier - enum: - - today - - yesterday - - week - - month - - year - - 7_days - - last_7_days - - 30_days - - last_30_days - - 12_months - - last_12_months - - any - in: path - name: range - required: true - type: string - produces: - - application/json - responses: - "200": - description: OK - schema: - $ref: '#/definitions/v1.StatsViewModel' - summary: Retrieve stats - tags: - - wakatime securityDefinitions: ApiKeyAuth: in: header diff --git a/version.txt b/version.txt index 3cd33cd..5db08bf 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -1.26.9 +1.27.0