-
Locally
go build . go run main.go or ./client-app-go
-
On docker
docker build . -t client-app-go:latest docker run -d --name client-app-go -p 8080:8080 -p 8090:8090 client-app-go:latest docker logs client-app-go -f
- POST
http POST :8080/apis/users email="[email protected]" name="Matteo Baiguini" age=33 http POST :8080/apis/users email="[email protected]" name="John Doe" age=42 http POST :8080/apis/users email="[email protected]" name="Jane Doe" age=24 http POST :8080/apis/users email="[email protected]" name="Clint Eastwood" age=75
- GET
http :8080/apis/users http :8080/apis/users/[email protected]
- PUT
http PUT :8080/apis/users id=$(http :8080/apis/users/[email protected] | jq ".id") email="[email protected]" name="Clint Eastwood" age=89
- DELETE
http DELETE :8080/apis/users/[email protected] http DELETE :8080/apis/users
GET /users
get allGET /users/{email}
get by emailPOST /users
insert newPUT /users
updateDELETE /users
delete allDELETE /users/{email}
delete by email
- rest apis
- kubernetes probes
- go structure
- expose logs
- expose metrics
- expose traces
- use kustomize for kube manifests