This is a template project for building Conduit connectors in Go. It makes it possible to start working on a Conduit connector in a matter of seconds.
This template includes the following:
- Skeleton code for the connector's configuration, source and destination
- Example unit tests
- A Makefile with commonly used targets
- A GitHub workflow to build the code and run the tests
- A GitHub workflow to run a pre-configured set of linters
- A GitHub workflow which automatically creates a release once a tag is pushed
- A dependabot setup which checks your dependencies for available updates and merges minor version upgrades automatically
- Issue and PR templates
- A README template
- On this repository's main page, click "Use this template"
- Enter the information about your repository
- Once your repository has been generated, clone it
- After cloning, run
./setup.sh <module name here>
(for example:./setup.sh github.com/awesome-org/conduit-connector-file
) - (Optional) Set the code owners (in the
CODEOWNERS
file)
With that, you're all set up and ready to start working on your connector! As a next step, we recommend that you check out the Conduit Connector SDK, which is the Go software development kit for implementing a connector for Conduit.
Following is a list of repository settings we recommend having.
- Allow squash merging only.
- Always suggest updating pull request branches.
- Allow auto-merge.
- Automatically delete head branches.
Protect the default branch using the following rules:
- Require a pull request before merging. Require approvals.
- Require status checks to pass before merging. Require branches to be up to date before merging.
- Specify status checks that are required.
- Require conversation resolution before merging.
- Do not allow bypassing the above settings.
- Allow all actions and reusable workflows.
- Allow GitHub Actions to create and approve pull requests (if dependabot is used and it's configured to automatically merge pull requests).
The spec.go
file provides a programmatic representation of the configuration options.
This template provides two types of "configs":
- general configuration (that applies to both, sources and destinations)
- and source/destination specific configs.
All are defined in config.go
and are represented by separate types. General configs should be added to connectorName.Config
,
whereas any source or destination specific configs should be added to connectorName.SourceConfig
and
connectorName.DestinationConfig
respectively.