goes
goes copied to clipboard
[contrib/auth] Add `QueryClient.Roles()` method
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 👍🏼