Documentation ¶
Overview ¶
Package vproductbus provides business access to view product domain.
Index ¶
Constants ¶
View Source
const ( OrderByProductID = "product_id" OrderByUserID = "user_id" OrderByName = "name" OrderByCost = "cost" OrderByQuantity = "quantity" OrderByUserName = "user_name" )
Set of fields that the results can be ordered by.
Variables ¶
View Source
var DefaultOrderBy = order.NewBy(OrderByProductID, order.ASC)
DefaultOrderBy represents the default way we sort.
Functions ¶
This section is empty.
Types ¶
type Business ¶
type Business struct {
// contains filtered or unexported fields
}
Business manages the set of APIs for view product access.
func NewBusiness ¶
NewBusiness constructs a vproduct business API for use.
type Product ¶
type Product struct { ID uuid.UUID UserID uuid.UUID Name productbus.Name Cost float64 Quantity int DateCreated time.Time DateUpdated time.Time UserName userbus.Name }
Product represents an individual product with extended information.
type QueryFilter ¶
type QueryFilter struct { ID *uuid.UUID Name *productbus.Name Cost *float64 Quantity *int UserName *userbus.Name }
QueryFilter holds the available fields a query can be filtered on. We are using pointer semantics because the With API mutates the value.
Directories ¶
Path | Synopsis |
---|---|
stores
|
|
vproductdb
Package vproductdb provides access to the product view.
|
Package vproductdb provides access to the product view. |
Click to show internal directories.
Click to hide internal directories.