modernice / goes

goes is an event-sourcing framework for Go.
https://goes.modernice.dev
Apache License 2.0
134 stars 12 forks source link

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

Open bounoable opened 2 years ago

bounoable commented 2 years ago

Allow querying of user roles:

package example

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

In which file i should implement such a method?

bounoable commented 1 year ago

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