ginrpc
ginrpc copied to clipboard
gin auto binding,grpc, and annotated route,gin 注解路由, grpc,自动参数绑定工具
![image](https://user-images.githubusercontent.com/38731433/181152844-2e45d0ef-e1a2-4188-a640-e0ef0a7ce279.png) github.com/xxjwxc/ginrpc imports github.com/xxjwxc/public/myast: cannot find module providing package github.com/xxjwxc/public/myast github.com/xxjwxc/ginrpc imports github.com/xxjwxc/public/mydoc: cannot find module providing package github.com/xxjwxc/public/mydoc github.com/xxjwxc/ginrpc imports github.com/xxjwxc/public/myreflect: cannot find module providing package github.com/xxjwxc/public/myreflect
就是说我的工程目前是gin写的,现在要在此基础上支持rpc调用,请问用这个可以实现吗?
1.通过ast获取注释,然后自动注册路由和参数绑定。我看代码部分是根据mod 和当前文件目录查找到具体文件,请问在生产环境是否受限,就是打包后发服务器是否可以继续用? 2.参数绑定我目前看到可以传req结构体,但是参数校验,比如新增age参数,然后传0和不传得到的结果是一样的,传一个小数也会接收到0,能否灵活配置,方便更严格的参数校验和参数获取。 另外不止如何添加您的联系方式,非常希望能够加上你一起交流。
不知道算不算问题哈 1. 建议打个tag, 这样方便go mod项目直接import 2. gen.go 的方法 genCode没有自动创建routers目录, 如果是直接使用这个库的情况(不是基于gmsec项目), 就会调试时可以注册路由, 到编译成其他系统就不行了 3. Register方法只能调用一次, 每次调用都会生成swagger.json, 会覆盖之前的文档 4. 默认情况下会为每个没有写注解的公开方法都生成路由, 这样的话想实现下面这种就比较怪了 会把api.BaseController里的方法也注册起来, 也许可以加个注解比如 @Ignore 忽略路由注册 ```go type SysUser struct { api.BaseController api.BaseAuthController...
``` if strings.HasSuffix(filename, "runtime/asm_amd64.s") { index = index - 2 break } index++ ``` asm_amd64 is not correct in arm64 platform ! panic: package parsing failed:can not find main files...
github.com/xxjwxc/[email protected]: reading github.com/xxjwxc/public/go.mod at revision v1.0.2: unknown revision v1.0.2 请更新一下版本吧 谢谢
github.com/xxjwxc/ginrpc/api: module github.com/xxjwxc/ginrpc@latest found (v1.0.0), but does not contain package github.com/xxjwxc/ginrpc/api
Bumps [github.com/gin-gonic/gin](https://github.com/gin-gonic/gin) from 1.9.1-0.20230302001220-a889c58de787 to 1.9.1. Release notes Sourced from github.com/gin-gonic/gin's releases. v1.9.1 Changelog BUG FIXES fix Request.Context() checks #3512 SECURITY fix lack of escaping of filename in Content-Disposition #3556...
Bumps [google.golang.org/protobuf](https://github.com/protocolbuffers/protobuf-go) from 1.29.0 to 1.29.1. Release notes Sourced from google.golang.org/protobuf's releases. v1.29.1 Notable changes Notable changes Bug fixes CL/475995: internal/encoding/text: fix parsing of incomplete numbers Commits 095a62b all: release...