provenance

package
v0.11.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2022 License: Apache-2.0 Imports: 14 Imported by: 9

Documentation

Index

Constants

View Source
const (
	BuildKitBuildType = "https://mobyproject.org/buildkit@v1"
)

Variables

This section is empty.

Functions

func FilterArgs

func FilterArgs(m map[string]string) map[string]string

Types

type BuildConfig

type BuildConfig struct {
	Definition []BuildStep `json:"llbDefinition,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"`
}

type BuildStep

type BuildStep struct {
	ID     string      `json:"id,omitempty"`
	Op     interface{} `json:"op,omitempty"`
	Inputs []string    `json:"inputs,omitempty"`
}

type Capture

type Capture struct {
	Frontend            string
	Args                map[string]string
	Sources             Sources
	Secrets             []Secret
	SSH                 []SSH
	NetworkAccess       bool
	IncompleteMaterials bool
}

func (*Capture) AddGit

func (c *Capture) AddGit(g GitSource)

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) AddLocalImage

func (c *Capture) AddLocalImage(i ImageSource)

func (*Capture) AddSSH

func (c *Capture) AddSSH(s SSH)

func (*Capture) AddSecret

func (c *Capture) AddSecret(s Secret)

func (*Capture) Merge

func (c *Capture) Merge(c2 *Capture) error

func (*Capture) OptimizeImageSources

func (c *Capture) OptimizeImageSources() error

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 GitSource struct {
	URL    string
	Commit string
}

type HTTPSource

type HTTPSource struct {
	URL    string
	Digest digest.Digest
}

type ImageSource

type ImageSource struct {
	Ref      string
	Platform *ocispecs.Platform
	Digest   digest.Digest
}

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 ProvenanceComplete

type ProvenanceComplete struct {
	slsa.ProvenanceComplete
	Hermetic bool `json:"https://mobyproject.org/buildkit@v1#hermetic,omitempty"`
}

type ProvenanceInvocation

type ProvenanceInvocation struct {
	ConfigSource slsa.ConfigSource `json:"configSource,omitempty"`
	Parameters   Parameters        `json:"parameters,omitempty"`
	Environment  Environment       `json:"environment,omitempty"`
}

type ProvenanceMetadata

type ProvenanceMetadata struct {
	slsa.ProvenanceMetadata
	Completeness     ProvenanceComplete `json:"completeness"`
	BuildKitMetadata BuildKitMetadata   `json:"https://mobyproject.org/buildkit@v1#metadata,omitempty"`
}

type ProvenancePredicate

type ProvenancePredicate struct {
	slsa.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 Result struct {
	Ref  *Capture
	Refs map[string]*Capture
}

type SSH

type SSH struct {
	ID       string `json:"id"`
	Optional bool   `json:"optional,omitempty"`
}

type Secret

type Secret struct {
	ID       string `json:"id"`
	Optional bool   `json:"optional,omitempty"`
}

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"`
	Data       []byte      `json:"data,omitempty"`
	Definition []BuildStep `json:"llbDefinition,omitempty"`
}

type Sources

type Sources struct {
	Images      []ImageSource
	LocalImages []ImageSource
	Git         []GitSource
	HTTP        []HTTPSource
	Local       []LocalSource
}

Jump to

Keyboard shortcuts

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