project

package
v0.0.0-...-0828d53 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromReaders

func FromReaders(readers iterator.ReadCloserIterator, orgPolicy organization.Policy, validator options.PolicyValidator) (map[string]Policy, error)

FromReaders creates a set of policies keyed by their package Name (and if present, the environment).

Types

type BuildRequirements

type BuildRequirements struct {
	RequireSlsaBuilder string     `json:"require_slsa_builder"`
	Repository         Repository `json:"repository"`
}

BuildRequirements defines the build requirements.

type Environment

type Environment struct {
	AnyOf []string `json:"any_of,omitempty"`
}

Environment defines the target environment.

type Package

type Package struct {
	Name        string      `json:"name"`
	Environment Environment `json:"environment,omitempty"`
}

Package defines publication metadata, such as the name and the target environment.

type Policy

type Policy struct {
	Format            int               `json:"format"`
	Package           Package           `json:"package"`
	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, reqOpts options.Request, buildOpts options.BuildVerification) (int, error)

Evaluate evaluates the policy.

type Repository

type Repository struct {
	URI string `json:"uri"`
}

Repository defines the repository.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL