Documentation
¶
Index ¶
- type IDMUserChecker
- type Service
- func (s *Service) AssignRolesToUsers(ctx context.Context, rctx graph.ResourceContext, ...) (*graph.RoleAssignmentResult, error)
- func (s *Service) GetRoles(ctx context.Context, rctx graph.ResourceContext) ([]*graph.Role, error)
- func (s *Service) ListUsers(ctx context.Context, rctx graph.ResourceContext, roleFilters []string) ([]*graph.UserRoles, error)
- func (s *Service) RemoveRole(ctx context.Context, rctx graph.ResourceContext, input graph.RemoveRoleInput) (*graph.RoleRemovalResult, error)
- type UserIDToRoles
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IDMUserChecker ¶ added in v0.11.1
type IDMUserChecker interface {
UserByMail(ctx context.Context, userID string) (*graph.User, error)
}
IDMUserChecker checks if a user exists in the Identity Management system
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func New ¶ added in v0.8.1
func New(client openfgav1.OpenFGAServiceClient, cfg *config.ServiceConfig, wsClientFactory workspace.ClientFactory, idmChecker IDMUserChecker) (*Service, error)
func NewWithRolesRetriever ¶ added in v0.8.1
func NewWithRolesRetriever(client openfgav1.OpenFGAServiceClient, cfg *config.ServiceConfig, rolesRetriever roles.RolesRetriever) *Service
NewWithRolesRetriever creates a new FGA service with a custom roles retriever
func (*Service) AssignRolesToUsers ¶ added in v0.8.1
func (s *Service) AssignRolesToUsers(ctx context.Context, rctx graph.ResourceContext, changes []*graph.UserRoleChange, invites []*graph.InviteInput) (*graph.RoleAssignmentResult, error)
AssignRolesToUsers creates tuples in FGA for the given users and roles, and processes invites
func (*Service) RemoveRole ¶ added in v0.8.1
func (s *Service) RemoveRole(ctx context.Context, rctx graph.ResourceContext, input graph.RemoveRoleInput) (*graph.RoleRemovalResult, error)
RemoveRole removes a role from a user by deleting the tuple in FGA
type UserIDToRoles ¶ added in v0.8.1
Click to show internal directories.
Click to hide internal directories.