package result
import "github.com/moby/buildkit/solver/result"
Index ¶
- 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 ConvertResult[U any, V any](r *Result[U], fn func(U) (V, error)) (*Result[V], error)
- func (r *Result[T]) AddAttestation(k string, v Attestation, ref 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]) SetRef(ref T)
- func (r *Result[T]) SingleRef() (T, error)
Functions ¶
func EachRef ¶
EachRef iterates over references in both a and b. a and b are assumed to be of the same size and map their references to the same set of keys
func FromDigestMap ¶
func ToDigestMap ¶
Types ¶
type Attestation ¶
type Attestation struct { Kind pb.AttestationKind Ref string Path string ContentFunc func() ([]byte, error) InToto InTotoAttestation }
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 // contains filtered or unexported fields }
func ConvertResult ¶
func (*Result[T]) AddAttestation ¶
func (r *Result[T]) AddAttestation(k string, v Attestation, ref T)
func (*Result[T]) AddMeta ¶
func (*Result[T]) AddRef ¶
func (*Result[T]) EachRef ¶
func (*Result[T]) SetRef ¶
func (r *Result[T]) SetRef(ref T)
func (*Result[T]) SingleRef ¶
Source Files ¶
- Version
- v0.11.0-rc1
- Published
- Nov 24, 2022
- Platform
- js/wasm
- Imports
- 7 packages
- Last checked
- 2 minutes ago –
Tools for package owners.