domain

package
v1.8.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoodsService

type GoodsService struct {
	Worker    freedom.Worker
	GoodsRepo repository.GoodsInterface
}

GoodsService .

func (*GoodsService) AddStock

func (srv *GoodsService) AddStock(goodsID, num int) error

AddStock .

func (*GoodsService) Get

func (srv *GoodsService) Get(ID int) (rep dto.GoodsRep, e error)

Get .

func (*GoodsService) GetAll

func (srv *GoodsService) GetAll() (result []dto.GoodsRep, e error)

GetAll .

type OrderService

type OrderService struct {
	Worker    freedom.Worker
	GoodsRepo repository.GoodsInterface
	OrderRepo repository.OrderInterface
	Tx        transaction.Transaction
}

OrderService .

func (*OrderService) Add

func (srv *OrderService) Add(goodsID, num, userID int) (resp string, e error)

Add .

func (*OrderService) Get

func (srv *OrderService) Get(ID, userID int) (result dto.OrderRep, e error)

Get .

func (*OrderService) GetAll

func (srv *OrderService) GetAll(userID int) (result []dto.OrderRep, e error)

GetAll .

Directories

Path Synopsis
Package dto code generated by 'freedom new-project infra-example'
Package dto code generated by 'freedom new-project infra-example'
Package po generated by 'freedom new-po' Package po generated by 'freedom new-po' Package po generated by 'freedom new-po' Package po generated by 'freedom new-po' Package po generated by 'freedom new-po'
Package po generated by 'freedom new-po' Package po generated by 'freedom new-po' Package po generated by 'freedom new-po' Package po generated by 'freedom new-po' Package po generated by 'freedom new-po'

Jump to

Keyboard shortcuts

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