MCPcopy Create free account
hub / github.com/conforma/cli / PolicySource

Interface PolicySource

internal/policy/source/source.go:65–70  ·  view source on GitHub ↗

PolicySource in an interface representing the location a policy source. Must implement the GetPolicy() method.

Source from the content-addressed store, hash-verified

63// PolicySource in an interface representing the location a policy source.
64// Must implement the GetPolicy() method.
65type PolicySource interface {
66 GetPolicy(ctx context.Context, dest string, showMsg bool) (string, error)
67 PolicyUrl() string
68 Subdir() string
69 Type() PolicyType
70}
71
72type PolicyUrl struct {
73 // A string containing a go-getter style source url compatible with conftest pull

Callers 25

PreProcessPolicyFunction · 0.65
TestInlineDataSourceFunction · 0.65
TestInlineDataGetPolicyFunction · 0.65
EvaluateMethod · 0.65
fetchPolicyCmdFunction · 0.65
PreProcessPolicyFunction · 0.65
urlsFunction · 0.65
getPolicyThroughCacheFunction · 0.65
TestInlineDataSourceFunction · 0.65
EvaluateMethod · 0.65

Implementers 4

PolicyUrlinternal/policy/source/source.go
inlineDatainternal/policy/source/source.go
mockPolicySourceinternal/policy/source/source_test.go
testPolicySourceinternal/evaluator/conftest_evaluator_

Calls

no outgoing calls

Tested by

no test coverage detected