The API is responsible for calculating the graph properties. It fetches the data from the Neo4j database and makes the calculated properties available via a REST interface.
git clone https://github.com/Graph-Analyzer/api.gitCreate a .env file locally, based on the provided .env.example.
go build && ./apiTests use mocks generated by mockery. Please follow the installation instructions to set it up.
Regenerate the mocks by running this command.
mockeryCode formatting is done using goimports. Installation instructions can be found in the official documentation.
Run the code formatting with the following command:
goimports -w .Follow the guide here: https://github.com/swaggo/swag
The swagger docs are accessible under /api/doc/index.html.
You can regenerate the docs with the following command.
swag initYou can format the annotations in the code with the following command.
swag fmtCopy the generated files over from the data-collector
This project is licensed under the MIT License.
Third party licenses can be found in THIRD-PARTY-LICENSES.txt.
Regenerate them with this command.
# Make sure you have a compiled version of the project in the project root
go install github.com/uw-labs/lichen@latest
./scripts/go-licenses.sh