A Golang microservice for managing exoplanets, providing CRUD operations and fuel estimation for space voyages.
- Add an Exoplanet
- List Exoplanets
- Get Exoplanet by ID
- Update Exoplanet
- Delete Exoplanet
- Fuel Estimation
- Gas Giant: Composed of gaseous compounds.
- Terrestrial: Earth-like, rocky, larger than Earth.
d
: distance (light years)g
: gravityc
: crew capacity
Gravity Calculation:
- Gas Giant:
g = 0.5 / r^2
- Terrestrial:
g = m / r^2
- Constraints:
10 < d < 1000
,0.1 < m < 10
,0.1 < r < 10
- Go 1.16+
- Docker
- Clone the repository
- Build and run the Docker container:
docker build -t exoplanet-service . docker run -it -p 8080:8080 exoplanet-service