Documentation ¶
Index ¶
- Constants
- Variables
- func ExtractOCIImagesFromResults(ctx context.Context, obj objects.TektonObject) []interface{}
- func ParseDigest(dig string) (algo_string string, hex string, err error)
- func RetrieveMaterialsFromStructuredResults(ctx context.Context, obj objects.TektonObject, categoryMarker string) []common.ProvenanceMaterial
- type OCIArtifact
- func (oa *OCIArtifact) Enabled(cfg config.Config) bool
- func (oa *OCIArtifact) ExtractObjects(ctx context.Context, obj objects.TektonObject) []interface{}
- func (oa *OCIArtifact) FullKey(obj interface{}) string
- func (oa *OCIArtifact) PayloadFormat(cfg config.Config) config.PayloadType
- func (oa *OCIArtifact) ShortKey(obj interface{}) string
- func (oa *OCIArtifact) Signer(cfg config.Config) string
- func (oa *OCIArtifact) StorageBackend(cfg config.Config) sets.Set[string]
- func (oa *OCIArtifact) Type() string
- type PipelineRunArtifact
- func (pa *PipelineRunArtifact) Enabled(cfg config.Config) bool
- func (pa *PipelineRunArtifact) ExtractObjects(ctx context.Context, obj objects.TektonObject) []interface{}
- func (pa *PipelineRunArtifact) FullKey(obj interface{}) string
- func (pa *PipelineRunArtifact) PayloadFormat(cfg config.Config) config.PayloadType
- func (pa *PipelineRunArtifact) ShortKey(obj interface{}) string
- func (pa *PipelineRunArtifact) Signer(cfg config.Config) string
- func (pa *PipelineRunArtifact) StorageBackend(cfg config.Config) sets.Set[string]
- func (pa *PipelineRunArtifact) Type() string
- type Signable
- type StructuredSignable
- type TaskRunArtifact
- func (ta *TaskRunArtifact) Enabled(cfg config.Config) bool
- func (ta *TaskRunArtifact) ExtractObjects(ctx context.Context, obj objects.TektonObject) []interface{}
- func (ta *TaskRunArtifact) FullKey(obj interface{}) string
- func (ta *TaskRunArtifact) PayloadFormat(cfg config.Config) config.PayloadType
- func (ta *TaskRunArtifact) ShortKey(obj interface{}) string
- func (ta *TaskRunArtifact) Signer(cfg config.Config) string
- func (ta *TaskRunArtifact) StorageBackend(cfg config.Config) sets.Set[string]
- func (ta *TaskRunArtifact) Type() string
Constants ¶
const ( ArtifactsInputsResultName = "ARTIFACT_INPUTS" ArtifactsOutputsResultName = "ARTIFACT_OUTPUTS" OCIScheme = "oci://" GitSchemePrefix = "git+" )
Variables ¶
var (
Sha1Regexp *regexp.Regexp = regexp.MustCompile(`^[a-f0-9]{40}$`)
)
Functions ¶
func ExtractOCIImagesFromResults ¶ added in v0.3.0
func ExtractOCIImagesFromResults(ctx context.Context, obj objects.TektonObject) []interface{}
func ParseDigest ¶ added in v0.17.0
ParseDigest parses the digest string and returns the algorithm and hex section of the digest.
func RetrieveMaterialsFromStructuredResults ¶ added in v0.13.0
func RetrieveMaterialsFromStructuredResults(ctx context.Context, obj objects.TektonObject, categoryMarker string) []common.ProvenanceMaterial
RetrieveMaterialsFromStructuredResults retrieves structured results from Tekton Object, and convert them into materials.
Types ¶
type OCIArtifact ¶
type OCIArtifact struct{}
func (*OCIArtifact) Enabled ¶ added in v0.7.0
func (oa *OCIArtifact) Enabled(cfg config.Config) bool
func (*OCIArtifact) ExtractObjects ¶
func (oa *OCIArtifact) ExtractObjects(ctx context.Context, obj objects.TektonObject) []interface{}
func (*OCIArtifact) FullKey ¶ added in v0.13.0
func (oa *OCIArtifact) FullKey(obj interface{}) string
func (*OCIArtifact) PayloadFormat ¶
func (oa *OCIArtifact) PayloadFormat(cfg config.Config) config.PayloadType
func (*OCIArtifact) ShortKey ¶ added in v0.13.0
func (oa *OCIArtifact) ShortKey(obj interface{}) string
func (*OCIArtifact) StorageBackend ¶
func (*OCIArtifact) Type ¶
func (oa *OCIArtifact) Type() string
type PipelineRunArtifact ¶ added in v0.13.0
type PipelineRunArtifact struct{}
func (*PipelineRunArtifact) Enabled ¶ added in v0.13.0
func (pa *PipelineRunArtifact) Enabled(cfg config.Config) bool
func (*PipelineRunArtifact) ExtractObjects ¶ added in v0.13.0
func (pa *PipelineRunArtifact) ExtractObjects(ctx context.Context, obj objects.TektonObject) []interface{}
func (*PipelineRunArtifact) FullKey ¶ added in v0.13.0
func (pa *PipelineRunArtifact) FullKey(obj interface{}) string
func (*PipelineRunArtifact) PayloadFormat ¶ added in v0.13.0
func (pa *PipelineRunArtifact) PayloadFormat(cfg config.Config) config.PayloadType
func (*PipelineRunArtifact) ShortKey ¶ added in v0.13.0
func (pa *PipelineRunArtifact) ShortKey(obj interface{}) string
func (*PipelineRunArtifact) Signer ¶ added in v0.13.0
func (pa *PipelineRunArtifact) Signer(cfg config.Config) string
func (*PipelineRunArtifact) StorageBackend ¶ added in v0.13.0
func (*PipelineRunArtifact) Type ¶ added in v0.13.0
func (pa *PipelineRunArtifact) Type() string
type Signable ¶
type Signable interface { ExtractObjects(ctx context.Context, obj objects.TektonObject) []interface{} StorageBackend(cfg config.Config) sets.Set[string] Signer(cfg config.Config) string PayloadFormat(cfg config.Config) config.PayloadType // FullKey returns the full identifier for a signable artifact. // - For OCI artifact, it is the full representation in the format of `<NAME>@sha256:<DIGEST>`. // - For TaskRun/PipelineRun artifact, it is `<GROUP>-<VERSION>-<KIND>-<UID>` FullKey(interface{}) string // ShortKey returns the short version of an artifact identifier. // - For OCI artifact, it is first 12 chars of the image digest. // - For TaskRun/PipelineRun artifact, it is `<KIND>-<UID>`. ShortKey(interface{}) string Type() string Enabled(cfg config.Config) bool }
type StructuredSignable ¶ added in v0.11.0
StructuredSignable contains info for signable targets to become either subjects or materials in intoto Statements. URI is the resource uri for the target needed iff the target is a material. Digest is the target's SHA digest.
func ExtractSignableTargetFromResults ¶ added in v0.11.0
func ExtractSignableTargetFromResults(ctx context.Context, obj objects.TektonObject) []StructuredSignable
ExtractSignableTargetFromResults extracts signable targets that aim to generate intoto provenance as materials within TaskRun results and store them as StructuredSignable.
func ExtractStructuredTargetFromResults ¶ added in v0.13.0
func ExtractStructuredTargetFromResults(ctx context.Context, obj objects.TektonObject, categoryMarker string) []*StructuredSignable
ExtractStructuredTargetFromResults extracts structured signable targets aim to generate intoto provenance as materials within TaskRun results and store them as StructuredSignable. categoryMarker categorizes signable targets into inputs and outputs.
func (*StructuredSignable) FullRef ¶ added in v0.12.0
func (s *StructuredSignable) FullRef() string
FullRef returns the full reference of the signable artifact in the format of URI@DIGEST
type TaskRunArtifact ¶
type TaskRunArtifact struct{}
func (*TaskRunArtifact) Enabled ¶ added in v0.7.0
func (ta *TaskRunArtifact) Enabled(cfg config.Config) bool
func (*TaskRunArtifact) ExtractObjects ¶
func (ta *TaskRunArtifact) ExtractObjects(ctx context.Context, obj objects.TektonObject) []interface{}
func (*TaskRunArtifact) FullKey ¶ added in v0.13.0
func (ta *TaskRunArtifact) FullKey(obj interface{}) string
func (*TaskRunArtifact) PayloadFormat ¶
func (ta *TaskRunArtifact) PayloadFormat(cfg config.Config) config.PayloadType
func (*TaskRunArtifact) ShortKey ¶ added in v0.13.0
func (ta *TaskRunArtifact) ShortKey(obj interface{}) string
func (*TaskRunArtifact) StorageBackend ¶
func (*TaskRunArtifact) Type ¶
func (ta *TaskRunArtifact) Type() string