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 ImageInput ¶
Types ¶
type ImageOption ¶
type ImageOption func(cfg *imageCfg)
func FromSnapshot ¶
func FromSnapshot() ImageOption
type ImageSnapshotTestConfig ¶
type PatternReplacement ¶
func NewPatternReplacement ¶
func NewPatternReplacement(r *regexp.Regexp) PatternReplacement
func (PatternReplacement) Redact ¶
func (p PatternReplacement) Redact(b []byte) []byte
type Redactions ¶
type Redactions struct {
// contains filtered or unexported fields
}
func NewRedactions ¶
func NewRedactions(redactors ...Redactor) *Redactions
func (Redactions) Redact ¶
func (r Redactions) Redact(b []byte) []byte
func (*Redactions) WithFunctions ¶
func (r *Redactions) WithFunctions(values ...func([]byte) []byte) *Redactions
func (*Redactions) WithPatternRedactors ¶
func (r *Redactions) WithPatternRedactors(values map[string]string) *Redactions
func (*Redactions) WithPatternsRedacted ¶
func (r *Redactions) WithPatternsRedacted(values ...string) *Redactions
func (*Redactions) WithRedactors ¶
func (r *Redactions) WithRedactors(rs ...Redactor) *Redactions
func (*Redactions) WithValueRedactors ¶
func (r *Redactions) WithValueRedactors(values map[string]string) *Redactions
func (*Redactions) WithValuesRedacted ¶
func (r *Redactions) WithValuesRedacted(values ...string) *Redactions
type RedactorFn ¶
func (RedactorFn) Redact ¶
func (r RedactorFn) Redact(b []byte) []byte
type ValueReplacement ¶
func NewValueReplacement ¶
func NewValueReplacement(v string) ValueReplacement
func (ValueReplacement) Redact ¶
func (v ValueReplacement) Redact(b []byte) []byte
Click to show internal directories.
Click to hide internal directories.