Skip to content

Latest commit

 

History

History
28 lines (28 loc) · 1011 Bytes

README.org

File metadata and controls

28 lines (28 loc) · 1011 Bytes

Tyr-Gin

Why?

The purpose of this is to centralize some features common to a gin service that we might use in our microservices. This way each microservice does not need to re-implement features. Such as jwt functions, logging and etc.

Features

  1. Logging
  2. JWT
  3. Easy way to add endpoints.

Setup the Environment

The following environmental variables are used:

MONGO_URI=<URI OF MongoDB>
DB_NAME=<Name of Database to use>
LOG_FILE=<Name of log file (log.json by default)>
JWT_SECRET=<Secret used for JWT encryption>
JWT_REALM=<Realm for JWT (different for prod/dev)>

Within this repo, there is an example .env file that is used for testing purposes, when using this package, place a .env file within the root folder where you setup the router.

Contributing

  1. Clone the repository locally, and create a new branch.
  2. Run go get.
  3. Run go get golang.org/x/tools/cmd/goimports.
  4. Make your changes.
  5. Run make all to fmt, lint, and test code.
  6. Make a merge request.