first commit
This commit is contained in:
		
							
								
								
									
										6
									
								
								deploy/template/rpc/server-func.tpl
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								deploy/template/rpc/server-func.tpl
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | ||||
|  | ||||
| {{if .hasComment}}{{.comment}}{{end}} | ||||
| func (s *{{.server}}Server) {{.method}} ({{if .notStream}}ctx context.Context,{{if .hasReq}} in {{.request}}{{end}}{{else}}{{if .hasReq}} in {{.request}},{{end}}stream {{.streamBody}}{{end}}) ({{if .notStream}}{{.response}},{{end}}error) { | ||||
| 	l := {{.logicPkg}}.New{{.logicName}}({{if .notStream}}ctx,{{else}}stream.Context(),{{end}}s.svcCtx) | ||||
| 	return l.{{.method}}({{if .hasReq}}in{{if .stream}} ,stream{{end}}{{else}}{{if .stream}}stream{{end}}{{end}}) | ||||
| } | ||||
		Reference in New Issue
	
	Block a user