Documentation ¶
Index ¶
- type BroHeader
- type BroHeaderIndexMap
- type IndexedFile
- func (i *IndexedFile) GetBroDataFactory() func() pt.BroData
- func (i *IndexedFile) GetFieldMap() BroHeaderIndexMap
- func (i *IndexedFile) GetHeader() *BroHeader
- func (i *IndexedFile) IsJSON() bool
- func (i *IndexedFile) SetBroDataFactory(broDataFactory func() pt.BroData)
- func (i *IndexedFile) SetFieldMap(fieldMap BroHeaderIndexMap)
- func (i *IndexedFile) SetHeader(header *BroHeader)
- func (i *IndexedFile) SetJSON()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BroHeader ¶
type BroHeader struct { Names []string // Names of fields Types []string // Types of fields Separator string // Field separator SetSep string // Set separator Empty string // Empty field tag Unset string // Unset field tag ObjType string // Object type (comes from #path) }
BroHeader contains the parse information contained within the comment lines of bro files
type BroHeaderIndexMap ¶
BroHeaderIndexMap maps the names of bro fields to their indexes in a BroData struct
type IndexedFile ¶
type IndexedFile struct { ID bson.ObjectId `bson:"_id,omitempty"` Path string `bson:"filepath"` Length int64 `bson:"length"` ModTime time.Time `bson:"modified"` Hash string `bson:"hash"` TargetCollection string `bson:"collection"` TargetDatabase string `bson:"database"` CID int `bson:"cid"` ParseTime time.Time `bson:"time_complete"` // contains filtered or unexported fields }
IndexedFile ties a file to a target collection and database
func (*IndexedFile) GetBroDataFactory ¶
func (i *IndexedFile) GetBroDataFactory() func() pt.BroData
GetBroDataFactory retrieves the function which makes bro data corresponding with this type of bro file
func (*IndexedFile) GetFieldMap ¶
func (i *IndexedFile) GetFieldMap() BroHeaderIndexMap
GetFieldMap retrieves the map which maps the names of bro fields to the index in their respective bro data structs
func (*IndexedFile) GetHeader ¶
func (i *IndexedFile) GetHeader() *BroHeader
GetHeader retrieves the bro header on the indexed file
func (*IndexedFile) IsJSON ¶
func (i *IndexedFile) IsJSON() bool
IsJson returns whether the file is a json file
func (*IndexedFile) SetBroDataFactory ¶
func (i *IndexedFile) SetBroDataFactory(broDataFactory func() pt.BroData)
SetBroDataFactory sets the function which makes bro data corresponding with this type of bro file
func (*IndexedFile) SetFieldMap ¶
func (i *IndexedFile) SetFieldMap(fieldMap BroHeaderIndexMap)
SetFieldMap sets the map which maps the names of bro fields to the index in their respective bro data structs
func (*IndexedFile) SetHeader ¶
func (i *IndexedFile) SetHeader(header *BroHeader)
SetHeader sets the bro header on the indexed file