This project is using echo as web framework, user profile object was stored in memory using map
- Builder Pattern
- Singleton Pattern
- Interface Segregation
go run server.go
Username: default_user
Password: default_password
curl -u default_user:default_password -H "Content-Type: application/json" \
--request POST \
--data '{"user_id": "12345", "email": "test@email.com", "address": "address", "password": "password", "retype_password": "password"}' \
http://localhost:8080/lemonilo/user-profile
curl -u default_user:default_password -H "Content-Type: application/json" \
--request GET http://localhost:8080/lemonilo/user-profile
curl -u default_user:default_password -H "Content-Type: application/json" \
--request GET \
http://localhost:8080/lemonilo/user-profile/12345
{"user_id":"12345","email":"test@email.com","address":"address"}
curl -u default_user:default_password -H "Content-Type: application/json" \
--request PUT \
--data '{"email": "test@email.com", "address": "address123", "password": "password", "retype_password": "password"}' \
http://localhost:8080/lemonilo/user-profile/12345
{"user_id":"12345","email":"test@email.com","address":"address123"}
curl -u default_user:default_password -H "Content-Type: application/json" \
--request DELETE http://localhost:8080/lemonilo/user-profile/12345