59 lines
1.8 KiB
Go
59 lines
1.8 KiB
Go
// Code generated by goctl. DO NOT EDIT.
|
|
// goctl 1.7.2
|
|
// Source: user.proto
|
|
|
|
package user
|
|
|
|
import (
|
|
"context"
|
|
|
|
"tianyuan-api/apps/user/user"
|
|
|
|
"github.com/zeromicro/go-zero/zrpc"
|
|
"google.golang.org/grpc"
|
|
)
|
|
|
|
type (
|
|
EmptyResponse = user.EmptyResponse
|
|
EnterpriseAuthReq = user.EnterpriseAuthReq
|
|
EnterpriseItem = user.EnterpriseItem
|
|
GetEnterpriseAuthStatusReq = user.GetEnterpriseAuthStatusReq
|
|
GetEnterpriseAuthStatusResp = user.GetEnterpriseAuthStatusResp
|
|
GetPendingEnterpriseReq = user.GetPendingEnterpriseReq
|
|
GetPendingEnterpriseResp = user.GetPendingEnterpriseResp
|
|
LoginReq = user.LoginReq
|
|
LoginResp = user.LoginResp
|
|
PhoneLoginReq = user.PhoneLoginReq
|
|
RegisterReq = user.RegisterReq
|
|
ReviewEnterpriseReq = user.ReviewEnterpriseReq
|
|
UserInfoReq = user.UserInfoReq
|
|
UserInfoResp = user.UserInfoResp
|
|
|
|
User interface {
|
|
// 获取用户信息
|
|
UserInfo(ctx context.Context, in *UserInfoReq, opts ...grpc.CallOption) (*UserInfoResp, error)
|
|
GetEnterpriseAuthStatus(ctx context.Context, in *GetEnterpriseAuthStatusReq, opts ...grpc.CallOption) (*GetEnterpriseAuthStatusResp, error)
|
|
}
|
|
|
|
defaultUser struct {
|
|
cli zrpc.Client
|
|
}
|
|
)
|
|
|
|
func NewUser(cli zrpc.Client) User {
|
|
return &defaultUser{
|
|
cli: cli,
|
|
}
|
|
}
|
|
|
|
// 获取用户信息
|
|
func (m *defaultUser) UserInfo(ctx context.Context, in *UserInfoReq, opts ...grpc.CallOption) (*UserInfoResp, error) {
|
|
client := user.NewUserClient(m.cli.Conn())
|
|
return client.UserInfo(ctx, in, opts...)
|
|
}
|
|
|
|
func (m *defaultUser) GetEnterpriseAuthStatus(ctx context.Context, in *GetEnterpriseAuthStatusReq, opts ...grpc.CallOption) (*GetEnterpriseAuthStatusResp, error) {
|
|
client := user.NewUserClient(m.cli.Conn())
|
|
return client.GetEnterpriseAuthStatus(ctx, in, opts...)
|
|
}
|