IUserLookup.cs
576 bytes
| 1 | using SplitApp.Shared.Contracts.Users; |
|---|---|
| 2 | |
| 3 | namespace SplitApp.Shared.Messaging.Integration.Users; |
| 4 | |
| 5 | /// <summary> |
| 6 | /// Higher-level abstraction over <see cref="IMessageBus"/> so consumer code in Trips.Api, |
| 7 | /// Expenses.Api, and the monolith WebApp doesn't take a direct dep on RabbitMQ plumbing. |
| 8 | /// </summary> |
| 9 | public interface IUserLookup |
| 10 | { |
| 11 | Task<UserDto?> GetByIdAsync(Guid id, CancellationToken cancellationToken = default); |
| 12 | |
| 13 | Task<IReadOnlyDictionary<Guid, UserDto>> GetByIdsAsync( |
| 14 | IEnumerable<Guid> ids, |
| 15 | CancellationToken cancellationToken = default); |
| 16 | } |
| 17 | |