Documentation ¶
Index ¶
- type Repository
- func (r *Repository) Add(_ context.Context, userID int64, skuID int64, count uint16) error
- func (r *Repository) DeleteItem(_ context.Context, userID int64, skuID int64) error
- func (r *Repository) DeleteItemsByUserID(_ context.Context, userID int64) (int, error)
- func (r *Repository) GetCart(_ context.Context, userID int64) ([]models.ItemCount, error)
- type RepositoryWithMetrics
- func (p *RepositoryWithMetrics) Add(ctx context.Context, userID int64, skuID int64, count uint16) (err error)
- func (p *RepositoryWithMetrics) DeleteItem(ctx context.Context, userID int64, skuID int64) (err error)
- func (p *RepositoryWithMetrics) DeleteItemsByUserID(ctx context.Context, userID int64) (count int, err error)
- func (p *RepositoryWithMetrics) GetCart(ctx context.Context, userID int64) (items []models.ItemCount, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository() *Repository
func (*Repository) DeleteItem ¶
func (*Repository) DeleteItemsByUserID ¶
type RepositoryWithMetrics ¶
type RepositoryWithMetrics struct {
// contains filtered or unexported fields
}
func NewRepositoryWithMetrics ¶
func NewRepositoryWithMetrics(repo *Repository) *RepositoryWithMetrics
func (*RepositoryWithMetrics) DeleteItem ¶
func (*RepositoryWithMetrics) DeleteItemsByUserID ¶
Click to show internal directories.
Click to hide internal directories.