fga

package
v0.12.78 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 26, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

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) GetRoles added in v0.8.1

func (s *Service) GetRoles(ctx context.Context, rctx graph.ResourceContext) ([]*graph.Role, error)

func (*Service) ListUsers added in v0.8.1

func (s *Service) ListUsers(ctx context.Context, rctx graph.ResourceContext, roleFilters []string) ([]*graph.UserRoles, error)

func (*Service) RemoveRole added in v0.8.1

RemoveRole removes a role from a user by deleting the tuple in FGA

type UserIDToRoles added in v0.8.1

type UserIDToRoles map[string][]string

Directories

Path Synopsis
Package store provides functionality for managing OpenFGA store and authorization model operations with caching capabilities.
Package store provides functionality for managing OpenFGA store and authorization model operations with caching capabilities.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL