MCPcopy Create free account
hub / github.com/go-dev-frame/sponge / GetGRPCProtoValidation

Method GetGRPCProtoValidation

pkg/sql2code/parser/commonParser.go:152–160  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

150}
151
152func (info *CrudInfo) GetGRPCProtoValidation() string {
153 if info == nil {
154 return ""
155 }
156 if info.ProtoType == "string" {
157 return `[(validate.rules).string.min_len = 1]`
158 }
159 return fmt.Sprintf(`[(validate.rules).%s.gt = 0]`, info.ProtoType)
160}
161
162func (info *CrudInfo) GetWebProtoValidation() string {
163 if info == nil {

Callers 1

TestCrudInfoFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestCrudInfoFunction · 0.64