Table of Contents
Go Gen Tools is a code generation tool that can automate repetitive tasks during application development. It provides a simple command-line interface that you can use to generate code files from templates or schema definitions.
This section list any major frameworks/libraries used to bootstrap project.
Prerequisites Before you start using Go Gen Tools, make sure that you have the following software installed on your computer:
- Go programming language (version 1.20 or later)
- Git version control system
- A text editor or integrated development environment (IDE) for writing code
- Docker
- Kubernetes
To install Go Gen Tools, you need to run the following command in your terminal or command prompt:
go get github.com/duyledat197/go-gen-tools@v0.0.1
Generate sql:
Generate proto:
Generate constract:
Generate layer by DDD (delivery, service, repository):
Generate mock:
- Auto generate protobuf files.
- Auto generate mock interface for DDD.
- Auto generate all layer of DDD.
- Auto generate sql query with struct mapping and entities.
- Auto migrate for Postgres.
- Support generate repository layer for postgres, mongo, inmem.
- Support mono repo architecture.
- Auto generate cli with cobra-cli.
- Support graceful shutdown.
- Start kubernetes with Kind.
- Manage kubernetes with Helm.
- Support vscode settings.
- Support github workflows.
- Support Twilio client.
- Support Sendgrid client.
- Support AWS client.
- Support metrics with Prometheus.
- Support Grafana for monitor.
- Support Elasticsearch client.
- Support Ethereum client.
- Support Kafka, Nats for message queue.
- Support Redis client.
- Support rate limit.
- Support configuration for grpc client, grpc server, http client, http server.
- Support Hystrix config for circuit breaker.
- Support Consul client for load balancer.
- Support open tracing with Jeager tracing.
.
βββ LICENSE
βββ Makefile
βββ README.md
βββ SECURITY.md
βββ api
β βββ contracts
β β βββ store.sol
β βββ proto
β βββ cobra
β β βββ example.proto
β βββ enum.proto
β βββ hub.proto
β βββ nats
β β βββ example.proto
β β βββ example_test.proto
β β βββ nrpc.proto
β βββ options
β β βββ annotations.pb.go
β β βββ annotations.proto
β β βββ doc.go
β βββ search.proto
β βββ team.proto
β βββ user.proto
βββ cmd
β βββ cmd.go
β βββ gateway.go
β βββ inventory.go
β βββ order.go
β βββ root.go
β βββ srv
β β βββ main.go
β βββ srv.go
β βββ thirdParty.go
βββ config
β βββ config.go
βββ database
β βββ migrations
β β βββ 0001_migrate.up.sql
β β βββ 0002_migrate.up.sql
β β βββ 0003_migrate.up.sql
β βββ queries
β βββ hub.sql
β βββ team.sql
β βββ user.sql
βββ deployments
β βββ helms
β βββ common.config.yaml
β βββ configs
β β βββ insfras.yaml
β βββ gateway
β β βββ Chart.yaml
β β βββ charts
β β βββ templates
β β β βββ NOTES.txt
β β β βββ _helpers.tpl
β β β βββ configmap.yaml
β β β βββ deployment.yaml
β β β βββ hpa.yaml
β β β βββ ingress.yaml
β β β βββ secrets.yaml
β β β βββ service.yaml
β β β βββ serviceaccount.yaml
β β β βββ tests
β β β βββ test-connection.yaml
β β βββ values.yaml
β βββ inventory
β β βββ Chart.yaml
β β βββ charts
β β βββ templates
β β β βββ NOTES.txt
β β β βββ _helpers.tpl
β β β βββ deployment.yaml
β β β βββ hpa.yaml
β β β βββ ingress.yaml
β β β βββ service.yaml
β β β βββ serviceaccount.yaml
β β β βββ tests
β β β βββ test-connection.yaml
β β βββ values.yaml
β βββ order
β β βββ Chart.yaml
β β βββ charts
β β βββ templates
β β β βββ NOTES.txt
β β β βββ _helpers.tpl
β β β βββ deployment.yaml
β β β βββ hpa.yaml
β β β βββ ingress.yaml
β β β βββ service.yaml
β β β βββ serviceaccount.yaml
β β β βββ tests
β β β βββ test-connection.yaml
β β βββ values.yaml
β βββ third_party
β βββ Chart.yaml
β βββ charts
β βββ templates
β β βββ NOTES.txt
β β βββ _helpers.tpl
β β βββ deployment.yaml
β β βββ hpa.yaml
β β βββ ingress.yaml
β β βββ service.yaml
β β βββ serviceaccount.yaml
β β βββ tests
β β βββ test-connection.yaml
β βββ values.yaml
βββ developments
β βββ Dockerfile
β βββ abi.Dockerfile
β βββ bdd_test.Dockerfile
β βββ docker-compose.yml
β βββ gen-abi.sh
β βββ gen-proto.sh
β βββ proto.Dockerfile
β βββ sqlc.yaml
β βββ start.sh
βββ docs
β βββ html
β β βββ index.html
β βββ markdown
β β βββ docs.md
β βββ swagger
β βββ *.swagger.json
βββ features
β βββ bdd.go
βββ go.mod
βββ go.sum
βββ idl
β βββ abi
β β βββ *.abi
β β βββ *.go
β βββ pb
β βββ cobra_pb
β β βββ ...
β βββ nats_pb
β β βββ ...
β βββ ...
βββ intergration_test.go
βββ internal
β βββ deliveries
β β βββ grpc
β β β βββ hub.go
β β β βββ search.go
β β β βββ team.go
β β β βββ user.go
β β βββ http
β β βββ ws
β β βββ client.go
β β βββ hub.go
β β βββ ws.go
β βββ models
β β βββ db.go
β β βββ hub.sql.go
β β βββ models.go
β β βββ querier.go
β β βββ team.sql.go
β β βββ user.sql.go
β βββ mongo
β β βββ user.go
β βββ repositories
β β βββ hub.go
β β βββ mongo
β β β βββ hub.go
β β β βββ team.go
β β β βββ user.go
β β βββ options.go
β β βββ postgres
β β β βββ hub.go
β β β βββ team.go
β β β βββ user.go
β β βββ team.go
β β βββ user.go
β βββ services
β βββ hub.go
β βββ hub_test.go
β βββ search.go
β βββ team.go
β βββ user.go
βββ pkg
β βββ elastic_client
β β βββ elastic.go
β βββ eth_client
β β βββ balance.go
β β βββ client.go
β β βββ keystore.go
β β βββ transaction.go
β β βββ wallet.go
β βββ grpc_client
β β βββ grpc.go
β β βββ option.go
β βββ grpc_server
β β βββ grpc.go
β β βββ health_check.go
β β βββ middleware.go
β βββ http_server
β β βββ http.go
β β βββ middleware.go
β β βββ middleware_test.go
β βββ hystrix
β β βββ config.go
β βββ kafka
β β βββ consumer.go
β β βββ consumer_group.go
β β βββ producer.go
β β βββ producer_test.go
β β βββ publisher.go
β β βββ subscriber.go
β βββ mongo_client
β β βββ mongo.go
β βββ nrpc
β β βββ nrpc.go
β β βββ nrpc.pb.go
β βββ postgres_client
β β βββ postgres.go
β βββ prometheus_server
β β βββ server.go
β βββ pubsub
β β βββ model.go
β β βββ publisher.go
β β βββ subscriber.go
β βββ ratelimit
β β βββ ratelimit.go
β βββ redis_client
β β βββ redis.go
β βββ registry
β β βββ client.go
β β βββ register.go
β βββ swagger_server
β β βββ server.go
β βββ tracing
β βββ client.go
βββ third_party
β βββ aws
β β βββ aws.go
β β βββ s3.go
β βββ email
β β βββ email.go
β βββ marketing
β β βββ marketing.go
β βββ sms
β βββ sms.go
βββ tools
β βββ gen-layer
β β βββ internal
β β β βββ generator.go
β β β βββ step.go
β β βββ main.go
β β βββ models
β β β βββ cli_step.go
β β β βββ feature.go
β β β βββ template.go
β β βββ templates
β β β βββ cucumber
β β β β βββ create.tpl
β β β β βββ delete.tpl
β β β β βββ list.tpl
β β β β βββ retrieve.tpl
β β β β βββ update.tpl
β β β βββ delivery
β β β β βββ create.tpl
β β β β βββ default.tpl
β β β β βββ delete.tpl
β β β β βββ list.tpl
β β β β βββ retrieve.tpl
β β β β βββ update.tpl
β β β βββ godog
β β β β βββ create.tpl
β β β β βββ default.tpl
β β β β βββ delete.tpl
β β β β βββ function.tpl
β β β β βββ list.tpl
β β β β βββ retrieve.tpl
β β β β βββ update.tpl
β β β βββ mongo
β β β β βββ create.tpl
β β β β βββ default.tpl
β β β β βββ delete.tpl
β β β β βββ list.tpl
β β β β βββ retrieve.tpl
β β β β βββ update.tpl
β β β βββ postgres
β β β β βββ create.tpl
β β β β βββ default.tpl
β β β β βββ delete.tpl
β β β β βββ list.tpl
β β β β βββ retrieve.tpl
β β β β βββ update.tpl
β β β βββ repository
β β β β βββ default.tpl
β β β βββ service
β β β βββ create.tpl
β β β βββ default.tpl
β β β βββ delete.tpl
β β β βββ list.tpl
β β β βββ retrieve.tpl
β β β βββ update.tpl
β β βββ utils
β β βββ parser
β β β βββ parser.go
β β βββ steps.go
β βββ gen-service
β βββ protoc-gen-custom
β β βββ internal
β β β βββ generator.go
β β βββ main.go
β βββ protoc-gen-nrpc
β βββ internal
β β βββ genrator.go
β βββ main.go
β βββ templates
β βββ nrpc.tpl
βββ transform
β βββ ...
βββ utils
βββ authenticate
β βββ authenticator.go
β βββ jwt.go
β βββ jwt_test.go
β βββ paseto.go
β βββ paseto_test.go
β βββ payload.go
β βββ token.go
βββ crypto
β βββ sha256.go
β βββ sha256_test.go
βββ helper
β βββ validation.go
β βββ validation_test.go
βββ ip.go
βββ logger
β βββ zap.go
βββ metadata
β βββ metadata.go
βββ otp
β βββ hotp.go
β βββ otp.go
β βββ totp.go
βββ pathutils
β βββ path.go
βββ string.go
βββ token.go
βββ transformhelpers
βββ helpers.go
Make sure you have Go installed (download). Version 1.19
or higher is required.
Install make for start the server.
For Linux:
For Macos:
First of all, you must start postgres:
After that should migrate:
Start server with cmd/terminal:
Start server with docker:
Run all test:
install graphviz:
$ go get -u github.com/google/pprof
$ apt-get install graphviz gv // for linux/debian
$ brew install graphviz (mac) // for mac
MIT
Free Software, Hell Yeah!