Documentation ¶
Index ¶
- 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
- type ImageOption
- type ImageSnapshotTestConfig
- type PatternReplacement
- type Redactions
- func (r Redactions) Redact(b []byte) []byte
- 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
- type Redactor
- type RedactorFn
- type ValueReplacement
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertEncoderAgainstGoldenImageSnapshot ¶
func AssertEncoderAgainstGoldenImageSnapshot(t *testing.T, imgCfg ImageSnapshotTestConfig, cfg EncoderSnapshotTestConfig)
func AssertEncoderAgainstGoldenSnapshot ¶
func AssertEncoderAgainstGoldenSnapshot(t *testing.T, cfg EncoderSnapshotTestConfig)
func DirectoryInputWithAuthorField ¶ added in v0.79.0
func ImageInput ¶
Types ¶
type EncoderSnapshotTestConfig ¶ added in v0.85.0
type ImageOption ¶
type ImageOption func(cfg *imageCfg)
func FromSnapshot ¶
func FromSnapshot() ImageOption
type ImageSnapshotTestConfig ¶ added in v0.85.0
type PatternReplacement ¶ added in v0.85.0
func NewPatternReplacement ¶ added in v0.85.0
func NewPatternReplacement(r *regexp.Regexp) PatternReplacement
func (PatternReplacement) Redact ¶ added in v0.85.0
func (p PatternReplacement) Redact(b []byte) []byte
type Redactions ¶ added in v0.85.0
type Redactions struct {
// contains filtered or unexported fields
}
func NewRedactions ¶ added in v0.85.0
func NewRedactions(redactors ...Redactor) *Redactions
func (Redactions) Redact ¶ added in v0.85.0
func (r Redactions) Redact(b []byte) []byte
func (*Redactions) WithFunctions ¶ added in v0.85.0
func (r *Redactions) WithFunctions(values ...func([]byte) []byte) *Redactions
func (*Redactions) WithPatternRedactors ¶ added in v0.85.0
func (r *Redactions) WithPatternRedactors(values map[string]string) *Redactions
func (*Redactions) WithPatternsRedacted ¶ added in v0.85.0
func (r *Redactions) WithPatternsRedacted(values ...string) *Redactions
func (*Redactions) WithRedactors ¶ added in v0.85.0
func (r *Redactions) WithRedactors(rs ...Redactor) *Redactions
func (*Redactions) WithValueRedactors ¶ added in v0.85.0
func (r *Redactions) WithValueRedactors(values map[string]string) *Redactions
func (*Redactions) WithValuesRedacted ¶ added in v0.85.0
func (r *Redactions) WithValuesRedacted(values ...string) *Redactions
type RedactorFn ¶ added in v0.85.0
func (RedactorFn) Redact ¶ added in v0.85.0
func (r RedactorFn) Redact(b []byte) []byte
type ValueReplacement ¶ added in v0.85.0
func NewValueReplacement ¶ added in v0.85.0
func NewValueReplacement(v string) ValueReplacement
func (ValueReplacement) Redact ¶ added in v0.85.0
func (v ValueReplacement) Redact(b []byte) []byte
Click to show internal directories.
Click to hide internal directories.