Documentation
¶
Index ¶
- func NewSessionPostgresqlRepository(db *sql.DB) order.Repository
- type PostgresqlRepository
- func (r *PostgresqlRepository) AddOrder(order *models.Order, userId uint64, products []*models.PreviewCartArticle, ...) (*models.OrderNumber, error)
- func (r *PostgresqlRepository) ChangeStatusOrder(orderId uint64, status string) (*models.OrderNumber, uint64, error)
- func (r *PostgresqlRepository) CreateSortString(sortKey, sortDirection string) (string, error)
- func (r *PostgresqlRepository) GetCountPages(userId uint64, countOrdersOnPage int) (int, error)
- func (r *PostgresqlRepository) GetProductsInOrder(orderId uint64) ([]*models.PreviewOrderedProducts, error)
- func (r *PostgresqlRepository) SelectRangeOrders(userId uint64, sortString string, paginator *models.PaginatorOrders) ([]*models.PlacedOrder, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSessionPostgresqlRepository ¶
func NewSessionPostgresqlRepository(db *sql.DB) order.Repository
Types ¶
type PostgresqlRepository ¶
type PostgresqlRepository struct {
// contains filtered or unexported fields
}
func (*PostgresqlRepository) AddOrder ¶
func (r *PostgresqlRepository) AddOrder(order *models.Order, userId uint64, products []*models.PreviewCartArticle, price *models.TotalPrice) (*models.OrderNumber, error)
Add order in db
func (*PostgresqlRepository) ChangeStatusOrder ¶
func (r *PostgresqlRepository) ChangeStatusOrder(orderId uint64, status string) (*models.OrderNumber, uint64, error)
func (*PostgresqlRepository) CreateSortString ¶
func (r *PostgresqlRepository) CreateSortString(sortKey, sortDirection string) (string, error)
func (*PostgresqlRepository) GetCountPages ¶
func (r *PostgresqlRepository) GetCountPages(userId uint64, countOrdersOnPage int) (int, error)
Get count of all pages for this category
func (*PostgresqlRepository) GetProductsInOrder ¶
func (r *PostgresqlRepository) GetProductsInOrder(orderId uint64) ([]*models.PreviewOrderedProducts, error)
func (*PostgresqlRepository) SelectRangeOrders ¶
func (r *PostgresqlRepository) SelectRangeOrders(userId uint64, sortString string, paginator *models.PaginatorOrders) ([]*models.PlacedOrder, error)
Click to show internal directories.
Click to hide internal directories.