driver

package
v0.0.0-...-bee9f94 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildSystem

type BuildSystem interface {
	GetRun(string) (*run.Run, error)
	RefreshRun(*run.Run) error
	BuildPredicate(*run.Run, *attestation.SLSAPredicate) (*attestation.SLSAPredicate, error)
	ArtifactStores() []store.Store
}

BuildSystemDriver is an interface to a type that can query a buildsystem for data required to build a provenance attestation

func NewFromMoniker

func NewFromMoniker(moniker string) (BuildSystem, error)

func NewFromSpecURL

func NewFromSpecURL(specURL string) (BuildSystem, error)

type GCB

type GCB struct {
	ProjectID string
	BuildID   string
}

func NewGCB

func NewGCB(specURL string) (*GCB, error)

func (*GCB) ArtifactStores

func (gcb *GCB) ArtifactStores() []store.Store

ArtifactStores returns the native artifact store of cloud build

func (*GCB) BuildPredicate

func (gcb *GCB) BuildPredicate(r *run.Run, draft *attestation.SLSAPredicate) (predicate *attestation.SLSAPredicate, err error)

BuildPredicate returns a SLSA predicate populated with the GCB run data as recommended by the SLSA 0.2 spec

func (*GCB) GetRun

func (gcb *GCB) GetRun(specURL string) (*run.Run, error)

func (*GCB) RefreshRun

func (gcb *GCB) RefreshRun(r *run.Run) error

RefreshRun queries the API from the build system and updates the run metadata.

func (*GCB) TriggerDetails

func (gcb *GCB) TriggerDetails(triggerID string) (repoURL string, err error)

TriggerDetails

type GitHubWorkflow

type GitHubWorkflow struct {
	Organization string
	Repository   string
	RunID        int
}

func (*GitHubWorkflow) ArtifactStores

func (ghw *GitHubWorkflow) ArtifactStores() []store.Store

ArtifactStores returns the native artifact store of github actions

func (*GitHubWorkflow) BuildPredicate

func (ghw *GitHubWorkflow) BuildPredicate(
	r *run.Run, draft *attestation.SLSAPredicate,
) (predicate *attestation.SLSAPredicate, err error)

BuildPredicate builds a predicate from the run data

func (*GitHubWorkflow) GetRun

func (ghw *GitHubWorkflow) GetRun(specURL string) (*run.Run, error)

func (*GitHubWorkflow) RefreshRun

func (ghw *GitHubWorkflow) RefreshRun(r *run.Run) error

RefreshRun queries the github API to get the latest data

Jump to

Keyboard shortcuts

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