proto/goutils/proto_build/tpls/logic_fusen_handler.tpl

25 lines
567 B
Smarty
Raw Normal View History

2023-11-27 09:36:02 +00:00
package {{.PackageName}}
import (
{{if eq .MethodType "rpc"}}
2023-12-06 09:13:51 +00:00
"context"
{{end}}
2023-11-27 09:36:02 +00:00
"{{.ProjectName}}/gen/go/service"
)
{{if eq .MethodType "rpc"}}
2023-12-06 09:13:51 +00:00
func (l *{{.StructName}}) {{.MethodName}}Logic({{range $index, $param := .Params}}{{if $index}}, {{end}}{{$param}}{{end}}) (resp {{.MethodReturn}},err error) {
2023-12-07 09:29:33 +00:00
resp = &{{.MethodResponse}}{}
2023-12-07 09:22:05 +00:00
return resp, nil
}
{{else if eq .MethodType "stream"}}
func (l *{{.StructName}}) {{.MethodName}}Logic(stream {{range $index, $param := .Params}}{{if $index}}, {{end}}{{$param}}{{end}}) (err error) {
2023-12-07 09:22:05 +00:00
return nil
}
{{end}}