MCPcopy Create free account
hub / github.com/chainloop-dev/chainloop / IsProviderScheme

Function IsProviderScheme

pkg/policies/loader.go:268–271  ·  view source on GitHub ↗

IsProviderScheme takes a policy reference and returns whether it's referencing to an external provider or not

(ref string)

Source from the content-addressed store, hash-verified

266
267// IsProviderScheme takes a policy reference and returns whether it's referencing to an external provider or not
268func IsProviderScheme(ref string) bool {
269 scheme, _ := RefParts(ref)
270 return scheme == chainloopScheme || scheme == ""
271}
272
273// ProviderRef represents a policy provider reference
274type ProviderRef struct {

Callers 4

TestIsProviderSchemeMethod · 0.85
LoadMethod · 0.85
LoadMethod · 0.85

Calls 1

RefPartsFunction · 0.85

Tested by 1

TestIsProviderSchemeMethod · 0.68