Documentation ¶
Index ¶
Constants ¶
View Source
const (
StreamFormatTar = "tar"
)
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(io.Reader) (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 { Spec types.Spec // 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 // Parser, if defined, structures the raw data for json and human sinks Parser func(io.Reader) (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 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
func SetCommonFieldsStreamSource ¶ added in v0.11.0
func SetCommonFieldsStreamSource(task StreamSource, spec types.Spec) (StreamSource, error)
type StreamsSource ¶
type StreamsSource struct { Spec types.Spec // 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) // 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 // Parser, if defined, structures the raw data for json and human sinks Parser func(io.Reader) (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 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
func SetCommonFieldsStreamsSource ¶ added in v0.11.0
func SetCommonFieldsStreamsSource(task StreamsSource, spec types.Spec) (StreamsSource, error)
type StructuredSource ¶
type StructuredSource struct { Spec types.Spec // 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 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 }
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.
func SetCommonFieldsStructuredSource ¶ added in v0.11.0
func SetCommonFieldsStructuredSource(task StructuredSource, spec types.Spec) (StructuredSource, error)
Click to show internal directories.
Click to hide internal directories.