diff --git a/policy/data/fixed.go b/policy/data/fixed.go index 91689e9..64e5954 100644 --- a/policy/data/fixed.go +++ b/policy/data/fixed.go @@ -13,11 +13,11 @@ type vulnerabilityFetcher func(ctx context.Context, evalCtx goals.GoalEvaluation type fixedDataSource struct { jynxGQLClient query.QueryClient - proxyClient *proxy.ProxyClient + proxyClient proxy.ProxyClient vulnerabilities vulnerabilityFetcher } -func NewFixedDataSource(jynxGQLClient query.QueryClient, proxyClient *proxy.ProxyClient, vulnerabilities vulnerabilityFetcher) DataSource { +func NewFixedDataSource(jynxGQLClient query.QueryClient, proxyClient proxy.ProxyClient, vulnerabilities vulnerabilityFetcher) DataSource { return &fixedDataSource{ jynxGQLClient: jynxGQLClient, proxyClient: proxyClient, @@ -29,7 +29,7 @@ func (ds *fixedDataSource) GetQueryClient() query.QueryClient { return ds.jynxGQLClient } -func (ds *fixedDataSource) GetProxyClient() (*proxy.ProxyClient, error) { +func (ds *fixedDataSource) GetProxyClient() (proxy.ProxyClient, error) { return ds.proxyClient, nil } diff --git a/policy/data/source.go b/policy/data/source.go index 94104fd..b0cf5b0 100644 --- a/policy/data/source.go +++ b/policy/data/source.go @@ -11,7 +11,7 @@ import ( type DataSource interface { GetQueryClient() query.QueryClient - GetProxyClient() (*proxy.ProxyClient, error) + GetProxyClient() (proxy.ProxyClient, error) GetImageVulnerabilities(ctx context.Context, evalCtx goals.GoalEvaluationContext, imageSbom types.SBOM) (*query.QueryResponse, []types.Package, map[string][]types.Vulnerability, error) }