repository

package
v0.0.0-...-04224c6 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CartRepository

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

func (CartRepository) CleanCart

func (c CartRepository) CleanCart(userId uint64) error

func (CartRepository) CreateCart

func (c CartRepository) CreateCart(cart *model.Cart) (uint64, error)

func (CartRepository) DecrNum

func (c CartRepository) DecrNum(cartId uint64, num uint64) error

func (CartRepository) DeleteCartById

func (c CartRepository) DeleteCartById(cartId uint64) error

func (CartRepository) FindAll

func (c CartRepository) FindAll(userId uint64) (cartAll []model.Cart, err error)

func (CartRepository) FindCartById

func (c CartRepository) FindCartById(cartId uint64) (cart *model.Cart, err error)

func (CartRepository) IncrNum

func (c CartRepository) IncrNum(cartId uint64, num uint64) error

func (CartRepository) InitTable

func (c CartRepository) InitTable() error

func (CartRepository) UpdateCart

func (c CartRepository) UpdateCart(cart *model.Cart) error

type ICartRepository

type ICartRepository interface {
	InitTable() error
	FindCartById(uint64) (*model.Cart, error)
	CreateCart(*model.Cart) (uint64, error)
	DeleteCartById(uint64) error
	UpdateCart(*model.Cart) error
	FindAll(uint64) ([]model.Cart, error)
	CleanCart(uint64) error
	IncrNum(uint64, uint64) error
	DecrNum(uint64, uint64) error
}

func NewCartRepository

func NewCartRepository(db *gorm.DB) ICartRepository

Jump to

Keyboard shortcuts

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