Skip to content

Commit

Permalink
add proxy-client back in
Browse files Browse the repository at this point in the history
  • Loading branch information
chrispatrick committed Sep 5, 2024
1 parent 194020f commit 2677244
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions policy/data/proxy/client.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package proxy

import (
"context"

"github.com/atomist-skills/go-skill/policy/goals"
"github.com/atomist-skills/go-skill/policy/types"
)

type ProxyClient interface {
Evaluate(ctx context.Context, organization, teamId, url string, sbom *types.SBOM, args map[string]interface{}) (goals.EvaluationResult, error)
}
2 changes: 2 additions & 0 deletions policy/data/source.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ package data
import (
"context"

"github.com/atomist-skills/go-skill/policy/data/proxy"
"github.com/atomist-skills/go-skill/policy/data/query"
"github.com/atomist-skills/go-skill/policy/goals"
"github.com/atomist-skills/go-skill/policy/types"
)

type DataSource interface {
GetQueryClient() query.QueryClient
GetProxyClient() proxy.ProxyClient

GetImageVulnerabilities(ctx context.Context, evalCtx goals.GoalEvaluationContext, imageSbom types.SBOM) (*query.QueryResponse, []types.Package, map[string][]types.Vulnerability, error)
}
1 change: 1 addition & 0 deletions policy/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ type Policy struct {
WithLocal bool
WithAsync bool
WithSyncQuery bool
WithProxy bool
}

0 comments on commit 2677244

Please sign in to comment.