Documentation
¶
Index ¶
- 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 Service ¶
type Service struct {
// contains filtered or unexported fields
}
func New ¶ added in v0.8.1
func New(client openfgav1.OpenFGAServiceClient, cfg *config.ServiceConfig) (*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) (*graph.RoleAssignmentResult, error)
AssignRolesToUsers creates tuples in FGA for the given users and roles
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.