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>master
parent
b282304054
commit
e7d46aa6e2
@ -1,33 +1,33 @@
|
|||||||
type (
|
type (
|
||||||
addReq struct {
|
addReq struct {
|
||||||
book string `form:"book"`
|
book string `form:"book"`
|
||||||
price int64 `form:"price"`
|
price int64 `form:"price"`
|
||||||
}
|
}
|
||||||
|
|
||||||
addResp struct {
|
addResp struct {
|
||||||
ok bool `json:"ok"`
|
ok bool `json:"ok"`
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type (
|
||||||
checkReq struct {
|
checkReq struct {
|
||||||
book string `form:"book"`
|
book string `form:"book"`
|
||||||
}
|
}
|
||||||
|
|
||||||
checkResp struct {
|
checkResp struct {
|
||||||
found bool `json:"found"`
|
found bool `json:"found"`
|
||||||
price int64 `json:"price"`
|
price int64 `json:"price"`
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
service bookstore-api {
|
service bookstore-api {
|
||||||
@server(
|
@server(
|
||||||
handler: AddHandler
|
handler: AddHandler
|
||||||
)
|
)
|
||||||
get /add(addReq) returns(addResp)
|
get /add (addReq) returns (addResp)
|
||||||
|
|
||||||
@server(
|
@server(
|
||||||
handler: CheckHandler
|
handler: CheckHandler
|
||||||
)
|
)
|
||||||
get /check(checkReq) returns(checkResp)
|
get /check (checkReq) returns (checkResp)
|
||||||
}
|
}
|
@ -1,12 +1,12 @@
|
|||||||
package gogen
|
package gogen
|
||||||
|
|
||||||
const (
|
const (
|
||||||
interval = "internal/"
|
interval = "internal/"
|
||||||
typesPacket = "types"
|
typesPacket = "types"
|
||||||
configDir = interval + "config"
|
configDir = interval + "config"
|
||||||
contextDir = interval + "svc"
|
contextDir = interval + "svc"
|
||||||
handlerDir = interval + "handler"
|
handlerDir = interval + "handler"
|
||||||
logicDir = interval + "logic"
|
logicDir = interval + "logic"
|
||||||
typesDir = interval + typesPacket
|
typesDir = interval + typesPacket
|
||||||
folderProperty = "folder"
|
groupProperty = "group"
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue