models

package
v0.0.0-...-3fe1aa9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 8, 2018 License: MIT Imports: 8 Imported by: 1

Documentation

Index

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

func MyHome

func MyHome(w http.ResponseWriter, r *http.Request)

MyHome teste teste teste teste

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 Message

type Message struct {
	Executed bool
	Message  string
	COD      int
}

Message struct of the message

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL