| 
									
										
										
										
											2024-10-02 00:57:17 +08:00
										 |  |  | // Code generated by goctl. DO NOT EDIT. | 
					
						
							|  |  |  | // goctl 1.7.2 | 
					
						
							|  |  |  | // Source: user.proto | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | package auth | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import ( | 
					
						
							|  |  |  | 	"context" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	"tianyuan-api/apps/user/user" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	"github.com/zeromicro/go-zero/zrpc" | 
					
						
							|  |  |  | 	"google.golang.org/grpc" | 
					
						
							|  |  |  | ) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | type ( | 
					
						
							| 
									
										
										
										
											2024-10-12 20:41:55 +08:00
										 |  |  | 	AddApiRequestRequest                 = user.AddApiRequestRequest | 
					
						
							|  |  |  | 	AddApiRequestResponse                = user.AddApiRequestResponse | 
					
						
							|  |  |  | 	ApiRequest                           = user.ApiRequest | 
					
						
							|  |  |  | 	Deduction                            = user.Deduction | 
					
						
							|  |  |  | 	EmptyResponse                        = user.EmptyResponse | 
					
						
							|  |  |  | 	EnterpriseAuthReq                    = user.EnterpriseAuthReq | 
					
						
							|  |  |  | 	EnterpriseItem                       = user.EnterpriseItem | 
					
						
							|  |  |  | 	GetApiRequestByTransactionIdRequest  = user.GetApiRequestByTransactionIdRequest | 
					
						
							|  |  |  | 	GetApiRequestByTransactionIdResponse = user.GetApiRequestByTransactionIdResponse | 
					
						
							|  |  |  | 	GetApiRequestsRequest                = user.GetApiRequestsRequest | 
					
						
							|  |  |  | 	GetApiRequestsResponse               = user.GetApiRequestsResponse | 
					
						
							|  |  |  | 	GetDeductionByTransactionIdRequest   = user.GetDeductionByTransactionIdRequest | 
					
						
							|  |  |  | 	GetDeductionByTransactionIdResponse  = user.GetDeductionByTransactionIdResponse | 
					
						
							|  |  |  | 	GetDeductionsRequest                 = user.GetDeductionsRequest | 
					
						
							|  |  |  | 	GetDeductionsResponse                = user.GetDeductionsResponse | 
					
						
							|  |  |  | 	GetEnterpriseAuthStatusReq           = user.GetEnterpriseAuthStatusReq | 
					
						
							|  |  |  | 	GetEnterpriseAuthStatusResp          = user.GetEnterpriseAuthStatusResp | 
					
						
							|  |  |  | 	GetPendingEnterpriseReq              = user.GetPendingEnterpriseReq | 
					
						
							|  |  |  | 	GetPendingEnterpriseResp             = user.GetPendingEnterpriseResp | 
					
						
							|  |  |  | 	GetUserInfoResp                      = user.GetUserInfoResp | 
					
						
							|  |  |  | 	GetWalletRequest                     = user.GetWalletRequest | 
					
						
							|  |  |  | 	GetWalletResponse                    = user.GetWalletResponse | 
					
						
							|  |  |  | 	LoginReq                             = user.LoginReq | 
					
						
							|  |  |  | 	LoginResp                            = user.LoginResp | 
					
						
							|  |  |  | 	PhoneLoginReq                        = user.PhoneLoginReq | 
					
						
							| 
									
										
										
										
											2024-10-15 17:19:23 +08:00
										 |  |  | 	RechargeItem                         = user.RechargeItem | 
					
						
							|  |  |  | 	RechargeRequest                      = user.RechargeRequest | 
					
						
							|  |  |  | 	RechargeResponse                     = user.RechargeResponse | 
					
						
							|  |  |  | 	RechargeWalletRequest                = user.RechargeWalletRequest | 
					
						
							|  |  |  | 	RechargeWalletResponse               = user.RechargeWalletResponse | 
					
						
							| 
									
										
										
										
											2024-10-12 20:41:55 +08:00
										 |  |  | 	RegisterReq                          = user.RegisterReq | 
					
						
							|  |  |  | 	ReviewEnterpriseReq                  = user.ReviewEnterpriseReq | 
					
						
							|  |  |  | 	UpdateWalletRequest                  = user.UpdateWalletRequest | 
					
						
							|  |  |  | 	UpdateWalletResponse                 = user.UpdateWalletResponse | 
					
						
							|  |  |  | 	UserInfoReq                          = user.UserInfoReq | 
					
						
							|  |  |  | 	UserInfoResp                         = user.UserInfoResp | 
					
						
							| 
									
										
										
										
											2024-10-02 00:57:17 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	Auth interface { | 
					
						
							|  |  |  | 		// 注册接口 | 
					
						
							|  |  |  | 		RegisterUser(ctx context.Context, in *RegisterReq, opts ...grpc.CallOption) (*EmptyResponse, error) | 
					
						
							|  |  |  | 		// 登录接口 | 
					
						
							|  |  |  | 		LoginUser(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginResp, error) | 
					
						
							|  |  |  | 		// 手机登录接口 | 
					
						
							|  |  |  | 		PhoneLoginUser(ctx context.Context, in *PhoneLoginReq, opts ...grpc.CallOption) (*LoginResp, error) | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	defaultAuth struct { | 
					
						
							|  |  |  | 		cli zrpc.Client | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | ) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | func NewAuth(cli zrpc.Client) Auth { | 
					
						
							|  |  |  | 	return &defaultAuth{ | 
					
						
							|  |  |  | 		cli: cli, | 
					
						
							|  |  |  | 	} | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // 注册接口 | 
					
						
							|  |  |  | func (m *defaultAuth) RegisterUser(ctx context.Context, in *RegisterReq, opts ...grpc.CallOption) (*EmptyResponse, error) { | 
					
						
							|  |  |  | 	client := user.NewAuthClient(m.cli.Conn()) | 
					
						
							|  |  |  | 	return client.RegisterUser(ctx, in, opts...) | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // 登录接口 | 
					
						
							|  |  |  | func (m *defaultAuth) LoginUser(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginResp, error) { | 
					
						
							|  |  |  | 	client := user.NewAuthClient(m.cli.Conn()) | 
					
						
							|  |  |  | 	return client.LoginUser(ctx, in, opts...) | 
					
						
							|  |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // 手机登录接口 | 
					
						
							|  |  |  | func (m *defaultAuth) PhoneLoginUser(ctx context.Context, in *PhoneLoginReq, opts ...grpc.CallOption) (*LoginResp, error) { | 
					
						
							|  |  |  | 	client := user.NewAuthClient(m.cli.Conn()) | 
					
						
							|  |  |  | 	return client.PhoneLoginUser(ctx, in, opts...) | 
					
						
							|  |  |  | } |