fixup generated file names and grpc template
Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
		
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| @@ -59,23 +59,8 @@ func (c *{{$ServiceName | lowerFirst}}Service) {{.Name}}(ctx context.Context, re | |||||||
|     return rsp, nil |     return rsp, nil | ||||||
|   {{- end}} |   {{- end}} | ||||||
| } | } | ||||||
| {{if or (.ServerStreaming) (.ClientStreaming)}} |  | ||||||
| type {{$ServiceName}}_{{.Name}}Service interface { |  | ||||||
|     Context() context.Context |  | ||||||
|     SendMsg(interface{}) error |  | ||||||
|     RecvMsg(interface{}) error |  | ||||||
|     {{- if and (.ClientStreaming) (not .ServerStreaming)}} |  | ||||||
|     RecvAndClose() (*{{$rspMethod}}, error) |  | ||||||
|     {{- end}} |  | ||||||
|     Close() error |  | ||||||
|     {{- if .ClientStreaming}} |  | ||||||
|     Send(*{{$reqMethod}}) error |  | ||||||
|     {{- end}} |  | ||||||
|     {{- if .ServerStreaming}} |  | ||||||
|     Recv() (*{{$rspMethod}}, error) |  | ||||||
|     {{- end}} |  | ||||||
| } |  | ||||||
| 
 | 
 | ||||||
|  | {{if or (.ServerStreaming) (.ClientStreaming)}} | ||||||
| type {{$ServiceName | lowerFirst}}Service{{.Name}} struct { | type {{$ServiceName | lowerFirst}}Service{{.Name}} struct { | ||||||
|     stream micro_client.Stream |     stream micro_client.Stream | ||||||
| } | } | ||||||
| @@ -156,22 +141,6 @@ func (h *{{$ServiceName | lowerFirst}}Handler) {{.Name}}(ctx context.Context, re | |||||||
| } | } | ||||||
| {{- end}} | {{- end}} | ||||||
| {{if or (.ServerStreaming) (.ClientStreaming)}} | {{if or (.ServerStreaming) (.ClientStreaming)}} | ||||||
| type {{$ServiceName}}_{{.Name}}Stream interface { |  | ||||||
|   Context() context.Context |  | ||||||
|   SendMsg(interface{}) error |  | ||||||
|   RecvMsg(interface{}) error |  | ||||||
|   {{- if and (.ClientStreaming) (not .ServerStreaming)}} |  | ||||||
|   SendAndClose(*{{$rspMethod}}) error |  | ||||||
|   {{- end}} |  | ||||||
|   Close() error |  | ||||||
|   {{- if .ServerStreaming}} |  | ||||||
|   Send(*{{$rspMethod}}) error |  | ||||||
|   {{- end}} |  | ||||||
|   {{- if .ClientStreaming}} |  | ||||||
|   Recv() (*{{$reqMethod}}, error) |  | ||||||
|   {{- end}} |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| type {{$ServiceName | lowerFirst}}{{.Name}}Stream struct { | type {{$ServiceName | lowerFirst}}{{.Name}}Stream struct { | ||||||
|   stream micro_server.Stream |   stream micro_server.Stream | ||||||
| } | } | ||||||
		Reference in New Issue
	
	Block a user