refactor and rename folder to group (#106)

* rebase upstream

* rebase

* trim no need line

* trim no need line

* trim no need line

* update doc

* remove update

* remove no need

* remove no need

* goctl add jwt support

* goctl add jwt support

* goctl add jwt support

* goctl support import

* goctl support import

* support return ()

* support return ()

* revert

* format api

* refactor and rename folder to group

Co-authored-by: kingxt <dream4kingxt@163.com>
This commit is contained in:
kingxt
2020-09-29 11:14:52 +08:00
committed by GitHub
parent b282304054
commit e7d46aa6e2
9 changed files with 61 additions and 48 deletions

View File

@@ -1,33 +1,33 @@
type (
addReq struct {
book string `form:"book"`
price int64 `form:"price"`
}
addReq struct {
book string `form:"book"`
price int64 `form:"price"`
}
addResp struct {
ok bool `json:"ok"`
}
addResp struct {
ok bool `json:"ok"`
}
)
type (
checkReq struct {
book string `form:"book"`
}
checkReq struct {
book string `form:"book"`
}
checkResp struct {
found bool `json:"found"`
price int64 `json:"price"`
}
checkResp struct {
found bool `json:"found"`
price int64 `json:"price"`
}
)
service bookstore-api {
@server(
handler: AddHandler
)
get /add(addReq) returns(addResp)
get /add (addReq) returns (addResp)
@server(
handler: CheckHandler
)
get /check(checkReq) returns(checkResp)
get /check (checkReq) returns (checkResp)
}