gatewayd-io / plugin-template-go

GatewayD plugin template in Go
https://docs.gatewayd.io/developing-plugins/plugin-developers-guide/
Apache License 2.0
2 stars 1 forks source link

Create a cookiecutter-like template #6

Open mostafa opened 9 months ago

mostafa commented 9 months ago

Cookiecutter templates are good for scaffolding new projects based on a template. There are similar projects for Go, like go-scaffold. The idea is to convert this project into a cookiecutter(-like) template and let the gatewayd plugin scaffold/init command take care of creating a project for the user.

Related

zeina1i commented 8 months ago
Screenshot 2024-03-15 at 21 41 45

Hey @mostafa ,

1-I consider the above directory structure for the templates. Do you agree with the structure? 2-With the introduction of cookiecutter-like templating, the flow for creating plugins will change. Currently, users can fork or use the GitHub template to get started. However, with templating, users will scaffold their plugin in a separate directory/project using this project and the scaffolder command in gatewayd project. Is my assumption correct?

mostafa commented 8 months ago

Hey @zeina1i,

  1. Yes.
  2. I suppose that the gatewayd command will take care of generating a plugin from the template. I can create a separate repo to continue the development of this template-based system. WDYT?
zeina1i commented 8 months ago

Hey @mostafa

Yes. I agree. Let's do it👍

mostafa commented 8 months ago

Hey @zeina1i,

I created this repo and added you.

zeina1i commented 8 months ago

Hey @mostafa Thanks, I will check it