Documentation ¶
Index ¶
- Constants
- Variables
- func EachRef[U any, V any](a *Result[U], b *Result[V], fn func(U, V) error) (err error)
- func FromDigestMap(m map[string]string) []digest.Digest
- func ToDigestMap(ds ...digest.Digest) map[string]string
- type Attestation
- type InTotoAttestation
- type InTotoSubject
- type Result
- func (r *Result[T]) AddAttestation(k string, v Attestation[T])
- func (r *Result[T]) AddMeta(k string, v []byte)
- func (r *Result[T]) AddRef(k string, ref T)
- func (r *Result[T]) EachRef(fn func(T) error) (err error)
- func (r *Result[T]) FindRef(key string) (T, bool)
- func (r *Result[T]) SetRef(ref T)
- func (r *Result[T]) SingleRef() (T, error)
Constants ¶
View Source
const ( AttestationReasonKey = "reason" AttestationInlineOnlyKey = "inline-only" )
Variables ¶
View Source
var ( AttestationReasonSBOM = []byte("sbom") AttestationReasonProvenance = []byte("provenance") )
Functions ¶
Types ¶
type Attestation ¶
type Attestation[T any] struct { Kind pb.AttestationKind Metadata map[string][]byte Ref T Path string ContentFunc func() ([]byte, error) InToto InTotoAttestation }
func ConvertAttestation ¶
func ConvertAttestation[U any, V any](a *Attestation[U], fn func(U) (V, error)) (*Attestation[V], error)
type InTotoAttestation ¶
type InTotoAttestation struct { PredicateType string Subjects []InTotoSubject }
type InTotoSubject ¶
type InTotoSubject struct { Kind pb.InTotoSubjectKind Name string Digest []digest.Digest }
type Result ¶
type Result[T any] struct { Ref T Refs map[string]T Metadata map[string][]byte Attestations map[string][]Attestation[T] // contains filtered or unexported fields }
func ConvertResult ¶
func (*Result[T]) AddAttestation ¶
func (r *Result[T]) AddAttestation(k string, v Attestation[T])
Click to show internal directories.
Click to hide internal directories.