protoc-gen-go-micro/examples/single-package-mode/templates/{{.File.Name|dir}}/service.go.tmpl

27 lines
656 B
Cheetah
Raw Normal View History

// file generated with protoc-gen-gotemplate
package {{.File.Name | dir}}
{{- $file := .File}}
{{- $currentFile := $file.Name | getProtoFile}}
import (
"fmt"
"golang.org/x/net/context"
{{- range .File.Dependency}}
{{- $dependency := . | getProtoFile}}
{{$dependency.GoPkg}}
{{end}}
)
type Service struct {}
{{- range .Service.Method}}
{{- $in := .InputType | getMessageType $file}}
{{- $out := .OutputType | getMessageType $file}}
func (service Service) {{.Name}}(ctx context.Context, input *{{$in.GoType $currentFile.GoPkg.Path}}) (*{{$out.GoType $currentFile.GoPkg.Path}}, error) {
return nil, fmt.Errorf("method not implemented")
}
{{end}}