Add missing gRPC functions
This commit is contained in:
@@ -26,6 +26,7 @@ type MobilityAccountsClient interface {
|
||||
UpdateData(ctx context.Context, in *UpdateDataRequest, opts ...grpc.CallOption) (*UpdateDataResponse, error)
|
||||
GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponse, error)
|
||||
GetAccounts(ctx context.Context, in *GetAccountsRequest, opts ...grpc.CallOption) (*GetAccountsResponse, error)
|
||||
GetAccountsBatch(ctx context.Context, in *GetAccountsBatchRequest, opts ...grpc.CallOption) (*GetAccountsBatchResponse, error)
|
||||
// Authentication functions
|
||||
Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
|
||||
ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*ChangePasswordResponse, error)
|
||||
@@ -75,6 +76,15 @@ func (c *mobilityAccountsClient) GetAccounts(ctx context.Context, in *GetAccount
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *mobilityAccountsClient) GetAccountsBatch(ctx context.Context, in *GetAccountsBatchRequest, opts ...grpc.CallOption) (*GetAccountsBatchResponse, error) {
|
||||
out := new(GetAccountsBatchResponse)
|
||||
err := c.cc.Invoke(ctx, "/MobilityAccounts/GetAccountsBatch", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *mobilityAccountsClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) {
|
||||
out := new(LoginResponse)
|
||||
err := c.cc.Invoke(ctx, "/MobilityAccounts/Login", in, out, opts...)
|
||||
@@ -101,6 +111,7 @@ type MobilityAccountsServer interface {
|
||||
UpdateData(context.Context, *UpdateDataRequest) (*UpdateDataResponse, error)
|
||||
GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error)
|
||||
GetAccounts(context.Context, *GetAccountsRequest) (*GetAccountsResponse, error)
|
||||
GetAccountsBatch(context.Context, *GetAccountsBatchRequest) (*GetAccountsBatchResponse, error)
|
||||
// Authentication functions
|
||||
Login(context.Context, *LoginRequest) (*LoginResponse, error)
|
||||
ChangePassword(context.Context, *ChangePasswordRequest) (*ChangePasswordResponse, error)
|
||||
@@ -123,6 +134,9 @@ func (UnimplementedMobilityAccountsServer) GetAccount(context.Context, *GetAccou
|
||||
func (UnimplementedMobilityAccountsServer) GetAccounts(context.Context, *GetAccountsRequest) (*GetAccountsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetAccounts not implemented")
|
||||
}
|
||||
func (UnimplementedMobilityAccountsServer) GetAccountsBatch(context.Context, *GetAccountsBatchRequest) (*GetAccountsBatchResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetAccountsBatch not implemented")
|
||||
}
|
||||
func (UnimplementedMobilityAccountsServer) Login(context.Context, *LoginRequest) (*LoginResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Login not implemented")
|
||||
}
|
||||
@@ -214,6 +228,24 @@ func _MobilityAccounts_GetAccounts_Handler(srv interface{}, ctx context.Context,
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _MobilityAccounts_GetAccountsBatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(GetAccountsBatchRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MobilityAccountsServer).GetAccountsBatch(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/MobilityAccounts/GetAccountsBatch",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MobilityAccountsServer).GetAccountsBatch(ctx, req.(*GetAccountsBatchRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _MobilityAccounts_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(LoginRequest)
|
||||
if err := dec(in); err != nil {
|
||||
@@ -273,6 +305,10 @@ var MobilityAccounts_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "GetAccounts",
|
||||
Handler: _MobilityAccounts_GetAccounts_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetAccountsBatch",
|
||||
Handler: _MobilityAccounts_GetAccountsBatch_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Login",
|
||||
Handler: _MobilityAccounts_Login_Handler,
|
||||
|
||||
Reference in New Issue
Block a user