service

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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

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

GetUserRole performs return the user role by id.

func (*AuthService) ListUsers

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL