Documentation ¶
Index ¶
- Variables
- func GenerateSalt(length int) (string, error)
- func GetPayloadFromToken(tokenString string) (string, error)
- func GetUserIdFromToken(tokenString string) (int64, error)
- func IsValidPassword(password string) (valid bool, err error)
- func NewUserService(registry registry.ServiceRegistry)
- type TokenType
- type UserService
- func (us *UserService) DeleteUser(ctx context.Context, req *user.DeleteUserRequest) error
- func (us *UserService) GetCurrentUser(ctx context.Context) (*user.GetCurrentUserResponse, error)
- func (us *UserService) GetUser(ctx context.Context, id int64) (*user.GetUserResponse, error)
- func (us *UserService) GetUserByKeyWord(ctx context.Context, keyword string) ([]*user.GetUserResponse, error)
- func (us *UserService) Login(ctx context.Context, req *user.LoginRequest) (*user.LoginResponse, error)
- func (*UserService) Logout(ctx context.Context) error
- func (*UserService) RefreshToken(ctx context.Context, token string) (string, error)
- func (us *UserService) Register(ctx context.Context, req *user.RegisterRequest) error
- func (us *UserService) UpdateUser(ctx context.Context, req *user.UpdateUserRequest) error
- func (*UserService) ValidateToken(ctx context.Context, token string) (int64, error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func GenerateSalt ¶
func GetPayloadFromToken ¶
func GetUserIdFromToken ¶
func IsValidPassword ¶
func NewUserService ¶
func NewUserService(registry registry.ServiceRegistry)
Types ¶
type UserService ¶
type UserService struct { user.UserService // contains filtered or unexported fields }
func (*UserService) DeleteUser ¶
func (us *UserService) DeleteUser(ctx context.Context, req *user.DeleteUserRequest) error
func (*UserService) GetCurrentUser ¶
func (us *UserService) GetCurrentUser(ctx context.Context) (*user.GetCurrentUserResponse, error)
func (*UserService) GetUser ¶
func (us *UserService) GetUser(ctx context.Context, id int64) (*user.GetUserResponse, error)
func (*UserService) GetUserByKeyWord ¶
func (us *UserService) GetUserByKeyWord(ctx context.Context, keyword string) ([]*user.GetUserResponse, error)
func (*UserService) Login ¶
func (us *UserService) Login(ctx context.Context, req *user.LoginRequest) (*user.LoginResponse, error)
func (*UserService) RefreshToken ¶
func (*UserService) Register ¶
func (us *UserService) Register(ctx context.Context, req *user.RegisterRequest) error
func (*UserService) UpdateUser ¶
func (us *UserService) UpdateUser(ctx context.Context, req *user.UpdateUserRequest) error
func (*UserService) ValidateToken ¶
Click to show internal directories.
Click to hide internal directories.