Quickly create an echo-based api project
GOPROXY https://goproxy.cn
Rename github.com/relax-space/go-api to xxx/xxx/your-project-name
Rename go-api to your-project-name
$ docker-compose -f .\example\docker-compose.yml up -d
$ go run .
Visit http://127.0.0.1:8080/ping
Visit swagger http://127.0.0.1:8080/docs
./kafka-console-consumer.bat --bootstrap-server localhost:9092 --from-beginning --topic behaviorlog{"action_id":"d14b340b-7b68-11ea-b68b-847beb364db6","service":"go-api","timestamp":"2020-04-11T04:21:10.657333+08:00","remote_ip":"::1","host":"localhost:8080","uri":"/v1/fruits","method":"GET","path":"/v1/fruits","referer":"http://localhost:8080/docs","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36","status":200,"latency":29999000,"bytes_sent":67,"hostname":"SS-CN-XIAOXINMI","controller":"controllers.FruitAPIController","action":"GetAll"}
Content type
Image
Digest
Size
14.7 MB
Last updated
over 5 years ago
docker pull relaxed/go-api