controller

package
v1.5.8 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 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 Cart

type Cart struct {
	Runtime     freedom.Runtime
	CartSev     *application.Cart  //购物车领域服务
	JSONRequest *infra.JSONRequest //基础设施 用于处理客户端请求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.

type Delivery

type Delivery struct {
	Runtime freedom.Runtime
}

type Goods

type Goods struct {
	GoodsSev    *application.Goods //商品领域服务
	Runtime     freedom.Runtime    //运行时,一个请求绑定一个运行时
	JSONRequest *infra.JSONRequest //基础设施 用于处理客户端请求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 {
	Runtime freedom.Runtime
}

type User

type User struct {
	Sev         *application.User  //用户领域服务
	Runtime     freedom.Runtime    //运行时,一个请求绑定一个运行时
	JSONRequest *infra.JSONRequest //基础设施 用于处理客户端请求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