Documentation
¶
Index ¶
Constants ¶
View Source
const ( MaxProdCategoryLength = 32 MaxProdNameLength = 256 MaxProdDescLength = 2048 MinPrice = 0.01 MaxPrice = 128000 )
View Source
const (
MaxQueryLength = 256
)
Variables ¶
Functions ¶
func ValidateCategory ¶
func ValidateDescription ¶
func ValidateName ¶
func ValidatePrice ¶
Types ¶
type Product ¶
type Product struct { ID uuid.UUID Name string Desc string Category string Price float64 IsActive bool CreatedAt time.Time UpdatedAt time.Time }
func NewProduct ¶
func NewValidatedProduct ¶
type SearchOptions ¶
func NewSearchOptions ¶
func NewSearchOptions(query *string, category *string, minPrice *float64, maxPrice *float64) SearchOptions
func (*SearchOptions) Validate ¶
func (o *SearchOptions) Validate() error
Click to show internal directories.
Click to hide internal directories.