api

command module
v0.0.0-...-a3743eb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 48 Imported by: 0

README

API

How to build

make build

Config

You will need to set some env variables with the prefix WORMSCAN

  • WORMSCAN_DB_MONGO
  • WORMSCAN_DB_NAME
  • WORMSCAN_PORT

for example:

WORMSCAN_DB_URL=mongodb://localhost:27017/wormhole WORMSCAN_DB_NAME=wormhole WORMSCAN_PORT=5555 WORMSCAN_RUNMODE=DEVELOPMENT ./api

API Documentation

Documentation is automagically generated via swaggo using annotations on code and placed inside doc/ folder.

To install swag tool run this

go install github.com/swaggo/swag/cmd/swag@latest

To generate or update the doc run:

make doc

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package docs Code generated by swaggo/swag.
Package docs Code generated by swaggo/swag.
handlers
governor
Package governor handle the request of governor data from governor endpoint defined in the api.
Package governor handle the request of governor data from governor endpoint defined in the api.
observations
Package observations handle the request of observations data from governor endpoint defined in the api.
Package observations handle the request of observations data from governor endpoint defined in the api.
vaa
internal
config
Package config implement a simple configuration package.
Package config implement a simple configuration package.
tvl
package middleare contains all the middleware function to use in the API.
package middleare contains all the middleware function to use in the API.
The response package defines the success and error response type.
The response package defines the success and error response type.
routes
guardian/governor
Package governor handle the request of governor data from governor endpoint defined in the api.
Package governor handle the request of governor data from governor endpoint defined in the api.
guardian/vaa
Package observations handle the request of VAA data from governor endpoint defined in the api.
Package observations handle the request of VAA data from governor endpoint defined in the api.
wormscan/governor
Package governor handle the request of governor data from governor endpoint defined in the api.
Package governor handle the request of governor data from governor endpoint defined in the api.
wormscan/observations
Package observations handle the request of observations data from governor endpoint defined in the api.
Package observations handle the request of observations data from governor endpoint defined in the api.
wormscan/vaa
Package observations handle the request of VAA data from governor endpoint defined in the api.
Package observations handle the request of VAA data from governor endpoint defined in the api.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL