handlers

package
v0.0.0-...-f50aa3d Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2019 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClassItem1

type ClassItem1 struct {
	Gname string
	Gtype string
}

获取分类返回的信息 {"data":[ {"gname":"苹果","gtype":"湿垃圾"}, {"gname":"苹果皮","gtype":"湿垃圾"}, {"gname":"[CQ:at,qq=210039672]苹果核","gtype":"湿垃圾"}], "msg":"success", "code":200 }

type ClassItem2

type ClassItem2 struct {
	Name    string
	Type    int
	Aipre   int
	Explain string
	Contain string
	Tip     string
}

{ "code":200, "msg":"success", "newslist":[ { "name":"隐形眼镜", "type":3, "aipre":0, "explain":"干垃圾即其它垃圾,指除可回收物、有害垃圾、厨余垃圾(湿垃圾)以外的其它生活废弃物。", "contain":"常见包括砖瓦陶瓷、渣土、卫生间废纸、猫砂、污损塑料、毛发、硬壳、一次性制品、灰土、瓷器碎片等难以回收的废弃物", "tip":"尽量沥干水分;难以辨识类别的生活垃圾都可以投入干垃圾容器内" }, { "name":"眼镜", "type":3, "aipre":0, "explain":"干垃圾即其它垃圾,指除可回收物、有害垃圾、厨余垃圾(湿垃圾)以外的其它生活废弃物。", "contain":"常见包括砖瓦陶瓷、渣土、卫生间废纸、猫砂、污损塑料、毛发、硬壳、一次性制品、灰土、瓷器碎片等难以回收的废弃物", "tip":"尽量沥干水分;难以辨识类别的生活垃圾都可以投入干垃圾容器内" }, { "name":"智能眼镜", "type":0, "aipre":0, "explain":"可回收垃圾是指适宜回收、可循环利用的生活废弃物。", "contain":"常见包括各类废金属、玻璃瓶、易拉罐、饮料瓶、塑料玩具、书本、报纸、广告单、纸板箱、衣服、床上用品、电子产品等", "tip":"轻投轻放;清洁干燥,避免污染,费纸尽量平整;立体包装物请清空内容物,清洁后压扁投放;有尖锐边角的、应包裹后投放" } ] }

type ClassResults1

type ClassResults1 struct {
	Data []ClassItem1
	Msg  string
	Code int
}

type ClassResults2

type ClassResults2 struct {
	Newslist []ClassItem2
	Msg      string
	Code     int
}

type DetectResult

type DetectResult struct {
	Log_id     int64        `json:"log_id"`
	Result_num int64        `json:"result_num"`
	Result     []ResultItem `json:"result"`
}

type ErrorClassResults1

type ErrorClassResults1 struct {
	Data string
	Msg  string
	Code int
}

type ErrorClassResults2

type ErrorClassResults2 struct {
	Msg  string
	Code int
}

type ResultItem

type ResultItem struct {
	Score   float64 `json:"score"`
	Root    string  `json:"root"`
	Keyword string  `json:"keyword"`
}

获取物品名请求返回的数据: {"log_id": 1207738314010879151, "result_num": 5, "result": [{"score": 0.481166, "root": "植物-其它", "keyword": "植物"}, {"score": 0.006152, "root": "植物-蔷薇科", "keyword": "草莓"}]}

type WasteServer

type WasteServer struct {
}

func NewService

func NewService() *WasteServer

func (*WasteServer) BinRegister

垃圾桶注册

func (*WasteServer) BinStatus

func (*WasteServer) BinStatus(ctx context.Context, in *pb.BinStatusRequest) (ret *pb.Null, err error)

状态上报

func (*WasteServer) WasteDetect

func (*WasteServer) WasteDetect(ctx context.Context, in *pb.WasteRequest) (*pb.WasteReply, error)

垃圾检测

Jump to

Keyboard shortcuts

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