repository

package
v1.7.7 Latest Latest
Warning

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

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

Documentation

Overview

Code generated by 'freedom new-crud'

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

type GoodsRepository

type GoodsRepository struct {
	freedom.Repository
}

GoodsRepository .

func (*GoodsRepository) Get

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

func (*GoodsRepository) GetAll

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

func (*GoodsRepository) Save

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

type OrderInterface

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

func (*OrderRepository) GetAll

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

Jump to

Keyboard shortcuts

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