Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attestation ¶
type Attestation struct { PURL packageurl.PackageURL Type Type }
Attestation an attestation url
func Reduce ¶
func Reduce(atts []Attestation, filter string) ([]Attestation, error)
Reduce filters the Attestations based on the given filter
func (Attestation) IsAttestationType ¶
func (a Attestation) IsAttestationType(t string) bool
IsAttestationType indicates if a PURL has the given attestation type.
func (Attestation) IsRegistry ¶
func (a Attestation) IsRegistry(registryURL string) bool
IsRegistry filters on a specific repository_url qualifier of the package.
type DefaultPrinter ¶
type DefaultPrinter struct {
// contains filtered or unexported fields
}
DefaultPrinter prints the attestation purls
func NewDefaultPrinter ¶
func NewDefaultPrinter(w io.Writer) *DefaultPrinter
NewDefaultPrinter creates a new DefaultPrinter instance utilizing the given io.Writer
func (*DefaultPrinter) Print ¶
func (p *DefaultPrinter) Print(atts []Attestation) error
Print prints the attestations to the io.Writer
func (*DefaultPrinter) PrintAttestation ¶
func (p *DefaultPrinter) PrintAttestation(a Attestation) error
PrintAttestation prints a single attestation to the io.Writer
type Discoverer ¶
Discoverer allows to discover attestations
type File ¶ added in v0.2.0
File extends cremote.File by adding Scheme
func ParseFileRef ¶ added in v0.2.0
ParseFileRef parses a file reference as a AttestationFile
type FilteredEnv ¶
type FilteredEnv struct {
Attestations []Attestation
}
FilteredEnv holds the context to apply filter expressions.
type Printer ¶
type Printer interface {
Print(atts []Attestation) error
}
Printer allows to print results
type PublishResult ¶ added in v0.2.0
PublishResult captures the result after publishing the attestations
type Resolver ¶
type Resolver interface {
Resolve(io.Reader) ([]Attestation, error)
}
Resolver allows to resolve attestations
type Type ¶
type Type int
Type enumeration of attestation types
func TypeFromString ¶
TypeFromString takes an attestation type as string and return the Type
func (*Type) UnmarshalText ¶
UnmarshalText unmarshals the type from a text form