modules

package
v0.0.0-...-423f668 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(rt *gin.Engine, db *gorm.DB)

func NewCtrl

func NewCtrl(reps interfaces.CartService) *cart_ctrl

func NewRepo

func NewRepo(db *gorm.DB) *cart_repo

func NewService

func NewService(reps interfaces.CartRepo) *cart_service

Types

type RepoMock

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

func (*RepoMock) AddCart

func (m *RepoMock) AddCart(data *database.Cart) (*database.Cart, error)

func (*RepoMock) DeleteCart

func (m *RepoMock) DeleteCart(code string) error

func (*RepoMock) FindCart

func (m *RepoMock) FindCart(code string) (*database.Cart, error)

func (*RepoMock) GetByName

func (m *RepoMock) GetByName(name string) (*database.Carts, error)

func (*RepoMock) GetByQty

func (m *RepoMock) GetByQty(qty int) (*database.Carts, error)

func (*RepoMock) GetCart

func (m *RepoMock) GetCart() (*database.Carts, error)

func (*RepoMock) UpdateCart

func (m *RepoMock) UpdateCart(data *database.Cart, code string) error

Jump to

Keyboard shortcuts

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