Versions in this module Expand all Collapse all v1 v1.0.0 Mar 1, 2024 Changes in this version + func AddSampleFileRelationships(s *sbom.SBOM) + func AssertEncoderAgainstGoldenImageSnapshot(t *testing.T, imgCfg ImageSnapshotTestConfig, cfg EncoderSnapshotTestConfig) + func AssertEncoderAgainstGoldenSnapshot(t *testing.T, cfg EncoderSnapshotTestConfig) + func DirectoryInput(t testing.TB, dir string) sbom.SBOM + func DirectoryInputWithAuthorField(t testing.TB) sbom.SBOM + func ImageInput(t testing.TB, testImage string, options ...ImageOption) sbom.SBOM + type EncoderSnapshotTestConfig struct + Format sbom.FormatEncoder + IsJSON bool + PersistRedactionsInSnapshot bool + Redactor Redactor + Subject sbom.SBOM + UpdateSnapshot bool + type ImageOption func(cfg *imageCfg) + func FromSnapshot() ImageOption + type ImageSnapshotTestConfig struct + Image string + UpdateImageSnapshot bool + type PatternReplacement struct + Replace string + Search *regexp.Regexp + func NewPatternReplacement(r *regexp.Regexp) PatternReplacement + func (p PatternReplacement) Redact(b []byte) []byte + type Redactions struct + func NewRedactions(redactors ...Redactor) *Redactions + func (r *Redactions) WithFunctions(values ...func([]byte) []byte) *Redactions + func (r *Redactions) WithPatternRedactors(values map[string]string) *Redactions + func (r *Redactions) WithPatternsRedacted(values ...string) *Redactions + func (r *Redactions) WithRedactors(rs ...Redactor) *Redactions + func (r *Redactions) WithValueRedactors(values map[string]string) *Redactions + func (r *Redactions) WithValuesRedacted(values ...string) *Redactions + func (r Redactions) Redact(b []byte) []byte + type Redactor interface + Redact func([]byte) []byte + type RedactorFn func([]byte) []byte + func (r RedactorFn) Redact(b []byte) []byte + type ValueReplacement struct + Replace string + Search string + func NewValueReplacement(v string) ValueReplacement + func (v ValueReplacement) Redact(b []byte) []byte