24 lines
536 B
Smarty
24 lines
536 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) {
|
|
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}}
|
|
|