This projects aims to serve as a wrapper for Amadeus API, which gives flight and hotel information. The hotel however, is not yet ready but the rest of it (overalls to 12 API calls total) is ready. This project was implemented using the following technologies and libraries.
- go-kit as a microsevice toolkit
- gRPC as the transport layer
- protobuf for serialization
- consul for service discovery
- redis for caching some stuff such as token
Firstly start by cloning the project into your local computer using the following command:
git clone github.com:meysam81/amadeus-go.git
After doing that, change your directory into the porject's root directory:
cd amadeus-go
Doing the above, you'll be able to make
some stuff that is in the Makefile. From the entries that already exists, you surely need to do the following as they are mandatory.
make proto
This command will generate the compiled proto files for you in their right directory. this command has to be entered before going any futher
You should also enter your API_KEY
and API_SECRET
to the corresponding config files which looks like the following:
{
"API_KEY": "<API_KEY>",
"API_SECRET": "<API_SECRET>"
}
You can now run the server using the following command:
make dev_run
Also if you want to test the server, there's a built-in client in cmd/cli/cli.go. To run it use the following command:
make dev_cli
You can also run it in container as there's a Dockerfile in the project's root directory. So runnning the following commands will build and run it.
make build
make up
If you want to stop the container you can enter the following command into your terminal:
make down
Feel free to contribute at anytime, PR's are welcomed with pleasure 😃