controller

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cart

type Cart struct {
	Worker  freedom.Worker
	CartSev *domain.Cart   //购物车领域服务
	Request *infra.Request //基础设施 用于处理客户端请求io的json数据和验证
}

func (*Cart) DeleteAll

func (c *Cart) DeleteAll() freedom.Result

DeleteAll 删除购物车全部商品, DELETE: /cart/all route.

func (*Cart) GetItems

func (c *Cart) GetItems() freedom.Result

GetItems 获取购物车商品列表, GET: /cart/items route.

func (*Cart) Post

func (c *Cart) Post() freedom.Result

Post 添加商品到购物车, POST: /cart route.

func (*Cart) PostShop added in v1.6.1

func (c *Cart) PostShop() freedom.Result

PostShop 购物购物车全部买商品, POST: /cart/shop route.

type Delivery

type Delivery struct {
	Worker   freedom.Worker
	OrderSrv *domain.Order  //订单领域服务
	Request  *infra.Request //基础设施 用于处理客户端请求io的json数据和验证
}

func (*Delivery) Post added in v1.6.5

func (d *Delivery) Post() freedom.Result

Post 发货, POST: /delivery route.

func (*Delivery) PostOrderPayBy added in v1.6.5

func (d *Delivery) PostOrderPayBy(eventID string) error

PostOrderPayBy 返货提醒, POST: /delivery/order/pay route.

type Goods

type Goods struct {
	GoodsSev *application.Goods //商品领域服务
	Worker   freedom.Worker     //运行时,一个请求绑定一个运行时
	Request  *infra.Request     //基础设施 用于处理客户端请求io的json数据和验证
}

func (*Goods) GetItems

func (g *Goods) GetItems() freedom.Result

GetItems 获取商品列表, GET: /goods/items route.

func (*Goods) Post

func (g *Goods) Post() freedom.Result

Post 添加商品, POST: /goods

func (*Goods) PostShop

func (g *Goods) PostShop() freedom.Result

PostShop 为商品打tag, POST: /goods/shop

func (*Goods) PutStockByBy

func (g *Goods) PutStockByBy(id, num int) freedom.Result

PutStock 增加库存, PUT: /goods/stock/:id/:num

func (*Goods) PutTag

func (g *Goods) PutTag() freedom.Result

PutTag 为商品打tag, PUT: /goods/tag

type Order

type Order struct {
	Worker   freedom.Worker
	Request  *infra.Request //基础设施 用于处理客户端请求io的json数据和验证
	OrderSrv *domain.Order  //订单领域服务
}

func (*Order) GetItems added in v1.6.1

func (o *Order) GetItems() freedom.Result

GetItems 获取商品列表, GET: /order/items route.

func (*Order) PutPay added in v1.6.1

func (o *Order) PutPay() freedom.Result

PutPay 支付订单, PUT: /order/pay route.

type User

type User struct {
	Sev     *domain.User   //用户领域服务
	Worker  freedom.Worker //运行时,一个请求绑定一个运行时
	Request *infra.Request //基础设施 用于处理客户端请求io的json数据和验证
}

User 控制器

func (*User) GetBy

func (c *User) GetBy(id int) freedom.Result

GetBy 获取用户信息, GET: /user/:id route.

func (*User) Post

func (u *User) Post() freedom.Result

Post 注册用户, POST: /user route.

func (*User) Put

func (u *User) Put() freedom.Result

Put 修改密码, PUT: /user route.

Jump to

Keyboard shortcuts

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