2023-11-27 09:36:02 +00:00
|
|
|
package {{.PackageName}}
|
|
|
|
|
|
|
|
import (
|
2023-12-07 07:34:40 +00:00
|
|
|
{{if eq .MethodType "rpc"}}
|
2023-12-06 09:13:51 +00:00
|
|
|
"context"
|
2023-12-07 07:34:40 +00:00
|
|
|
{{end}}
|
2023-11-27 09:36:02 +00:00
|
|
|
"{{.ProjectName}}/gen/go/service"
|
|
|
|
)
|
|
|
|
|
2023-12-07 07:34:40 +00:00
|
|
|
{{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
|
2023-12-07 07:34:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
{{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
|
2023-12-07 07:34:40 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
{{end}}
|
|
|
|
|