...
1 package v01
2
3 import (
4 "time"
5
6 "github.com/in-toto/in-toto-golang/in_toto/slsa_provenance/common"
7 )
8
9 const (
10
11 PredicateSLSAProvenance = "https://slsa.dev/provenance/v0.1"
12 )
13
14
15 type ProvenancePredicate struct {
16 Builder common.ProvenanceBuilder `json:"builder"`
17 Recipe ProvenanceRecipe `json:"recipe"`
18 Metadata *ProvenanceMetadata `json:"metadata,omitempty"`
19 Materials []common.ProvenanceMaterial `json:"materials,omitempty"`
20 }
21
22
23 type ProvenanceRecipe struct {
24 Type string `json:"type"`
25
26
27 DefinedInMaterial *int `json:"definedInMaterial,omitempty"`
28 EntryPoint string `json:"entryPoint"`
29 Arguments interface{} `json:"arguments,omitempty"`
30 Environment interface{} `json:"environment,omitempty"`
31 }
32
33
34 type ProvenanceMetadata struct {
35
36
37 BuildStartedOn *time.Time `json:"buildStartedOn,omitempty"`
38 BuildFinishedOn *time.Time `json:"buildFinishedOn,omitempty"`
39 Completeness ProvenanceComplete `json:"completeness"`
40 Reproducible bool `json:"reproducible"`
41 }
42
43
44
45
46 type ProvenanceComplete struct {
47 Arguments bool `json:"arguments"`
48 Environment bool `json:"environment"`
49 Materials bool `json:"materials"`
50 }
51
View as plain text