Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CachedProductQuery ¶
type CachedProductQuery struct {
// contains filtered or unexported fields
}
func NewCachedProductQuery ¶
func NewCachedProductQuery(pq ProductQuery, cacheClient *redis.Client) CachedProductQuery
type Category ¶
type Category struct { Base Name string `json:"name"` Description string `json:"description"` Products []Product `json:"product" gorm:"many2many:product_category"` }
type Product ¶
type Product struct { Base Name string `json:"name"` Description string `json:"description"` Picture string `json:"picture"` Price float32 `json:"price"` Categories []Category `json:"categories" gorm:"many2many:product_category"` }
func GetProductById ¶
func SearchProduct ¶
type ProductQuery ¶
type ProductQuery struct {
// contains filtered or unexported fields
}
func NewProductQuery ¶
func NewProductQuery(ctx context.Context, db *gorm.DB) ProductQuery
Click to show internal directories.
Click to hide internal directories.