Skip to content

Commit ccf6ff3

Browse files
committed
feat!: Move to go.mod to plugin-sdk
1 parent a895e9b commit ccf6ff3

17 files changed

+76
-1663
lines changed

Diff for: CONTRIBUTING.md

+16-15
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ The following is a set of guidelines for contributing to this repository.
1313
[I don't want to read this whole thing, I just have a question!!!](#i-dont-want-to-read-this-whole-thing-i-just-have-a-question)
1414

1515
[What should I know before I get started?](#what-should-i-know-before-i-get-started)
16-
* [Core](#cq-core-repo)
17-
* [SDK](#cq-provider-sdk-repo)
18-
* [Provider](#cq-provider-repos)
16+
* [CLI and Plugins](#cq-core-repo)
17+
* [SDK](#cloudquery-plugin-sdk-repo)
1918

2019
[How Can I Contribute?](#how-can-i-contribute)
2120
* [Reporting Bugs](#reporting-bugs)
@@ -37,39 +36,41 @@ This project and everyone participating in it is governed by the [CloudQuery Cod
3736

3837
### CloudQuery Architecture
3938

40-
CloudQuery has a pluggable architecture and is using the go-plugin to load, run, and communicate between providers via gRPC. To develop a new provider for CloudQuery, you don’t need to understand the inner workings of go-plugin as those are abstracted away via the [provider-sdk](#cq-provider-sdk-repo).
39+
CloudQuery has a pluggable architecture and is using grpc (go-grpc) to communicate between source plugins, cli and destination plugins. To develop a new plugin for CloudQuery, you don’t need to understand the inner workings of grpc as those are abstracted away via the [plugin-sdk](#cloudquery-plugin-sdk-repo).
40+
41+
CloudQuery has a pluggable architecture and is using the go-plugin to load, run, and communicate between plugins via gRPC. T
4142

4243
![architecture overview](https://docs.cloudquery.io/assets/images/cloudquery-architecture-02b1d1162883cd02510db2cb75c29d27.png)
4344

4445
### Breakdown of Responsibilities and Repositories
4546

46-
#### CQ Core [Repo](https://github.com/cloudquery/cloudquery):
47+
#### CQ CLI and Plugins [Mono Repo](https://github.com/cloudquery/cloudquery):
4748
- Main entry point and CLI for the user
4849
- Reading CloudQuery configuration
49-
- Downloading, verifying, and running providers
50+
- Downloading, verifying, and running plugins
5051
- Running policy packs
5152
- Repository for CQ Core can be found
5253

53-
#### CQ Provider SDK [Repo](https://github.com/cloudquery/cq-plugin-sdk):
54+
#### CloudQuery Plugin SDK [Repo](https://github.com/cloudquery/plugin-sdk):
5455
- Interacting with CQ Core for initialization and configuration
5556
- Helper functions for defining table schemas
5657
- Methods for testing the resource
57-
- Framework for running and building a provider locally
58+
- Framework for running and building a plugin locally
5859

59-
#### CQ Provider [Repos](https://github.com/search?q=org%3Acloudquery+cq-provider-&type=repositories):
60+
#### CloudQuery Plugins and CLI [Mono Repo](https://github.com/cloudquery/cloudquery):
6061
- Executed only by CQ-Core via gRPC
6162
- Interaction with remote data sources:
6263
- Initialization of clients
6364
- Authentication
6465
- Fetching of configuration information
65-
- More information about developing your own provider can be found [here](https://docs.cloudquery.io/docs/developers/developing-new-provider)
66+
- More information about developing your own plugin can be found [here](https://docs.cloudquery.io/docs/developers/developing-new-provider)
6667

6768

6869
## How Can I Contribute?
6970

7071
### Reporting Bugs
7172

72-
This section guides you through submitting a bug report for the AWS Provider for CloudQuery. Following these guidelines helps maintainers and the community understand your report :pencil:, reproduce the behavior :computer: :cloud:, and find related reports :mag_right:.
73+
This section guides you through submitting a bug report for the AWS Plugin for CloudQuery. Following these guidelines helps maintainers and the community understand your report :pencil:, reproduce the behavior :computer: :cloud:, and find related reports :mag_right:.
7374

7475
Before creating bug reports, please check [this list](#before-submitting-a-bug-report) as you might find out that you don't need to create one. When you are creating a bug report, please [include as many details as possible](#how-do-i-submit-a-good-bug-report). Fill out [the required template](.github/ISSUE_TEMPLATE/bug_report.md), the information it asks for helps us resolve issues faster.
7576

@@ -101,7 +102,7 @@ Include details about your configuration and environment:
101102

102103
### Suggesting Enhancements
103104

104-
This section guides you through submitting an enhancement suggestion for CloudQuery, including completely new features, minor improvements to existing functionality and new providers. Following these guidelines helps maintainers and the community understand your suggestion :pencil: and find related suggestions :mag_right:.
105+
This section guides you through submitting an enhancement suggestion for CloudQuery, including completely new features, minor improvements to existing functionality and new plugins. Following these guidelines helps maintainers and the community understand your suggestion :pencil: and find related suggestions :mag_right:.
105106

106107
Before creating enhancement suggestions, please check [this list](#before-submitting-an-enhancement-suggestion) as you might find out that you don't need to create one. When you are creating an enhancement suggestion, please [include as many details as possible](#how-do-i-submit-a-good-enhancement-suggestion). Fill in [the template](.github/ISSUE_TEMPLATE/feature_request.md), including the steps that you imagine you would take if the feature you're requesting existed.
107108

@@ -131,10 +132,10 @@ If you don't see any issues that you think you can help with reach out to the co
131132
#### Local Development
132133

133134
CloudQuery has the ability to be run locally with a corresponding local postgres database. To get it up and running follow the following instructions:
134-
* [Building and Running the Provider Locally](../docs/index.md)
135+
* [Building and Running the plugin Locally](../docs/index.md)
135136
* [Connecting to a database](https://docs.cloudquery.io/docs/getting-started#spawn-or-connect-to-a-database)
136-
* [Debugging a Provider](https://docs.cloudquery.io/docs/developers/debugging)
137-
* [Developing a New Provider](https://docs.cloudquery.io/docs/developers/developing-new-provider)
137+
* [Debugging a plugin](https://docs.cloudquery.io/docs/developers/debugging)
138+
* [Developing a new plugin](https://docs.cloudquery.io/docs/developers/developing-new-provider)
138139

139140
#### Commit Messages
140141

Diff for: clients/destination.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import (
44
"context"
55
"fmt"
66

7-
"github.com/cloudquery/cq-plugin-sdk/internal/pb"
8-
"github.com/cloudquery/cq-plugin-sdk/plugins"
9-
"github.com/cloudquery/cq-plugin-sdk/schema"
10-
"github.com/cloudquery/cq-plugin-sdk/specs"
7+
"github.com/cloudquery/plugin-sdk/internal/pb"
8+
"github.com/cloudquery/plugin-sdk/plugins"
9+
"github.com/cloudquery/plugin-sdk/schema"
10+
"github.com/cloudquery/plugin-sdk/specs"
1111
"github.com/vmihailenco/msgpack/v5"
1212
"google.golang.org/grpc"
1313
"gopkg.in/yaml.v3"

Diff for: clients/source.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import (
99
"io"
1010
"text/template"
1111

12-
"github.com/cloudquery/cq-plugin-sdk/internal/pb"
13-
"github.com/cloudquery/cq-plugin-sdk/schema"
14-
"github.com/cloudquery/cq-plugin-sdk/specs"
12+
"github.com/cloudquery/plugin-sdk/internal/pb"
13+
"github.com/cloudquery/plugin-sdk/schema"
14+
"github.com/cloudquery/plugin-sdk/specs"
1515
"github.com/pkg/errors"
1616
"github.com/vmihailenco/msgpack/v5"
1717
"github.com/xeipuuv/gojsonschema"

Diff for: go.mod

+12-41
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,27 @@
1-
module github.com/cloudquery/cq-plugin-sdk
1+
module github.com/cloudquery/plugin-sdk
22

33
go 1.17
44

55
require (
6-
github.com/Masterminds/squirrel v1.5.3
7-
github.com/aws/smithy-go v1.12.0
86
github.com/cloudquery/faker/v3 v3.7.7
9-
github.com/creasty/defaults v1.6.0
10-
github.com/doug-martin/goqu/v9 v9.18.0
11-
github.com/elliotchance/orderedmap v1.4.0
127
github.com/georgysavva/scany v1.0.0
138
github.com/gofrs/uuid v4.2.0+incompatible
14-
github.com/golang-migrate/migrate/v4 v4.15.2
15-
github.com/golang/mock v1.6.0
169
github.com/google/uuid v1.3.0
17-
github.com/hashicorp/errwrap v1.1.0
18-
github.com/hashicorp/go-hclog v1.2.1
19-
github.com/hashicorp/go-plugin v1.4.4
20-
github.com/hashicorp/go-version v1.6.0
21-
github.com/hashicorp/hcl/v2 v2.13.0
10+
github.com/grpc-ecosystem/go-grpc-middleware/providers/zerolog/v2 v2.0.0-rc.2
11+
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.2
2212
github.com/iancoleman/strcase v0.2.0
23-
github.com/jackc/pgconn v1.12.1
24-
github.com/jackc/pgerrcode v0.0.0-20220416144525-469b46aa5efa
25-
github.com/jackc/pgtype v1.11.0
26-
github.com/jackc/pgx/v4 v4.16.1
2713
github.com/lorenzosaino/go-sysctl v0.3.1
2814
github.com/mitchellh/hashstructure/v2 v2.0.2
2915
github.com/modern-go/reflect2 v1.0.2
3016
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58
31-
github.com/segmentio/stats/v4 v4.6.3
32-
github.com/spf13/afero v1.8.2
17+
github.com/pkg/errors v0.9.1
18+
github.com/rs/zerolog v1.27.0
3319
github.com/spf13/cast v1.5.0
20+
github.com/spf13/cobra v1.5.0
3421
github.com/stretchr/testify v1.8.0
3522
github.com/thoas/go-funk v0.9.2
3623
github.com/vmihailenco/msgpack/v5 v5.3.5
37-
github.com/xo/dburl v0.11.0
24+
github.com/xeipuuv/gojsonschema v1.2.0
3825
golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f
3926
google.golang.org/grpc v1.48.0
4027
google.golang.org/protobuf v1.28.0
@@ -43,44 +30,27 @@ require (
4330

4431
require (
4532
github.com/BurntSushi/toml v1.1.0 // indirect
46-
github.com/agext/levenshtein v1.2.3 // indirect
47-
github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect
4833
github.com/davecgh/go-spew v1.1.1 // indirect
49-
github.com/fatih/color v1.13.0 // indirect
50-
github.com/go-test/deep v1.0.7 // indirect
34+
github.com/gogo/protobuf v1.3.2 // indirect
5135
github.com/golang/protobuf v1.5.2 // indirect
52-
github.com/google/go-cmp v0.5.8 // indirect
53-
github.com/grpc-ecosystem/go-grpc-middleware/providers/zerolog/v2 v2.0.0-rc.2 // indirect
54-
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.0.0-rc.2 // indirect
55-
github.com/hashicorp/go-multierror v1.1.1 // indirect
56-
github.com/hashicorp/yamux v0.0.0-20210826001029-26ff87cf9493 // indirect
5736
github.com/inconshreveable/mousetrap v1.0.0 // indirect
5837
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
38+
github.com/jackc/pgconn v1.12.1 // indirect
5939
github.com/jackc/pgio v1.0.0 // indirect
6040
github.com/jackc/pgpassfile v1.0.0 // indirect
6141
github.com/jackc/pgproto3/v2 v2.3.0 // indirect
6242
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect
43+
github.com/jackc/pgtype v1.11.0 // indirect
44+
github.com/jackc/pgx/v4 v4.16.1 // indirect
6345
github.com/jackc/puddle v1.2.1 // indirect
64-
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
65-
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
6646
github.com/lib/pq v1.10.3 // indirect
6747
github.com/mattn/go-colorable v0.1.12 // indirect
6848
github.com/mattn/go-isatty v0.0.14 // indirect
69-
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
70-
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
71-
github.com/oklog/run v1.1.0 // indirect
72-
github.com/pkg/errors v0.9.1 // indirect
7349
github.com/pmezard/go-difflib v1.0.0 // indirect
74-
github.com/rs/zerolog v1.27.0 // indirect
75-
github.com/spf13/cobra v1.5.0 // indirect
7650
github.com/spf13/pflag v1.0.5 // indirect
77-
github.com/stretchr/objx v0.4.0 // indirect
7851
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
7952
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
8053
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
81-
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
82-
github.com/zclconf/go-cty v1.9.1 // indirect
83-
go.uber.org/atomic v1.7.0 // indirect
8454
golang.org/x/crypto v0.0.0-20220517005047-85d78b3ac167 // indirect
8555
golang.org/x/exp/typeparams v0.0.0-20220613132600-b0d781184e0d // indirect
8656
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect
@@ -90,5 +60,6 @@ require (
9060
golang.org/x/text v0.3.7 // indirect
9161
golang.org/x/tools v0.1.11 // indirect
9262
google.golang.org/genproto v0.0.0-20220314164441-57ef72a4c106 // indirect
63+
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
9364
honnef.co/go/tools v0.3.2 // indirect
9465
)

0 commit comments

Comments
 (0)