package types
import "github.com/moby/buildkit/solver/llbsolver/provenance/types"
Index ¶
- Constants
- type BuildConfig
- type BuildKitComplete
- type BuildKitMetadata
- type BuildStep
- type Environment
- func (p Environment) MarshalJSON() ([]byte, error)
- func (p *Environment) UnmarshalJSON(data []byte) error
- type GitSource
- type HTTPSource
- type ImageSource
- type LocalSource
- type Parameters
- type ProvenanceBuildDefinitionSLSA1
- type ProvenanceConfigSourceSLSA1
- type ProvenanceCustomEnv
- type ProvenanceExternalParametersSLSA1
- type ProvenanceInternalParametersSLSA1
- func (p ProvenanceInternalParametersSLSA1) MarshalJSON() ([]byte, error)
- func (p *ProvenanceInternalParametersSLSA1) UnmarshalJSON(data []byte) error
- type ProvenanceInvocationSLSA02
- type ProvenanceMetadataSLSA02
- type ProvenanceMetadataSLSA1
- type ProvenancePredicateSLSA02
- type ProvenancePredicateSLSA1
- type ProvenanceRunDetailsSLSA1
- type ProvenanceSLSA
- type SSH
- type Secret
- type Source
- type SourceInfo
- type Sources
Constants ¶
const ( BuildKitBuildType1 = "https://github.com/moby/buildkit/blob/master/docs/attestations/slsa-definitions.md" BuildKitBuildType02 = "https://mobyproject.org/buildkit@v1" ProvenanceSLSA1 = ProvenanceSLSA("v1") ProvenanceSLSA02 = ProvenanceSLSA("v0.2") )
Types ¶
type BuildConfig ¶
type BuildConfig struct {
Definition []BuildStep `json:"llbDefinition,omitempty"`
DigestMapping map[digest.Digest]string `json:"digestMapping,omitempty"`
}
type BuildKitComplete ¶
type BuildKitComplete struct {
Request bool `json:"request"`
ResolvedDependencies bool `json:"resolvedDependencies"`
}
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 []*resourcestypes.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 Environment ¶
type Environment struct {
Platform string `json:"platform"`
ProvenanceCustomEnv
}
func (Environment) MarshalJSON ¶
func (p Environment) MarshalJSON() ([]byte, error)
func (*Environment) UnmarshalJSON ¶
func (p *Environment) UnmarshalJSON(data []byte) error
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 ProvenanceBuildDefinitionSLSA1 ¶
type ProvenanceBuildDefinitionSLSA1 struct {
slsa1.ProvenanceBuildDefinition
ExternalParameters ProvenanceExternalParametersSLSA1 `json:"externalParameters"`
InternalParameters ProvenanceInternalParametersSLSA1 `json:"internalParameters"`
}
type ProvenanceConfigSourceSLSA1 ¶
type ProvenanceConfigSourceSLSA1 struct {
URI string `json:"uri,omitempty"`
Digest slsa.DigestSet `json:"digest,omitempty"`
Path string `json:"path,omitempty"`
}
type ProvenanceCustomEnv ¶
type ProvenanceExternalParametersSLSA1 ¶
type ProvenanceExternalParametersSLSA1 struct {
ConfigSource ProvenanceConfigSourceSLSA1 `json:"configSource"`
Request Parameters `json:"request"`
}
type ProvenanceInternalParametersSLSA1 ¶
type ProvenanceInternalParametersSLSA1 struct {
BuildConfig *BuildConfig `json:"buildConfig,omitempty"`
BuilderPlatform string `json:"builderPlatform"`
ProvenanceCustomEnv
}
func (ProvenanceInternalParametersSLSA1) MarshalJSON ¶
func (p ProvenanceInternalParametersSLSA1) MarshalJSON() ([]byte, error)
MarshalJSON flattens ProvenanceCustomEnv into top level.
func (*ProvenanceInternalParametersSLSA1) UnmarshalJSON ¶
func (p *ProvenanceInternalParametersSLSA1) UnmarshalJSON(data []byte) error
UnmarshalJSON fills both struct fields and flattened custom env.
type ProvenanceInvocationSLSA02 ¶
type ProvenanceInvocationSLSA02 struct {
ConfigSource slsa02.ConfigSource `json:"configSource"`
Parameters Parameters `json:"parameters"`
Environment Environment `json:"environment"`
}
type ProvenanceMetadataSLSA02 ¶
type ProvenanceMetadataSLSA02 struct {
slsa02.ProvenanceMetadata
BuildKitMetadata BuildKitMetadata `json:"https://mobyproject.org/buildkit@v1#metadata"`
Hermetic bool `json:"https://mobyproject.org/buildkit@v1#hermetic,omitempty"`
}
type ProvenanceMetadataSLSA1 ¶
type ProvenanceMetadataSLSA1 struct {
slsa1.BuildMetadata
BuildKitMetadata BuildKitMetadata `json:"buildkit_metadata"`
Hermetic bool `json:"buildkit_hermetic,omitempty"`
Completeness BuildKitComplete `json:"buildkit_completeness"`
Reproducible bool `json:"buildkit_reproducible,omitempty"`
}
type ProvenancePredicateSLSA02 ¶
type ProvenancePredicateSLSA02 struct {
slsa02.ProvenancePredicate
Invocation ProvenanceInvocationSLSA02 `json:"invocation"`
BuildConfig *BuildConfig `json:"buildConfig,omitempty"`
Metadata *ProvenanceMetadataSLSA02 `json:"metadata,omitempty"`
}
func (*ProvenancePredicateSLSA02) ConvertToSLSA1 ¶
func (p *ProvenancePredicateSLSA02) ConvertToSLSA1() *ProvenancePredicateSLSA1
ConvertToSLSA1 converts to a SLSA v1 provenance predicate.
type ProvenancePredicateSLSA1 ¶
type ProvenancePredicateSLSA1 struct {
slsa1.ProvenancePredicate
BuildDefinition ProvenanceBuildDefinitionSLSA1 `json:"buildDefinition"`
RunDetails ProvenanceRunDetailsSLSA1 `json:"runDetails"`
}
func (*ProvenancePredicateSLSA1) ConvertToSLSA02 ¶
func (p *ProvenancePredicateSLSA1) ConvertToSLSA02() *ProvenancePredicateSLSA02
ConvertToSLSA02 converts to a SLSA v0.2 provenance predicate.
type ProvenanceRunDetailsSLSA1 ¶
type ProvenanceRunDetailsSLSA1 struct {
slsa1.ProvenanceRunDetails
Metadata *ProvenanceMetadataSLSA1 `json:"metadata,omitempty"`
}
type ProvenanceSLSA ¶
type ProvenanceSLSA string
func (*ProvenanceSLSA) Validate ¶
func (ps *ProvenanceSLSA) Validate() error
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 ¶
- Version
- v0.27.0
- Published
- Jan 21, 2026
- Platform
- linux/amd64
- Imports
- 11 packages
- Last checked
- 26 seconds ago –
Tools for package owners.