Skip to content

arkeonetwork/directory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6dd2e59 · Mar 21, 2023

History

63 Commits
Dec 9, 2022
Mar 21, 2023
Mar 21, 2023
Mar 9, 2023
Mar 21, 2023
Dec 19, 2022
Mar 21, 2023
Mar 13, 2023
Mar 21, 2023
Dec 9, 2022
Mar 13, 2023
Mar 9, 2023
Mar 3, 2023
Nov 9, 2022
Mar 3, 2023
Dec 2, 2022
Mar 21, 2023
Mar 21, 2023
Mar 21, 2023

Repository files navigation

Arkeo Directory Service

The directory is an off-chain API/service (utilizing openapi/swagger) that makes it easier for users and client to discover data providers.

go-swagger

Currently, this API uses go-swagger to generate the API spec and can be used to also generate a client in the future. For now this can be installed using brew or by following alternate instructions here.

brew tap go-swagger/go-swagger
brew install go-swagger

Once installed you can use the following make commands to either generate a swagger.yaml or serve the .yaml.

make swagger
make swagger-serve

An important note for VS code users, leave a single blank linke between your code annotations and the function definition. This will enable the go formatter to not re-format the needed + into a -

Database

  • Postgres 15

Migrations

Tern is used to manage database structure and initialize state. For now tern is using the default configuration mechanism, see db/tern.conf.

With postgres running and pointed to by tern.conf:

make db-migrate

Create a new migration:

tern new -m db useful_name

ls db/007_useful_name.sql
db/007_useful_name.sql

Undo the most recently applied migration:

tern migrate -c db/tern.conf -m db --destination -1