modernice/goes

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

Opened this issue · 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)
}

In which file i should implement such a method?

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