identity

package
v1.28.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: MIT Imports: 9 Imported by: 0

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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