Documentation
¶
Index ¶
- type CompatService
- func NewCompatClient(cl openfgav1.OpenFGAServiceClient, db db.Service, fgaEvents FgaEvents) (*CompatService, error)
- func NewFGAServer(grpcAddr string, db db.Service, fgaEvents FgaEvents, ...) (*grpc.Server, *CompatService, error)
- func NewFGAService(grpcAddr string, db db.Service, fgaEvents FgaEvents) (*CompatService, error)
- func (s *CompatService) AssignRoleBindings(ctx context.Context, tenantID string, entityType string, entityID string, ...) error
- func (s *CompatService) CreateAccount(ctx context.Context, tenantID string, entityType string, entityID string, ...) error
- func (s *CompatService) RemoveAccount(ctx context.Context, tenantID string, entityType string, entityID string) error
- func (s *CompatService) RemoveFromEntity(ctx context.Context, tenantID string, entityType string, entityID string, ...) error
- func (s *CompatService) UsersForEntity(ctx context.Context, tenantID string, entityID string, entityType string) (types.UserIDToRoles, error)
- func (s *CompatService) UsersForEntityRolefilter(ctx context.Context, tenantID string, entityID string, entityType string, ...) (types.UserIDToRoles, error)
- func (c *CompatService) Write(ctx context.Context, in *openfgav1.WriteRequest) (*openfgav1.WriteResponse, error)
- type FGAEventer
- type FGAEventerOption
- type FGALoginHandler
- type FgaEvents
- type InviteManger
- type Service
- type Tuple
- type UserService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CompatService ¶
type CompatService struct {
openfgav1.UnimplementedOpenFGAServiceServer
// contains filtered or unexported fields
}
func NewCompatClient ¶
func NewCompatClient(cl openfgav1.OpenFGAServiceClient, db db.Service, fgaEvents FgaEvents) (*CompatService, error)
func NewFGAServer ¶
func NewFGAServer( grpcAddr string, db db.Service, fgaEvents FgaEvents, tr policy_services.TenantIdReader, isLocal bool, ) (*grpc.Server, *CompatService, error)
func NewFGAService ¶
func (*CompatService) AssignRoleBindings ¶
func (*CompatService) CreateAccount ¶
func (*CompatService) RemoveAccount ¶
func (*CompatService) RemoveFromEntity ¶
func (*CompatService) UsersForEntity ¶
func (s *CompatService) UsersForEntity( ctx context.Context, tenantID string, entityID string, entityType string, ) (types.UserIDToRoles, error)
UsersForEntity returns a map of user IDs to roles for a given entity.
func (*CompatService) UsersForEntityRolefilter ¶
func (s *CompatService) UsersForEntityRolefilter( ctx context.Context, tenantID string, entityID string, entityType string, rolefilter []*graphql.RoleInput, ) (types.UserIDToRoles, error)
UsersForEntityRolefilter returns a map of user IDs to roles for a given entity using a rolefilter
func (*CompatService) Write ¶
func (c *CompatService) Write(ctx context.Context, in *openfgav1.WriteRequest) (*openfgav1.WriteResponse, error)
Write implements openfgav1.OpenFGAServiceServer.
type FGAEventer ¶
type FGAEventer struct {
FGALoginHandler
// contains filtered or unexported fields
}
func NewFGAEventer ¶
func NewFGAEventer( client openfgav1.OpenFGAServiceClient, inviteManager InviteManger, helper pmfga.FGAStoreHelper, opts ...FGAEventerOption, ) (*FGAEventer, error)
func (*FGAEventer) HandleLogin ¶
func (s *FGAEventer) HandleLogin(ctx context.Context, logger *commonslogger.Logger, tenantID string, userId string, userEmail string) error
HandleLogin Handles the login event whenever a user logs into the portal. This makes sure that the user gets the appropriate tenant role
type FGAEventerOption ¶
type FGAEventerOption func(f *FGAEventer)
func WithOpenFGAClient ¶
func WithOpenFGAClient(cl openfgav1.OpenFGAServiceClient) FGAEventerOption
type FGALoginHandler ¶
type InviteManger ¶
type Service ¶
type Service interface {
UsersForEntity(ctx context.Context, tenantID string, entityID string, entityType string) (types.UserIDToRoles, error)
UsersForEntityRolefilter(
ctx context.Context, tenantID string, entityID string, entityType string, rolefilter []*graphql.RoleInput,
) (types.UserIDToRoles, error)
CreateAccount(ctx context.Context, tenantID string, entityType string, entityID string, ownerUserID string) error
RemoveAccount(ctx context.Context, tenantID string, entityType string, entityID string) error
AssignRoleBindings(ctx context.Context, tenantID string, entityType string, entityID string, input []*graphql.Change) error
RemoveFromEntity(ctx context.Context, tenantID string, entityType string, entityID string, userID string) error
}
Click to show internal directories.
Click to hide internal directories.