#[non_exhaustive]pub struct SourceDefinition {
pub name: String,
pub version: u32,
pub framing: Framing,
pub decoding: Decoding,
pub columns: Vec<String>,
pub nil: Vec<String>,
pub unwrap: Option<String>,
pub common: BTreeMap<String, FieldSpec>,
pub data_components: Vec<String>,
pub kinds: Vec<KindDefinition>,
}Expand description
A source definition as written.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringThe source’s name, such as sysmon.
version: u32Increased whenever the output for some input changes, so a stored event can be traced to the definition that produced it.
framing: FramingHow a byte stream splits into records.
decoding: DecodingHow a record becomes a field map.
columns: Vec<String>The names of a row’s values, in the row’s order, for csv decoding.
nil: Vec<String>Values a source writes for a field it has no value for, such as
Windows’ -. A field whose source holds one is not written, as if
the source had left it out; the value is still kept under
unmapped where the kind keeps the object it is in.
unwrap: Option<String>A member that holds a batch of records, such as Records in the log
files AWS delivers. A decoded object whose only member this is,
holding an array, is taken as the records in the array, each with
its own raw bytes; any other record is taken as it is. . names the
record itself: a record that is an array, as many APIs answer with,
is taken as its elements.
common: BTreeMap<String, FieldSpec>Fields every kind writes, such as the time and the device.
data_components: Vec<String>The ATT&CK data components the records it reads supply, by name,
such as Process Creation, so that coverage can tell a rule that can
fire from one whose data is not collected. See
docs/adr/0009-attack-knowledge-model.md.
kinds: Vec<KindDefinition>The kinds of record the source produces, tried in order.