Is a test task project.
-
Create cli utility which converts one currency into another using coinmarketcap API. Example:
$> ./coinconv 123.45 USD BTC 654.05
-
Code should be uploaded to github.
-
Use the test API key
b54bcf4d-1bca-4e8e-9a24-22ff2c3d462c
-
Take care about clean architecture and SOLID principles.
Is an auto generated REST client. Downloaded from here -> swagger
Is an adapter for autogenerated REST client
Contains an application instance and constructor for all application components
Contains interfaces of all application components
Is an entrypoint to run app from console
- Entry point (cmd/cli/main.go) inits App passing app.Config. Any entrypoint current or future must not import app components directly.
- All componets App consists of must follow one of interfaces from internal/rep.
- adapter/coinmarketcap imports src/client/coinmarketcap directly, it's OK, because this is just a decorator for autogenerated client.
- Application has no models, because passing arguments and reciving values of interfaces are primitive. Add ./models/... if you'll need to share complex data between app components.
- Application has no
usecase
ordomain
package because no complex highlevel logic is required yet. We just build app based on console input, send one request to Converter components and returns the result back to the console.