Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromReaders ¶
func FromReaders(readers iterator.NamedReadCloserIterator, orgPolicy organization.Policy, validator options.PolicyValidator) (map[string]Policy, error)
FromReaders creates a set of policies indexed by their unique id.
Types ¶
type BuildRequirements ¶
type BuildRequirements struct {
RequireSlsaLevel *int `json:"require_slsa_level"`
}
BuildRequirements defines the build requirements.
type Environment ¶
type Environment struct {
AnyOf []string `json:"any_of"`
}
Environment defines the target environment.
type Package ¶
type Package struct { Name string `json:"name"` Environment Environment `json:"environment"` }
Package defines publication metadata, such as the name, registry and the target environment.
type Policy ¶
type Policy struct { Format int `json:"format"` Protection Protection `json:"protection"` Packages []Package `json:"packages"` BuildRequirements BuildRequirements `json:"build"` // contains filtered or unexported fields }
Policy defines the policy.
func (*Policy) Evaluate ¶
func (p *Policy) Evaluate(digests intoto.DigestSet, packageName string, orgPolicy organization.Policy, publishOpts options.PublishVerification) (*Protection, error)
Evaluate evaluates a policy.
type Protection ¶
type Protection struct {
GoogleServiceAccount string `json:"google_service_account"`
}
Click to show internal directories.
Click to hide internal directories.