This is a primary API gateway for the client.
OpenAPI 3.0.0 standard.
Build and start local documentation:
cd docs
npm i
npm run build & npm run start
In case everything is successful, you will see the following links:
✔ Documentation (ReDoc): http://localhost:8080
✔ Documentation (SwaggerUI): http://localhost:8080/swagger-ui/
✔ Swagger Editor: http://localhost:8080/swagger-editor/
We use openapi-generator.
You can generate model bindings for Go based on docs using generate.sh
script.
./generate.sh --help
This service interacts with Solidity contract Posts.sol
from contracts.
In pkg/
directory you can find generated Go bindings for it. To obtain them yourself, at first you need ABI -
check the reference section in contracts.
Then, utilize abigen:
abigen --abi=Posts.abi --pkg=posts --out=pkg/posts/posts.go