Documentation
¶
Index ¶
- type Article
- type BlogCategory
- func (b *BlogCategory) CreateArticleCategory(db *sql.DB) error
- func (b *BlogCategory) DeleteArticleCategory(db *sql.DB) error
- func (b *BlogCategory) GetArticleCategories(db *sql.DB) ([]BlogCategory, error)
- func (b *BlogCategory) GetArticleCategory(db *sql.DB, id string) error
- func (a *BlogCategory) Scan(value interface{}) error
- func (b *BlogCategory) UpdateArticleCategory(db *sql.DB) error
- func (bc BlogCategory) Value() (driver.Value, error)
- type Category
- func (c *Category) CreateCategory(db *sql.DB) error
- func (c *Category) DeleteCategory(db *sql.DB) error
- func (c *Category) GetCategories(db *sql.DB) ([]Category, error)
- func (c *Category) GetCategory(db *sql.DB, id string) error
- func (a *Category) Scan(value interface{}) error
- func (c *Category) UpdateCategory(db *sql.DB) error
- func (a Category) Value() (driver.Value, error)
- type Product
- func (p *Product) CreateProduct(db *sql.DB) error
- func (p *Product) DeleteProduct(db *sql.DB) error
- func (p *Product) GetProduct(db *sql.DB, id string) error
- func (p *Product) GetProducts(db *sql.DB, start, count int) ([]Product, error)
- func (p *Product) ProductDiscount(percent float64) *float64
- func (p *Product) UpdateProduct(db *sql.DB) error
- type Vendor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Article ¶
type BlogCategory ¶
func (*BlogCategory) CreateArticleCategory ¶
func (b *BlogCategory) CreateArticleCategory(db *sql.DB) error
func (*BlogCategory) DeleteArticleCategory ¶
func (b *BlogCategory) DeleteArticleCategory(db *sql.DB) error
func (*BlogCategory) GetArticleCategories ¶
func (b *BlogCategory) GetArticleCategories(db *sql.DB) ([]BlogCategory, error)
func (*BlogCategory) GetArticleCategory ¶
func (b *BlogCategory) GetArticleCategory(db *sql.DB, id string) error
func (*BlogCategory) Scan ¶
func (a *BlogCategory) Scan(value interface{}) error
func (*BlogCategory) UpdateArticleCategory ¶
func (b *BlogCategory) UpdateArticleCategory(db *sql.DB) error
type Category ¶
type Product ¶
type Product struct {
ID string `json:"id"`
Name string `json:"name"`
Price float64 `json:"price"`
Image string `json:"image"`
Details string `json:"details"`
Sizes []string `json:"sizes"`
Colours []string `json:"colours"`
VideoUrl string `json:"video_url"`
Availability bool `json:"availability"`
Star []int64 `json:"star"`
Labels []string `json:"labels"`
Discount float64 `json:"discount"`
Brands []string `json:"brands"`
Categories Category `json:"categories"`
CreatedDate time.Time `json:"created_date"`
UpdatedDate time.Time `json:"updated_date"`
}
func (*Product) GetProducts ¶
func (*Product) ProductDiscount ¶
Click to show internal directories.
Click to hide internal directories.