Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrPrincipalNotFound = errors.New("identity: principal not found for identity")
Functions ¶
func Resolve ¶ added in v1.16.0
func Resolve(ctx context.Context, db storage.DBTX, identity *relationshipspb.Identity) (uuid.UUID, error)
Resolve returns the principal mapped to identity, or ErrPrincipalNotFound. It is read-only, so it takes a DBTX (the pool, or a tx).
func ResolveOrCreateBatch ¶ added in v1.14.0
func ResolveOrCreateBatch(ctx context.Context, tx storage.Transaction, identities []*relationshipspb.Identity) ([]uuid.UUID, error)
ResolveOrCreateBatch resolves each identity to its principal, minting one for any identity not yet mapped. It writes, so it takes the transaction it runs in.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.