The Go(smo) API
Gopher image by [Renee French][rf], licensed under [Creative Commons 3.0 Attributions license][cc3-by].
Cosmo Gopher aka Gosmix version by [Yoan Pompet][rf].
Table of Contents
Setup
The api is made in Golang
aka Go
and can be use from source or using Docker
.
- In order to run correctly, its need a database running, the database information are
conf_local.yaml
orconf_docker.yaml
- Some vars are also need :
export PASS_DB=root
export TOKEN_API_TEST=test
Then you can run the apps using following commands or using the make command using the local makefile
.
- Helper
Usage :
-conf string
path for the configuration file. (default "test/conf_local.yaml")
-swagger string
relative path for the swagger file. (default "/swagger.yaml")
- Build
make docker-build
- Run
make docker-run
The default access port of the API is 8080
, so after it’s running you should be able to access it from : http://127.0.0.1:8080
.
API Documentation
- A build-in interactive documentation is openly available at the
/docs
endpoint. - The build-in swagger is available at the
/swagger
endpoint.
HealthCheck
- The healthcheck is available at the
/health
endpoint. - The status resume is available at the
/auth/status
endpoint. - The profile resume is available at the
/auth/profile
endpoint.
Galaxy CAS
A connexion with the galaxy is available in the coCAS module.
Authentication
A session token is need to acceed to each endpoint of the API and to use the swagger.
New endpoints / modules
To create a new endpoints, check the documentation module.
Contributing
If you want to contribute to the project, please referred yourself at the contributing doc.