Documentation ¶
Index ¶
- func NewAuthService(usersRepository repository.UsersRepository) pb.AuthServiceServer
- type AuthService
- func (s *AuthService) ChangeUserRole(ctx context.Context, req *pb.ChangeUserRoleRequest) (*pb.User, error)
- func (s *AuthService) DeleteUser(ctx context.Context, req *pb.DeleteUserRequest) (*pb.DeleteUserResponse, error)
- func (s *AuthService) GetUser(ctx context.Context, req *pb.GetUserRequest) (*pb.User, error)
- func (s *AuthService) GetUserRole(ctx context.Context, req *pb.GetUserRoleRequest) (*pb.GetUserRoleResponse, error)
- func (s *AuthService) ListUsers(req *pb.ListUsersRequest, stream pb.AuthService_ListUsersServer) error
- func (s *AuthService) SignIn(ctx context.Context, req *pb.SignInRequest) (*pb.SignInResponse, error)
- func (s *AuthService) SignUp(ctx context.Context, req *pb.SignUpRequest) (*pb.User, error)
- func (s *AuthService) UpdateUserEmail(ctx context.Context, req *pb.UpdateUserEmailRequest) (*pb.User, error)
- func (s *AuthService) UpdateUserName(ctx context.Context, req *pb.UpdateUserNameRequest) (*pb.User, error)
- func (s *AuthService) UpdateUserPassword(ctx context.Context, req *pb.UpdateUserPasswordRequest) (*pb.User, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAuthService ¶
func NewAuthService(usersRepository repository.UsersRepository) pb.AuthServiceServer
NewAuthService creates a new AuthService instance.
Types ¶
type AuthService ¶
type AuthService struct {
// contains filtered or unexported fields
}
AuthService provides usersRepository for authentication service.
func (*AuthService) ChangeUserRole ¶
func (s *AuthService) ChangeUserRole(ctx context.Context, req *pb.ChangeUserRoleRequest) (*pb.User, error)
ChangeUserRole performs change the user role.
func (*AuthService) DeleteUser ¶
func (s *AuthService) DeleteUser(ctx context.Context, req *pb.DeleteUserRequest) (*pb.DeleteUserResponse, error)
DeleteUser performs delete the user.
func (*AuthService) GetUser ¶
func (s *AuthService) GetUser(ctx context.Context, req *pb.GetUserRequest) (*pb.User, error)
GetUser performs return the user by id.
func (*AuthService) GetUserRole ¶
func (s *AuthService) GetUserRole(ctx context.Context, req *pb.GetUserRoleRequest) (*pb.GetUserRoleResponse, error)
GetUserRole performs return the user role by id.
func (*AuthService) ListUsers ¶
func (s *AuthService) ListUsers(req *pb.ListUsersRequest, stream pb.AuthService_ListUsersServer) error
ListUser list all users.
func (*AuthService) SignIn ¶
func (s *AuthService) SignIn(ctx context.Context, req *pb.SignInRequest) (*pb.SignInResponse, error)
SignIn performs the user login process.
func (*AuthService) SignUp ¶
func (s *AuthService) SignUp(ctx context.Context, req *pb.SignUpRequest) (*pb.User, error)
SignUp performs the user registration process.
func (*AuthService) UpdateUserEmail ¶
func (s *AuthService) UpdateUserEmail(ctx context.Context, req *pb.UpdateUserEmailRequest) (*pb.User, error)
UpdateUser performs update the password.
func (*AuthService) UpdateUserName ¶
func (s *AuthService) UpdateUserName(ctx context.Context, req *pb.UpdateUserNameRequest) (*pb.User, error)
UpdateUser performs update the username.
func (*AuthService) UpdateUserPassword ¶
func (s *AuthService) UpdateUserPassword(ctx context.Context, req *pb.UpdateUserPasswordRequest) (*pb.User, error)
UpdateUser performs update the password.
Click to show internal directories.
Click to hide internal directories.