Skip to content

Graph-Analyzer/api

Repository files navigation

Graph Analyzer - API

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.

Run Locally

Checkout the project

git clone https://github.com/Graph-Analyzer/api.git

Configuration

Create a .env file locally, based on the provided .env.example.

Run

go build && ./api

Access

Mocks

Tests use mocks generated by mockery. Please follow the installation instructions to set it up.

Regenerate the mocks by running this command.

mockery

Code Formatting

Code formatting is done using goimports. Installation instructions can be found in the official documentation.

Run the code formatting with the following command:

goimports -w .

OpenAPI v2 documentation

Installation

Follow the guide here: https://github.com/swaggo/swag

Access

The swagger docs are accessible under /api/doc/index.html.

Generation

You can regenerate the docs with the following command.

swag init

Formatting

You can format the annotations in the code with the following command.

swag fmt

gRPC client

Copy the generated files over from the data-collector

Authors

License

This project is licensed under the MIT License.

Third Party Licenses

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages