Coding Standards

Code Formatting

Code should be formatted with gofmt.

Comments

TBD.

Repo Structure

Each plugin should reside in a separate GitHub repository, named tailpipe-plugin-{plugin name}. The repo should contain:

  • README.md
  • LICENSE
  • Makefile
  • main.go - along with corresponding go.mod and go.sum files.

Along with the following directories

  • {plugin name} (required): This should contain plugin.go.
  • mappers (optional): May contain go files for any specific mappers required by the plugin in format {model_name}_mapper.go.
  • rows (required): Contains go files which define the table schema(s) used in the plugin.
  • sources (optional): May contain go files for any sources required that aren't provided by the SDK, along with any required configuration schemas.
  • tables (required): Contains go files for table definitions {model_name}_table.go and table specific configuration {model_name}_table_config.go.
  • docs (required): Containing documentation, especially table docs.

Example: Repo Structure