Documentation ¶
Index ¶
- Variables
- func Craft(ctx context.Context, materialSchema *schemaapi.CraftingSchema_Material, ...) (*api.Attestation_Material, error)
- type ArtifactCrafter
- type CSAFVEXCrafter
- type Craftable
- type CyclonedxJSONCrafter
- type JUnitXMLCrafter
- type OCIImageCrafter
- type OpenVEXCrafter
- type SARIFCrafter
- type SPDXJSONCrafter
- type StringCrafter
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidMaterialType = fmt.Errorf("unexpected material type")
ErrInvalidMaterialType is returned when the provided material type is not from the kind we are expecting
Functions ¶
func Craft ¶
func Craft(ctx context.Context, materialSchema *schemaapi.CraftingSchema_Material, value string, casBackend *casclient.CASBackend, logger *zerolog.Logger) (*api.Attestation_Material, error)
Types ¶
type ArtifactCrafter ¶
type ArtifactCrafter struct {
// contains filtered or unexported fields
}
func NewArtifactCrafter ¶
func NewArtifactCrafter(schema *schemaapi.CraftingSchema_Material, backend *casclient.CASBackend, l *zerolog.Logger) (*ArtifactCrafter, error)
func (*ArtifactCrafter) Craft ¶
func (i *ArtifactCrafter) Craft(ctx context.Context, artifactPath string) (*api.Attestation_Material, error)
Craft will calculate the digest of the artifact, simulate an upload and return the material definition
type CSAFVEXCrafter ¶ added in v0.19.0
type CSAFVEXCrafter struct {
// contains filtered or unexported fields
}
func NewCSAFVEXCrafter ¶ added in v0.19.0
func NewCSAFVEXCrafter(materialSchema *schemaapi.CraftingSchema_Material, backend *casclient.CASBackend, l *zerolog.Logger) (*CSAFVEXCrafter, error)
func (*CSAFVEXCrafter) Craft ¶ added in v0.19.0
func (i *CSAFVEXCrafter) Craft(ctx context.Context, filepath string) (*api.Attestation_Material, error)
type CyclonedxJSONCrafter ¶
type CyclonedxJSONCrafter struct {
// contains filtered or unexported fields
}
func NewCyclonedxJSONCrafter ¶
func NewCyclonedxJSONCrafter(materialSchema *schemaapi.CraftingSchema_Material, backend *casclient.CASBackend, l *zerolog.Logger) (*CyclonedxJSONCrafter, error)
func (*CyclonedxJSONCrafter) Craft ¶
func (i *CyclonedxJSONCrafter) Craft(ctx context.Context, filePath string) (*api.Attestation_Material, error)
type JUnitXMLCrafter ¶ added in v0.10.0
type JUnitXMLCrafter struct {
// contains filtered or unexported fields
}
func NewJUnitXMLCrafter ¶ added in v0.10.0
func NewJUnitXMLCrafter(schema *schemaapi.CraftingSchema_Material, backend *casclient.CASBackend, l *zerolog.Logger) (*JUnitXMLCrafter, error)
func (*JUnitXMLCrafter) Craft ¶ added in v0.10.0
func (i *JUnitXMLCrafter) Craft(ctx context.Context, filePath string) (*api.Attestation_Material, error)
type OCIImageCrafter ¶
type OCIImageCrafter struct {
// contains filtered or unexported fields
}
func NewOCIImageCrafter ¶
func NewOCIImageCrafter(schema *schemaapi.CraftingSchema_Material, l *zerolog.Logger) (*OCIImageCrafter, error)
func (*OCIImageCrafter) Craft ¶
func (i *OCIImageCrafter) Craft(_ context.Context, imageRef string) (*api.Attestation_Material, error)
type OpenVEXCrafter ¶ added in v0.19.0
type OpenVEXCrafter struct {
// contains filtered or unexported fields
}
func NewOpenVEXCrafter ¶ added in v0.19.0
func NewOpenVEXCrafter(materialSchema *schemaapi.CraftingSchema_Material, backend *casclient.CASBackend, l *zerolog.Logger) (*OpenVEXCrafter, error)
func (*OpenVEXCrafter) Craft ¶ added in v0.19.0
func (i *OpenVEXCrafter) Craft(ctx context.Context, filePath string) (*api.Attestation_Material, error)
type SARIFCrafter ¶ added in v0.19.0
type SARIFCrafter struct {
// contains filtered or unexported fields
}
func NewSARIFCrafter ¶ added in v0.19.0
func NewSARIFCrafter(materialSchema *schemaapi.CraftingSchema_Material, backend *casclient.CASBackend, l *zerolog.Logger) (*SARIFCrafter, error)
func (*SARIFCrafter) Craft ¶ added in v0.19.0
func (i *SARIFCrafter) Craft(ctx context.Context, filepath string) (*api.Attestation_Material, error)
type SPDXJSONCrafter ¶
type SPDXJSONCrafter struct {
// contains filtered or unexported fields
}
func NewSPDXJSONCrafter ¶
func NewSPDXJSONCrafter(materialSchema *schemaapi.CraftingSchema_Material, backend *casclient.CASBackend, l *zerolog.Logger) (*SPDXJSONCrafter, error)
func (*SPDXJSONCrafter) Craft ¶
func (i *SPDXJSONCrafter) Craft(ctx context.Context, filePath string) (*api.Attestation_Material, error)
type StringCrafter ¶
type StringCrafter struct {
// contains filtered or unexported fields
}
func NewStringCrafter ¶
func NewStringCrafter(materialSchema *schemaapi.CraftingSchema_Material) (*StringCrafter, error)
func (*StringCrafter) Craft ¶
func (i *StringCrafter) Craft(_ context.Context, value string) (*api.Attestation_Material, error)
Click to show internal directories.
Click to hide internal directories.