- go get github.com/go-sql-driver/mysql
- go get github.com/gin-gonic/gin
- go get github.com/jmoiron/sqlx
- go get github.com/juankis/registry
- In registry folder run in the console: go run api/src/main/main.go
{
"data":{
"nombre":"jun carlos",
"apellido":"jun carlos",
"correo":"juanki@mail",
"telefono": "783278234",
"type_customer":1
}
}
{
"id": 1,
"nombre": "jun carlos",
"apellido": "jun carlos",
"correo": "estilista@gmail.com",
"telefono": "783278234",
"type_customer": 1,
"created_at": "2019-03-23 09:20:07"
}
- Request
localhost:8080/registry
- Response
[
{
"id": 1,
"nombre": "jun carlos",
"apellido": "jun carlos",
"correo": "estilista@gmail.com",
"telefono": "783278234",
"type_customer": 1,
"created_at": "2019-03-23 09:20:07"
},
{
"id": 2,
"nombre": "Ricardo Tapia",
"correo": "estilista@gmail.com",
"telefono": "78687698",
"type_customer": 1,
"created_at": "2019-03-23 09:20:13"
}
- Request
localhost:8080/registry/1
- Response
{
"data": {
"id": 5,
"nombre": "Elver",
"apellido": "Galarga",
"correo": "elver@galarga.com",
"telefono": "1234567890",
"type_customer": 0,
"created_at": "2019-04-27 09:58:00"
}
}
- Request
localhost:8080/registry/1
{
"data":{
"nombre":"jun carlos",
"apellido":"jun carlos",
"correo":"juanki@mail",
"telefono": "783278234",
"type_customer":1
}
}
{
"id": 1,
"nombre": "jun carlos",
"apellido": "jun carlos",
"correo": "juanki@mail",
"telefono": "783278234",
"type_customer": 1
}
- Request
localhost:8080/registry/1