···
GetByDID(ctx context.Context, did string) (*User, error)
GetByHandle(ctx context.Context, handle string) (*User, error)
UpdateHandle(ctx context.Context, did, newHandle string) (*User, error)
GetByDIDs(ctx context.Context, dids []string) (map[string]*User, error)
···
GetByDID(ctx context.Context, did string) (*User, error)
GetByHandle(ctx context.Context, handle string) (*User, error)
UpdateHandle(ctx context.Context, did, newHandle string) (*User, error)
+
// GetByDIDs retrieves multiple users by their DIDs in a single batch query.
+
// Returns a map of DID → User for efficient lookups.
+
// Missing users are not included in the result map (no error for missing users).
+
// Returns error only on database failures or validation errors (invalid DIDs, batch too large).
+
// - ctx: Context for cancellation and timeout
+
// - dids: Array of DIDs to retrieve (must start with "did:", max 1000 items)
+
// - map[string]*User: Map of DID → User for found users
+
// - error: Validation or database errors (not errors for missing users)
+
// userMap, err := repo.GetByDIDs(ctx, []string{"did:plc:abc", "did:plc:xyz"})
+
// if err != nil { return err }
+
// if user, found := userMap["did:plc:abc"]; found {
GetByDIDs(ctx context.Context, dids []string) (map[string]*User, error)