Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RawScrubber ¶
func RawScrubber(scrubSpec types.Scrub) (types.BytesScrubber, error)
RawScrubber creates a scrubber function from a scrubSpec
Types ¶
type ByteSource ¶
type ByteSource struct {
// Producer provides the seed data for this task
Producer func(context.Context) ([]byte, error)
// RawScrubber, if defined, rewrites the raw data to to remove sensitive data
RawScrubber func([]byte) []byte
// Parser, if defined, structures the raw data for json and human sinks
Parser func([]byte) (interface{}, error)
// StructuredScrubber, if defined, rewrites the structured data to remove sensitive data
//StructedScrubber func(interface{}) (interface{}, error)
// Template, if defined, renders structured data in a human-readable format
Template string
// If RawPath is defined it will get a copy of the raw data []byte
RawPath string
// If JSONPath is defined and Parser is defined, it will get a jsonified
// copy of the strucutred data. If JSONPath is defined and Parser is not,
// it will get a copy of the raw data.
JSONPath string
// If HumanPath is defined and Parser and Template are defined, it will get
// the output of the template rendered with the structure context. If
// HumanPath and Parser are defined but Template is not, it will get a YAML
// copy of the structured data. If HumanPath is defined and Parser is not,
// it will get a copy of the raw data.
HumanPath string
// If Timeout is defined, it will be used rather than the context provided
// to Exec.
Timeout time.Duration
}
ByteSource is a Task that gets its data source as a []byte.
type Prepared ¶
type Prepared struct {
// contains filtered or unexported fields
}
Prepared is a Task that returns preconfigured Results.
func PreparedError ¶
Prepare results for an incomplete spec
type StreamSource ¶
type StreamSource struct {
// Producer provides the seed data for this task as an io.Reader
Producer func(context.Context) (io.Reader, error)
// StreamFormat describe stream format returned by Producer. Only "" and "tar" are supported.
StreamFormat string
// RawScrubber, if defined, rewrites the raw data to to remove sensitive data
RawScrubber func([]byte) []byte
// Template, if defined, renders structured data in a human-readable format
Template string
// If RawPath is defined it will get a copy of the data
RawPath string
// If JSONPath is defined it will get a copy of the data
JSONPath string
// If HumanPath is defined it will get a copy of the data
HumanPath string
// If Timeout is defined, it will be used rather than the context provided
// to Exec.
Timeout time.Duration
}
StreamSource is a Task that gets its data as an io.Reader
type StreamsSource ¶
type StreamsSource struct {
// Producer provides the seed data for this task as an io.Reader array
// Names of the sources are provided as a string array
Producer func(context.Context) (map[string]io.Reader, error)
// RawScrubber, if defined, rewrites the raw data to to remove sensitive data
RawScrubber func([]byte) []byte
// Template, if defined, renders structured data in a human-readable format
Template string
// If RawPath is defined it will get a copy of the data
RawPath string
// If JSONPath is defined it will get a copy of the data
JSONPath string
// If HumanPath is defined it will get a copy of the data
HumanPath string
// If Timeout is defined, it will be used rather than the context provided
// to Exec.
Timeout time.Duration
}
StreamsSource is a Task that gets its data as an io.Reader
type StructuredSource ¶
type StructuredSource struct {
// Producer provides the seed data for this task
Producer func(context.Context) (interface{}, error)
// RawScrubber, if defined, rewrites the raw data to to remove sensitive data
RawScrubber func([]byte) []byte
// Template, if defined, renders the task's data in a human-readable format
Template string
// RawPath, if defined, gets the tasks's data as json.
RawPath string
// JSONPath, if defined, gets a jsonified copy of the task's data.
JSONPath string
// If HumanPath is defined and a Template is defined, it will get the
// output of the template rendered with the task's data as context. If
// HumanPath is defined and a Template is not, it will get the data as
// YAML.
HumanPath string
// If Timeout is defined, it will be used rather than the context provided
// to Exec.
Timeout time.Duration
}
StructuredSource is a Task that gets its data as a structured object ready to be jsonified or used as a context in a human template.
Click to show internal directories.
Click to hide internal directories.