go-template

module
v0.0.0-...-33e5404 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: MIT

README

go-template

go-skeleton-lido

How to use the template

  1. Clone repository
  2. cd root repository
  3. make tools
  4. make vendor
  5. docker-composer up -d
  6. make migrate
  7. make build
  8. Run service ./bin/service

How to create migrations?

./bin/migrate create -ext=sql -dir=db/migrations

How to make migrations?

  1. make migrate from terminal or
    bin/migrate -database ${POSTGRESQL_URL} -path db/migrations up

Where I have to start to code my custom logic?

  • Register handler
  • Logic layer: /internal/pkg/your_package_name/. Just see an example with User package
  • Env
  • Connecters pg, logger, redis and etc...
  • For external clients you have to create folder in ./internal/clients/<your_client_name>/client.go where your_client_name - is google_client, alchemy or internal client for private network.

Docs and rules

  1. App structure layout
  2. Code style

Current drivers or dependencies

  1. Postgres - pgx
  2. Logger - Logrus
  3. Mockery Mockery
  4. Http router gorilla_mux. Of course your can change it for example to Gin
  5. Env reader Viper

Jump to

Keyboard shortcuts

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