Skip to content

Commit

Permalink
PLT-1454: Add sdk support for user management.
Browse files Browse the repository at this point in the history
  • Loading branch information
SivaanandM committed Nov 13, 2024
1 parent e0871b5 commit a2507f4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions client/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,15 @@ func (h *V1Client) GetUserByEmail(email string) (*models.V1User, error) {
return nil, fmt.Errorf("user with email '%s' not found", email)
}

func (h *V1Client) GetUserByID(userUID string) (*models.V1User, error) {

Check failure on line 113 in client/user.go

View workflow job for this annotation

GitHub Actions / build-with-coverage

exported: exported method V1Client.GetUserByID should have comment or be unexported (revive)
params := clientv1.NewV1UsersUIDGetParams().WithUID(userUID)
resp, err := h.Client.V1UsersUIDGet(params)
if err != nil {
return nil, err
}
return resp.Payload, nil
}

// DeleteUser deletes an existing user by UID.
func (h *V1Client) DeleteUser(uid string) error {
params := clientv1.NewV1UsersUIDDeleteParams().WithUID(uid)
Expand Down

0 comments on commit a2507f4

Please sign in to comment.