1 Star 1 Fork 2

kristas / booting-go

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
test_inject_path_controller.go 1.48 KB
一键复制 编辑 原始数据 按行查看 历史
kristas 提交于 2021-10-22 22:58 . feat: add annotation
// Package api Code Generated by booctl; SKIP IF EXISTS.
package api_test
import (
"gitee.com/kristas/booting-go/framework"
"gitee.com/kristas/booting-go/framework/core/log"
"gitee.com/kristas/booting-go/framework/core/statement/types"
"gitee.com/kristas/booting-go/framework/web/rest"
)
func init() {
framework.Component(new(TestInjectPathController))
}
type TestInjectPathController struct {
types.Controller `group:"/test/inject/path"`
Log log.Logger `wire:""`
testInt rest.GET `url:"/int/{val}" param:"val path"`
testInt32 rest.GET `url:"/int32/{val}" param:"val path"`
testInt64 rest.GET `url:"/int64/{val}" param:"val path"`
testFloat32 rest.GET `url:"/float32/{val}" param:"val path"`
testFloat64 rest.GET `url:"/float64/{val}" param:"val path"`
testBool rest.GET `url:"/bool/{val}" param:"val path"`
testString rest.GET `url:"/string/{val}" param:"val path"`
}
func (h *TestInjectPathController) TestInt(val int) int {
return val
}
func (h *TestInjectPathController) TestInt32(val int32) int32 {
return val
}
func (h *TestInjectPathController) TestInt64(val int64) int64 {
return val
}
func (h *TestInjectPathController) TestFloat32(val float32) float32 {
return val
}
func (h *TestInjectPathController) TestFloat64(val float64) float64 {
return val
}
func (h *TestInjectPathController) TestBool(val bool) bool {
return val
}
func (h *TestInjectPathController) TestString(val string) string {
return val
}
Go
1
https://gitee.com/kristas/booting-go.git
git@gitee.com:kristas/booting-go.git
kristas
booting-go
booting-go
v1.4.4

搜索帮助