// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.3.0 // - protoc v3.15.6 // source: proto/users.proto package proto 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 const ( Users_Register_FullMethodName = "/users.Users/Register" Users_Login_FullMethodName = "/users.Users/Login" Users_Authorize_FullMethodName = "/users.Users/Authorize" Users_ChangePassword_FullMethodName = "/users.Users/ChangePassword" Users_ResetPassword_FullMethodName = "/users.Users/ResetPassword" ) // UsersClient is the client API for Users 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 UsersClient interface { Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) Authorize(ctx context.Context, in *AuthorizeRequest, opts ...grpc.CallOption) (*AuthorizeResponse, error) ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*ChangePasswordResponse, error) ResetPassword(ctx context.Context, in *ResetPasswordReqeust, opts ...grpc.CallOption) (*ResetPasswordResponse, error) } type usersClient struct { cc grpc.ClientConnInterface } func NewUsersClient(cc grpc.ClientConnInterface) UsersClient { return &usersClient{cc} } func (c *usersClient) Register(ctx context.Context, in *RegisterRequest, opts ...grpc.CallOption) (*RegisterResponse, error) { out := new(RegisterResponse) err := c.cc.Invoke(ctx, Users_Register_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *usersClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) { out := new(LoginResponse) err := c.cc.Invoke(ctx, Users_Login_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *usersClient) Authorize(ctx context.Context, in *AuthorizeRequest, opts ...grpc.CallOption) (*AuthorizeResponse, error) { out := new(AuthorizeResponse) err := c.cc.Invoke(ctx, Users_Authorize_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *usersClient) ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*ChangePasswordResponse, error) { out := new(ChangePasswordResponse) err := c.cc.Invoke(ctx, Users_ChangePassword_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } func (c *usersClient) ResetPassword(ctx context.Context, in *ResetPasswordReqeust, opts ...grpc.CallOption) (*ResetPasswordResponse, error) { out := new(ResetPasswordResponse) err := c.cc.Invoke(ctx, Users_ResetPassword_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } // UsersServer is the server API for Users service. // All implementations must embed UnimplementedUsersServer // for forward compatibility type UsersServer interface { Register(context.Context, *RegisterRequest) (*RegisterResponse, error) Login(context.Context, *LoginRequest) (*LoginResponse, error) Authorize(context.Context, *AuthorizeRequest) (*AuthorizeResponse, error) ChangePassword(context.Context, *ChangePasswordRequest) (*ChangePasswordResponse, error) ResetPassword(context.Context, *ResetPasswordReqeust) (*ResetPasswordResponse, error) mustEmbedUnimplementedUsersServer() } // UnimplementedUsersServer must be embedded to have forward compatible implementations. type UnimplementedUsersServer struct { } func (UnimplementedUsersServer) Register(context.Context, *RegisterRequest) (*RegisterResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Register not implemented") } func (UnimplementedUsersServer) Login(context.Context, *LoginRequest) (*LoginResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Login not implemented") } func (UnimplementedUsersServer) Authorize(context.Context, *AuthorizeRequest) (*AuthorizeResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Authorize not implemented") } func (UnimplementedUsersServer) ChangePassword(context.Context, *ChangePasswordRequest) (*ChangePasswordResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ChangePassword not implemented") } func (UnimplementedUsersServer) ResetPassword(context.Context, *ResetPasswordReqeust) (*ResetPasswordResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ResetPassword not implemented") } func (UnimplementedUsersServer) mustEmbedUnimplementedUsersServer() {} // UnsafeUsersServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to UsersServer will // result in compilation errors. type UnsafeUsersServer interface { mustEmbedUnimplementedUsersServer() } func RegisterUsersServer(s grpc.ServiceRegistrar, srv UsersServer) { s.RegisterService(&Users_ServiceDesc, srv) } func _Users_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.(UsersServer).Register(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Users_Register_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(UsersServer).Register(ctx, req.(*RegisterRequest)) } return interceptor(ctx, in, info, handler) } func _Users_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.(UsersServer).Login(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Users_Login_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(UsersServer).Login(ctx, req.(*LoginRequest)) } return interceptor(ctx, in, info, handler) } func _Users_Authorize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(AuthorizeRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(UsersServer).Authorize(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Users_Authorize_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(UsersServer).Authorize(ctx, req.(*AuthorizeRequest)) } return interceptor(ctx, in, info, handler) } func _Users_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.(UsersServer).ChangePassword(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Users_ChangePassword_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(UsersServer).ChangePassword(ctx, req.(*ChangePasswordRequest)) } return interceptor(ctx, in, info, handler) } func _Users_ResetPassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ResetPasswordReqeust) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(UsersServer).ResetPassword(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Users_ResetPassword_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(UsersServer).ResetPassword(ctx, req.(*ResetPasswordReqeust)) } return interceptor(ctx, in, info, handler) } // Users_ServiceDesc is the grpc.ServiceDesc for Users service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Users_ServiceDesc = grpc.ServiceDesc{ ServiceName: "users.Users", HandlerType: (*UsersServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Register", Handler: _Users_Register_Handler, }, { MethodName: "Login", Handler: _Users_Login_Handler, }, { MethodName: "Authorize", Handler: _Users_Authorize_Handler, }, { MethodName: "ChangePassword", Handler: _Users_ChangePassword_Handler, }, { MethodName: "ResetPassword", Handler: _Users_ResetPassword_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "proto/users.proto", }