From ebe12bb04a467881e19d0e0e4c88ca626338023c Mon Sep 17 00:00:00 2001 From: Kieran Klukas <92754843+kcoderhtml@users.noreply.github.com> Date: Wed, 11 Sep 2024 10:54:03 -0400 Subject: [PATCH] chore: switch module origin to kcoderhtml/hackatime --- config/config.go | 7 +++-- config/jobqueue.go | 5 +-- helpers/date.go | 3 +- helpers/http.go | 5 +-- helpers/interval.go | 5 +-- helpers/interval_test.go | 5 +-- helpers/summary.go | 3 +- main.go | 26 ++++++++-------- middlewares/authenticate.go | 13 ++++---- middlewares/authenticate_test.go | 7 +++-- middlewares/custom/wakatime.go | 13 ++++---- middlewares/principal.go | 3 +- ...20201103_rename_language_mappings_table.go | 7 +++-- .../20201106_migration_cascade_constraints.go | 7 +++-- ...2_fix_cascade_for_alias_user_constraint.go | 7 +++-- ...06_drop_badges_column_add_sharing_flags.go | 7 +++-- migrations/20210213_add_has_data_field.go | 2 +- .../20210221_add_created_date_column.go | 2 +- migrations/20210411_add_imprint_content.go | 6 ++-- migrations/20210411_drop_migrations_table.go | 5 +-- ...0210806_remove_persisted_project_labels.go | 7 +++-- migrations/20211215_migrate_id_to_bigint.go | 5 +-- .../20212212_total_summary_heartbeats.go | 7 +++-- migrations/20220317_align_num_heartbeats.go | 7 +++-- .../20220318_mysql_timestamp_precision.go | 5 +-- migrations/202203191_drop_diagnostics_user.go | 7 +++-- migrations/20220403_drop_user_project_idx.go | 7 +++-- .../20220930_drop_heartbeats_entity_idx.go | 4 +-- migrations/20221002_fix_summary_id_types.go | 7 +++-- migrations/20221016_drop_rank_column.go | 7 +++-- .../20221028_fix_heartbeats_time_user_idx.go | 7 +++-- migrations/20230219_add_astro_language.go | 5 +-- .../20230219_add_subscription_renewal.go | 7 +++-- migrations/20231023_fill_last_branch.go | 6 ++-- migrations/migrations.go | 7 +++-- migrations/shared.go | 7 +++-- mocks/alias_repository.go | 2 +- mocks/alias_service.go | 2 +- mocks/duration_service.go | 5 +-- mocks/heartbeat_service.go | 7 +++-- mocks/key_value_service.go | 2 +- mocks/project_label_service.go | 2 +- mocks/summary_repository.go | 5 +-- mocks/summary_service.go | 7 +++-- mocks/user_service.go | 2 +- models/compat/shields/v1/badge.go | 4 +-- models/compat/wakatime/v1/all_time.go | 5 +-- models/compat/wakatime/v1/heartbeat.go | 2 +- models/compat/wakatime/v1/stats.go | 5 +-- models/compat/wakatime/v1/summaries.go | 6 ++-- models/compat/wakatime/v1/user.go | 4 +-- models/types/types.go | 3 +- models/user.go | 7 +++-- models/user_test.go | 2 +- models/view/common.go | 4 +-- models/view/leaderboard.go | 5 +-- models/view/projects.go | 4 +-- models/view/settings.go | 5 +-- models/view/summary.go | 5 +-- repositories/alias.go | 3 +- repositories/diagnostics.go | 2 +- repositories/heartbeat.go | 6 ++-- repositories/key_value.go | 4 +-- repositories/language_mapping.go | 4 +-- repositories/leaderboard.go | 4 +-- repositories/metrics.go | 2 +- repositories/project_label.go | 5 +-- repositories/repositories.go | 3 +- repositories/summary.go | 4 +-- repositories/user.go | 7 +++-- routes/api/activity.go | 21 +++++++------ routes/api/avatar.go | 13 ++++---- routes/api/badge.go | 14 ++++----- routes/api/badge_test.go | 23 +++++++------- routes/api/captcha.go | 2 +- routes/api/diagnostics.go | 13 ++++---- routes/api/heartbeat.go | 23 +++++++------- routes/api/metrics.go | 31 ++++++++++--------- routes/api/summary.go | 13 ++++---- routes/compat/shields/v1/badge.go | 21 +++++++------ routes/compat/wakatime/v1/all_time.go | 21 +++++++------ routes/compat/wakatime/v1/heartbeat.go | 12 +++---- routes/compat/wakatime/v1/leaders.go | 25 ++++++++------- routes/compat/wakatime/v1/projects.go | 23 +++++++------- routes/compat/wakatime/v1/stats.go | 12 +++---- routes/compat/wakatime/v1/statusbar.go | 16 +++++----- routes/compat/wakatime/v1/summaries.go | 16 +++++----- routes/compat/wakatime/v1/users.go | 12 +++---- routes/compat/wakatime/v1/users_test.go | 8 ++--- routes/home.go | 19 ++++++------ routes/home_test.go | 21 +++++++------ routes/imprint.go | 11 ++++--- routes/leaderboard.go | 14 ++++----- routes/login.go | 25 ++++++++------- routes/projects.go | 19 ++++++------ routes/relay/relay.go | 5 +-- routes/routes.go | 17 +++++----- routes/settings.go | 28 +++++++++-------- routes/subscription.go | 10 +++--- routes/summary.go | 17 +++++----- routes/utils/badge_utils.go | 7 +++-- routes/utils/heartbeat_utils.go | 5 +-- routes/utils/messages.go | 5 +-- routes/utils/project_utils.go | 7 +++-- routes/utils/summary_utils.go | 13 ++++---- routes/utils/user_utils.go | 8 ++--- routes/utils/user_utils_test.go | 15 ++++----- scripts/sqlite2mysql.go | 4 +-- services/activity.go | 19 ++++++------ services/aggregation.go | 11 ++++--- services/alias.go | 9 +++--- services/alias_test.go | 4 +-- services/diagnostics.go | 6 ++-- services/duration.go | 7 +++-- services/duration_test.go | 9 +++--- services/heartbeat.go | 17 +++++----- services/housekeeping.go | 11 ++++--- services/housekeeping_test.go | 9 +++--- services/imports/importers.go | 3 +- services/imports/wakatime.go | 5 +-- services/imports/wakatime_dump.go | 14 +++++---- services/imports/wakatime_heartbeats.go | 18 ++++++----- services/imports/wakatime_utils.go | 9 +++--- services/key_value.go | 6 ++-- services/language_mapping.go | 9 +++--- services/leaderboard.go | 17 +++++----- services/mail/mail.go | 16 +++++----- services/mail/noop.go | 3 +- services/mail/smtp.go | 7 +++-- services/mail/smtp_test.go | 6 ++-- services/mail/types.go | 2 +- services/misc.go | 13 ++++---- services/project_label.go | 9 +++--- services/report.go | 13 ++++---- services/services.go | 9 +++--- services/summary.go | 17 +++++----- services/summary_test.go | 11 ++++--- services/user.go | 13 ++++---- 138 files changed, 674 insertions(+), 576 deletions(-) diff --git a/config/config.go b/config/config.go index f6eede43..f8a10ee1 100644 --- a/config/config.go +++ b/config/config.go @@ -13,13 +13,14 @@ import ( "github.com/duke-git/lancet/v2/slice" + "log/slog" + "github.com/gofrs/uuid/v5" "github.com/gorilla/securecookie" "github.com/jinzhu/configor" - "github.com/muety/wakapi/data" - "github.com/muety/wakapi/utils" + "github.com/kcoderhtml/hackatime/data" + "github.com/kcoderhtml/hackatime/utils" "github.com/robfig/cron/v3" - "log/slog" ) const ( diff --git a/config/jobqueue.go b/config/jobqueue.go index d58526d4..ab0e27e8 100644 --- a/config/jobqueue.go +++ b/config/jobqueue.go @@ -2,9 +2,10 @@ package config import ( "fmt" - "github.com/muety/artifex/v2" - "github.com/muety/wakapi/utils" "log/slog" + + "github.com/kcoderhtml/hackatime/utils" + "github.com/muety/artifex/v2" ) var jobQueues map[string]*artifex.Dispatcher diff --git a/helpers/date.go b/helpers/date.go index cab30cc2..0457f533 100644 --- a/helpers/date.go +++ b/helpers/date.go @@ -2,8 +2,9 @@ package helpers import ( "fmt" - "github.com/muety/wakapi/config" "time" + + "github.com/kcoderhtml/hackatime/config" ) // ParseDateTimeTZ attempts to parse the given date string from multiple formats. diff --git a/helpers/http.go b/helpers/http.go index 6337a046..61ed44ee 100644 --- a/helpers/http.go +++ b/helpers/http.go @@ -3,9 +3,10 @@ package helpers import ( "encoding/json" "errors" - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" "net/http" + + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" ) func ExtractCookieAuth(r *http.Request, config *config.Config) (username *string, err error) { diff --git a/helpers/interval.go b/helpers/interval.go index cd505d1b..6c74ac21 100644 --- a/helpers/interval.go +++ b/helpers/interval.go @@ -2,9 +2,10 @@ package helpers import ( "errors" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/utils" "time" + + "github.com/kcoderhtml/hackatime/models" + "github.com/kcoderhtml/hackatime/utils" ) func ParseInterval(interval string) (*models.IntervalKey, error) { diff --git a/helpers/interval_test.go b/helpers/interval_test.go index 9564b5e6..3dad6086 100644 --- a/helpers/interval_test.go +++ b/helpers/interval_test.go @@ -1,10 +1,11 @@ package helpers import ( - "github.com/muety/wakapi/models" - "github.com/stretchr/testify/assert" "testing" "time" + + "github.com/kcoderhtml/hackatime/models" + "github.com/stretchr/testify/assert" ) func TestResolveMaximumRange_Default(t *testing.T) { diff --git a/helpers/summary.go b/helpers/summary.go index 6bb16c2b..c72bee53 100644 --- a/helpers/summary.go +++ b/helpers/summary.go @@ -2,9 +2,10 @@ package helpers import ( "errors" - "github.com/muety/wakapi/models" "net/http" "time" + + "github.com/kcoderhtml/hackatime/models" ) func ParseSummaryParams(r *http.Request) (*models.SummaryParams, error) { diff --git a/main.go b/main.go index 75fa28fc..3586f326 100644 --- a/main.go +++ b/main.go @@ -25,19 +25,19 @@ import ( "gorm.io/gorm" "gorm.io/gorm/logger" - conf "github.com/muety/wakapi/config" - "github.com/muety/wakapi/middlewares" - "github.com/muety/wakapi/migrations" - "github.com/muety/wakapi/repositories" - "github.com/muety/wakapi/routes" - "github.com/muety/wakapi/routes/api" - shieldsV1Routes "github.com/muety/wakapi/routes/compat/shields/v1" - wtV1Routes "github.com/muety/wakapi/routes/compat/wakatime/v1" - "github.com/muety/wakapi/routes/relay" - "github.com/muety/wakapi/services" - "github.com/muety/wakapi/services/mail" - "github.com/muety/wakapi/static/docs" - fsutils "github.com/muety/wakapi/utils/fs" + conf "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/middlewares" + "github.com/kcoderhtml/hackatime/migrations" + "github.com/kcoderhtml/hackatime/repositories" + "github.com/kcoderhtml/hackatime/routes" + "github.com/kcoderhtml/hackatime/routes/api" + shieldsV1Routes "github.com/kcoderhtml/hackatime/routes/compat/shields/v1" + wtV1Routes "github.com/kcoderhtml/hackatime/routes/compat/wakatime/v1" + "github.com/kcoderhtml/hackatime/routes/relay" + "github.com/kcoderhtml/hackatime/services" + "github.com/kcoderhtml/hackatime/services/mail" + "github.com/kcoderhtml/hackatime/static/docs" + fsutils "github.com/kcoderhtml/hackatime/utils/fs" _ "net/http/pprof" ) diff --git a/middlewares/authenticate.go b/middlewares/authenticate.go index 53deb245..9e253dee 100644 --- a/middlewares/authenticate.go +++ b/middlewares/authenticate.go @@ -3,16 +3,17 @@ package middlewares import ( "errors" "fmt" - "github.com/duke-git/lancet/v2/slice" - "github.com/muety/wakapi/helpers" "net" "net/http" "strings" - conf "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/services" - "github.com/muety/wakapi/utils" + "github.com/duke-git/lancet/v2/slice" + "github.com/kcoderhtml/hackatime/helpers" + + conf "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" + "github.com/kcoderhtml/hackatime/services" + "github.com/kcoderhtml/hackatime/utils" ) const ( diff --git a/middlewares/authenticate_test.go b/middlewares/authenticate_test.go index e7a8d7f1..4426f241 100644 --- a/middlewares/authenticate_test.go +++ b/middlewares/authenticate_test.go @@ -3,13 +3,14 @@ package middlewares import ( "encoding/base64" "fmt" - "github.com/muety/wakapi/config" "net/http" "net/url" "testing" - "github.com/muety/wakapi/mocks" - "github.com/muety/wakapi/models" + "github.com/kcoderhtml/hackatime/config" + + "github.com/kcoderhtml/hackatime/mocks" + "github.com/kcoderhtml/hackatime/models" "github.com/stretchr/testify/assert" ) diff --git a/middlewares/custom/wakatime.go b/middlewares/custom/wakatime.go index 3481570b..2314a86a 100644 --- a/middlewares/custom/wakatime.go +++ b/middlewares/custom/wakatime.go @@ -6,16 +6,17 @@ import ( "encoding/json" "errors" "fmt" - "github.com/leandro-lugaresi/hub" - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/middlewares" - "github.com/muety/wakapi/models" - routeutils "github.com/muety/wakapi/routes/utils" - "github.com/patrickmn/go-cache" "io" "log/slog" "net/http" "time" + + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/middlewares" + "github.com/kcoderhtml/hackatime/models" + routeutils "github.com/kcoderhtml/hackatime/routes/utils" + "github.com/leandro-lugaresi/hub" + "github.com/patrickmn/go-cache" ) const maxFailuresPerDay = 100 diff --git a/middlewares/principal.go b/middlewares/principal.go index 0fa3185b..ca2ac1a2 100644 --- a/middlewares/principal.go +++ b/middlewares/principal.go @@ -2,8 +2,9 @@ package middlewares import ( "context" - "github.com/muety/wakapi/models" "net/http" + + "github.com/kcoderhtml/hackatime/models" ) const keyPrincipal = "principal" diff --git a/migrations/20201103_rename_language_mappings_table.go b/migrations/20201103_rename_language_mappings_table.go index ddff0eae..d7c2d4bf 100644 --- a/migrations/20201103_rename_language_mappings_table.go +++ b/migrations/20201103_rename_language_mappings_table.go @@ -1,10 +1,11 @@ package migrations import ( - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - "gorm.io/gorm" "log/slog" + + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" + "gorm.io/gorm" ) func init() { diff --git a/migrations/20201106_migration_cascade_constraints.go b/migrations/20201106_migration_cascade_constraints.go index 1bffd689..201a4ca0 100644 --- a/migrations/20201106_migration_cascade_constraints.go +++ b/migrations/20201106_migration_cascade_constraints.go @@ -1,10 +1,11 @@ package migrations import ( - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - "gorm.io/gorm" "log/slog" + + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" + "gorm.io/gorm" ) func init() { diff --git a/migrations/20210202_fix_cascade_for_alias_user_constraint.go b/migrations/20210202_fix_cascade_for_alias_user_constraint.go index 8f9bfa29..f40e2e2d 100644 --- a/migrations/20210202_fix_cascade_for_alias_user_constraint.go +++ b/migrations/20210202_fix_cascade_for_alias_user_constraint.go @@ -1,10 +1,11 @@ package migrations import ( - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - "gorm.io/gorm" "log/slog" + + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" + "gorm.io/gorm" ) func init() { diff --git a/migrations/20210206_drop_badges_column_add_sharing_flags.go b/migrations/20210206_drop_badges_column_add_sharing_flags.go index 25e27b28..680921f8 100644 --- a/migrations/20210206_drop_badges_column_add_sharing_flags.go +++ b/migrations/20210206_drop_badges_column_add_sharing_flags.go @@ -1,10 +1,11 @@ package migrations import ( - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - "gorm.io/gorm" "log/slog" + + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" + "gorm.io/gorm" ) func init() { diff --git a/migrations/20210213_add_has_data_field.go b/migrations/20210213_add_has_data_field.go index 73dddcbc..a3f22d1e 100644 --- a/migrations/20210213_add_has_data_field.go +++ b/migrations/20210213_add_has_data_field.go @@ -1,7 +1,7 @@ package migrations import ( - "github.com/muety/wakapi/config" + "github.com/kcoderhtml/hackatime/config" "gorm.io/gorm" ) diff --git a/migrations/20210221_add_created_date_column.go b/migrations/20210221_add_created_date_column.go index bceeb263..72542cde 100644 --- a/migrations/20210221_add_created_date_column.go +++ b/migrations/20210221_add_created_date_column.go @@ -1,7 +1,7 @@ package migrations import ( - "github.com/muety/wakapi/config" + "github.com/kcoderhtml/hackatime/config" "gorm.io/gorm" ) diff --git a/migrations/20210411_add_imprint_content.go b/migrations/20210411_add_imprint_content.go index d275d8e3..d0ae6d63 100644 --- a/migrations/20210411_add_imprint_content.go +++ b/migrations/20210411_add_imprint_content.go @@ -1,9 +1,9 @@ package migrations import ( - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/utils" + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" + "github.com/kcoderhtml/hackatime/utils" "gorm.io/gorm" "gorm.io/gorm/clause" ) diff --git a/migrations/20210411_drop_migrations_table.go b/migrations/20210411_drop_migrations_table.go index f630263e..262e2f7a 100644 --- a/migrations/20210411_drop_migrations_table.go +++ b/migrations/20210411_drop_migrations_table.go @@ -1,9 +1,10 @@ package migrations import ( - "github.com/muety/wakapi/config" - "gorm.io/gorm" "log/slog" + + "github.com/kcoderhtml/hackatime/config" + "gorm.io/gorm" ) func init() { diff --git a/migrations/20210806_remove_persisted_project_labels.go b/migrations/20210806_remove_persisted_project_labels.go index 79fb452e..2804d9bc 100644 --- a/migrations/20210806_remove_persisted_project_labels.go +++ b/migrations/20210806_remove_persisted_project_labels.go @@ -2,10 +2,11 @@ package migrations import ( "fmt" - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - "gorm.io/gorm" "log/slog" + + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" + "gorm.io/gorm" ) func init() { diff --git a/migrations/20211215_migrate_id_to_bigint.go b/migrations/20211215_migrate_id_to_bigint.go index a0e4ac1e..1733ca10 100644 --- a/migrations/20211215_migrate_id_to_bigint.go +++ b/migrations/20211215_migrate_id_to_bigint.go @@ -1,9 +1,10 @@ package migrations import ( - "github.com/muety/wakapi/config" - "gorm.io/gorm" "log/slog" + + "github.com/kcoderhtml/hackatime/config" + "gorm.io/gorm" ) func init() { diff --git a/migrations/20212212_total_summary_heartbeats.go b/migrations/20212212_total_summary_heartbeats.go index 639fee67..ec0279ef 100644 --- a/migrations/20212212_total_summary_heartbeats.go +++ b/migrations/20212212_total_summary_heartbeats.go @@ -2,10 +2,11 @@ package migrations import ( "database/sql" - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - "gorm.io/gorm" "log/slog" + + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" + "gorm.io/gorm" ) func init() { diff --git a/migrations/20220317_align_num_heartbeats.go b/migrations/20220317_align_num_heartbeats.go index 8c5dc6f3..1956e52d 100644 --- a/migrations/20220317_align_num_heartbeats.go +++ b/migrations/20220317_align_num_heartbeats.go @@ -1,10 +1,11 @@ package migrations import ( - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - "gorm.io/gorm" "log/slog" + + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" + "gorm.io/gorm" ) func init() { diff --git a/migrations/20220318_mysql_timestamp_precision.go b/migrations/20220318_mysql_timestamp_precision.go index a6efd892..7b7b2507 100644 --- a/migrations/20220318_mysql_timestamp_precision.go +++ b/migrations/20220318_mysql_timestamp_precision.go @@ -1,9 +1,10 @@ package migrations import ( - "github.com/muety/wakapi/config" - "gorm.io/gorm" "log/slog" + + "github.com/kcoderhtml/hackatime/config" + "gorm.io/gorm" ) func init() { diff --git a/migrations/202203191_drop_diagnostics_user.go b/migrations/202203191_drop_diagnostics_user.go index 6a1c7229..b872aad2 100644 --- a/migrations/202203191_drop_diagnostics_user.go +++ b/migrations/202203191_drop_diagnostics_user.go @@ -1,10 +1,11 @@ package migrations import ( - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - "gorm.io/gorm" "log/slog" + + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" + "gorm.io/gorm" ) func init() { diff --git a/migrations/20220403_drop_user_project_idx.go b/migrations/20220403_drop_user_project_idx.go index a7cef3ad..f0f0defe 100644 --- a/migrations/20220403_drop_user_project_idx.go +++ b/migrations/20220403_drop_user_project_idx.go @@ -1,10 +1,11 @@ package migrations import ( - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - "gorm.io/gorm" "log/slog" + + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" + "gorm.io/gorm" ) // migration to fix https://github.com/muety/wakapi/issues/346 diff --git a/migrations/20220930_drop_heartbeats_entity_idx.go b/migrations/20220930_drop_heartbeats_entity_idx.go index 1b517dc9..50389303 100644 --- a/migrations/20220930_drop_heartbeats_entity_idx.go +++ b/migrations/20220930_drop_heartbeats_entity_idx.go @@ -1,8 +1,8 @@ package migrations import ( - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" "gorm.io/gorm" ) diff --git a/migrations/20221002_fix_summary_id_types.go b/migrations/20221002_fix_summary_id_types.go index b235cfd5..91d3a014 100644 --- a/migrations/20221002_fix_summary_id_types.go +++ b/migrations/20221002_fix_summary_id_types.go @@ -1,10 +1,11 @@ package migrations import ( - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - "gorm.io/gorm" "strings" + + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" + "gorm.io/gorm" ) // fix for https://github.com/muety/wakapi/issues/416 diff --git a/migrations/20221016_drop_rank_column.go b/migrations/20221016_drop_rank_column.go index ea483f8f..32c58c59 100644 --- a/migrations/20221016_drop_rank_column.go +++ b/migrations/20221016_drop_rank_column.go @@ -1,10 +1,11 @@ package migrations import ( - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - "gorm.io/gorm" "log/slog" + + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" + "gorm.io/gorm" ) func init() { diff --git a/migrations/20221028_fix_heartbeats_time_user_idx.go b/migrations/20221028_fix_heartbeats_time_user_idx.go index 2254f5de..a778620f 100644 --- a/migrations/20221028_fix_heartbeats_time_user_idx.go +++ b/migrations/20221028_fix_heartbeats_time_user_idx.go @@ -4,10 +4,11 @@ import ( "regexp" "strings" - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - "gorm.io/gorm" "log/slog" + + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" + "gorm.io/gorm" ) // due to an error in the model definition, idx_time_user used to only cover 'user_id', but not time column diff --git a/migrations/20230219_add_astro_language.go b/migrations/20230219_add_astro_language.go index 8d096e2e..d8a290bf 100644 --- a/migrations/20230219_add_astro_language.go +++ b/migrations/20230219_add_astro_language.go @@ -1,9 +1,10 @@ package migrations import ( - "github.com/muety/wakapi/config" - "gorm.io/gorm" "log/slog" + + "github.com/kcoderhtml/hackatime/config" + "gorm.io/gorm" ) func init() { diff --git a/migrations/20230219_add_subscription_renewal.go b/migrations/20230219_add_subscription_renewal.go index b228c3e8..d0e0cd8d 100644 --- a/migrations/20230219_add_subscription_renewal.go +++ b/migrations/20230219_add_subscription_renewal.go @@ -1,10 +1,11 @@ package migrations import ( - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - "gorm.io/gorm" "log/slog" + + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" + "gorm.io/gorm" ) func init() { diff --git a/migrations/20231023_fill_last_branch.go b/migrations/20231023_fill_last_branch.go index c7921814..fc855722 100644 --- a/migrations/20231023_fill_last_branch.go +++ b/migrations/20231023_fill_last_branch.go @@ -2,9 +2,9 @@ package migrations import ( "github.com/alitto/pond" - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/utils" + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" + "github.com/kcoderhtml/hackatime/utils" "gorm.io/gorm" ) diff --git a/migrations/migrations.go b/migrations/migrations.go index 43d2319c..11981009 100644 --- a/migrations/migrations.go +++ b/migrations/migrations.go @@ -1,12 +1,13 @@ package migrations import ( - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - "gorm.io/gorm" "log/slog" "sort" "strings" + + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" + "gorm.io/gorm" ) type gormMigrationFunc func(db *gorm.DB) error diff --git a/migrations/shared.go b/migrations/shared.go index 41abc9cd..3255fd9e 100644 --- a/migrations/shared.go +++ b/migrations/shared.go @@ -1,10 +1,11 @@ package migrations import ( - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/utils" - "gorm.io/gorm" "log/slog" + + "github.com/kcoderhtml/hackatime/models" + "github.com/kcoderhtml/hackatime/utils" + "gorm.io/gorm" ) func hasRun(name string, db *gorm.DB) bool { diff --git a/mocks/alias_repository.go b/mocks/alias_repository.go index e962d264..aec99a85 100644 --- a/mocks/alias_repository.go +++ b/mocks/alias_repository.go @@ -1,7 +1,7 @@ package mocks import ( - "github.com/muety/wakapi/models" + "github.com/kcoderhtml/hackatime/models" "github.com/stretchr/testify/mock" ) diff --git a/mocks/alias_service.go b/mocks/alias_service.go index 37c9eafa..037c55aa 100644 --- a/mocks/alias_service.go +++ b/mocks/alias_service.go @@ -1,7 +1,7 @@ package mocks import ( - "github.com/muety/wakapi/models" + "github.com/kcoderhtml/hackatime/models" "github.com/stretchr/testify/mock" ) diff --git a/mocks/duration_service.go b/mocks/duration_service.go index a62b1dae..3a8d9ad0 100644 --- a/mocks/duration_service.go +++ b/mocks/duration_service.go @@ -1,9 +1,10 @@ package mocks import ( - "github.com/muety/wakapi/models" - "github.com/stretchr/testify/mock" "time" + + "github.com/kcoderhtml/hackatime/models" + "github.com/stretchr/testify/mock" ) type DurationServiceMock struct { diff --git a/mocks/heartbeat_service.go b/mocks/heartbeat_service.go index d302e038..356fc7e5 100644 --- a/mocks/heartbeat_service.go +++ b/mocks/heartbeat_service.go @@ -1,10 +1,11 @@ package mocks import ( - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/utils" - "github.com/stretchr/testify/mock" "time" + + "github.com/kcoderhtml/hackatime/models" + "github.com/kcoderhtml/hackatime/utils" + "github.com/stretchr/testify/mock" ) type HeartbeatServiceMock struct { diff --git a/mocks/key_value_service.go b/mocks/key_value_service.go index ed20477e..8c4d31bd 100644 --- a/mocks/key_value_service.go +++ b/mocks/key_value_service.go @@ -1,7 +1,7 @@ package mocks import ( - "github.com/muety/wakapi/models" + "github.com/kcoderhtml/hackatime/models" "github.com/stretchr/testify/mock" ) diff --git a/mocks/project_label_service.go b/mocks/project_label_service.go index 92dadde3..a02719de 100644 --- a/mocks/project_label_service.go +++ b/mocks/project_label_service.go @@ -1,7 +1,7 @@ package mocks import ( - "github.com/muety/wakapi/models" + "github.com/kcoderhtml/hackatime/models" "github.com/stretchr/testify/mock" ) diff --git a/mocks/summary_repository.go b/mocks/summary_repository.go index 65ff043c..4231a09c 100644 --- a/mocks/summary_repository.go +++ b/mocks/summary_repository.go @@ -1,9 +1,10 @@ package mocks import ( - "github.com/muety/wakapi/models" - "github.com/stretchr/testify/mock" "time" + + "github.com/kcoderhtml/hackatime/models" + "github.com/stretchr/testify/mock" ) type SummaryRepositoryMock struct { diff --git a/mocks/summary_service.go b/mocks/summary_service.go index a238281e..c0825be8 100644 --- a/mocks/summary_service.go +++ b/mocks/summary_service.go @@ -1,10 +1,11 @@ package mocks import ( - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/models/types" - "github.com/stretchr/testify/mock" "time" + + "github.com/kcoderhtml/hackatime/models" + "github.com/kcoderhtml/hackatime/models/types" + "github.com/stretchr/testify/mock" ) type SummaryServiceMock struct { diff --git a/mocks/user_service.go b/mocks/user_service.go index 064c62e3..f0b53472 100644 --- a/mocks/user_service.go +++ b/mocks/user_service.go @@ -1,7 +1,7 @@ package mocks import ( - "github.com/muety/wakapi/models" + "github.com/kcoderhtml/hackatime/models" "github.com/stretchr/testify/mock" ) diff --git a/models/compat/shields/v1/badge.go b/models/compat/shields/v1/badge.go index 6ef754de..e2644bad 100644 --- a/models/compat/shields/v1/badge.go +++ b/models/compat/shields/v1/badge.go @@ -1,8 +1,8 @@ package v1 import ( - "github.com/muety/wakapi/helpers" - "github.com/muety/wakapi/models" + "github.com/kcoderhtml/hackatime/helpers" + "github.com/kcoderhtml/hackatime/models" ) // https://shields.io/endpoint diff --git a/models/compat/wakatime/v1/all_time.go b/models/compat/wakatime/v1/all_time.go index 55dc68fc..c4c1ccb9 100644 --- a/models/compat/wakatime/v1/all_time.go +++ b/models/compat/wakatime/v1/all_time.go @@ -1,9 +1,10 @@ package v1 import ( - "github.com/muety/wakapi/helpers" - "github.com/muety/wakapi/models" "time" + + "github.com/kcoderhtml/hackatime/helpers" + "github.com/kcoderhtml/hackatime/models" ) // https://wakatime.com/developers#all_time_since_today diff --git a/models/compat/wakatime/v1/heartbeat.go b/models/compat/wakatime/v1/heartbeat.go index 39d25d1c..b77c3f3b 100644 --- a/models/compat/wakatime/v1/heartbeat.go +++ b/models/compat/wakatime/v1/heartbeat.go @@ -4,7 +4,7 @@ import ( "strconv" "time" - "github.com/muety/wakapi/models" + "github.com/kcoderhtml/hackatime/models" ) type HeartbeatsViewModel struct { diff --git a/models/compat/wakatime/v1/stats.go b/models/compat/wakatime/v1/stats.go index 1b264151..f24e9f58 100644 --- a/models/compat/wakatime/v1/stats.go +++ b/models/compat/wakatime/v1/stats.go @@ -1,10 +1,11 @@ package v1 import ( - "github.com/muety/wakapi/helpers" - "github.com/muety/wakapi/models" "math" "time" + + "github.com/kcoderhtml/hackatime/helpers" + "github.com/kcoderhtml/hackatime/models" ) // https://wakatime.com/api/v1/users/current/stats/last_7_days diff --git a/models/compat/wakatime/v1/summaries.go b/models/compat/wakatime/v1/summaries.go index f52c67d2..299eace8 100644 --- a/models/compat/wakatime/v1/summaries.go +++ b/models/compat/wakatime/v1/summaries.go @@ -8,9 +8,9 @@ import ( "time" "github.com/duke-git/lancet/v2/mathutil" - "github.com/muety/wakapi/helpers" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/utils" + "github.com/kcoderhtml/hackatime/helpers" + "github.com/kcoderhtml/hackatime/models" + "github.com/kcoderhtml/hackatime/utils" ) // https://wakatime.com/developers#summaries diff --git a/models/compat/wakatime/v1/user.go b/models/compat/wakatime/v1/user.go index 775a2eeb..089defff 100644 --- a/models/compat/wakatime/v1/user.go +++ b/models/compat/wakatime/v1/user.go @@ -5,8 +5,8 @@ import ( "strings" "time" - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" ) const DefaultWakaUserDisplayName = "Anonymous User" diff --git a/models/types/types.go b/models/types/types.go index c88ec00e..cff1c65e 100644 --- a/models/types/types.go +++ b/models/types/types.go @@ -1,8 +1,9 @@ package types import ( - "github.com/muety/wakapi/models" "time" + + "github.com/kcoderhtml/hackatime/models" ) type SummaryRetriever func(f, t time.Time, u *models.User, filters *models.Filters) (*models.Summary, error) diff --git a/models/user.go b/models/user.go index b938e214..3d7eb0cb 100644 --- a/models/user.go +++ b/models/user.go @@ -3,12 +3,13 @@ package models import ( "crypto/md5" "fmt" - "github.com/dchest/captcha" - conf "github.com/muety/wakapi/config" - "github.com/muety/wakapi/utils" "regexp" "strings" "time" + + "github.com/dchest/captcha" + conf "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/utils" ) const ( diff --git a/models/user_test.go b/models/user_test.go index d35c70ae..f39035c9 100644 --- a/models/user_test.go +++ b/models/user_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - conf "github.com/muety/wakapi/config" + conf "github.com/kcoderhtml/hackatime/config" "github.com/stretchr/testify/assert" ) diff --git a/models/view/common.go b/models/view/common.go index cd2d9bc6..bb7bc81a 100644 --- a/models/view/common.go +++ b/models/view/common.go @@ -1,8 +1,8 @@ package view import ( - conf "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" + conf "github.com/kcoderhtml/hackatime/ckatime/config" + "github.com/kcoderhtml/hackatime/ckatime/models" ) type BasicViewModel interface { diff --git a/models/view/leaderboard.go b/models/view/leaderboard.go index c23f2687..00636fa2 100644 --- a/models/view/leaderboard.go +++ b/models/view/leaderboard.go @@ -1,9 +1,10 @@ package view import ( - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/utils" "time" + + "github.com/kcoderhtml/hackatime/models" + "github.com/kcoderhtml/hackatime/utils" ) type LeaderboardViewModel struct { diff --git a/models/view/projects.go b/models/view/projects.go index c18a5db9..6315ce79 100644 --- a/models/view/projects.go +++ b/models/view/projects.go @@ -6,8 +6,8 @@ import ( "github.com/duke-git/lancet/v2/mathutil" "github.com/duke-git/lancet/v2/slice" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/utils" + "github.com/kcoderhtml/hackatime/models" + "github.com/kcoderhtml/hackatime/utils" ) type ProjectsViewModel struct { diff --git a/models/view/settings.go b/models/view/settings.go index ae400a3c..de9f420b 100644 --- a/models/view/settings.go +++ b/models/view/settings.go @@ -1,8 +1,9 @@ package view import ( - "github.com/muety/wakapi/models" - "time" + "github.com/kcoderhtml/hackatime/ + + "github.com/kcoderhtml/hackatime/models" ) type SettingsViewModel struct { diff --git a/models/view/summary.go b/models/view/summary.go index f4d09d77..c58e7881 100644 --- a/models/view/summary.go +++ b/models/view/summary.go @@ -1,9 +1,10 @@ package view import ( - conf "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" "time" + + conf "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" ) type SummaryViewModel struct { diff --git a/repositories/alias.go b/repositories/alias.go index 7c1f05a1..0a33dbec 100644 --- a/repositories/alias.go +++ b/repositories/alias.go @@ -2,7 +2,8 @@ package repositories import ( "errors" - "github.com/muety/wakapi/models" + + "github.com/kcoderhtml/hackatime/models" "gorm.io/gorm" ) diff --git a/repositories/diagnostics.go b/repositories/diagnostics.go index 465ede53..93b19998 100644 --- a/repositories/diagnostics.go +++ b/repositories/diagnostics.go @@ -1,7 +1,7 @@ package repositories import ( - "github.com/muety/wakapi/models" + "github.com/kcoderhtml/hackatime/ckatime/models" "gorm.io/gorm" ) diff --git a/repositories/heartbeat.go b/repositories/heartbeat.go index 23d4d3a5..db926bd8 100644 --- a/repositories/heartbeat.go +++ b/repositories/heartbeat.go @@ -5,9 +5,9 @@ import ( "time" "github.com/duke-git/lancet/v2/slice" - conf "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/utils" + conf "github.com/kcoderhtml/hackatime/ckatime/config" + "github.com/kcoderhtml/hackatime/ckatime/models" + "github.com/kcoderhtml/hackatime/ckatime/utils" "gorm.io/driver/sqlserver" "gorm.io/gorm" "gorm.io/gorm/clause" diff --git a/repositories/key_value.go b/repositories/key_value.go index 450aa923..b491ac25 100644 --- a/repositories/key_value.go +++ b/repositories/key_value.go @@ -3,8 +3,8 @@ package repositories import ( "errors" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/utils" + "github.com/kcoderhtml/hackatime/ckatime/models" + "github.com/kcoderhtml/hackatime/ckatime/utils" "gorm.io/gorm" "gorm.io/gorm/clause" ) diff --git a/repositories/language_mapping.go b/repositories/language_mapping.go index f6fcf143..7bd2500f 100644 --- a/repositories/language_mapping.go +++ b/repositories/language_mapping.go @@ -2,8 +2,8 @@ package repositories import ( "errors" - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" + "github.com/kcoderhtml/hackatime/ckatime/config" + "github.com/kcoderhtml/hackatime/ckatime/models" "gorm.io/gorm" ) diff --git a/repositories/leaderboard.go b/repositories/leaderboard.go index 4eeb84c5..69f3b976 100644 --- a/repositories/leaderboard.go +++ b/repositories/leaderboard.go @@ -1,8 +1,8 @@ package repositories import ( - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/utils" + "github.com/kcoderhtml/hackatime/models" + "github.com/kcoderhtml/hackatime/utils" "gorm.io/gorm" "gorm.io/gorm/clause" ) diff --git a/repositories/metrics.go b/repositories/metrics.go index 594fbed4..45987d00 100644 --- a/repositories/metrics.go +++ b/repositories/metrics.go @@ -1,7 +1,7 @@ package repositories import ( - "github.com/muety/wakapi/config" + "github.com/kcoderhtml/hackatime/config" "gorm.io/gorm" ) diff --git a/repositories/project_label.go b/repositories/project_label.go index 05320b34..3a00317b 100644 --- a/repositories/project_label.go +++ b/repositories/project_label.go @@ -2,8 +2,9 @@ package repositories import ( "errors" - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" + + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" "gorm.io/gorm" ) diff --git a/repositories/repositories.go b/repositories/repositories.go index 72cb3d61..4c32b442 100644 --- a/repositories/repositories.go +++ b/repositories/repositories.go @@ -1,8 +1,9 @@ package repositories import ( - "github.com/muety/wakapi/models" "time" + + "github.com/kcoderhtml/hackatime/models" ) type IAliasRepository interface { diff --git a/repositories/summary.go b/repositories/summary.go index f0c39bc8..d4008b98 100644 --- a/repositories/summary.go +++ b/repositories/summary.go @@ -4,8 +4,8 @@ import ( "time" "github.com/duke-git/lancet/v2/slice" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/utils" + "github.com/kcoderhtml/hackatime/models" + "github.com/kcoderhtml/hackatime/utils" "gorm.io/gorm" "gorm.io/gorm/clause" ) diff --git a/repositories/user.go b/repositories/user.go index 613e3855..67e0c14c 100644 --- a/repositories/user.go +++ b/repositories/user.go @@ -3,11 +3,12 @@ package repositories import ( "errors" "fmt" - "github.com/duke-git/lancet/v2/condition" "time" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/utils" + "github.com/duke-git/lancet/v2/condition" + + "github.com/kcoderhtml/hackatime/models" + "github.com/kcoderhtml/hackatime/utils" "gorm.io/gorm" ) diff --git a/routes/api/activity.go b/routes/api/activity.go index 79d2f8fd..97b1df61 100644 --- a/routes/api/activity.go +++ b/routes/api/activity.go @@ -1,18 +1,19 @@ package api import ( - "github.com/go-chi/chi/v5" - "github.com/go-chi/chi/v5/middleware" - conf "github.com/muety/wakapi/config" - "github.com/muety/wakapi/helpers" - "github.com/muety/wakapi/middlewares" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/services" - "github.com/muety/wakapi/utils" "net/http" "regexp" - "strings" - "time" + "stri"github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/ +"github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/" + "github.com/kcoderhtml/hackatime//middleware" + "github.com/kcoderhtml/hackatime/ml/hackatime/config" + "github.com/kcoderhtml/hackatime/helpers" + "github.com/kcoderhtml/hackatime/middlewares" + "github.com/kcoderhtml/hackatime/models" + "github.com/kcoderhtml/hackatime/services" + "github.com/kcoderhtml/hackatime/utils" ) var userWithExtPattern *regexp.Regexp diff --git a/routes/api/avatar.go b/routes/api/avatar.go index bfd74f50..49c24cbe 100644 --- a/routes/api/avatar.go +++ b/routes/api/avatar.go @@ -1,14 +1,15 @@ package api import ( - "codeberg.org/Codeberg/avatars" - "github.com/go-chi/chi/v5" - "github.com/go-chi/chi/v5/middleware" - lru "github.com/hashicorp/golang-lru" - conf "github.com/muety/wakapi/config" - "github.com/muety/wakapi/utils" "net/http" "time" + + "codeberg.org/Codeberg/avatars" + "gith"github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime//middleware" + lru "github.com/hashicorp/golang-lru" + conf "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/utils" ) type AvatarHandler struct { diff --git a/routes/api/badge.go b/routes/api/badge.go index a05bcd85..685b1205 100644 --- a/routes/api/badge.go +++ b/routes/api/badge.go @@ -5,13 +5,13 @@ import ( "github.com/duke-git/lancet/v2/maputil" "github.com/duke-git/lancet/v2/slice" "github.com/go-chi/chi/v5" - conf "github.com/muety/wakapi/config" - "github.com/muety/wakapi/middlewares" - "github.com/muety/wakapi/models" - v1 "github.com/muety/wakapi/models/compat/shields/v1" - routeutils "github.com/muety/wakapi/routes/utils" - "github.com/muety/wakapi/services" - "github.com/muety/wakapi/utils" + conf "github.com/kcoderhtml/hackatime/ckatime/config" + "github.com/kcoderhtml/hackatime/ckatime/middlewares" + "github.com/kcoderhtml/hackatime/ckatime/models" + v1 "github.com/kcoderhtml/hackatime/ckatime/models/compat/shields/v1" + routeutils "github.com/kcoderhtml/hackatime/ckatime/routes/utils" + "github.com/kcoderhtml/hackatime/ckatime/services" + "github.com/kcoderhtml/hackatime/ckatime/utils" "github.com/narqo/go-badge" "github.com/patrickmn/go-cache" "net/http" diff --git a/routes/api/badge_test.go b/routes/api/badge_test.go index 73165094..cf463085 100644 --- a/routes/api/badge_test.go +++ b/routes/api/badge_test.go @@ -1,20 +1,21 @@ package api import ( - "github.com/go-chi/chi/v5" - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/middlewares" - "github.com/muety/wakapi/mocks" - "github.com/muety/wakapi/models" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" "io" - "net/http" - "net/http/httptest" - "regexp" - "strings" + "github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/ "testing" "time" + + "github.com/go-chi/chi/v5" + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/middlewares" + "github.com/kcoderhtml/hackatime/mocks" + "github.com/kcoderhtml/hackatime/models" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" ) var ( diff --git a/routes/api/captcha.go b/routes/api/captcha.go index af552ab1..646b4414 100644 --- a/routes/api/captcha.go +++ b/routes/api/captcha.go @@ -3,7 +3,7 @@ package api import ( "github.com/dchest/captcha" "github.com/go-chi/chi/v5" - conf "github.com/muety/wakapi/config" + conf "github.com/kcoderhtml/hackatime/ckatime/config" ) type CaptchaHandler struct { diff --git a/routes/api/diagnostics.go b/routes/api/diagnostics.go index 9222f72f..fb135338 100644 --- a/routes/api/diagnostics.go +++ b/routes/api/diagnostics.go @@ -2,13 +2,14 @@ package api import ( "encoding/json" - "github.com/go-chi/chi/v5" - "github.com/muety/wakapi/helpers" "net/http" - - conf "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/services" +"github.com/kcoderhtml/hackatime/ + "github.com/go-chi/chi/v5" + "github.com/kcoderhtml/hackatime/helpers" +"github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/ml/hackatime/config" + "github.com/kcoderhtml/hackatime/ckatime/models" + "github.com/kcoderhtml/hackatime/services" ) type DiagnosticsApiHandler struct { diff --git a/routes/api/heartbeat.go b/routes/api/heartbeat.go index 64082ae5..8c965cf2 100644 --- a/routes/api/heartbeat.go +++ b/routes/api/heartbeat.go @@ -1,19 +1,20 @@ package api import ( - "github.com/duke-git/lancet/v2/condition" - "github.com/go-chi/chi/v5" - "github.com/muety/wakapi/helpers" "net/http" - conf "github.com/muety/wakapi/config" - "github.com/muety/wakapi/middlewares" - customMiddleware "github.com/muety/wakapi/middlewares/custom" - routeutils "github.com/muety/wakapi/routes/utils" - "github.com/muety/wakapi/services" - "github.com/muety/wakapi/utils" - - "github.com/muety/wakapi/models" + "github.com/kcoderhtml/hackatime/et/v2/condition" + "github.com/go-chi/chi/v5" + "github.com/kcoderhtml/hackatime/helpers" +"github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/ml/hackatime/config" + "github.com/kcode"github.com/kcoderhtml/hackatime/es" + customMiddl"github.com/kcoderhtml/hackatime/tml/hackatime/middlewares/custom" + "github.com/kcoderhtml/hackatime/oderhtml/hackatime/routes/utils" + "github.com/kcoderhtml/hackatime/ckatime/services" + "github.com/kcoderhtml/hackatime/utils" +"github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/models" ) type HeartbeatApiHandler struct { diff --git a/routes/api/metrics.go b/routes/api/metrics.go index 57442de0..46169282 100644 --- a/routes/api/metrics.go +++ b/routes/api/metrics.go @@ -2,23 +2,24 @@ package api import ( "errors" - "github.com/alitto/pond" - "github.com/go-chi/chi/v5" - conf "github.com/muety/wakapi/config" - "github.com/muety/wakapi/helpers" - "github.com/muety/wakapi/middlewares" - "github.com/muety/wakapi/models" - v1 "github.com/muety/wakapi/models/compat/wakatime/v1" - mm "github.com/muety/wakapi/models/metrics" - "github.com/muety/wakapi/repositories" - "github.com/muety/wakapi/services" - "github.com/muety/wakapi/utils" "log/slog" "net/http" - "runtime" - "sort" - "sync" - "time" + "runt"github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/ +"github.com/kcoderhtml/hackatime/ + "gi"github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/" + "github.com/kcoderhtml/hackatime/ml/hackatime/config" + "github.com/kcoderhtml/hackatime/ckatime/helpers" + "github.com/kcoderhtml/hackatime/middlewares" + "github.com/kcoderhtml/hackatime/models" + v1 "github.com/kcoderhtml/hackatime/models/compat/wakatime/v1" + mm "github.com/kcoderhtml/hackatime/models/metrics" + "github.com/kcoderhtml/hackatime/repositories" + "github.com/kcoderhtml/hackatime/services" + "github.com/kcoderhtml/hackatime/utils" ) const ( diff --git a/routes/api/summary.go b/routes/api/summary.go index 5b2060a2..fd3469b3 100644 --- a/routes/api/summary.go +++ b/routes/api/summary.go @@ -1,14 +1,15 @@ package api import ( - "github.com/go-chi/chi/v5" - "github.com/muety/wakapi/helpers" - routeutils "github.com/muety/wakapi/routes/utils" "net/http" - conf "github.com/muety/wakapi/config" - "github.com/muety/wakapi/middlewares" - "github.com/muety/wakapi/services" + "github.com/go-chi/chi/v5" + "github.com/kcoderhtml/hackatime/helpers" + routeutils "github.com/kcoderhtml/hackatime/routes/utils" + + conf "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/middlewares" + "github.com/kcoderhtml/hackatime/services" ) type SummaryApiHandler struct { diff --git a/routes/compat/shields/v1/badge.go b/routes/compat/shields/v1/badge.go index 50cf865c..b34c2d3e 100644 --- a/routes/compat/shields/v1/badge.go +++ b/routes/compat/shields/v1/badge.go @@ -2,17 +2,18 @@ package v1 import ( "fmt" - "github.com/go-chi/chi/v5" - "github.com/muety/wakapi/helpers" - "github.com/muety/wakapi/models/types" - routeutils "github.com/muety/wakapi/routes/utils" "net/http" - "time" - - conf "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - v1 "github.com/muety/wakapi/models/compat/shields/v1" - "github.com/muety/wakapi/services" + "github.com/kcoderhtml/hackatime/ +"github.com/kcoderhtml/hackatime/ + "github.com"github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/helpers" + "github.com/kcoderhtml/hackatime/models/types" + routeutils "github.com/kcoderhtml/hackatime/routes/utils" +"github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/ml/hackatime/config" + "gi"github.com/kcoderhtml/hackatime/time/models" + "github.com/kcoderhtml/hackatime//hackatime/models/compat/shields/v1" + "github.com/kcoderhtml/hackatime/services" "github.com/patrickmn/go-cache" ) diff --git a/routes/compat/wakatime/v1/all_time.go b/routes/compat/wakatime/v1/all_time.go index 5bb2b26c..b778b295 100644 --- a/routes/compat/wakatime/v1/all_time.go +++ b/routes/compat/wakatime/v1/all_time.go @@ -1,17 +1,18 @@ package v1 import ( - "github.com/go-chi/chi/v5" - conf "github.com/muety/wakapi/config" - "github.com/muety/wakapi/helpers" - "github.com/muety/wakapi/middlewares" - "github.com/muety/wakapi/models" - v1 "github.com/muety/wakapi/models/compat/wakatime/v1" - "github.com/muety/wakapi/models/types" - routeutils "github.com/muety/wakapi/routes/utils" - "github.com/muety/wakapi/services" "net/http" - "time" + "time"github.com/kcoderhtml/hackatime/ +"github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/" + "github.com/kcoderhtml/hackatime/ml/hackatime/config" + "gi"github.com/kcoderhtml/hackatime/time/helpers" + "github.com/kcoderhtml/hackatime/ckatime/middlewares" + "github.com"github.com/kcoderhtml/hackatime/els" + "github.com/kcoderhtml/hackatime//hackatime/models/compat/wakatime/v1" + "github.com/kcoderhtml/hackatime/models/types" + routeutils "github.com/kcoderhtml/hackatime/routes/utils" + "github.com/kcoderhtml/hackatime/services" ) type AllTimeHandler struct { diff --git a/routes/compat/wakatime/v1/heartbeat.go b/routes/compat/wakatime/v1/heartbeat.go index e9b1afb4..e9e090fc 100644 --- a/routes/compat/wakatime/v1/heartbeat.go +++ b/routes/compat/wakatime/v1/heartbeat.go @@ -3,15 +3,15 @@ package v1 import ( "github.com/duke-git/lancet/v2/datetime" "github.com/go-chi/chi/v5" - "github.com/muety/wakapi/helpers" + "github.com/kcoderhtml/hackatime/ckatime/helpers" "net/http" "time" - conf "github.com/muety/wakapi/config" - "github.com/muety/wakapi/middlewares" - wakatime "github.com/muety/wakapi/models/compat/wakatime/v1" - routeutils "github.com/muety/wakapi/routes/utils" - "github.com/muety/wakapi/services" + conf "github.com/kcoderhtml/hackatime/ckatime/config" + "github.com/kcoderhtml/hackatime/ckatime/middlewares" + wakatime "github.com/kcoderhtml/hackatime/ckatime/models/compat/wakatime/v1" + routeutils "github.com/kcoderhtml/hackatime/ckatime/routes/utils" + "github.com/kcoderhtml/hackatime/ckatime/services" ) type HeartbeatsResult struct { diff --git a/routes/compat/wakatime/v1/leaders.go b/routes/compat/wakatime/v1/leaders.go index a633520c..127269af 100644 --- a/routes/compat/wakatime/v1/leaders.go +++ b/routes/compat/wakatime/v1/leaders.go @@ -1,20 +1,21 @@ package v1 import ( - "github.com/duke-git/lancet/v2/slice" - "github.com/go-chi/chi/v5" - "github.com/muety/wakapi/helpers" - "github.com/muety/wakapi/middlewares" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/utils" "math" "net/http" - "strings" - "time" - - conf "github.com/muety/wakapi/config" - v1 "github.com/muety/wakapi/models/compat/wakatime/v1" - "github.com/muety/wakapi/services" + "github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/ +"github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/et/v2/slice" + "github.com/go-chi/chi/v5" + "github.com/kcoderhtml/hackatime/helpers" + "github.com/kcoderhtml/hackatime/middlewares" + "github.com/kcoderhtml/hackatime/models" + "github.com/kcoderhtml/hackatime/utils" +"github.com/kcoderhtml/hackatime/ + con"github.com/kcoderhtml/hackatime/hackatime/config" + "github.com/kcoderhtml/hackatime//hackatime/models/compat/wakatime/v1" + "github.com/kcoderhtml/hackatime/services" ) type LeadersHandler struct { diff --git a/routes/compat/wakatime/v1/projects.go b/routes/compat/wakatime/v1/projects.go index ff3a59f5..19784b61 100644 --- a/routes/compat/wakatime/v1/projects.go +++ b/routes/compat/wakatime/v1/projects.go @@ -1,21 +1,22 @@ package v1 import ( - "github.com/muety/wakapi/models" - "net/http" + "github.com/kcoderhtml/hackatime/ "net/url" "strings" "time" - "github.com/go-chi/chi/v5" - "github.com/muety/wakapi/helpers" - - conf "github.com/muety/wakapi/config" - "github.com/muety/wakapi/middlewares" - v1 "github.com/muety/wakapi/models/compat/wakatime/v1" - routeutils "github.com/muety/wakapi/routes/utils" - "github.com/muety/wakapi/services" - "github.com/muety/wakapi/utils" + "github.com/kcoderhtml/hackatime/models" + + "github.com/kcoderhtml/hackatime/" + "github.com/kcoderhtml/hackatime/helpers" +"github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/ml/hackatime/config" + "gi"github.com/kcoderhtml/hackatime/time/middlewares" + v1 "github."github.com/kcoderhtml/hackatime/models/compat/wakatime/v1" + "github.com/kcoderhtml/hackatime/oderhtml/hackatime/routes/utils" + "github.com/kcoderhtml/hackatime/ckatime/services" + "github.com/kcoderhtml/hackatime/utils" ) type ProjectsHandler struct { diff --git a/routes/compat/wakatime/v1/stats.go b/routes/compat/wakatime/v1/stats.go index 1dfd1475..95401b34 100644 --- a/routes/compat/wakatime/v1/stats.go +++ b/routes/compat/wakatime/v1/stats.go @@ -5,13 +5,13 @@ import ( "time" "github.com/go-chi/chi/v5" - "github.com/muety/wakapi/helpers" + "github.com/kcoderhtml/hackatime/ckatime/helpers" - conf "github.com/muety/wakapi/config" - "github.com/muety/wakapi/middlewares" - "github.com/muety/wakapi/models" - v1 "github.com/muety/wakapi/models/compat/wakatime/v1" - "github.com/muety/wakapi/services" + conf "github.com/kcoderhtml/hackatime/ckatime/config" + "github.com/kcoderhtml/hackatime/ckatime/middlewares" + "github.com/kcoderhtml/hackatime/ckatime/models" + v1 "github.com/kcoderhtml/hackatime/ckatime/models/compat/wakatime/v1" + "github.com/kcoderhtml/hackatime/ckatime/services" ) type StatsHandler struct { diff --git a/routes/compat/wakatime/v1/statusbar.go b/routes/compat/wakatime/v1/statusbar.go index cf6201fb..beea530f 100644 --- a/routes/compat/wakatime/v1/statusbar.go +++ b/routes/compat/wakatime/v1/statusbar.go @@ -2,17 +2,17 @@ package v1 import ( "github.com/go-chi/chi/v5" - "github.com/muety/wakapi/helpers" - "github.com/muety/wakapi/models/types" + "github.com/kcoderhtml/hackatime/ckatime/helpers" + "github.com/kcoderhtml/hackatime/ckatime/models/types" "net/http" "time" - conf "github.com/muety/wakapi/config" - "github.com/muety/wakapi/middlewares" - "github.com/muety/wakapi/models" - v1 "github.com/muety/wakapi/models/compat/wakatime/v1" - routeutils "github.com/muety/wakapi/routes/utils" - "github.com/muety/wakapi/services" + conf "github.com/kcoderhtml/hackatime/ckatime/config" + "github.com/kcoderhtml/hackatime/ckatime/middlewares" + "github.com/kcoderhtml/hackatime/ckatime/models" + v1 "github.com/kcoderhtml/hackatime/ckatime/models/compat/wakatime/v1" + routeutils "github.com/kcoderhtml/hackatime/ckatime/routes/utils" + "github.com/kcoderhtml/hackatime/ckatime/services" ) type StatusBarViewModel struct { diff --git a/routes/compat/wakatime/v1/summaries.go b/routes/compat/wakatime/v1/summaries.go index e0dde8b6..9bee29cf 100644 --- a/routes/compat/wakatime/v1/summaries.go +++ b/routes/compat/wakatime/v1/summaries.go @@ -4,18 +4,18 @@ import ( "errors" "github.com/duke-git/lancet/v2/datetime" "github.com/go-chi/chi/v5" - "github.com/muety/wakapi/helpers" + "github.com/kcoderhtml/hackatime/ckatime/helpers" "net/http" "strings" "time" - conf "github.com/muety/wakapi/config" - "github.com/muety/wakapi/middlewares" - "github.com/muety/wakapi/models" - v1 "github.com/muety/wakapi/models/compat/wakatime/v1" - routeutils "github.com/muety/wakapi/routes/utils" - "github.com/muety/wakapi/services" - "github.com/muety/wakapi/utils" + conf "github.com/kcoderhtml/hackatime/ckatime/config" + "github.com/kcoderhtml/hackatime/ckatime/middlewares" + "github.com/kcoderhtml/hackatime/ckatime/models" + v1 "github.com/kcoderhtml/hackatime/ckatime/models/compat/wakatime/v1" + routeutils "github.com/kcoderhtml/hackatime/ckatime/routes/utils" + "github.com/kcoderhtml/hackatime/ckatime/services" + "github.com/kcoderhtml/hackatime/ckatime/utils" ) type SummariesHandler struct { diff --git a/routes/compat/wakatime/v1/users.go b/routes/compat/wakatime/v1/users.go index fdfd456f..cef139ba 100644 --- a/routes/compat/wakatime/v1/users.go +++ b/routes/compat/wakatime/v1/users.go @@ -2,14 +2,14 @@ package v1 import ( "github.com/go-chi/chi/v5" - "github.com/muety/wakapi/helpers" + "github.com/kcoderhtml/hackatime/ckatime/helpers" "net/http" - conf "github.com/muety/wakapi/config" - "github.com/muety/wakapi/middlewares" - v1 "github.com/muety/wakapi/models/compat/wakatime/v1" - routeutils "github.com/muety/wakapi/routes/utils" - "github.com/muety/wakapi/services" + conf "github.com/kcoderhtml/hackatime/ckatime/config" + "github.com/kcoderhtml/hackatime/ckatime/middlewares" + v1 "github.com/kcoderhtml/hackatime/ckatime/models/compat/wakatime/v1" + routeutils "github.com/kcoderhtml/hackatime/ckatime/routes/utils" + "github.com/kcoderhtml/hackatime/ckatime/services" ) type UsersHandler struct { diff --git a/routes/compat/wakatime/v1/users_test.go b/routes/compat/wakatime/v1/users_test.go index 8833730c..59252c0f 100644 --- a/routes/compat/wakatime/v1/users_test.go +++ b/routes/compat/wakatime/v1/users_test.go @@ -4,10 +4,10 @@ import ( "encoding/base64" "fmt" "github.com/go-chi/chi/v5" - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/middlewares" - "github.com/muety/wakapi/mocks" - "github.com/muety/wakapi/models" + "github.com/kcoderhtml/hackatime/ckatime/config" + "github.com/kcoderhtml/hackatime/ckatime/middlewares" + "github.com/kcoderhtml/hackatime/ckatime/mocks" + "github.com/kcoderhtml/hackatime/ckatime/models" "io" "net/http" "net/http/httptest" diff --git a/routes/home.go b/routes/home.go index 6aca2917..6872e501 100644 --- a/routes/home.go +++ b/routes/home.go @@ -3,17 +3,18 @@ package routes import ( "encoding/json" "fmt" - "github.com/go-chi/chi/v5" - "github.com/gorilla/schema" - conf "github.com/muety/wakapi/config" - "github.com/muety/wakapi/middlewares" - "github.com/muety/wakapi/models/view" - routeutils "github.com/muety/wakapi/routes/utils" - "github.com/muety/wakapi/services" "net/http" "strconv" - "strings" - "time" + "stri"github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/ +"github.com/kcoderhtml/hackatime/ + "github.com"github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/a" + conf "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/middlewares" + "github.com/kcoderhtml/hackatime/models/view" + routeutils "github.com/kcoderhtml/hackatime/routes/utils" + "github.com/kcoderhtml/hackatime/services" ) type HomeHandler struct { diff --git a/routes/home_test.go b/routes/home_test.go index 9bd61b5a..45d44f33 100644 --- a/routes/home_test.go +++ b/routes/home_test.go @@ -1,18 +1,19 @@ package routes import ( - "github.com/go-chi/chi/v5" - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/middlewares" - "github.com/muety/wakapi/mocks" - "github.com/muety/wakapi/models" - "github.com/stretchr/testify/assert" "io" - "net/http" - "net/http/httptest" - "os" - "strings" + "github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/ "testing" + + "github.com/go-chi/chi/v5" + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/middlewares" + "github.com/kcoderhtml/hackatime/mocks" + "github.com/kcoderhtml/hackatime/models" + "github.com/stretchr/testify/assert" ) var ( diff --git a/routes/imprint.go b/routes/imprint.go index 1c88448a..2c44dcda 100644 --- a/routes/imprint.go +++ b/routes/imprint.go @@ -1,12 +1,13 @@ package routes import ( - "github.com/go-chi/chi/v5" - conf "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/models/view" - "github.com/muety/wakapi/services" "net/http" +"github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/" + "github.com/kcoderhtml/hackatime/ml/hackatime/config" + "github.com/kcoderhtml/hackatime/ckatime/models" + "github.com/kcoderhtml/hackatime/models/view" + "github.com/kcoderhtml/hackatime/services" ) type ImprintHandler struct { diff --git a/routes/leaderboard.go b/routes/leaderboard.go index d4206b34..6ff6e203 100644 --- a/routes/leaderboard.go +++ b/routes/leaderboard.go @@ -4,13 +4,13 @@ import ( "fmt" "github.com/duke-git/lancet/v2/slice" "github.com/go-chi/chi/v5" - conf "github.com/muety/wakapi/config" - "github.com/muety/wakapi/middlewares" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/models/view" - routeutils "github.com/muety/wakapi/routes/utils" - "github.com/muety/wakapi/services" - "github.com/muety/wakapi/utils" + conf "github.com/kcoderhtml/hackatime/ckatime/ckatime/config" + "github.com/kcoderhtml/hackatime/ckatime/ckatime/middlewares" + "github.com/kcoderhtml/hackatime/ckatime/ckatime/models" + "github.com/kcoderhtml/hackatime/ckatime/ckatime/models/view" + routeutils "github.com/kcoderhtml/hackatime/ckatime/ckatime/routes/utils" + "github.com/kcoderhtml/hackatime/ckatime/ckatime/services" + "github.com/kcoderhtml/hackatime/ckatime/ckatime/utils" "net/http" "strings" ) diff --git a/routes/login.go b/routes/login.go index b8716fee..2fd17911 100644 --- a/routes/login.go +++ b/routes/login.go @@ -2,21 +2,22 @@ package routes import ( "fmt" - "github.com/dchest/captcha" - "github.com/go-chi/chi/v5" - "github.com/go-chi/httprate" - conf "github.com/muety/wakapi/config" - "github.com/muety/wakapi/middlewares" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/models/view" - routeutils "github.com/muety/wakapi/routes/utils" - "github.com/muety/wakapi/services" - "github.com/muety/wakapi/utils" "log/slog" "net/http" "net/url" - "strings" - "time" + "stri"github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/ +"github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/a" + "github.com"github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/te" + "github.com/kcoderhtml/hackatime/ml/hackatime/config" + "github.com/kcoderhtml/hackatime/middlewares" + "github.com/kcoderhtml/hackatime/models" + "github.com/kcoderhtml/hackatime/models/view" + routeutils "github.com/kcoderhtml/hackatime/routes/utils" + "github.com/kcoderhtml/hackatime/services" + "github.com/kcoderhtml/hackatime/utils" ) type LoginHandler struct { diff --git a/routes/projects.go b/routes/projects.go index e68ca253..4432a39e 100644 --- a/routes/projects.go +++ b/routes/projects.go @@ -1,16 +1,17 @@ package routes import ( - "github.com/go-chi/chi/v5" - conf "github.com/muety/wakapi/config" - "github.com/muety/wakapi/middlewares" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/models/view" - routeutils "github.com/muety/wakapi/routes/utils" - "github.com/muety/wakapi/services" - "github.com/muety/wakapi/utils" "net/http" - "time" + "time"github.com/kcoderhtml/hackatime/ +"github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/" + "github.com/kcoderhtml/hackatime/ml/hackatime/config" + "github.com"github.com/kcoderhtml/hackatime/dlewares" + "github.com/kcoderhtml/hackatime/ckatime/models" + "github.com/kcoderhtml/hackatime/ckatime/models/view" + routeutils "github.com/kcoderhtml/hackatime/routes/utils" + "github.com/kcoderhtml/hackatime/services" + "github.com/kcoderhtml/hackatime/utils" ) type ProjectsHandler struct { diff --git a/routes/relay/relay.go b/routes/relay/relay.go index 49d745e0..8b31ca33 100644 --- a/routes/relay/relay.go +++ b/routes/relay/relay.go @@ -1,12 +1,13 @@ package relay import ( - "github.com/go-chi/chi/v5" - conf "github.com/muety/wakapi/config" "net/http" "net/http/httputil" "net/url" "regexp" + + "github.com/go-chi/chi/v5" + conf "github.com/kcoderhtml/hackatime/config" ) const targetUrlHeader = "X-Target-URL" diff --git a/routes/routes.go b/routes/routes.go index 8de095e7..037e35ed 100644 --- a/routes/routes.go +++ b/routes/routes.go @@ -1,16 +1,17 @@ package routes import ( - "github.com/duke-git/lancet/v2/strutil" - "github.com/muety/wakapi/helpers" "html/template" - "strings" + "github.com/kcoderhtml/hackatime/ + + "github.com/duke-git/lancet/v2/strutil" + "github.com/kcoderhtml/hackatime/helpers" - "github.com/duke-git/lancet/v2/datetime" - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/utils" - "github.com/muety/wakapi/views" + "github.com/kcoderhtml/hackatime/et/v2/datetime" + "github.com/kcoderhtml/hackatime/ckatime/config" + "github.com/kcoderhtml/hackatime/ckatime/models" + "github.com/kcoderhtml/hackatime/ckatime/utils" + "github.com/kcoderhtml/hackatime/views" ) var templates map[string]*template.Template diff --git a/routes/settings.go b/routes/settings.go index 42ace200..a1561d38 100644 --- a/routes/settings.go +++ b/routes/settings.go @@ -3,26 +3,28 @@ package routes import ( "encoding/base64" "fmt" - "github.com/duke-git/lancet/v2/condition" - "github.com/go-chi/chi/v5" - "github.com/gofrs/uuid/v5" "net/http" "sort" "strconv" "strings" "time" - datastructure "github.com/duke-git/lancet/v2/datastructure/set" - "github.com/gorilla/schema" - conf "github.com/muety/wakapi/config" - "github.com/muety/wakapi/middlewares" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/models/view" - routeutils "github.com/muety/wakapi/routes/utils" - "github.com/muety/wakapi/services" - "github.com/muety/wakapi/services/imports" - "github.com/muety/wakapi/utils" + "github.com/duke-git/lancet/v2/condition" + "github.com/go-chi/chi/v5" + "github.com/gofrs/uuid/v5" + "log/slog" +"github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime//duke-git/lancet/v2/datastructure/set" + "github.com/kcoderhtml/hackatime/a" + "github.com/kcoderhtml/hackatime/ml/hackatime/config" + "github.com"github.com/kcoderhtml/hackatime/dlewares" + "github.com/kcoderhtml/hackatime/ckatime/models" + "github.com/kcoderhtml/hackatime/ckatime/models/view" + "github.com/kcoderhtml/hackatime/oderhtml/hackatime/routes/utils" + "github.com/kcoderhtml/hackatime/services" + "github.com/kcoderhtml/hackatime/services/imports" + "github.com/kcoderhtml/hackatime/utils" ) const criticalError = "a critical error has occurred, sorry" diff --git a/routes/subscription.go b/routes/subscription.go index 5b1b7429..6f0a17b0 100644 --- a/routes/subscription.go +++ b/routes/subscription.go @@ -5,12 +5,12 @@ import ( "errors" "fmt" "github.com/go-chi/chi/v5" + conf "github.com/kcoderhtml/hackatime/ckatime/config" + "github.com/kcoderhtml/hackatime/ckatime/middlewares" + "github.com/kcoderhtml/hackatime/ckatime/models" + routeutils "github.com/kcoderhtml/hackatime/ckatime/routes/utils" + "github.com/kcoderhtml/hackatime/ckatime/services" "github.com/leandro-lugaresi/hub" - conf "github.com/muety/wakapi/config" - "github.com/muety/wakapi/middlewares" - "github.com/muety/wakapi/models" - routeutils "github.com/muety/wakapi/routes/utils" - "github.com/muety/wakapi/services" "github.com/stripe/stripe-go/v74" stripePortalSession "github.com/stripe/stripe-go/v74/billingportal/session" stripeCheckoutSession "github.com/stripe/stripe-go/v74/checkout/session" diff --git a/routes/summary.go b/routes/summary.go index b1681d46..000be129 100644 --- a/routes/summary.go +++ b/routes/summary.go @@ -2,16 +2,17 @@ package routes import ( "fmt" - "github.com/go-chi/chi/v5" - conf "github.com/muety/wakapi/config" - "github.com/muety/wakapi/helpers" - "github.com/muety/wakapi/middlewares" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/models/view" - su "github.com/muety/wakapi/routes/utils" - "github.com/muety/wakapi/services" "net/http" "time" + + "github.com/go-chi/chi/v5" + conf "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/helpers" + "github.com/kcoderhtml/hackatime/middlewares" + "github.com/kcoderhtml/hackatime/models" + "github.com/kcoderhtml/hackatime/models/view" + su "github.com/kcoderhtml/hackatime/routes/utils" + "github.com/kcoderhtml/hackatime/services" ) type SummaryHandler struct { diff --git a/routes/utils/badge_utils.go b/routes/utils/badge_utils.go index 69c4ada9..55992e45 100644 --- a/routes/utils/badge_utils.go +++ b/routes/utils/badge_utils.go @@ -2,9 +2,10 @@ package utils import ( "errors" - "github.com/muety/wakapi/helpers" - "github.com/muety/wakapi/models" - "regexp" + "github.com/kcoderhtml/hackatime/ +"github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/helpers" + "github.com/kcoderhtml/hackatime/models" ) const ( diff --git a/routes/utils/heartbeat_utils.go b/routes/utils/heartbeat_utils.go index 1c441a17..9fbb7535 100644 --- a/routes/utils/heartbeat_utils.go +++ b/routes/utils/heartbeat_utils.go @@ -3,9 +3,10 @@ package utils import ( "bytes" "encoding/json" - "github.com/muety/wakapi/models" - "io" + "github.com/kcoderhtml/hackatime/ "net/http" + + "github.com/kcoderhtml/hackatime/models" ) func ParseHeartbeats(r *http.Request) ([]*models.Heartbeat, error) { diff --git a/routes/utils/messages.go b/routes/utils/messages.go index 0d14ab3f..e7cabf29 100644 --- a/routes/utils/messages.go +++ b/routes/utils/messages.go @@ -1,9 +1,10 @@ package utils import ( - conf "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models/view" "net/http" + + conf "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models/view" ) func SetError(r *http.Request, w http.ResponseWriter, message string) { diff --git a/routes/utils/project_utils.go b/routes/utils/project_utils.go index e34b87d6..29d18e86 100644 --- a/routes/utils/project_utils.go +++ b/routes/utils/project_utils.go @@ -1,10 +1,11 @@ package utils import ( - datastructure "github.com/duke-git/lancet/v2/datastructure/set" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/services" "sort" + + datastructure "github.com/duke-git/lancet/v2/datastructure/set" + "github.com/kcoderhtml/hackatime/models" + "github.com/kcoderhtml/hackatime/services" ) // GetEffectiveProjectsList returns the user's projects, including all alias targets and excluding all remapped project names (alias sources) diff --git a/routes/utils/summary_utils.go b/routes/utils/summary_utils.go index a790fbb1..6285e49e 100644 --- a/routes/utils/summary_utils.go +++ b/routes/utils/summary_utils.go @@ -1,12 +1,13 @@ package utils import ( - "github.com/muety/wakapi/helpers" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/models/types" - "github.com/muety/wakapi/services" - "net/http" - "strings" + "github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/ +"github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/ckatime/helpers" + "github.com/kcoderhtml/hackatime/models" + "github.com/kcoderhtml/hackatime/models/types" + "github.com/kcoderhtml/hackatime/services" ) func LoadUserSummary(ss services.ISummaryService, r *http.Request) (*models.Summary, error, int) { diff --git a/routes/utils/user_utils.go b/routes/utils/user_utils.go index 92702f2b..a856c11a 100644 --- a/routes/utils/user_utils.go +++ b/routes/utils/user_utils.go @@ -3,10 +3,10 @@ package utils import ( "errors" "github.com/go-chi/chi/v5" - conf "github.com/muety/wakapi/config" - "github.com/muety/wakapi/middlewares" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/services" + conf "github.com/kcoderhtml/hackatime/ckatime/config" + "github.com/kcoderhtml/hackatime/ckatime/middlewares" + "github.com/kcoderhtml/hackatime/ckatime/models" + "github.com/kcoderhtml/hackatime/ckatime/services" "net/http" ) diff --git a/routes/utils/user_utils_test.go b/routes/utils/user_utils_test.go index 9474aeb8..c42761ac 100644 --- a/routes/utils/user_utils_test.go +++ b/routes/utils/user_utils_test.go @@ -2,15 +2,16 @@ package utils import ( "context" + "net/http" + "github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/ + "github.com/go-chi/chi/v5" - "github.com/muety/wakapi/middlewares" - "github.com/muety/wakapi/mocks" - "github.com/muety/wakapi/models" + "github.com/kcoderhtml/hackatime/middlewares" + "github.com/kcoderhtml/hackatime/mocks" + "github.com/kcoderhtml/hackatime/models" "github.com/stretchr/testify/assert" - "net/http" - "net/http/httptest" - "strings" - "testing" ) func TestCheckEffectiveUser_Current(t *testing.T) { diff --git a/scripts/sqlite2mysql.go b/scripts/sqlite2mysql.go index a7237640..970a9dda 100644 --- a/scripts/sqlite2mysql.go +++ b/scripts/sqlite2mysql.go @@ -36,8 +36,8 @@ import ( "os" "github.com/jinzhu/configor" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/repositories" + "github.com/kcoderhtml/hackatime/models" + "github.com/kcoderhtml/hackatime/repositories" "gorm.io/driver/mysql" "gorm.io/driver/postgres" "gorm.io/driver/sqlite" diff --git a/services/activity.go b/services/activity.go index 30b5b7f2..82c76d2a 100644 --- a/services/activity.go +++ b/services/activity.go @@ -5,18 +5,19 @@ import ( _ "embed" "errors" "fmt" - svg "github.com/ajstarks/svgo/float" - "github.com/alitto/pond" - "github.com/duke-git/lancet/v2/condition" - "github.com/duke-git/lancet/v2/datetime" - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/helpers" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/utils" - "github.com/patrickmn/go-cache" "math" "sync" "time" + + "github.com/kcoderhtml/hackatime/svgo/float" + "github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/et/v2/condition" + "github.com/kcoderhtml/hackatime/et/v2/datetime" + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/helpers" + "github.com/kcoderhtml/hackatime/models" + "github.com/kcoderhtml/hackatime/utils" + "github.com/patrickmn/go-cache" ) const ( diff --git a/services/aggregation.go b/services/aggregation.go index c92e0f91..d9d3c5eb 100644 --- a/services/aggregation.go +++ b/services/aggregation.go @@ -2,14 +2,15 @@ package services import ( "errors" - datastructure "github.com/duke-git/lancet/v2/datastructure/set" - "github.com/muety/artifex/v2" - "github.com/muety/wakapi/config" "log/slog" "sync" - "time" + "github.com/kcoderhtml/hackatime/ - "github.com/muety/wakapi/models" + datastructure "github.com/duke-git/lancet/v2/datastructure/set" + "github.com/kcoderhtml/hackatime/config" + "github.com/muety/artifex/v2" +"github.com/kcoderhtml/hackatime/ + "github.com/kcoderhtml/hackatime/models" ) const ( diff --git a/services/alias.go b/services/alias.go index c6938450..35c2ce54 100644 --- a/services/alias.go +++ b/services/alias.go @@ -3,12 +3,13 @@ package services import ( "errors" "fmt" + "sync" + "github.com/becheran/wildmatch-go" datastructure "github.com/duke-git/lancet/v2/datastructure/set" - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/repositories" - "sync" + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" + "github.com/kcoderhtml/hackatime/repositories" ) type AliasService struct { diff --git a/services/alias_test.go b/services/alias_test.go index 73561a79..479657f5 100644 --- a/services/alias_test.go +++ b/services/alias_test.go @@ -1,8 +1,8 @@ package services import ( - "github.com/muety/wakapi/mocks" - "github.com/muety/wakapi/models" + "github.com/kcoderhtml/hackatime/ckatime/ckatime/mocks" + "github.com/kcoderhtml/hackatime/ckatime/ckatime/models" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/suite" diff --git a/services/diagnostics.go b/services/diagnostics.go index 59edb79c..6ac0235a 100644 --- a/services/diagnostics.go +++ b/services/diagnostics.go @@ -1,9 +1,9 @@ package services import ( - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/repositories" + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" + "github.com/kcoderhtml/hackatime/repositories" ) type DiagnosticsService struct { diff --git a/services/duration.go b/services/duration.go index 4d49d378..a55241cc 100644 --- a/services/duration.go +++ b/services/duration.go @@ -1,11 +1,12 @@ package services import ( + "time" + "github.com/duke-git/lancet/v2/datetime" "github.com/duke-git/lancet/v2/mathutil" - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - "time" + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" ) type DurationService struct { diff --git a/services/duration_test.go b/services/duration_test.go index a3b15e6b..0a559e7b 100644 --- a/services/duration_test.go +++ b/services/duration_test.go @@ -1,13 +1,14 @@ package services import ( - "github.com/muety/wakapi/mocks" - "github.com/muety/wakapi/models" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/suite" "math/rand" "testing" "time" + + "github.com/kcoderhtml/hackatime/mocks" + "github.com/kcoderhtml/hackatime/models" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/suite" ) const ( diff --git a/services/heartbeat.go b/services/heartbeat.go index 7978bc9a..070541f5 100644 --- a/services/heartbeat.go +++ b/services/heartbeat.go @@ -2,19 +2,20 @@ package services import ( "fmt" - datastructure "github.com/duke-git/lancet/v2/datastructure/set" - "github.com/duke-git/lancet/v2/maputil" - "github.com/leandro-lugaresi/hub" - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/repositories" - "github.com/muety/wakapi/utils" - "github.com/patrickmn/go-cache" "math" "strings" "sync" "time" - "github.com/muety/wakapi/models" + datastructure "github.com/duke-git/lancet/v2/datastructure/set" + "github.com/duke-git/lancet/v2/maputil" + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/repositories" + "github.com/kcoderhtml/hackatime/utils" + "github.com/leandro-lugaresi/hub" + "github.com/patrickmn/go-cache" + + "github.com/kcoderhtml/hackatime/models" ) type HeartbeatService struct { diff --git a/services/housekeeping.go b/services/housekeeping.go index 140d9165..922b9f88 100644 --- a/services/housekeeping.go +++ b/services/housekeeping.go @@ -1,13 +1,14 @@ package services import ( - "github.com/duke-git/lancet/v2/slice" - "github.com/muety/artifex/v2" - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/utils" "log/slog" "time" + + "github.com/duke-git/lancet/v2/slice" + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" + "github.com/kcoderhtml/hackatime/utils" + "github.com/muety/artifex/v2" ) type HousekeepingService struct { diff --git a/services/housekeeping_test.go b/services/housekeeping_test.go index 11f34317..631a9917 100644 --- a/services/housekeeping_test.go +++ b/services/housekeeping_test.go @@ -1,12 +1,13 @@ package services import ( - "github.com/muety/wakapi/mocks" - "github.com/muety/wakapi/models" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/suite" "testing" "time" + + "github.com/kcoderhtml/hackatime/mocks" + "github.com/kcoderhtml/hackatime/models" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/suite" ) type HousekeepingServiceTestSuite struct { diff --git a/services/imports/importers.go b/services/imports/importers.go index 668bd918..883f6a5c 100644 --- a/services/imports/importers.go +++ b/services/imports/importers.go @@ -1,8 +1,9 @@ package imports import ( - "github.com/muety/wakapi/models" "time" + + "github.com/kcoderhtml/hackatime/models" ) type DataImporter interface { diff --git a/services/imports/wakatime.go b/services/imports/wakatime.go index b1e1ecb0..6e77d44d 100644 --- a/services/imports/wakatime.go +++ b/services/imports/wakatime.go @@ -1,10 +1,11 @@ package imports import ( - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" "strings" "time" + + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" ) type WakatimeImporter struct { diff --git a/services/imports/wakatime_dump.go b/services/imports/wakatime_dump.go index b1f1f393..515ab510 100644 --- a/services/imports/wakatime_dump.go +++ b/services/imports/wakatime_dump.go @@ -6,16 +6,18 @@ import ( "encoding/json" "errors" "fmt" - "github.com/duke-git/lancet/v2/slice" - "github.com/muety/wakapi/utils" "net/http" "time" - "github.com/muety/artifex/v2" - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - wakatime "github.com/muety/wakapi/models/compat/wakatime/v1" + "github.com/duke-git/lancet/v2/slice" + "github.com/kcoderhtml/hackatime/utils" + "log/slog" + + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" + wakatime "github.com/kcoderhtml/hackatime/models/compat/wakatime/v1" + "github.com/muety/artifex/v2" ) // data example: https://github.com/muety/wakapi/issues/323#issuecomment-1627467052 diff --git a/services/imports/wakatime_heartbeats.go b/services/imports/wakatime_heartbeats.go index 19b2d793..8ea5d7c3 100644 --- a/services/imports/wakatime_heartbeats.go +++ b/services/imports/wakatime_heartbeats.go @@ -5,19 +5,21 @@ import ( "encoding/json" "errors" "fmt" - "github.com/alitto/pond" - "github.com/duke-git/lancet/v2/datetime" - "github.com/muety/artifex/v2" - "github.com/muety/wakapi/utils" "net/http" "strings" "time" - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - wakatime "github.com/muety/wakapi/models/compat/wakatime/v1" - "go.uber.org/atomic" + "github.com/alitto/pond" + "github.com/duke-git/lancet/v2/datetime" + "github.com/kcoderhtml/hackatime/utils" + "github.com/muety/artifex/v2" + "log/slog" + + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" + wakatime "github.com/kcoderhtml/hackatime/models/compat/wakatime/v1" + "go.uber.org/atomic" ) const OriginWakatime = "wakatime" diff --git a/services/imports/wakatime_utils.go b/services/imports/wakatime_utils.go index 5d76c437..96ee2ca5 100644 --- a/services/imports/wakatime_utils.go +++ b/services/imports/wakatime_utils.go @@ -4,12 +4,13 @@ import ( "encoding/base64" "encoding/json" "fmt" - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - wakatime "github.com/muety/wakapi/models/compat/wakatime/v1" - "github.com/muety/wakapi/utils" "net/http" "time" + + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" + wakatime "github.com/kcoderhtml/hackatime/models/compat/wakatime/v1" + "github.com/kcoderhtml/hackatime/utils" ) // https://wakatime.com/api/v1/users/current/machine_names diff --git a/services/key_value.go b/services/key_value.go index 99fc039d..428ca314 100644 --- a/services/key_value.go +++ b/services/key_value.go @@ -1,9 +1,9 @@ package services import ( - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/repositories" + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" + "github.com/kcoderhtml/hackatime/repositories" ) type KeyValueService struct { diff --git a/services/language_mapping.go b/services/language_mapping.go index 73241183..9139e923 100644 --- a/services/language_mapping.go +++ b/services/language_mapping.go @@ -2,11 +2,12 @@ package services import ( "errors" - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/repositories" - "github.com/patrickmn/go-cache" "time" + + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" + "github.com/kcoderhtml/hackatime/repositories" + "github.com/patrickmn/go-cache" ) type LanguageMappingService struct { diff --git a/services/leaderboard.go b/services/leaderboard.go index edab6b95..ca667a42 100644 --- a/services/leaderboard.go +++ b/services/leaderboard.go @@ -2,19 +2,20 @@ package services import ( "fmt" - "github.com/leandro-lugaresi/hub" - "github.com/muety/artifex/v2" - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/helpers" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/repositories" - "github.com/muety/wakapi/utils" - "github.com/patrickmn/go-cache" "log/slog" "reflect" "strconv" "strings" "time" + + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/helpers" + "github.com/kcoderhtml/hackatime/models" + "github.com/kcoderhtml/hackatime/repositories" + "github.com/kcoderhtml/hackatime/utils" + "github.com/leandro-lugaresi/hub" + "github.com/muety/artifex/v2" + "github.com/patrickmn/go-cache" ) type LeaderboardService struct { diff --git a/services/mail/mail.go b/services/mail/mail.go index 3c570632..a045cb53 100644 --- a/services/mail/mail.go +++ b/services/mail/mail.go @@ -5,14 +5,14 @@ import ( "fmt" "time" - "github.com/muety/wakapi/helpers" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/routes" - "github.com/muety/wakapi/services" - "github.com/muety/wakapi/utils" - "github.com/muety/wakapi/views/mail" - - conf "github.com/muety/wakapi/config" + "github.com/kcoderhtml/hackatime/helpers" + "github.com/kcoderhtml/hackatime/models" + "github.com/kcoderhtml/hackatime/routes" + "github.com/kcoderhtml/hackatime/services" + "github.com/kcoderhtml/hackatime/utils" + "github.com/kcoderhtml/hackatime/views/mail" + + conf "github.com/kcoderhtml/hackatime/config" ) const ( diff --git a/services/mail/noop.go b/services/mail/noop.go index 9c554501..c87867bc 100644 --- a/services/mail/noop.go +++ b/services/mail/noop.go @@ -1,8 +1,9 @@ package mail import ( - "github.com/muety/wakapi/models" "log/slog" + + "github.com/kcoderhtml/hackatime/models" ) type NoopSendingService struct{} diff --git a/services/mail/smtp.go b/services/mail/smtp.go index 9cae7f9a..015fe272 100644 --- a/services/mail/smtp.go +++ b/services/mail/smtp.go @@ -3,11 +3,12 @@ package mail import ( "crypto/tls" "errors" + "io" + "github.com/emersion/go-sasl" "github.com/emersion/go-smtp" - conf "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - "io" + conf "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" ) type SMTPSendingService struct { diff --git a/services/mail/smtp_test.go b/services/mail/smtp_test.go index 2cd721aa..24129147 100644 --- a/services/mail/smtp_test.go +++ b/services/mail/smtp_test.go @@ -20,9 +20,9 @@ import ( "log/slog" - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/utils" + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" + "github.com/kcoderhtml/hackatime/utils" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/suite" ) diff --git a/services/mail/types.go b/services/mail/types.go index 9f95c782..7e8b236a 100644 --- a/services/mail/types.go +++ b/services/mail/types.go @@ -1,6 +1,6 @@ package mail -import "github.com/muety/wakapi/models" +import "github.com/kcoderhtml/hackatime/models" type PasswordResetTplData struct { ResetLink string diff --git a/services/misc.go b/services/misc.go index af09c584..9a7c9cd8 100644 --- a/services/misc.go +++ b/services/misc.go @@ -2,18 +2,19 @@ package services import ( "fmt" - "github.com/duke-git/lancet/v2/slice" - "github.com/muety/artifex/v2" - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/utils" - "go.uber.org/atomic" "log/slog" "strconv" "strings" "sync" "time" - "github.com/muety/wakapi/models" + "github.com/duke-git/lancet/v2/slice" + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/utils" + "github.com/muety/artifex/v2" + "go.uber.org/atomic" + + "github.com/kcoderhtml/hackatime/models" ) const ( diff --git a/services/project_label.go b/services/project_label.go index 0936ced3..10c7b342 100644 --- a/services/project_label.go +++ b/services/project_label.go @@ -2,13 +2,14 @@ package services import ( "errors" + "time" + "github.com/duke-git/lancet/v2/slice" + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" + "github.com/kcoderhtml/hackatime/repositories" "github.com/leandro-lugaresi/hub" - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/repositories" "github.com/patrickmn/go-cache" - "time" ) type ProjectLabelService struct { diff --git a/services/report.go b/services/report.go index 1a1c665e..9997ea49 100644 --- a/services/report.go +++ b/services/report.go @@ -1,16 +1,17 @@ package services import ( + "log/slog" + "math/rand" + "time" + "github.com/duke-git/lancet/v2/datetime" "github.com/duke-git/lancet/v2/slice" + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" + "github.com/kcoderhtml/hackatime/utils" "github.com/leandro-lugaresi/hub" "github.com/muety/artifex/v2" - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/utils" - "log/slog" - "math/rand" - "time" ) // delay between evey report generation task (to throttle email sending frequency) diff --git a/services/services.go b/services/services.go index c1054fe2..557969fd 100644 --- a/services/services.go +++ b/services/services.go @@ -1,11 +1,12 @@ package services import ( - datastructure "github.com/duke-git/lancet/v2/datastructure/set" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/models/types" - "github.com/muety/wakapi/utils" "time" + + datastructure "github.com/duke-git/lancet/v2/datastructure/set" + "github.com/kcoderhtml/hackatime/models" + "github.com/kcoderhtml/hackatime/models/types" + "github.com/kcoderhtml/hackatime/utils" ) type IAggregationService interface { diff --git a/services/summary.go b/services/summary.go index 425968d4..a856394b 100644 --- a/services/summary.go +++ b/services/summary.go @@ -2,19 +2,20 @@ package services import ( "errors" + "log/slog" + "sort" + "strings" + "time" + "github.com/becheran/wildmatch-go" "github.com/duke-git/lancet/v2/datetime" "github.com/duke-git/lancet/v2/slice" + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" + "github.com/kcoderhtml/hackatime/models/types" + "github.com/kcoderhtml/hackatime/repositories" "github.com/leandro-lugaresi/hub" - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/models/types" - "github.com/muety/wakapi/repositories" "github.com/patrickmn/go-cache" - "log/slog" - "sort" - "strings" - "time" ) type SummaryService struct { diff --git a/services/summary_test.go b/services/summary_test.go index 81561e8a..1b0730ea 100644 --- a/services/summary_test.go +++ b/services/summary_test.go @@ -1,15 +1,16 @@ package services import ( - "github.com/muety/wakapi/mocks" - "github.com/muety/wakapi/models" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/mock" - "github.com/stretchr/testify/suite" "math/rand" "strings" "testing" "time" + + "github.com/kcoderhtml/hackatime/mocks" + "github.com/kcoderhtml/hackatime/models" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/suite" ) const ( diff --git a/services/user.go b/services/user.go index 7368e4c0..bcd393a3 100644 --- a/services/user.go +++ b/services/user.go @@ -3,17 +3,18 @@ package services import ( "errors" "fmt" + "log/slog" + "time" + "github.com/duke-git/lancet/v2/convertor" "github.com/duke-git/lancet/v2/datetime" "github.com/gofrs/uuid/v5" + "github.com/kcoderhtml/hackatime/config" + "github.com/kcoderhtml/hackatime/models" + "github.com/kcoderhtml/hackatime/repositories" + "github.com/kcoderhtml/hackatime/utils" "github.com/leandro-lugaresi/hub" - "github.com/muety/wakapi/config" - "github.com/muety/wakapi/models" - "github.com/muety/wakapi/repositories" - "github.com/muety/wakapi/utils" "github.com/patrickmn/go-cache" - "log/slog" - "time" ) type UserService struct {