288 lines
11 KiB
Go
288 lines
11 KiB
Go
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||
|
// versions:
|
||
|
// - protoc-gen-go-grpc v1.2.0
|
||
|
// - protoc v3.19.4
|
||
|
// source: comasvc.proto
|
||
|
|
||
|
package grpcapi
|
||
|
|
||
|
import (
|
||
|
context "context"
|
||
|
grpc "google.golang.org/grpc"
|
||
|
codes "google.golang.org/grpc/codes"
|
||
|
status "google.golang.org/grpc/status"
|
||
|
)
|
||
|
|
||
|
// This is a compile-time assertion to ensure that this generated file
|
||
|
// is compatible with the grpc package it is being compiled against.
|
||
|
// Requires gRPC-Go v1.32.0 or later.
|
||
|
const _ = grpc.SupportPackageIsVersion7
|
||
|
|
||
|
// MobilityAccountsClient is the client API for MobilityAccounts service.
|
||
|
//
|
||
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||
|
type MobilityAccountsClient interface {
|
||
|
Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error)
|
||
|
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)
|
||
|
// Authentication functions
|
||
|
Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
|
||
|
ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*ChangePasswordResponse, error)
|
||
|
}
|
||
|
|
||
|
type mobilityAccountsClient struct {
|
||
|
cc grpc.ClientConnInterface
|
||
|
}
|
||
|
|
||
|
func NewMobilityAccountsClient(cc grpc.ClientConnInterface) MobilityAccountsClient {
|
||
|
return &mobilityAccountsClient{cc}
|
||
|
}
|
||
|
|
||
|
func (c *mobilityAccountsClient) Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error) {
|
||
|
out := new(RegisterResponse)
|
||
|
err := c.cc.Invoke(ctx, "/MobilityAccounts/Register", in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *mobilityAccountsClient) UpdateData(ctx context.Context, in *UpdateDataRequest, opts ...grpc.CallOption) (*UpdateDataResponse, error) {
|
||
|
out := new(UpdateDataResponse)
|
||
|
err := c.cc.Invoke(ctx, "/MobilityAccounts/UpdateData", in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *mobilityAccountsClient) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...grpc.CallOption) (*GetAccountResponse, error) {
|
||
|
out := new(GetAccountResponse)
|
||
|
err := c.cc.Invoke(ctx, "/MobilityAccounts/GetAccount", in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *mobilityAccountsClient) GetAccounts(ctx context.Context, in *GetAccountsRequest, opts ...grpc.CallOption) (*GetAccountsResponse, error) {
|
||
|
out := new(GetAccountsResponse)
|
||
|
err := c.cc.Invoke(ctx, "/MobilityAccounts/GetAccounts", 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...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
func (c *mobilityAccountsClient) ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*ChangePasswordResponse, error) {
|
||
|
out := new(ChangePasswordResponse)
|
||
|
err := c.cc.Invoke(ctx, "/MobilityAccounts/ChangePassword", in, out, opts...)
|
||
|
if err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
return out, nil
|
||
|
}
|
||
|
|
||
|
// MobilityAccountsServer is the server API for MobilityAccounts service.
|
||
|
// All implementations must embed UnimplementedMobilityAccountsServer
|
||
|
// for forward compatibility
|
||
|
type MobilityAccountsServer interface {
|
||
|
Register(context.Context, *RegisterRequest) (*RegisterResponse, error)
|
||
|
UpdateData(context.Context, *UpdateDataRequest) (*UpdateDataResponse, error)
|
||
|
GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error)
|
||
|
GetAccounts(context.Context, *GetAccountsRequest) (*GetAccountsResponse, error)
|
||
|
// Authentication functions
|
||
|
Login(context.Context, *LoginRequest) (*LoginResponse, error)
|
||
|
ChangePassword(context.Context, *ChangePasswordRequest) (*ChangePasswordResponse, error)
|
||
|
mustEmbedUnimplementedMobilityAccountsServer()
|
||
|
}
|
||
|
|
||
|
// UnimplementedMobilityAccountsServer must be embedded to have forward compatible implementations.
|
||
|
type UnimplementedMobilityAccountsServer struct {
|
||
|
}
|
||
|
|
||
|
func (UnimplementedMobilityAccountsServer) Register(context.Context, *RegisterRequest) (*RegisterResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method Register not implemented")
|
||
|
}
|
||
|
func (UnimplementedMobilityAccountsServer) UpdateData(context.Context, *UpdateDataRequest) (*UpdateDataResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method UpdateData not implemented")
|
||
|
}
|
||
|
func (UnimplementedMobilityAccountsServer) GetAccount(context.Context, *GetAccountRequest) (*GetAccountResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method GetAccount not implemented")
|
||
|
}
|
||
|
func (UnimplementedMobilityAccountsServer) GetAccounts(context.Context, *GetAccountsRequest) (*GetAccountsResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method GetAccounts not implemented")
|
||
|
}
|
||
|
func (UnimplementedMobilityAccountsServer) Login(context.Context, *LoginRequest) (*LoginResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method Login not implemented")
|
||
|
}
|
||
|
func (UnimplementedMobilityAccountsServer) ChangePassword(context.Context, *ChangePasswordRequest) (*ChangePasswordResponse, error) {
|
||
|
return nil, status.Errorf(codes.Unimplemented, "method ChangePassword not implemented")
|
||
|
}
|
||
|
func (UnimplementedMobilityAccountsServer) mustEmbedUnimplementedMobilityAccountsServer() {}
|
||
|
|
||
|
// UnsafeMobilityAccountsServer may be embedded to opt out of forward compatibility for this service.
|
||
|
// Use of this interface is not recommended, as added methods to MobilityAccountsServer will
|
||
|
// result in compilation errors.
|
||
|
type UnsafeMobilityAccountsServer interface {
|
||
|
mustEmbedUnimplementedMobilityAccountsServer()
|
||
|
}
|
||
|
|
||
|
func RegisterMobilityAccountsServer(s grpc.ServiceRegistrar, srv MobilityAccountsServer) {
|
||
|
s.RegisterService(&MobilityAccounts_ServiceDesc, srv)
|
||
|
}
|
||
|
|
||
|
func _MobilityAccounts_Register_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(RegisterRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(MobilityAccountsServer).Register(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: "/MobilityAccounts/Register",
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(MobilityAccountsServer).Register(ctx, req.(*RegisterRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
func _MobilityAccounts_UpdateData_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(UpdateDataRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(MobilityAccountsServer).UpdateData(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: "/MobilityAccounts/UpdateData",
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(MobilityAccountsServer).UpdateData(ctx, req.(*UpdateDataRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
func _MobilityAccounts_GetAccount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(GetAccountRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(MobilityAccountsServer).GetAccount(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: "/MobilityAccounts/GetAccount",
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(MobilityAccountsServer).GetAccount(ctx, req.(*GetAccountRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
func _MobilityAccounts_GetAccounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(GetAccountsRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(MobilityAccountsServer).GetAccounts(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: "/MobilityAccounts/GetAccounts",
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(MobilityAccountsServer).GetAccounts(ctx, req.(*GetAccountsRequest))
|
||
|
}
|
||
|
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 {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(MobilityAccountsServer).Login(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: "/MobilityAccounts/Login",
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(MobilityAccountsServer).Login(ctx, req.(*LoginRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
func _MobilityAccounts_ChangePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||
|
in := new(ChangePasswordRequest)
|
||
|
if err := dec(in); err != nil {
|
||
|
return nil, err
|
||
|
}
|
||
|
if interceptor == nil {
|
||
|
return srv.(MobilityAccountsServer).ChangePassword(ctx, in)
|
||
|
}
|
||
|
info := &grpc.UnaryServerInfo{
|
||
|
Server: srv,
|
||
|
FullMethod: "/MobilityAccounts/ChangePassword",
|
||
|
}
|
||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||
|
return srv.(MobilityAccountsServer).ChangePassword(ctx, req.(*ChangePasswordRequest))
|
||
|
}
|
||
|
return interceptor(ctx, in, info, handler)
|
||
|
}
|
||
|
|
||
|
// MobilityAccounts_ServiceDesc is the grpc.ServiceDesc for MobilityAccounts service.
|
||
|
// It's only intended for direct use with grpc.RegisterService,
|
||
|
// and not to be introspected or modified (even as a copy)
|
||
|
var MobilityAccounts_ServiceDesc = grpc.ServiceDesc{
|
||
|
ServiceName: "MobilityAccounts",
|
||
|
HandlerType: (*MobilityAccountsServer)(nil),
|
||
|
Methods: []grpc.MethodDesc{
|
||
|
{
|
||
|
MethodName: "Register",
|
||
|
Handler: _MobilityAccounts_Register_Handler,
|
||
|
},
|
||
|
{
|
||
|
MethodName: "UpdateData",
|
||
|
Handler: _MobilityAccounts_UpdateData_Handler,
|
||
|
},
|
||
|
{
|
||
|
MethodName: "GetAccount",
|
||
|
Handler: _MobilityAccounts_GetAccount_Handler,
|
||
|
},
|
||
|
{
|
||
|
MethodName: "GetAccounts",
|
||
|
Handler: _MobilityAccounts_GetAccounts_Handler,
|
||
|
},
|
||
|
{
|
||
|
MethodName: "Login",
|
||
|
Handler: _MobilityAccounts_Login_Handler,
|
||
|
},
|
||
|
{
|
||
|
MethodName: "ChangePassword",
|
||
|
Handler: _MobilityAccounts_ChangePassword_Handler,
|
||
|
},
|
||
|
},
|
||
|
Streams: []grpc.StreamDesc{},
|
||
|
Metadata: "comasvc.proto",
|
||
|
}
|