package provenance
import "github.com/moby/buildkit/solver/llbsolver/provenance"
Index ¶
- Constants
- func FilterArgs(m map[string]string) map[string]string
- type BuildConfig
- type BuildKitMetadata
- type BuildStep
- type Capture
- func (c *Capture) AddGit(g GitSource)
- func (c *Capture) AddHTTP(h HTTPSource)
- func (c *Capture) AddImage(i ImageSource)
- func (c *Capture) AddLocal(l LocalSource)
- func (c *Capture) AddSSH(s SSH)
- func (c *Capture) AddSamples(dgst digest.Digest, samples *resourcestypes.Samples)
- func (c *Capture) AddSecret(s Secret)
- func (c *Capture) Merge(c2 *Capture) error
- func (c *Capture) OptimizeImageSources() error
- func (c *Capture) Sort()
- type Environment
- type GitSource
- type HTTPSource
- type ImageSource
- type LocalSource
- type Parameters
- type ProvenanceInvocation
- type ProvenanceMetadata
- type ProvenancePredicate
- type Result
- type SSH
- type Secret
- type Source
- type SourceInfo
- type Sources
Constants ¶
const (
BuildKitBuildType = "https://mobyproject.org/buildkit@v1"
)
Functions ¶
func FilterArgs ¶
Types ¶
type BuildConfig ¶
type BuildConfig struct {
Definition []BuildStep `json:"llbDefinition,omitempty"`
DigestMapping map[digest.Digest]string `json:"digestMapping,omitempty"`
}
type BuildKitMetadata ¶
type BuildKitMetadata struct {
VCS map[string]string `json:"vcs,omitempty"`
Source *Source `json:"source,omitempty"`
Layers map[string][][]ocispecs.Descriptor `json:"layers,omitempty"`
SysUsage []*resourcetypes.SysSample `json:"sysUsage,omitempty"`
}
type BuildStep ¶
type BuildStep struct {
ID string `json:"id,omitempty"`
Op pb.Op `json:"op,omitempty"`
Inputs []string `json:"inputs,omitempty"`
ResourceUsage *resourcestypes.Samples `json:"resourceUsage,omitempty"`
}
type Capture ¶
type Capture struct {
Frontend string
Args map[string]string
Sources Sources
Secrets []Secret
SSH []SSH
NetworkAccess bool
IncompleteMaterials bool
Samples map[digest.Digest]*resourcestypes.Samples
}
func (*Capture) AddGit ¶
func (*Capture) AddHTTP ¶
func (c *Capture) AddHTTP(h HTTPSource)
func (*Capture) AddImage ¶
func (c *Capture) AddImage(i ImageSource)
func (*Capture) AddLocal ¶
func (c *Capture) AddLocal(l LocalSource)
func (*Capture) AddSSH ¶
func (*Capture) AddSamples ¶
func (c *Capture) AddSamples(dgst digest.Digest, samples *resourcestypes.Samples)
func (*Capture) AddSecret ¶
func (*Capture) Merge ¶
func (*Capture) OptimizeImageSources ¶
OptimizeImageSources filters out image sources by digest reference if same digest is already present by a tag reference.
func (*Capture) Sort ¶
func (c *Capture) Sort()
type Environment ¶
type Environment struct {
Platform string `json:"platform"`
}
type GitSource ¶
type HTTPSource ¶
type ImageSource ¶
type LocalSource ¶
type LocalSource struct {
Name string `json:"name"`
}
type Parameters ¶
type Parameters struct {
Frontend string `json:"frontend,omitempty"`
Args map[string]string `json:"args,omitempty"`
Secrets []*Secret `json:"secrets,omitempty"`
SSH []*SSH `json:"ssh,omitempty"`
Locals []*LocalSource `json:"locals,omitempty"`
}
type ProvenanceInvocation ¶
type ProvenanceInvocation struct {
ConfigSource slsa02.ConfigSource `json:"configSource,omitempty"`
Parameters Parameters `json:"parameters,omitempty"`
Environment Environment `json:"environment,omitempty"`
}
type ProvenanceMetadata ¶
type ProvenanceMetadata struct {
slsa02.ProvenanceMetadata
BuildKitMetadata BuildKitMetadata `json:"https://mobyproject.org/buildkit@v1#metadata,omitempty"`
Hermetic bool `json:"https://mobyproject.org/buildkit@v1#hermetic,omitempty"`
}
type ProvenancePredicate ¶
type ProvenancePredicate struct {
slsa02.ProvenancePredicate
Invocation ProvenanceInvocation `json:"invocation,omitempty"`
BuildConfig *BuildConfig `json:"buildConfig,omitempty"`
Metadata *ProvenanceMetadata `json:"metadata,omitempty"`
}
func NewPredicate ¶
func NewPredicate(c *Capture) (*ProvenancePredicate, error)
type Result ¶
type SSH ¶
type Secret ¶
type Source ¶
type Source struct {
Locations map[string]*pb.Locations `json:"locations,omitempty"`
Infos []SourceInfo `json:"infos,omitempty"`
}
type SourceInfo ¶
type SourceInfo struct {
Filename string `json:"filename,omitempty"`
Language string `json:"language,omitempty"`
Data []byte `json:"data,omitempty"`
Definition []BuildStep `json:"llbDefinition,omitempty"`
DigestMapping map[digest.Digest]string `json:"digestMapping,omitempty"`
}
type Sources ¶
type Sources struct {
Images []ImageSource
Git []GitSource
HTTP []HTTPSource
Local []LocalSource
}
Source Files ¶
buildconfig.go capture.go predicate.go
- Version
- v0.13.0-beta2
- Published
- Jan 30, 2024
- Platform
- linux/amd64
- Imports
- 14 packages
- Last checked
- 1 minute ago –
Tools for package owners.