Documentation ¶
Index ¶
- func New(rt *gin.Engine, db *gorm.DB)
- func NewCtrl(reps interfaces.CartService) *cart_ctrl
- func NewRepo(db *gorm.DB) *cart_repo
- func NewService(reps interfaces.CartRepo) *cart_service
- type RepoMock
- func (m *RepoMock) AddCart(data *database.Cart) (*database.Cart, error)
- func (m *RepoMock) DeleteCart(code string) error
- func (m *RepoMock) FindCart(code string) (*database.Cart, error)
- func (m *RepoMock) GetByName(name string) (*database.Carts, error)
- func (m *RepoMock) GetByQty(qty int) (*database.Carts, error)
- func (m *RepoMock) GetCart() (*database.Carts, error)
- func (m *RepoMock) UpdateCart(data *database.Cart, code string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCtrl ¶
func NewCtrl(reps interfaces.CartService) *cart_ctrl
func NewService ¶
func NewService(reps interfaces.CartRepo) *cart_service
Types ¶
type RepoMock ¶
type RepoMock struct {
// contains filtered or unexported fields
}
func (*RepoMock) DeleteCart ¶
Click to show internal directories.
Click to hide internal directories.