CosmoAppy

API for the perfect ESN association.

View project on GitHub

Modules

All endpoints are defined here !

Each endpoint has its own documentation as README.md.

New modules

If you want to create a new module, you only need to inspire yourself from already created module and follow those requirements :

  • connector.go MANDATORY
  • controller.go MANDATORY
  • model.go MANDATORY
  • router.go MANDATORY
  • swagger.go MANDATORY
  • vars.go MANDATORY
  • README.md MANDATORY

  • specimen.go OPTIONAL
  • database.go OPTIONAL

⚠ Do not forget to add your module to the Launcher at launcher/launcher.go, it’s him whose controls and manages all modules.

List of existing modules

Router access

2 subrouters are availables :

  • 1 subrouter for public access who can be accessible by anyone, example :
MYSERVER='127.0.0.1:8080'

curl -X GET \
    "https://${MYSERVER}/health`" \
    -H "accept: application/json"
  • 1 subrouter SECURE for private access requiring a token and can be accessible from auth after the server name, example :
MYSERVER='127.0.0.1:8080'
SECURE='auth'
MYTOKEN='MyVeryLongToken'

curl -X GET \
    "https://${MYSERVER}/${SECURE}/status`" \
    -H "accept: application/json" -H "X-Session-Token: ${MYTOKEN}"