github.com/wostzone/hub/auth@v0.0.0-20220118060317-7bb375743b17/pkg/authorize/IAclStore.go (about) 1 package authorize 2 3 // IAclStore defines the interface of a group based ACL store 4 type IAclStore interface { 5 // GetGroups returns a list of groups a thing or user is a member of 6 GetGroups(clientID string) []string 7 8 // GetRole returns the highest role of a user has in a list of group 9 // Intended to get client permissions in case of overlapping groups 10 // Returns the role 11 GetRole(clientID string, groupIDs []string) string 12 13 // Close the store 14 Close() 15 16 // Open the store 17 Open() error 18 19 // SetRole writes the role for the client in a group 20 SetRole(clientID string, groupID string, role string) error 21 }