mirror of
https://github.com/zeromicro/go-zero.git
synced 2025-01-24 09:40:24 +08:00
b060867009
* update bookstore * update bookstore
29 lines
397 B
Plaintext
29 lines
397 B
Plaintext
type (
|
|
addReq {
|
|
book string `form:"book"`
|
|
price int64 `form:"price"`
|
|
}
|
|
|
|
addResp {
|
|
ok bool `json:"ok"`
|
|
}
|
|
)
|
|
|
|
type (
|
|
checkReq {
|
|
book string `form:"book"`
|
|
}
|
|
|
|
checkResp {
|
|
found bool `json:"found"`
|
|
price int64 `json:"price"`
|
|
}
|
|
)
|
|
|
|
service bookstore-api {
|
|
@handler AddHandler
|
|
get /add (addReq) returns (addResp)
|
|
|
|
@handler CheckHandler
|
|
get /check (checkReq) returns (checkResp)
|
|
} |