From 9773238b727b897dca233048b5c0dd3e5f82fb86 Mon Sep 17 00:00:00 2001 From: Artem Sidorenko Date: Thu, 7 Mar 2019 22:10:10 +0100 Subject: [PATCH] Refactoring: datasource is a better name for data sources Signed-off-by: Artem Sidorenko --- cli/commands/generate/generate.go | 4 ++-- {source => datasource}/connectors/connectors.go | 0 {source => datasource}/connectors/connectors_test.go | 2 +- {source => datasource}/connectors/github/github.go | 4 ++-- {source => datasource}/connectors/github/github_test.go | 6 +++--- {source => datasource}/connectors/github/helpers.go | 2 +- .../connectors/github/internal/client/client.go | 0 .../connectors/github/internal/client/interfaces.go | 0 .../connectors/github/internal/testclient/generators.go | 2 +- .../connectors/github/internal/testclient/helpers.go | 0 .../connectors/github/internal/testclient/testclient.go | 4 ++-- {source => datasource}/connectors/github/issues.go | 2 +- {source => datasource}/connectors/github/issues_test.go | 4 ++-- {source => datasource}/connectors/github/prs.go | 2 +- {source => datasource}/connectors/github/prs_test.go | 4 ++-- {source => datasource}/connectors/github/tags.go | 2 +- {source => datasource}/connectors/github/tags_test.go | 4 ++-- {source => datasource}/connectors/github/urls.go | 0 {source => datasource}/connectors/github/urls_test.go | 2 +- {source => datasource}/connectors/gitlab/gitlab.go | 4 ++-- {source => datasource}/connectors/gitlab/gitlab_test.go | 6 +++--- {source => datasource}/connectors/gitlab/helpers.go | 2 +- .../connectors/gitlab/internal/client/client.go | 0 .../connectors/gitlab/internal/client/interfaces.go | 0 .../connectors/gitlab/internal/testclient/generators.go | 0 .../connectors/gitlab/internal/testclient/helpers.go | 0 .../connectors/gitlab/internal/testclient/testclient.go | 4 ++-- {source => datasource}/connectors/gitlab/issues.go | 2 +- {source => datasource}/connectors/gitlab/issues_test.go | 4 ++-- {source => datasource}/connectors/gitlab/mrs.go | 2 +- {source => datasource}/connectors/gitlab/mrs_test.go | 4 ++-- {source => datasource}/connectors/gitlab/tags.go | 2 +- {source => datasource}/connectors/gitlab/tags_test.go | 4 ++-- {source => datasource}/connectors/gitlab/urls.go | 0 {source => datasource}/connectors/gitlab/urls_test.go | 2 +- {source => datasource}/connectors/helpers/helpers.go | 0 {source => datasource}/connectors/interface.go | 0 .../internal/testing/apitestdata/apitestdata.go | 0 .../connectors/internal/testing/apitestdata/commits.go | 0 .../connectors/internal/testing/apitestdata/issues.go | 0 .../connectors/internal/testing/apitestdata/mrs.go | 0 .../connectors/internal/testing/apitestdata/tags.go | 2 +- source/source.go => datasource/datasource.go | 8 ++++---- internal/testing/testconnector/testconnector.go | 2 +- 44 files changed, 46 insertions(+), 46 deletions(-) rename {source => datasource}/connectors/connectors.go (100%) rename {source => datasource}/connectors/connectors_test.go (98%) rename {source => datasource}/connectors/github/github.go (95%) rename {source => datasource}/connectors/github/github_test.go (94%) rename {source => datasource}/connectors/github/helpers.go (92%) rename {source => datasource}/connectors/github/internal/client/client.go (100%) rename {source => datasource}/connectors/github/internal/client/interfaces.go (100%) rename {source => datasource}/connectors/github/internal/testclient/generators.go (97%) rename {source => datasource}/connectors/github/internal/testclient/helpers.go (100%) rename {source => datasource}/connectors/github/internal/testclient/testclient.go (97%) rename {source => datasource}/connectors/github/issues.go (98%) rename {source => datasource}/connectors/github/issues_test.go (96%) rename {source => datasource}/connectors/github/prs.go (98%) rename {source => datasource}/connectors/github/prs_test.go (97%) rename {source => datasource}/connectors/github/tags.go (99%) rename {source => datasource}/connectors/github/tags_test.go (97%) rename {source => datasource}/connectors/github/urls.go (100%) rename {source => datasource}/connectors/github/urls_test.go (96%) rename {source => datasource}/connectors/gitlab/gitlab.go (95%) rename {source => datasource}/connectors/gitlab/gitlab_test.go (94%) rename {source => datasource}/connectors/gitlab/helpers.go (76%) rename {source => datasource}/connectors/gitlab/internal/client/client.go (100%) rename {source => datasource}/connectors/gitlab/internal/client/interfaces.go (100%) rename {source => datasource}/connectors/gitlab/internal/testclient/generators.go (100%) rename {source => datasource}/connectors/gitlab/internal/testclient/helpers.go (100%) rename {source => datasource}/connectors/gitlab/internal/testclient/testclient.go (97%) rename {source => datasource}/connectors/gitlab/issues.go (98%) rename {source => datasource}/connectors/gitlab/issues_test.go (96%) rename {source => datasource}/connectors/gitlab/mrs.go (98%) rename {source => datasource}/connectors/gitlab/mrs_test.go (97%) rename {source => datasource}/connectors/gitlab/tags.go (98%) rename {source => datasource}/connectors/gitlab/tags_test.go (96%) rename {source => datasource}/connectors/gitlab/urls.go (100%) rename {source => datasource}/connectors/gitlab/urls_test.go (94%) rename {source => datasource}/connectors/helpers/helpers.go (100%) rename {source => datasource}/connectors/interface.go (100%) rename {source => datasource}/connectors/internal/testing/apitestdata/apitestdata.go (100%) rename {source => datasource}/connectors/internal/testing/apitestdata/commits.go (100%) rename {source => datasource}/connectors/internal/testing/apitestdata/issues.go (100%) rename {source => datasource}/connectors/internal/testing/apitestdata/mrs.go (100%) rename {source => datasource}/connectors/internal/testing/apitestdata/tags.go (96%) rename source/source.go => datasource/datasource.go (71%) diff --git a/cli/commands/generate/generate.go b/cli/commands/generate/generate.go index 4800d04..5a0e622 100644 --- a/cli/commands/generate/generate.go +++ b/cli/commands/generate/generate.go @@ -31,8 +31,8 @@ import ( "github.com/artem-sidorenko/chagen/generator" // some of connectors control functionality will be moved to source at some point - _ "github.com/artem-sidorenko/chagen/source" - "github.com/artem-sidorenko/chagen/source/connectors" + _ "github.com/artem-sidorenko/chagen/datasource" + "github.com/artem-sidorenko/chagen/datasource/connectors" "github.com/urfave/cli" ) diff --git a/source/connectors/connectors.go b/datasource/connectors/connectors.go similarity index 100% rename from source/connectors/connectors.go rename to datasource/connectors/connectors.go diff --git a/source/connectors/connectors_test.go b/datasource/connectors/connectors_test.go similarity index 98% rename from source/connectors/connectors_test.go rename to datasource/connectors/connectors_test.go index 683c0e4..faa7a12 100644 --- a/source/connectors/connectors_test.go +++ b/datasource/connectors/connectors_test.go @@ -24,7 +24,7 @@ import ( "testing" "github.com/artem-sidorenko/chagen/data" - "github.com/artem-sidorenko/chagen/source/connectors" + "github.com/artem-sidorenko/chagen/datasource/connectors" "github.com/urfave/cli" ) diff --git a/source/connectors/github/github.go b/datasource/connectors/github/github.go similarity index 95% rename from source/connectors/github/github.go rename to datasource/connectors/github/github.go index 19ee29a..553254f 100644 --- a/source/connectors/github/github.go +++ b/datasource/connectors/github/github.go @@ -23,8 +23,8 @@ import ( "fmt" "os" - "github.com/artem-sidorenko/chagen/source/connectors" - "github.com/artem-sidorenko/chagen/source/connectors/github/internal/client" + "github.com/artem-sidorenko/chagen/datasource/connectors" + "github.com/artem-sidorenko/chagen/datasource/connectors/github/internal/client" "github.com/urfave/cli" ) diff --git a/source/connectors/github/github_test.go b/datasource/connectors/github/github_test.go similarity index 94% rename from source/connectors/github/github_test.go rename to datasource/connectors/github/github_test.go index f989c5c..e4d9c24 100644 --- a/source/connectors/github/github_test.go +++ b/datasource/connectors/github/github_test.go @@ -22,10 +22,10 @@ import ( "reflect" "testing" + "github.com/artem-sidorenko/chagen/datasource/connectors" + "github.com/artem-sidorenko/chagen/datasource/connectors/github" + "github.com/artem-sidorenko/chagen/datasource/connectors/github/internal/testclient" tcli "github.com/artem-sidorenko/chagen/internal/testing/cli" - "github.com/artem-sidorenko/chagen/source/connectors" - "github.com/artem-sidorenko/chagen/source/connectors/github" - "github.com/artem-sidorenko/chagen/source/connectors/github/internal/testclient" ) func setupTestConnector( diff --git a/source/connectors/github/helpers.go b/datasource/connectors/github/helpers.go similarity index 92% rename from source/connectors/github/helpers.go rename to datasource/connectors/github/helpers.go index 8c168f3..687c089 100644 --- a/source/connectors/github/helpers.go +++ b/datasource/connectors/github/helpers.go @@ -17,7 +17,7 @@ package github import ( - "github.com/artem-sidorenko/chagen/source/connectors/helpers" + "github.com/artem-sidorenko/chagen/datasource/connectors/helpers" ) // formatErrorCode formats the error message for this connector diff --git a/source/connectors/github/internal/client/client.go b/datasource/connectors/github/internal/client/client.go similarity index 100% rename from source/connectors/github/internal/client/client.go rename to datasource/connectors/github/internal/client/client.go diff --git a/source/connectors/github/internal/client/interfaces.go b/datasource/connectors/github/internal/client/interfaces.go similarity index 100% rename from source/connectors/github/internal/client/interfaces.go rename to datasource/connectors/github/internal/client/interfaces.go diff --git a/source/connectors/github/internal/testclient/generators.go b/datasource/connectors/github/internal/testclient/generators.go similarity index 97% rename from source/connectors/github/internal/testclient/generators.go rename to datasource/connectors/github/internal/testclient/generators.go index 919ee3f..76c7f48 100644 --- a/source/connectors/github/internal/testclient/generators.go +++ b/datasource/connectors/github/internal/testclient/generators.go @@ -20,7 +20,7 @@ import ( "net/http" "time" - "github.com/artem-sidorenko/chagen/source/connectors/helpers" + "github.com/artem-sidorenko/chagen/datasource/connectors/helpers" "github.com/google/go-github/github" ) diff --git a/source/connectors/github/internal/testclient/helpers.go b/datasource/connectors/github/internal/testclient/helpers.go similarity index 100% rename from source/connectors/github/internal/testclient/helpers.go rename to datasource/connectors/github/internal/testclient/helpers.go diff --git a/source/connectors/github/internal/testclient/testclient.go b/datasource/connectors/github/internal/testclient/testclient.go similarity index 97% rename from source/connectors/github/internal/testclient/testclient.go rename to datasource/connectors/github/internal/testclient/testclient.go index 979606c..b90ff22 100644 --- a/source/connectors/github/internal/testclient/testclient.go +++ b/datasource/connectors/github/internal/testclient/testclient.go @@ -22,8 +22,8 @@ import ( "context" "fmt" - "github.com/artem-sidorenko/chagen/source/connectors/github/internal/client" - "github.com/artem-sidorenko/chagen/source/connectors/internal/testing/apitestdata" + "github.com/artem-sidorenko/chagen/datasource/connectors/github/internal/client" + "github.com/artem-sidorenko/chagen/datasource/connectors/internal/testing/apitestdata" "github.com/google/go-github/github" ) diff --git a/source/connectors/github/issues.go b/datasource/connectors/github/issues.go similarity index 98% rename from source/connectors/github/issues.go rename to datasource/connectors/github/issues.go index c896643..aeb24b9 100644 --- a/source/connectors/github/issues.go +++ b/datasource/connectors/github/issues.go @@ -20,7 +20,7 @@ import ( "context" "sync" - "github.com/artem-sidorenko/chagen/source/connectors/helpers" + "github.com/artem-sidorenko/chagen/datasource/connectors/helpers" "github.com/artem-sidorenko/chagen/data" diff --git a/source/connectors/github/issues_test.go b/datasource/connectors/github/issues_test.go similarity index 96% rename from source/connectors/github/issues_test.go rename to datasource/connectors/github/issues_test.go index a3ab6d8..fc55c79 100644 --- a/source/connectors/github/issues_test.go +++ b/datasource/connectors/github/issues_test.go @@ -25,9 +25,9 @@ import ( "time" "github.com/artem-sidorenko/chagen/data" + "github.com/artem-sidorenko/chagen/datasource/connectors/github" + "github.com/artem-sidorenko/chagen/datasource/connectors/github/internal/testclient" "github.com/artem-sidorenko/chagen/internal/testing/helpers" - "github.com/artem-sidorenko/chagen/source/connectors/github" - "github.com/artem-sidorenko/chagen/source/connectors/github/internal/testclient" ) func TestConnector_Issues(t *testing.T) { diff --git a/source/connectors/github/prs.go b/datasource/connectors/github/prs.go similarity index 98% rename from source/connectors/github/prs.go rename to datasource/connectors/github/prs.go index 2033b57..13deae1 100644 --- a/source/connectors/github/prs.go +++ b/datasource/connectors/github/prs.go @@ -21,7 +21,7 @@ import ( "sync" "time" - "github.com/artem-sidorenko/chagen/source/connectors/helpers" + "github.com/artem-sidorenko/chagen/datasource/connectors/helpers" "github.com/artem-sidorenko/chagen/data" diff --git a/source/connectors/github/prs_test.go b/datasource/connectors/github/prs_test.go similarity index 97% rename from source/connectors/github/prs_test.go rename to datasource/connectors/github/prs_test.go index 49b009e..72a5efc 100644 --- a/source/connectors/github/prs_test.go +++ b/datasource/connectors/github/prs_test.go @@ -25,9 +25,9 @@ import ( "time" "github.com/artem-sidorenko/chagen/data" + "github.com/artem-sidorenko/chagen/datasource/connectors/github" + "github.com/artem-sidorenko/chagen/datasource/connectors/github/internal/testclient" "github.com/artem-sidorenko/chagen/internal/testing/helpers" - "github.com/artem-sidorenko/chagen/source/connectors/github" - "github.com/artem-sidorenko/chagen/source/connectors/github/internal/testclient" ) func TestConnector_MRs(t *testing.T) { diff --git a/source/connectors/github/tags.go b/datasource/connectors/github/tags.go similarity index 99% rename from source/connectors/github/tags.go rename to datasource/connectors/github/tags.go index 8107955..0e85f4c 100644 --- a/source/connectors/github/tags.go +++ b/datasource/connectors/github/tags.go @@ -20,7 +20,7 @@ import ( "context" "sync" - "github.com/artem-sidorenko/chagen/source/connectors/helpers" + "github.com/artem-sidorenko/chagen/datasource/connectors/helpers" "github.com/artem-sidorenko/chagen/data" diff --git a/source/connectors/github/tags_test.go b/datasource/connectors/github/tags_test.go similarity index 97% rename from source/connectors/github/tags_test.go rename to datasource/connectors/github/tags_test.go index ed8605d..8915bd6 100644 --- a/source/connectors/github/tags_test.go +++ b/datasource/connectors/github/tags_test.go @@ -25,9 +25,9 @@ import ( "time" "github.com/artem-sidorenko/chagen/data" + "github.com/artem-sidorenko/chagen/datasource/connectors/github" + "github.com/artem-sidorenko/chagen/datasource/connectors/github/internal/testclient" "github.com/artem-sidorenko/chagen/internal/testing/helpers" - "github.com/artem-sidorenko/chagen/source/connectors/github" - "github.com/artem-sidorenko/chagen/source/connectors/github/internal/testclient" ) func TestConnector_Tags(t *testing.T) { diff --git a/source/connectors/github/urls.go b/datasource/connectors/github/urls.go similarity index 100% rename from source/connectors/github/urls.go rename to datasource/connectors/github/urls.go diff --git a/source/connectors/github/urls_test.go b/datasource/connectors/github/urls_test.go similarity index 96% rename from source/connectors/github/urls_test.go rename to datasource/connectors/github/urls_test.go index 576ac37..8d63082 100644 --- a/source/connectors/github/urls_test.go +++ b/datasource/connectors/github/urls_test.go @@ -19,7 +19,7 @@ package github_test import ( "testing" - "github.com/artem-sidorenko/chagen/source/connectors/github/internal/testclient" + "github.com/artem-sidorenko/chagen/datasource/connectors/github/internal/testclient" ) func TestGetNewTagURL(t *testing.T) { diff --git a/source/connectors/gitlab/gitlab.go b/datasource/connectors/gitlab/gitlab.go similarity index 95% rename from source/connectors/gitlab/gitlab.go rename to datasource/connectors/gitlab/gitlab.go index ba4c6de..e90b00c 100644 --- a/source/connectors/gitlab/gitlab.go +++ b/datasource/connectors/gitlab/gitlab.go @@ -23,8 +23,8 @@ import ( "fmt" "os" - "github.com/artem-sidorenko/chagen/source/connectors" - "github.com/artem-sidorenko/chagen/source/connectors/gitlab/internal/client" + "github.com/artem-sidorenko/chagen/datasource/connectors" + "github.com/artem-sidorenko/chagen/datasource/connectors/gitlab/internal/client" "github.com/urfave/cli" ) diff --git a/source/connectors/gitlab/gitlab_test.go b/datasource/connectors/gitlab/gitlab_test.go similarity index 94% rename from source/connectors/gitlab/gitlab_test.go rename to datasource/connectors/gitlab/gitlab_test.go index e60103c..65a2803 100644 --- a/source/connectors/gitlab/gitlab_test.go +++ b/datasource/connectors/gitlab/gitlab_test.go @@ -22,10 +22,10 @@ import ( "reflect" "testing" + "github.com/artem-sidorenko/chagen/datasource/connectors" + "github.com/artem-sidorenko/chagen/datasource/connectors/gitlab" + "github.com/artem-sidorenko/chagen/datasource/connectors/gitlab/internal/testclient" tcli "github.com/artem-sidorenko/chagen/internal/testing/cli" - "github.com/artem-sidorenko/chagen/source/connectors" - "github.com/artem-sidorenko/chagen/source/connectors/gitlab" - "github.com/artem-sidorenko/chagen/source/connectors/gitlab/internal/testclient" ) func setupTestConnector( diff --git a/source/connectors/gitlab/helpers.go b/datasource/connectors/gitlab/helpers.go similarity index 76% rename from source/connectors/gitlab/helpers.go rename to datasource/connectors/gitlab/helpers.go index 0881fc9..4533054 100644 --- a/source/connectors/gitlab/helpers.go +++ b/datasource/connectors/gitlab/helpers.go @@ -1,7 +1,7 @@ package gitlab import ( - "github.com/artem-sidorenko/chagen/source/connectors/helpers" + "github.com/artem-sidorenko/chagen/datasource/connectors/helpers" ) // formatErrorCode formats the error message for this connector diff --git a/source/connectors/gitlab/internal/client/client.go b/datasource/connectors/gitlab/internal/client/client.go similarity index 100% rename from source/connectors/gitlab/internal/client/client.go rename to datasource/connectors/gitlab/internal/client/client.go diff --git a/source/connectors/gitlab/internal/client/interfaces.go b/datasource/connectors/gitlab/internal/client/interfaces.go similarity index 100% rename from source/connectors/gitlab/internal/client/interfaces.go rename to datasource/connectors/gitlab/internal/client/interfaces.go diff --git a/source/connectors/gitlab/internal/testclient/generators.go b/datasource/connectors/gitlab/internal/testclient/generators.go similarity index 100% rename from source/connectors/gitlab/internal/testclient/generators.go rename to datasource/connectors/gitlab/internal/testclient/generators.go diff --git a/source/connectors/gitlab/internal/testclient/helpers.go b/datasource/connectors/gitlab/internal/testclient/helpers.go similarity index 100% rename from source/connectors/gitlab/internal/testclient/helpers.go rename to datasource/connectors/gitlab/internal/testclient/helpers.go diff --git a/source/connectors/gitlab/internal/testclient/testclient.go b/datasource/connectors/gitlab/internal/testclient/testclient.go similarity index 97% rename from source/connectors/gitlab/internal/testclient/testclient.go rename to datasource/connectors/gitlab/internal/testclient/testclient.go index 2a6ce2d..19dcba4 100644 --- a/source/connectors/gitlab/internal/testclient/testclient.go +++ b/datasource/connectors/gitlab/internal/testclient/testclient.go @@ -21,8 +21,8 @@ import ( "fmt" "time" - "github.com/artem-sidorenko/chagen/source/connectors/gitlab/internal/client" - "github.com/artem-sidorenko/chagen/source/connectors/internal/testing/apitestdata" + "github.com/artem-sidorenko/chagen/datasource/connectors/gitlab/internal/client" + "github.com/artem-sidorenko/chagen/datasource/connectors/internal/testing/apitestdata" gitlab "github.com/xanzy/go-gitlab" ) diff --git a/source/connectors/gitlab/issues.go b/datasource/connectors/gitlab/issues.go similarity index 98% rename from source/connectors/gitlab/issues.go rename to datasource/connectors/gitlab/issues.go index 89be670..2ddd4b5 100644 --- a/source/connectors/gitlab/issues.go +++ b/datasource/connectors/gitlab/issues.go @@ -21,7 +21,7 @@ import ( "sync" "github.com/artem-sidorenko/chagen/data" - "github.com/artem-sidorenko/chagen/source/connectors/helpers" + "github.com/artem-sidorenko/chagen/datasource/connectors/helpers" gitlab "github.com/xanzy/go-gitlab" ) diff --git a/source/connectors/gitlab/issues_test.go b/datasource/connectors/gitlab/issues_test.go similarity index 96% rename from source/connectors/gitlab/issues_test.go rename to datasource/connectors/gitlab/issues_test.go index fd421e2..c793f06 100644 --- a/source/connectors/gitlab/issues_test.go +++ b/datasource/connectors/gitlab/issues_test.go @@ -26,9 +26,9 @@ import ( "time" "github.com/artem-sidorenko/chagen/data" + "github.com/artem-sidorenko/chagen/datasource/connectors/gitlab" + "github.com/artem-sidorenko/chagen/datasource/connectors/gitlab/internal/testclient" "github.com/artem-sidorenko/chagen/internal/testing/helpers" - "github.com/artem-sidorenko/chagen/source/connectors/gitlab" - "github.com/artem-sidorenko/chagen/source/connectors/gitlab/internal/testclient" ) func TestConnector_Issues(t *testing.T) { diff --git a/source/connectors/gitlab/mrs.go b/datasource/connectors/gitlab/mrs.go similarity index 98% rename from source/connectors/gitlab/mrs.go rename to datasource/connectors/gitlab/mrs.go index 338212e..4085bec 100644 --- a/source/connectors/gitlab/mrs.go +++ b/datasource/connectors/gitlab/mrs.go @@ -22,7 +22,7 @@ import ( gitlab "github.com/xanzy/go-gitlab" - "github.com/artem-sidorenko/chagen/source/connectors/helpers" + "github.com/artem-sidorenko/chagen/datasource/connectors/helpers" "github.com/artem-sidorenko/chagen/data" ) diff --git a/source/connectors/gitlab/mrs_test.go b/datasource/connectors/gitlab/mrs_test.go similarity index 97% rename from source/connectors/gitlab/mrs_test.go rename to datasource/connectors/gitlab/mrs_test.go index 9ad38f9..a4aaca5 100644 --- a/source/connectors/gitlab/mrs_test.go +++ b/datasource/connectors/gitlab/mrs_test.go @@ -25,9 +25,9 @@ import ( "time" "github.com/artem-sidorenko/chagen/data" + "github.com/artem-sidorenko/chagen/datasource/connectors/gitlab" + "github.com/artem-sidorenko/chagen/datasource/connectors/gitlab/internal/testclient" "github.com/artem-sidorenko/chagen/internal/testing/helpers" - "github.com/artem-sidorenko/chagen/source/connectors/gitlab" - "github.com/artem-sidorenko/chagen/source/connectors/gitlab/internal/testclient" ) func TestConnector_MRs(t *testing.T) { diff --git a/source/connectors/gitlab/tags.go b/datasource/connectors/gitlab/tags.go similarity index 98% rename from source/connectors/gitlab/tags.go rename to datasource/connectors/gitlab/tags.go index 023881a..6f9e615 100644 --- a/source/connectors/gitlab/tags.go +++ b/datasource/connectors/gitlab/tags.go @@ -20,7 +20,7 @@ import ( "context" "sync" - "github.com/artem-sidorenko/chagen/source/connectors/helpers" + "github.com/artem-sidorenko/chagen/datasource/connectors/helpers" "github.com/artem-sidorenko/chagen/data" gitlab "github.com/xanzy/go-gitlab" diff --git a/source/connectors/gitlab/tags_test.go b/datasource/connectors/gitlab/tags_test.go similarity index 96% rename from source/connectors/gitlab/tags_test.go rename to datasource/connectors/gitlab/tags_test.go index 7e2d659..5e97cb1 100644 --- a/source/connectors/gitlab/tags_test.go +++ b/datasource/connectors/gitlab/tags_test.go @@ -25,9 +25,9 @@ import ( "time" "github.com/artem-sidorenko/chagen/data" + "github.com/artem-sidorenko/chagen/datasource/connectors/gitlab" + "github.com/artem-sidorenko/chagen/datasource/connectors/gitlab/internal/testclient" "github.com/artem-sidorenko/chagen/internal/testing/helpers" - "github.com/artem-sidorenko/chagen/source/connectors/gitlab" - "github.com/artem-sidorenko/chagen/source/connectors/gitlab/internal/testclient" ) func TestConnector_Tags(t *testing.T) { diff --git a/source/connectors/gitlab/urls.go b/datasource/connectors/gitlab/urls.go similarity index 100% rename from source/connectors/gitlab/urls.go rename to datasource/connectors/gitlab/urls.go diff --git a/source/connectors/gitlab/urls_test.go b/datasource/connectors/gitlab/urls_test.go similarity index 94% rename from source/connectors/gitlab/urls_test.go rename to datasource/connectors/gitlab/urls_test.go index 965d056..487ef88 100644 --- a/source/connectors/gitlab/urls_test.go +++ b/datasource/connectors/gitlab/urls_test.go @@ -19,7 +19,7 @@ package gitlab_test import ( "testing" - "github.com/artem-sidorenko/chagen/source/connectors/gitlab/internal/testclient" + "github.com/artem-sidorenko/chagen/datasource/connectors/gitlab/internal/testclient" ) func TestGetNewTagURL(t *testing.T) { diff --git a/source/connectors/helpers/helpers.go b/datasource/connectors/helpers/helpers.go similarity index 100% rename from source/connectors/helpers/helpers.go rename to datasource/connectors/helpers/helpers.go diff --git a/source/connectors/interface.go b/datasource/connectors/interface.go similarity index 100% rename from source/connectors/interface.go rename to datasource/connectors/interface.go diff --git a/source/connectors/internal/testing/apitestdata/apitestdata.go b/datasource/connectors/internal/testing/apitestdata/apitestdata.go similarity index 100% rename from source/connectors/internal/testing/apitestdata/apitestdata.go rename to datasource/connectors/internal/testing/apitestdata/apitestdata.go diff --git a/source/connectors/internal/testing/apitestdata/commits.go b/datasource/connectors/internal/testing/apitestdata/commits.go similarity index 100% rename from source/connectors/internal/testing/apitestdata/commits.go rename to datasource/connectors/internal/testing/apitestdata/commits.go diff --git a/source/connectors/internal/testing/apitestdata/issues.go b/datasource/connectors/internal/testing/apitestdata/issues.go similarity index 100% rename from source/connectors/internal/testing/apitestdata/issues.go rename to datasource/connectors/internal/testing/apitestdata/issues.go diff --git a/source/connectors/internal/testing/apitestdata/mrs.go b/datasource/connectors/internal/testing/apitestdata/mrs.go similarity index 100% rename from source/connectors/internal/testing/apitestdata/mrs.go rename to datasource/connectors/internal/testing/apitestdata/mrs.go diff --git a/source/connectors/internal/testing/apitestdata/tags.go b/datasource/connectors/internal/testing/apitestdata/tags.go similarity index 96% rename from source/connectors/internal/testing/apitestdata/tags.go rename to datasource/connectors/internal/testing/apitestdata/tags.go index 3cf8c6d..3b92f1c 100644 --- a/source/connectors/internal/testing/apitestdata/tags.go +++ b/datasource/connectors/internal/testing/apitestdata/tags.go @@ -19,7 +19,7 @@ package apitestdata import ( "time" - "github.com/artem-sidorenko/chagen/source/connectors/helpers" + "github.com/artem-sidorenko/chagen/datasource/connectors/helpers" ) // Tag describes a struct with tag information diff --git a/source/source.go b/datasource/datasource.go similarity index 71% rename from source/source.go rename to datasource/datasource.go index 5fb3ffd..b9e43e0 100644 --- a/source/source.go +++ b/datasource/datasource.go @@ -14,10 +14,10 @@ limitations under the License. */ -// Package source provides the data source functionality -package source +// Package datasource provides the data source functionality +package datasource import ( - _ "github.com/artem-sidorenko/chagen/source/connectors/github" //enable github - _ "github.com/artem-sidorenko/chagen/source/connectors/gitlab" //enable gitlab + _ "github.com/artem-sidorenko/chagen/datasource/connectors/github" //enable github + _ "github.com/artem-sidorenko/chagen/datasource/connectors/gitlab" //enable gitlab ) diff --git a/internal/testing/testconnector/testconnector.go b/internal/testing/testconnector/testconnector.go index c55ced1..d2fecab 100644 --- a/internal/testing/testconnector/testconnector.go +++ b/internal/testing/testconnector/testconnector.go @@ -23,8 +23,8 @@ import ( "time" "github.com/artem-sidorenko/chagen/data" + "github.com/artem-sidorenko/chagen/datasource/connectors" "github.com/artem-sidorenko/chagen/internal/testing/testconnector/testdata" - "github.com/artem-sidorenko/chagen/source/connectors" "github.com/urfave/cli" )