Documentation ¶
Index ¶
- Constants
- func OccurrenceToAttestation(checkName string, occ *grafeas.Occurrence) voucher.SignedAttestation
- func OccurrenceToBuildDetail(occ *grafeas.Occurrence) (detail repository.BuildDetail)
- func OccurrenceToVulnerability(occ *grafeas.Occurrence) voucher.Vulnerability
- type Client
- func (g *Client) AddAttestationToImage(ctx context.Context, ref reference.Canonical, attestation voucher.Attestation) (voucher.SignedAttestation, error)
- func (g *Client) CanAttest() bool
- func (g *Client) Close()
- func (g *Client) GetAttestations(ctx context.Context, ref reference.Canonical) ([]voucher.SignedAttestation, error)
- func (g *Client) GetBuildDetail(ctx context.Context, ref reference.Canonical) (repository.BuildDetail, error)
- func (g *Client) GetVulnerabilities(ctx context.Context, ref reference.Canonical) (vulnerabilities []voucher.Vulnerability, err error)
- func (g *Client) NewPayloadBody(ref reference.Canonical) (string, error)
Constants ¶
const DeploymentType voucher.MetadataType = "deployment"
DeploymentType is a Grafeas specific type which refers to MetadataItems containing deployment data.
const DiscoveryType voucher.MetadataType = "discovery"
DiscoveryType is a Grafeas specific type which refers to MetadataItems containing metadata discovery status.
const ImageType voucher.MetadataType = "image"
ImageType is a Grafeas specific type which refers to MetadataItems containing Image information.
const PackageType voucher.MetadataType = "package"
PackageType is a Grafeas specific type which refers to MetadataItems containing package information.
Variables ¶
This section is empty.
Functions ¶
func OccurrenceToAttestation ¶
func OccurrenceToAttestation(checkName string, occ *grafeas.Occurrence) voucher.SignedAttestation
OccurrenceToAttestation converts an Occurrence to a Attestation
func OccurrenceToBuildDetail ¶
func OccurrenceToBuildDetail(occ *grafeas.Occurrence) (detail repository.BuildDetail)
OccurrenceToBuildDetail converts an Occurrence to a BuildDetail
func OccurrenceToVulnerability ¶
func OccurrenceToVulnerability(occ *grafeas.Occurrence) voucher.Vulnerability
OccurrenceToVulnerability converts an Occurrence to a Vulnerability.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements voucher.MetadataClient, connecting to containeranalysis Grafeas.
func NewClient ¶
func NewClient(ctx context.Context, binauthProject string, keyring signer.AttestationSigner) (*Client, error)
NewClient creates a new containeranalysis Grafeas Client.
func (*Client) AddAttestationToImage ¶
func (g *Client) AddAttestationToImage(ctx context.Context, ref reference.Canonical, attestation voucher.Attestation) (voucher.SignedAttestation, error)
AddAttestationToImage adds a new attestation with the passed Attestation to the image described by ImageData.
func (*Client) GetAttestations ¶
func (g *Client) GetAttestations(ctx context.Context, ref reference.Canonical) ([]voucher.SignedAttestation, error)
GetAttestations returns all of the attestations associated with an image.
func (*Client) GetBuildDetail ¶
func (g *Client) GetBuildDetail(ctx context.Context, ref reference.Canonical) (repository.BuildDetail, error)
GetBuildDetail gets the BuildDetail for the passed image.
func (*Client) GetVulnerabilities ¶
func (g *Client) GetVulnerabilities(ctx context.Context, ref reference.Canonical) (vulnerabilities []voucher.Vulnerability, err error)
GetVulnerabilities returns the detected vulnerabilities for the Image described by voucher.ImageData.