goes icon indicating copy to clipboard operation
goes copied to clipboard

[contrib/auth] Add `QueryClient.Roles()` method

Open bounoable opened this issue 3 years ago • 2 comments

Allow querying of user roles:

package example

func example(client auth.QueryClient) {
  userID := uuid.New()
  roleIDs, roleNames, err := client.RolesOf(context.TODO(), userID)
}

bounoable avatar Aug 01 '22 16:08 bounoable

In which file i should implement such a method?

groggy7 avatar Sep 24 '23 14:09 groggy7

This is the contrib/auth package. The QueryClient can be found in the contrib/auth/api.go 👍🏼

bounoable avatar Sep 24 '23 14:09 bounoable