// Code generated by protoc-gen-go-grpc. DO NOT EDIT. package account import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" emptypb "google.golang.org/protobuf/types/known/emptypb" ) // 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 // AccountClient is the client API for Account 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 AccountClient interface { DebugLogin(ctx context.Context, in *DebugLoginRequest, opts ...grpc.CallOption) (*TokenReply, error) Authorization(ctx context.Context, in *AuthorizationRequest, opts ...grpc.CallOption) (*TokenReply, error) SendPhoneCode(ctx context.Context, in *SendPhoneCodeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) CheckPhoneCode(ctx context.Context, in *CheckPhoneCodeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) } type accountClient struct { cc grpc.ClientConnInterface } func NewAccountClient(cc grpc.ClientConnInterface) AccountClient { return &accountClient{cc} } func (c *accountClient) DebugLogin(ctx context.Context, in *DebugLoginRequest, opts ...grpc.CallOption) (*TokenReply, error) { out := new(TokenReply) err := c.cc.Invoke(ctx, "/api.account.Account/DebugLogin", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *accountClient) Authorization(ctx context.Context, in *AuthorizationRequest, opts ...grpc.CallOption) (*TokenReply, error) { out := new(TokenReply) err := c.cc.Invoke(ctx, "/api.account.Account/Authorization", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *accountClient) SendPhoneCode(ctx context.Context, in *SendPhoneCodeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/api.account.Account/SendPhoneCode", in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *accountClient) CheckPhoneCode(ctx context.Context, in *CheckPhoneCodeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) err := c.cc.Invoke(ctx, "/api.account.Account/CheckPhoneCode", in, out, opts...) if err != nil { return nil, err } return out, nil } // AccountServer is the server API for Account service. // All implementations must embed UnimplementedAccountServer // for forward compatibility type AccountServer interface { DebugLogin(context.Context, *DebugLoginRequest) (*TokenReply, error) Authorization(context.Context, *AuthorizationRequest) (*TokenReply, error) SendPhoneCode(context.Context, *SendPhoneCodeRequest) (*emptypb.Empty, error) CheckPhoneCode(context.Context, *CheckPhoneCodeRequest) (*emptypb.Empty, error) mustEmbedUnimplementedAccountServer() } // UnimplementedAccountServer must be embedded to have forward compatible implementations. type UnimplementedAccountServer struct { } func (UnimplementedAccountServer) DebugLogin(context.Context, *DebugLoginRequest) (*TokenReply, error) { return nil, status.Errorf(codes.Unimplemented, "method DebugLogin not implemented") } func (UnimplementedAccountServer) Authorization(context.Context, *AuthorizationRequest) (*TokenReply, error) { return nil, status.Errorf(codes.Unimplemented, "method Authorization not implemented") } func (UnimplementedAccountServer) SendPhoneCode(context.Context, *SendPhoneCodeRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method SendPhoneCode not implemented") } func (UnimplementedAccountServer) CheckPhoneCode(context.Context, *CheckPhoneCodeRequest) (*emptypb.Empty, error) { return nil, status.Errorf(codes.Unimplemented, "method CheckPhoneCode not implemented") } func (UnimplementedAccountServer) mustEmbedUnimplementedAccountServer() {} // UnsafeAccountServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to AccountServer will // result in compilation errors. type UnsafeAccountServer interface { mustEmbedUnimplementedAccountServer() } func RegisterAccountServer(s grpc.ServiceRegistrar, srv AccountServer) { s.RegisterService(&Account_ServiceDesc, srv) } func _Account_DebugLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DebugLoginRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AccountServer).DebugLogin(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/api.account.Account/DebugLogin", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AccountServer).DebugLogin(ctx, req.(*DebugLoginRequest)) } return interceptor(ctx, in, info, handler) } func _Account_Authorization_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(AuthorizationRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AccountServer).Authorization(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/api.account.Account/Authorization", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AccountServer).Authorization(ctx, req.(*AuthorizationRequest)) } return interceptor(ctx, in, info, handler) } func _Account_SendPhoneCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(SendPhoneCodeRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AccountServer).SendPhoneCode(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/api.account.Account/SendPhoneCode", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AccountServer).SendPhoneCode(ctx, req.(*SendPhoneCodeRequest)) } return interceptor(ctx, in, info, handler) } func _Account_CheckPhoneCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CheckPhoneCodeRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(AccountServer).CheckPhoneCode(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: "/api.account.Account/CheckPhoneCode", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(AccountServer).CheckPhoneCode(ctx, req.(*CheckPhoneCodeRequest)) } return interceptor(ctx, in, info, handler) } // Account_ServiceDesc is the grpc.ServiceDesc for Account service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Account_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.account.Account", HandlerType: (*AccountServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "DebugLogin", Handler: _Account_DebugLogin_Handler, }, { MethodName: "Authorization", Handler: _Account_Authorization_Handler, }, { MethodName: "SendPhoneCode", Handler: _Account_SendPhoneCode_Handler, }, { MethodName: "CheckPhoneCode", Handler: _Account_CheckPhoneCode_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "account.proto", }