Documentation ¶
Index ¶
- func CtrClients(w http.ResponseWriter, r *http.Request)
- func CtrProdutos(w http.ResponseWriter, r *http.Request)
- func DeleteEndPointClients(id int, w http.ResponseWriter, r *http.Request)
- func DeleteEndPointProducts(id int, w http.ResponseWriter, r *http.Request)
- func EndPointPostClients(w http.ResponseWriter, r *http.Request)
- func EndPointPostProducts(w http.ResponseWriter, r *http.Request)
- func EndPointUpdateClients(id int, w http.ResponseWriter, r *http.Request)
- func EndPointUpdateProducts(id int, w http.ResponseWriter, r *http.Request)
- func GetlistEndPointClients(w http.ResponseWriter, r *http.Request)
- func GetlistEndPointClientsByID(id int, w http.ResponseWriter, r *http.Request)
- func GetlistEndPointProducts(w http.ResponseWriter, r *http.Request)
- func GetlistEndPointProductsByID(id int, w http.ResponseWriter, r *http.Request)
- func MyHome(w http.ResponseWriter, r *http.Request)
- type AddressClients
- type Clients
- type Message
- type Products
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CtrClients ¶
func CtrClients(w http.ResponseWriter, r *http.Request)
CtrClients controller de chamadas
func CtrProdutos ¶
func CtrProdutos(w http.ResponseWriter, r *http.Request)
CtrProdutos controller de chamadas
func DeleteEndPointClients ¶
func DeleteEndPointClients(id int, w http.ResponseWriter, r *http.Request)
DeleteEndPointClients delete a client
func DeleteEndPointProducts ¶
func DeleteEndPointProducts(id int, w http.ResponseWriter, r *http.Request)
DeleteEndPointProducts exclude a product
func EndPointPostClients ¶
func EndPointPostClients(w http.ResponseWriter, r *http.Request)
EndPointPostClients Create client
func EndPointPostProducts ¶
func EndPointPostProducts(w http.ResponseWriter, r *http.Request)
EndPointPostProducts create new product in databases
func EndPointUpdateClients ¶
func EndPointUpdateClients(id int, w http.ResponseWriter, r *http.Request)
EndPointUpdateClients alter client
func EndPointUpdateProducts ¶
func EndPointUpdateProducts(id int, w http.ResponseWriter, r *http.Request)
EndPointUpdateProducts altereding a product
func GetlistEndPointClients ¶
func GetlistEndPointClients(w http.ResponseWriter, r *http.Request)
GetlistEndPointClients list all clients resgistered in your databases
func GetlistEndPointClientsByID ¶
func GetlistEndPointClientsByID(id int, w http.ResponseWriter, r *http.Request)
GetlistEndPointClientsByID list a client by your code
func GetlistEndPointProducts ¶
func GetlistEndPointProducts(w http.ResponseWriter, r *http.Request)
GetlistEndPointProducts list all products resgistered in your databases
func GetlistEndPointProductsByID ¶
func GetlistEndPointProductsByID(id int, w http.ResponseWriter, r *http.Request)
GetlistEndPointProductsByID list an product by your code
Types ¶
type AddressClients ¶
type AddressClients struct { ID int `json:"id,omitempty" db:"id"` IDclients string `json:"idclient,omitempty" db:"idClients"` Address string `json:"address,omitempty" db:"address"` Number string `json:"number,omitempty" db:"number"` City string `json:"city,omitempty" db:"city"` Neighborhood string `json:"neighborhood,omitempty" db:"neighborhood"` Country string `json:"country,omitempty" db:"country"` State string `json:"state,omitempty" db:"state"` }
AddressClients to listing clients
type Clients ¶
type Clients struct { ID int `json:"id,omitempty" db:"id"` Name string `json:"name,omitempty" db:"name"` Email string `json:"email,omitempty" db:"email"` Phone string `json:"phone,omitempty" db:"phone"` Status string `json:"status,omitempty" db:"status"` Date string `json:"date,omitempty" db:"date"` Address []AddressClients `json:"address,omitempty"` }
Clients to listing clients
type Products ¶
type Products struct { ID int `json:"id" db:"id"` Nome string `json:"name" db:"name"` Description string `json:"description" db:"description"` Stock float64 `json:"stock" db:"stock"` Width float64 `json:"width" db:"width"` Height float64 `json:"heigth" db:"height"` Amount float64 `json:"amount" db:"amount"` Weight float64 `json:"weight" db:"weight"` Price float64 `json:"price" db:"price"` Discount float64 `json:"discount" db:"discount"` Promotion float64 `json:"promotion" db:"promotion"` }
Products Struct of products