25 lines
567 B
Smarty
25 lines
567 B
Smarty
package {{.PackageName}}
|
|
|
|
import (
|
|
{{if eq .MethodType "rpc"}}
|
|
"context"
|
|
{{end}}
|
|
"{{.ProjectName}}/gen/go/service"
|
|
)
|
|
|
|
{{if eq .MethodType "rpc"}}
|
|
|
|
func (l *{{.StructName}}) {{.MethodName}}Logic({{range $index, $param := .Params}}{{if $index}}, {{end}}{{$param}}{{end}}) (resp {{.MethodReturn}},err error) {
|
|
resp = &{{.MethodResponse}}{}
|
|
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) {
|
|
return nil
|
|
}
|
|
|
|
{{end}}
|
|
|