cart

package
v0.0.0-...-1bf90d9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 30, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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) Add

func (r *Repository) Add(_ context.Context, userID int64, skuID int64, count uint16) error

func (*Repository) DeleteItem

func (r *Repository) DeleteItem(_ context.Context, userID int64, skuID int64) error

func (*Repository) DeleteItemsByUserID

func (r *Repository) DeleteItemsByUserID(_ context.Context, userID int64) (int, error)

func (*Repository) GetCart

func (r *Repository) GetCart(_ context.Context, userID int64) ([]models.ItemCount, error)

type RepositoryWithMetrics

type RepositoryWithMetrics struct {
	// contains filtered or unexported fields
}

func NewRepositoryWithMetrics

func NewRepositoryWithMetrics(repo *Repository) *RepositoryWithMetrics

func (*RepositoryWithMetrics) Add

func (p *RepositoryWithMetrics) Add(ctx context.Context, userID int64, skuID int64, count uint16) (err error)

func (*RepositoryWithMetrics) DeleteItem

func (p *RepositoryWithMetrics) DeleteItem(ctx context.Context, userID int64, skuID int64) (err error)

func (*RepositoryWithMetrics) DeleteItemsByUserID

func (p *RepositoryWithMetrics) DeleteItemsByUserID(ctx context.Context, userID int64) (count int, err error)

func (*RepositoryWithMetrics) GetCart

func (p *RepositoryWithMetrics) GetCart(ctx context.Context, userID int64) (items []models.ItemCount, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL