diff --git a/.gitignore b/.gitignore index f7be56e..578ee75 100644 --- a/.gitignore +++ b/.gitignore @@ -17,9 +17,10 @@ .DS_Store -cq-ticketing +cq-source-ticketing .cq dist -*.log \ No newline at end of file +*.log +config.yml \ No newline at end of file diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 73e8fc9..89afccf 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -8,7 +8,7 @@ builds: - CGO_ENABLED=0 - GO111MODULE=on ldflags: - - -s -w -X github.com/poozlehq/cq-ticketing/plugin.Version={{.Version}} + - -s -w -X github.com/poozlehq/cq-source-ticketing/plugin.Version={{.Version}} goos: - windows - linux diff --git a/README.md b/README.md index 5c31a8a..f44448c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # CloudQuery ticketing Source Plugin -[![test](https://github.com/poozlehq/cq-ticketing/actions/workflows/test.yaml/badge.svg)](https://github.com/poozlehq/cq-ticketing/actions/workflows/test.yaml) -[![Go Report Card](https://goreportcard.com/badge/github.com/poozlehq/cq-ticketing)](https://goreportcard.com/report/github.com/poozlehq/cq-ticketing) +[![test](https://github.com/poozlehq/cq-source-ticketing/actions/workflows/test.yaml/badge.svg)](https://github.com/poozlehq/cq-source-ticketing/actions/workflows/test.yaml) +[![Go Report Card](https://goreportcard.com/badge/github.com/poozlehq/cq-source-ticketing)](https://goreportcard.com/report/github.com/poozlehq/cq-source-ticketing) A ticketing source plugin for CloudQuery that loads data from ticketing to any database, data warehouse or data lake supported by [CloudQuery](https://www.cloudquery.io/), such as PostgreSQL, BigQuery, Athena, and many more. diff --git a/client/client.go b/client/client.go index c9c85fc..680dc79 100644 --- a/client/client.go +++ b/client/client.go @@ -4,7 +4,7 @@ import ( "fmt" "github.com/cloudquery/plugin-sdk/v4/state" - "github.com/poozlehq/cq-ticketing/internal/ticketing" + "github.com/poozlehq/cq-source-ticketing/internal/ticketing" "github.com/rs/zerolog" ) diff --git a/go.mod b/go.mod index 3797e7e..47c0c61 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/poozlehq/cq-ticketing +module github.com/poozlehq/cq-source-ticketing go 1.19 diff --git a/internal/ticketing/ticketing.go b/internal/ticketing/ticketing.go index 7a7cf85..8f52e29 100644 --- a/internal/ticketing/ticketing.go +++ b/internal/ticketing/ticketing.go @@ -13,7 +13,7 @@ import ( "strings" "time" - "github.com/poozlehq/cq-ticketing/internal/httperror" + "github.com/poozlehq/cq-source-ticketing/internal/httperror" "github.com/rs/zerolog" "github.com/rs/zerolog/log" "golang.org/x/time/rate" diff --git a/main.go b/main.go index fbd2412..be54d76 100644 --- a/main.go +++ b/main.go @@ -5,7 +5,7 @@ import ( "log" "github.com/cloudquery/plugin-sdk/v4/serve" - "github.com/poozlehq/cq-ticketing/resources/plugin" + "github.com/poozlehq/cq-source-ticketing/resources/plugin" ) const sentryDSN = "https://99f66f1a627f48deb66e49a25d6028a6@o1396617.ingest.sentry.io/6747628" diff --git a/resources/plugin/client.go b/resources/plugin/client.go index d9cea25..30e784a 100644 --- a/resources/plugin/client.go +++ b/resources/plugin/client.go @@ -12,8 +12,8 @@ import ( "github.com/cloudquery/plugin-sdk/v4/scheduler" "github.com/cloudquery/plugin-sdk/v4/schema" "github.com/cloudquery/plugin-sdk/v4/state" - "github.com/poozlehq/cq-ticketing/client" - "github.com/poozlehq/cq-ticketing/internal/ticketing" + "github.com/poozlehq/cq-source-ticketing/client" + "github.com/poozlehq/cq-source-ticketing/internal/ticketing" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" @@ -102,7 +102,7 @@ func Configure(_ context.Context, logger zerolog.Logger, specBytes []byte, opts } services, err := ticketing.New(ticketing.ClientOptions{ - Log: logger.With().Str("source", "cq-ticketing").Logger(), + Log: logger.With().Str("source", "cq-source-ticketing").Logger(), HC: &http.Client{ Timeout: time.Duration(config.Timeout) * time.Second, }, diff --git a/resources/plugin/tables.go b/resources/plugin/tables.go index bac9379..e5600a4 100644 --- a/resources/plugin/tables.go +++ b/resources/plugin/tables.go @@ -3,7 +3,7 @@ package plugin import ( "github.com/cloudquery/plugin-sdk/v4/schema" "github.com/cloudquery/plugin-sdk/v4/transformers" - resources "github.com/poozlehq/cq-ticketing/resources/services" + resources "github.com/poozlehq/cq-source-ticketing/resources/services" ) func getTables() []*schema.Table { diff --git a/resources/services/collection.go b/resources/services/collection.go index 513af30..c1dbc28 100644 --- a/resources/services/collection.go +++ b/resources/services/collection.go @@ -11,8 +11,8 @@ import ( "github.com/apache/arrow/go/v13/arrow" "github.com/cloudquery/plugin-sdk/v4/schema" "github.com/cloudquery/plugin-sdk/v4/transformers" - "github.com/poozlehq/cq-ticketing/client" - "github.com/poozlehq/cq-ticketing/internal/ticketing" + "github.com/poozlehq/cq-source-ticketing/client" + "github.com/poozlehq/cq-source-ticketing/internal/ticketing" ) func Collection() *schema.Table { diff --git a/resources/services/comment.go b/resources/services/comment.go index 1908013..e708b3c 100644 --- a/resources/services/comment.go +++ b/resources/services/comment.go @@ -9,8 +9,8 @@ import ( "github.com/apache/arrow/go/v13/arrow" "github.com/cloudquery/plugin-sdk/v4/schema" "github.com/cloudquery/plugin-sdk/v4/transformers" - "github.com/poozlehq/cq-ticketing/client" - "github.com/poozlehq/cq-ticketing/internal/ticketing" + "github.com/poozlehq/cq-source-ticketing/client" + "github.com/poozlehq/cq-source-ticketing/internal/ticketing" ) func Comment() *schema.Table { diff --git a/resources/services/tag.go b/resources/services/tag.go index b693e91..cbd2a77 100644 --- a/resources/services/tag.go +++ b/resources/services/tag.go @@ -11,8 +11,8 @@ import ( "github.com/apache/arrow/go/v13/arrow" "github.com/cloudquery/plugin-sdk/v4/schema" "github.com/cloudquery/plugin-sdk/v4/transformers" - "github.com/poozlehq/cq-ticketing/client" - "github.com/poozlehq/cq-ticketing/internal/ticketing" + "github.com/poozlehq/cq-source-ticketing/client" + "github.com/poozlehq/cq-source-ticketing/internal/ticketing" ) func Tag() *schema.Table { diff --git a/resources/services/team.go b/resources/services/team.go index 0571908..b04af66 100644 --- a/resources/services/team.go +++ b/resources/services/team.go @@ -11,8 +11,8 @@ import ( "github.com/apache/arrow/go/v13/arrow" "github.com/cloudquery/plugin-sdk/v4/schema" "github.com/cloudquery/plugin-sdk/v4/transformers" - "github.com/poozlehq/cq-ticketing/client" - "github.com/poozlehq/cq-ticketing/internal/ticketing" + "github.com/poozlehq/cq-source-ticketing/client" + "github.com/poozlehq/cq-source-ticketing/internal/ticketing" ) func Team() *schema.Table { diff --git a/resources/services/ticket.go b/resources/services/ticket.go index 08d5def..3db3eff 100644 --- a/resources/services/ticket.go +++ b/resources/services/ticket.go @@ -10,8 +10,8 @@ import ( "github.com/apache/arrow/go/v13/arrow" "github.com/cloudquery/plugin-sdk/v4/schema" "github.com/cloudquery/plugin-sdk/v4/transformers" - "github.com/poozlehq/cq-ticketing/client" - "github.com/poozlehq/cq-ticketing/internal/ticketing" + "github.com/poozlehq/cq-source-ticketing/client" + "github.com/poozlehq/cq-source-ticketing/internal/ticketing" ) func Ticket() *schema.Table { diff --git a/resources/services/user.go b/resources/services/user.go index 8324fd8..afcb167 100644 --- a/resources/services/user.go +++ b/resources/services/user.go @@ -11,8 +11,8 @@ import ( "github.com/apache/arrow/go/v13/arrow" "github.com/cloudquery/plugin-sdk/v4/schema" "github.com/cloudquery/plugin-sdk/v4/transformers" - "github.com/poozlehq/cq-ticketing/client" - "github.com/poozlehq/cq-ticketing/internal/ticketing" + "github.com/poozlehq/cq-source-ticketing/client" + "github.com/poozlehq/cq-source-ticketing/internal/ticketing" ) func User() *schema.Table {