This project is for thunes API to transfer money by golang.
Root
.
├── api
├── config
├── internal
│ ├── app
│ └── pkg
│ ├── config
│ ├── routers
│ ├── thunes // thunes API client
│ └── server
│ ├── common
│ ├── country
│ ├── payer
│ ├── ping
│ ├── quotation
│ └── transaction
└── test
└── mocks
In internal/pkg
, exclude the thunes
, all is the web service for money transfering.
It offered many useful interface by HTTP.
quotation/
.
├── handler.go
├── handler_test.go
└── quotation.go
In this directory, quotation.go
is the model for interface.
And all interface and implement is in handler.go
.
All unit test is in handler_test.go
.
You can use command go run main.go
to start a HTTP service.
And yes, do not forget the auth API Key and Secret.
They can be set by environment
- THUNES_APIKEY
- THUNES_APISECRET
It will listen :8080
.
This project contains unit test and integration test.
You can check the Makefile
.
Uint test: make unittest
Integration test: make integration_test
Also you want to see coverage for unit test:
make coverage
This project is connected to Travis.
So there are tags in this document header.
A picture for automated test CI
Duo to time limited, some detail isnot very well.
This project can be better.
- static string
- more edge unit test
- more error handler
- more log
- opentracing
- Docker deploy
and so on.