Documentation ¶
Index ¶
- type Product
- func (p *Product) ClearTable(db *sql.DB) error
- func (p *Product) CreateProduct(db *sql.DB) error
- func (p *Product) CreateTable(db *sql.DB) error
- func (p *Product) DeleteProduct(db *sql.DB) error
- func (p *Product) GetProduct(db *sql.DB) ([]Product, error)
- func (p *Product) GetProducts(db *sql.DB, start, count int) ([]Product, error)
- func (p *Product) UpdateProduct(db *sql.DB) ([]Product, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Product ¶
Product is a model for a product in json
func (*Product) ClearTable ¶
ClearTable has a function to clean table
func (*Product) CreateProduct ¶
CreateProduct has a function to eate product
func (*Product) CreateTable ¶
CreateTable has a function to cxreate that table in database
func (*Product) DeleteProduct ¶
DeleteProduct has a functio to delete the product
func (*Product) GetProduct ¶
GetProduct is a function to get one product
func (*Product) GetProducts ¶
GetProducts is a function to get all products
Click to show internal directories.
Click to hide internal directories.