MCPcopy
hub / github.com/open-policy-agent/gatekeeper / Fetcher

Interface Fetcher

pkg/gator/policy/catalog/fetch.go:37–44  ·  view source on GitHub ↗

Fetcher defines the interface for fetching catalog data.

Source from the content-addressed store, hash-verified

35
36// Fetcher defines the interface for fetching catalog data.
37type Fetcher interface {
38 // Fetch retrieves the catalog from the given URL.
39 Fetch(ctx context.Context, catalogURL string) ([]byte, error)
40 // FetchContent retrieves content from a URL (for templates/constraints).
41 FetchContent(ctx context.Context, contentURL string) ([]byte, error)
42 // SetInsecure allows fetching over plain HTTP (not recommended for production).
43 SetInsecure(insecure bool)
44}
45
46// HTTPFetcher implements Fetcher using HTTP and file:// protocols.
47// HTTPFetcher is safe for concurrent use after creation.

Callers 4

EnsureCatalogFunction · 0.65
LoadCatalogFunction · 0.65
installPolicyFunction · 0.65
installConstraintFunction · 0.65

Implementers 2

FakeFetcherpkg/gator/policy/client/client_test.go
HTTPFetcherpkg/gator/policy/catalog/fetch.go

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…