34 lines
462 B
Smarty
34 lines
462 B
Smarty
|
{{.head}}
|
||
|
|
||
|
package {{.filePackage}}
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
|
||
|
{{.pbPackage}}
|
||
|
{{if ne .pbPackage .protoGoPackage}}{{.protoGoPackage}}{{end}}
|
||
|
|
||
|
"github.com/zeromicro/go-zero/zrpc"
|
||
|
"google.golang.org/grpc"
|
||
|
)
|
||
|
|
||
|
type (
|
||
|
{{.alias}}
|
||
|
|
||
|
{{.serviceName}} interface {
|
||
|
{{.interface}}
|
||
|
}
|
||
|
|
||
|
default{{.serviceName}} struct {
|
||
|
cli zrpc.Client
|
||
|
}
|
||
|
)
|
||
|
|
||
|
func New{{.serviceName}}(cli zrpc.Client) {{.serviceName}} {
|
||
|
return &default{{.serviceName}}{
|
||
|
cli: cli,
|
||
|
}
|
||
|
}
|
||
|
|
||
|
{{.functions}}
|