From af7061fdfa5696b68db74a6231de572c21cd7c29 Mon Sep 17 00:00:00 2001 From: Johan Brandhorst-Satzkorn Date: Mon, 6 Nov 2023 10:19:42 -0800 Subject: [PATCH] fixup! handlers/targets: add pagination support --- internal/daemon/controller/handlers/targets/target_service.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/daemon/controller/handlers/targets/target_service.go b/internal/daemon/controller/handlers/targets/target_service.go index f2a4357a3ee..158312c2ac7 100644 --- a/internal/daemon/controller/handlers/targets/target_service.go +++ b/internal/daemon/controller/handlers/targets/target_service.go @@ -247,6 +247,9 @@ func (s Service) ListTargets(ctx context.Context, req *pbs.ListTargetsRequest) ( if err != nil { return nil, err } + // TODO: replace the need for this function with some way to convert the `filter` + // to a domain type. This would allow filtering to happen in the domain, and we could + // remove this callback altogether. filterItemFn := func(ctx context.Context, item target.Target) (bool, error) { pbItem, err := toProto(ctx, item, newOutputOpts(ctx, item, authResults, authzScopes)...) if err != nil {