gen-tools

command module
v0.0.0-...-071115b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2023 License: GPL-3.0 Imports: 1 Imported by: 0

README

Template generation tools

Generic badge Generic badge Generic badge Generic badge Generic badge Build Status

CLI Tool for generating different project modules for templating complex systems with ease. Dockerized version also provides set of tools for code generation and linting.


Options:

Options you can specify under 'gen' command:

  • drone - includes drone.yml template for project CI-CD
  • mit - adds MIT license to project
  • gpl - adds GPLv3 license to project
  • make - adds Makefile to project
  • pkgbuild - arch format PKGBUILD for packaging to AUR
  • lego - generates templates of commands for lego, to simplify process of obtaining certificates

Compose file options:

  • compose-nginx - adds nginx to your compose file, and generates template of config in directory (reuses certificates generated by lego)
  • compose-postgres - adds postgres to compose file, and goose tool for migrations aswell
  • compose-redis - adds redis to compose
  • compose-nats - adds single nats node to compose, and nats-ui for visualization
  • compose-gitea - adds gitea with some predefined parameters and configuartion files, additional themes, description, logo
  • compose-drone - adds drone server and runner to compose, with predifined parameters to connect to gitea
  • compose-pacman - adds self-hosted pacman repository for arch packages
  • compose-pocketbase - adds pocketbase template to compose (self-hosted real-time backend)
  • compose-mkdocs - adds mkdocs with theme, custom css and some preconfigured stuff
  • compose-kuma - adds kuma, for tracking and visualizing services stability
  • compose-dozzle - adds dozzle, for for viewing services logs

Go code options:

  • go-cli - includes cobra and viper
  • go-lint - includes golanglint-ci linter for go code
  • go-grpc - includes proto and buf files for generation
  • go-docker - includes 2 stage Dockerfile and compose for ease of development
  • go-pg - includes pgx module in porstgres, sqlc for generation and goose for migrations
  • go-redis - includes redis template
  • go-nats - includes consumer and producer nats template

Installation:

  • docker
docker pull dancheg97.ru/templates/gen-tools:latest
  • go
go install dancheg97.ru/templates/gen-tools@latest
  • yay
yay -Sy gen-tools

Examples:

gen-tools gen drone gpl
gen-tools go --repo myrepo.com/me/tool
gen-tools infr --name Nice --domain nice.org --user admin --pass SeCReT --email he@he.org
gen-tools infr --name Nice --domain nice.org --user admin --pass SeCReT --email he@he.org
  • gen-tools - tool for generating go project templates
docker run --rm -it -v $(pwd):/wd -w /wd dancheg97.ru/templates/gen-tools:latest gen-tools --help
  • gofumpt - tool for formatting go code
docker run --rm -it -v $(pwd):/wd -w /wd dancheg97.ru/templates/gen-tools:latest gofumpt --help
docker run --rm -it -v $(pwd):/wd -w /wd dancheg97.ru/templates/gen-tools:latest golanglint-ci --help
docker run --rm -it -v $(pwd):/wd -w /wd dancheg97.ru/templates/gen-tools:latest buf --help
docker run --rm -it -v $(pwd):/wd -w /wd dancheg97.ru/templates/gen-tools:latest sqlc --help
  • go-swag - tool for generating swagger.yaml from code annotations.
docker run --rm -it -v $(pwd):/wd -w /wd dancheg97.ru/templates/gen-tools:latest swag --help
  • go-lego - tool for obtaining sertificates from ACME.
docker run --rm -it -v $(pwd):/wd -w /wd dancheg97.ru/templates/gen-tools:latest lego --help
  • go-lego - tool for migrating database (eg postgres).
docker run --rm -it -v $(pwd):/wd -w /wd dancheg97.ru/templates/gen-tools:latest goose --help

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL