You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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)
|
|
} |