Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrUserNotFound = errors.New("user not found")
ErrUserNotFound is returned when the requested user has no identity mapping.
Functions ¶
This section is empty.
Types ¶
type DeleteUserHandle ¶
type DeleteUserHandle interface {
// Execute removes the external identity (e.g. Ory). It must be called
// only after the caller has already deleted the database rows.
Execute(ctx context.Context) error
}
DeleteUserHandle holds pre-fetched state needed to finalise user deletion after the database rows have been removed.
type Provider ¶
type Provider interface {
GetProfilesByUserID(ctx context.Context, userIDs []uuid.UUID) (map[uuid.UUID]Profile, error)
FindProfilesByEmail(ctx context.Context, email string) ([]Profile, error)
GetTeamCreatorContext(ctx context.Context, userID uuid.UUID) (*sharedteamprovision.CreatorContextV1, error)
// PrepareDeleteUser resolves the external identity references for the
// given user so they can be removed after the database rows are gone.
PrepareDeleteUser(ctx context.Context, userID uuid.UUID) (DeleteUserHandle, error)
}
func NewOryProvider ¶
func NewSupabaseProvider ¶
func NewSupabaseProvider(db *supabasedb.Client) Provider
Click to show internal directories.
Click to hide internal directories.