controller

package
v1.9.4 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2023 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 CartController added in v1.9.3

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

CartController .

func (*CartController) DeleteAll added in v1.9.3

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

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

func (*CartController) GetItems added in v1.9.3

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

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

func (*CartController) Post added in v1.9.3

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

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

func (*CartController) PostShop added in v1.9.3

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

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

type DeliveryController added in v1.9.3

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

DeliveryController .

func (*DeliveryController) Post added in v1.9.3

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

Post 发货, POST: /delivery route.

func (*DeliveryController) PostOrderPayBy added in v1.9.3

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

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

type GoodsController added in v1.9.3

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

GoodsController .

func (*GoodsController) GetItems added in v1.9.3

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

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

func (*GoodsController) Post added in v1.9.3

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

Post 添加商品, POST: /goods

func (*GoodsController) PostShop added in v1.9.3

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

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

func (*GoodsController) PutStockByBy added in v1.9.3

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

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

func (*GoodsController) PutTag added in v1.9.3

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

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

type OrderController added in v1.9.3

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

OrderController .

func (*OrderController) GetItems added in v1.9.3

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

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

func (*OrderController) PutPay added in v1.9.3

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

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

type UserController added in v1.9.3

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

UserController 控制器

func (*UserController) GetBy added in v1.9.3

func (u *UserController) GetBy(id int) freedom.Result

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

func (*UserController) Post added in v1.9.3

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

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

func (*UserController) Put added in v1.9.3

func (u *UserController) 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