This is a backend to create reports from the Smart Cities application
To start using this project first you must install Golang.
The following dependencies are used in this project:
- Gin-Gonic - HTTP Web Framework
- Viper - Library used for giving a configuration solution
- Elasticsearch for go - Elasticsearch functions for Go.
- Minio-sdk - Minio sdk for Go
- AWS S3 Go sdk - AWS S3 sdk for Go
This backend uses a Elasticsearch for storing reports created in the Smart Cities application, also a Amazon Web Service S3
for image storage, as a second option for the image storage you could use a Minio these are all required by this backend.
in the config.toml file you can configure the address of the different services That this backend makes use of.
[311]
host = "<PUT YOUR AWS S3 ADDRESS HERE>"
[minio]
host = "<PUT YOUR MINIO ADDRESS HERE>"
accessKeyID = "<PUT YOUR ACCESS KEY ID HERE>"
secretAccessKey = "<PUT YOUR SECRET ACCESS KEY HERE>"
[server]
port = 9090
[s3]
region = "<PUT YOUR AWS S3 REGION HERE>"
Once Golang is installed clone this repository and run the following command at your project root
go get
This will download all the dependencies required.
Once you have installed Elasticsearch and Minio (or Amazon Web Service S3 configured) run them on your machine.
Go to the project's root and execute the following command in your terminal:
go run main.go
You could use Postman for testing all endpoints of this backend.
...
This is the initial version We use SemVer for versioning.
...