repositorys

package
v1.3.5 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2020 License: Apache-2.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 GoodsInterface

type GoodsInterface interface {
	Get(id int) (objects.Goods, error)
	GetAll() ([]objects.Goods, error)
	Update(*objects.Goods) error
}

type GoodsRepository

type GoodsRepository struct {
	freedom.Repository
}

GoodsRepository .

func (*GoodsRepository) Get

func (repo *GoodsRepository) Get(id int) (result objects.Goods, e error)

func (*GoodsRepository) GetAll

func (repo *GoodsRepository) GetAll() (result []objects.Goods, e error)

func (*GoodsRepository) Update added in v1.3.3

func (repo *GoodsRepository) Update(goods *objects.Goods) (e error)

type OrderInterface

type OrderInterface interface {
	Get(id int, userID int) (objects.Order, error)
	GetAll(userID int) ([]objects.Order, error)
	Create(goodsID, num, userID int) error
}

type OrderRepository

type OrderRepository struct {
	freedom.Repository
}

OrderRepository .

func (*OrderRepository) Create

func (repo *OrderRepository) Create(goodsID, num, userID int) error

func (*OrderRepository) Get

func (repo *OrderRepository) Get(id, userID int) (result objects.Order, e error)

func (*OrderRepository) GetAll

func (repo *OrderRepository) GetAll(userID int) (result []objects.Order, e error)

Jump to

Keyboard shortcuts

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