39 lines
681 B
Go
39 lines
681 B
Go
// Code generated by goctl. DO NOT EDIT.
|
|
// goctl 1.10.1
|
|
// Source: user.proto
|
|
|
|
package userclient
|
|
|
|
import (
|
|
"context"
|
|
|
|
"user/user"
|
|
|
|
"github.com/zeromicro/go-zero/zrpc"
|
|
"google.golang.org/grpc"
|
|
)
|
|
|
|
type (
|
|
Request = user.Request
|
|
Response = user.Response
|
|
|
|
User interface {
|
|
Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
|
|
}
|
|
|
|
defaultUser struct {
|
|
cli zrpc.Client
|
|
}
|
|
)
|
|
|
|
func NewUser(cli zrpc.Client) User {
|
|
return &defaultUser{
|
|
cli: cli,
|
|
}
|
|
}
|
|
|
|
func (m *defaultUser) Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
|
|
client := user.NewUserClient(m.cli.Conn())
|
|
return client.Ping(ctx, in, opts...)
|
|
}
|