repository

package
v1.7.8 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Code generated by 'freedom new-po'

Code generated by 'freedom new-project infra-example'

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) (po.Goods, error)
	GetAll() ([]po.Goods, error)
	Save(*po.Goods) error
}

type GoodsRepository

type GoodsRepository struct {
	freedom.Repository
}

GoodsRepository .

func (*GoodsRepository) Get

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

func (*GoodsRepository) GetAll

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

func (*GoodsRepository) Save

func (repo *GoodsRepository) Save(goods *po.Goods) (e error)

type OrderInterface

type OrderInterface interface {
	Get(id int, userID int) (po.Order, error)
	GetAll(userID int) ([]po.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 po.Order, e error)

func (*OrderRepository) GetAll

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

Jump to

Keyboard shortcuts

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