fileparsetypes

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2018 License: GPL-3.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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

type BroHeaderIndexMap map[string]int

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"`
	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) 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL