Documentation
¶
Index ¶
- Variables
- func Main(urlStr string, showData bool, showAll bool, limit int, processes int, ...) error
- type Adapter
- type DataStoreAdapter
- type ElasticsearchAdapter
- func (a ElasticsearchAdapter) FetchTableData(table table, limit int) (*tableData, error)
- func (a ElasticsearchAdapter) FetchTables() ([]table, error)
- func (a *ElasticsearchAdapter) Init(urlStr string) error
- func (a *ElasticsearchAdapter) RowName() string
- func (a *ElasticsearchAdapter) Scan(scanOpts ScanOpts) ([]ruleMatch, error)
- func (a *ElasticsearchAdapter) TableName() string
- type FileAdapter
- type Formatter
- type JSONFormatter
- type LocalFileAdapter
- func (a LocalFileAdapter) FetchFiles() ([]string, error)
- func (a LocalFileAdapter) FindFileMatches(filename string, matchFinder *MatchFinder) error
- func (a *LocalFileAdapter) Init(url string) error
- func (a *LocalFileAdapter) ObjectName() string
- func (a *LocalFileAdapter) Scan(scanOpts ScanOpts) ([]ruleMatch, error)
- type MatchConfig
- type MatchFinder
- type MatchLine
- type MongodbAdapter
- func (a MongodbAdapter) FetchTableData(table table, limit int) (*tableData, error)
- func (a MongodbAdapter) FetchTables() ([]table, error)
- func (a *MongodbAdapter) Init(urlStr string) error
- func (a *MongodbAdapter) RowName() string
- func (a *MongodbAdapter) Scan(scanOpts ScanOpts) ([]ruleMatch, error)
- func (a *MongodbAdapter) TableName() string
- type RedisAdapter
- func (a RedisAdapter) FetchTableData(table table, limit int) (*tableData, error)
- func (a RedisAdapter) FetchTables() ([]table, error)
- func (a *RedisAdapter) Init(urlStr string) error
- func (a *RedisAdapter) RowName() string
- func (a *RedisAdapter) Scan(scanOpts ScanOpts) ([]ruleMatch, error)
- func (a *RedisAdapter) TableName() string
- type S3Adapter
- type ScanOpts
- type SqlAdapter
- func (a SqlAdapter) FetchTableData(table table, limit int) (*tableData, error)
- func (a SqlAdapter) FetchTables() ([]table, error)
- func (a *SqlAdapter) Init(url string) error
- func (a *SqlAdapter) RowName() string
- func (a *SqlAdapter) Scan(scanOpts ScanOpts) ([]ruleMatch, error)
- func (a *SqlAdapter) TableName() string
- type TextFormatter
Constants ¶
This section is empty.
Variables ¶
View Source
var Formatters = map[string]Formatter{ "text": TextFormatter{}, "ndjson": JSONFormatter{}, }
Formatters holds available formatters
Functions ¶
Types ¶
type DataStoreAdapter ¶ added in v0.1.5
type ElasticsearchAdapter ¶ added in v0.1.4
type ElasticsearchAdapter struct { DB *elasticsearch.Client // contains filtered or unexported fields }
func (ElasticsearchAdapter) FetchTableData ¶ added in v0.1.4
func (a ElasticsearchAdapter) FetchTableData(table table, limit int) (*tableData, error)
func (ElasticsearchAdapter) FetchTables ¶ added in v0.1.4
func (a ElasticsearchAdapter) FetchTables() ([]table, error)
func (*ElasticsearchAdapter) Init ¶ added in v0.1.4
func (a *ElasticsearchAdapter) Init(urlStr string) error
func (*ElasticsearchAdapter) RowName ¶ added in v0.1.4
func (a *ElasticsearchAdapter) RowName() string
func (*ElasticsearchAdapter) Scan ¶ added in v0.1.6
func (a *ElasticsearchAdapter) Scan(scanOpts ScanOpts) ([]ruleMatch, error)
func (*ElasticsearchAdapter) TableName ¶ added in v0.1.4
func (a *ElasticsearchAdapter) TableName() string
type FileAdapter ¶ added in v0.1.1
type Formatter ¶ added in v0.1.7
type Formatter interface { // PrintMatch formats and prints the match to `writer`. PrintMatch(writer io.Writer, match matchInfo) error }
Format defines the interface used to deliver results to the end user.
type JSONFormatter ¶ added in v0.1.7
type JSONFormatter struct{}
JSONFormatter prints the result as a JSON object.
func (JSONFormatter) PrintMatch ¶ added in v0.1.7
func (f JSONFormatter) PrintMatch(writer io.Writer, match matchInfo) error
type LocalFileAdapter ¶ added in v0.1.1
type LocalFileAdapter struct {
// contains filtered or unexported fields
}
func (LocalFileAdapter) FetchFiles ¶ added in v0.1.1
func (a LocalFileAdapter) FetchFiles() ([]string, error)
func (LocalFileAdapter) FindFileMatches ¶ added in v0.1.1
func (a LocalFileAdapter) FindFileMatches(filename string, matchFinder *MatchFinder) error
TODO read metadata for certain file types
func (*LocalFileAdapter) Init ¶ added in v0.1.1
func (a *LocalFileAdapter) Init(url string) error
func (*LocalFileAdapter) ObjectName ¶ added in v0.1.5
func (a *LocalFileAdapter) ObjectName() string
func (*LocalFileAdapter) Scan ¶ added in v0.1.6
func (a *LocalFileAdapter) Scan(scanOpts ScanOpts) ([]ruleMatch, error)
type MatchConfig ¶ added in v0.1.6
type MatchConfig struct { RegexRules []regexRule NameRules []nameRule MultiNameRules []multiNameRule TokenRules []tokenRule MinCount int }
func NewMatchConfig ¶ added in v0.1.6
func NewMatchConfig() MatchConfig
type MatchFinder ¶ added in v0.1.6
type MatchFinder struct { MatchedValues [][]MatchLine TokenValues [][]MatchLine Count int // contains filtered or unexported fields }
func NewMatchFinder ¶ added in v0.1.6
func NewMatchFinder(matchConfig *MatchConfig) MatchFinder
func (*MatchFinder) CheckMatches ¶ added in v0.1.6
func (a *MatchFinder) CheckMatches(colIdentifier string, onlyValues bool) []ruleMatch
func (*MatchFinder) CheckTableData ¶ added in v0.1.6
func (a *MatchFinder) CheckTableData(table table, tableData *tableData) []ruleMatch
func (*MatchFinder) Clear ¶ added in v0.1.6
func (a *MatchFinder) Clear()
func (*MatchFinder) Scan ¶ added in v0.1.6
func (a *MatchFinder) Scan(v string, index int)
fast check for matches extract values and index in a later step if needed (if --show-data is passed)
func (*MatchFinder) ScanValues ¶ added in v0.1.6
func (a *MatchFinder) ScanValues(values []string)
type MongodbAdapter ¶ added in v0.1.4
func (MongodbAdapter) FetchTableData ¶ added in v0.1.4
func (a MongodbAdapter) FetchTableData(table table, limit int) (*tableData, error)
func (MongodbAdapter) FetchTables ¶ added in v0.1.4
func (a MongodbAdapter) FetchTables() ([]table, error)
func (*MongodbAdapter) Init ¶ added in v0.1.4
func (a *MongodbAdapter) Init(urlStr string) error
func (*MongodbAdapter) RowName ¶ added in v0.1.4
func (a *MongodbAdapter) RowName() string
func (*MongodbAdapter) Scan ¶ added in v0.1.6
func (a *MongodbAdapter) Scan(scanOpts ScanOpts) ([]ruleMatch, error)
func (*MongodbAdapter) TableName ¶ added in v0.1.4
func (a *MongodbAdapter) TableName() string
type RedisAdapter ¶ added in v0.1.4
type RedisAdapter struct {
DB *redis.Client
}
func (RedisAdapter) FetchTableData ¶ added in v0.1.4
func (a RedisAdapter) FetchTableData(table table, limit int) (*tableData, error)
func (RedisAdapter) FetchTables ¶ added in v0.1.4
func (a RedisAdapter) FetchTables() ([]table, error)
func (*RedisAdapter) Init ¶ added in v0.1.4
func (a *RedisAdapter) Init(urlStr string) error
func (*RedisAdapter) RowName ¶ added in v0.1.4
func (a *RedisAdapter) RowName() string
func (*RedisAdapter) Scan ¶ added in v0.1.6
func (a *RedisAdapter) Scan(scanOpts ScanOpts) ([]ruleMatch, error)
func (*RedisAdapter) TableName ¶ added in v0.1.4
func (a *RedisAdapter) TableName() string
type S3Adapter ¶ added in v0.1.1
type S3Adapter struct {
// contains filtered or unexported fields
}
func (S3Adapter) FetchFiles ¶ added in v0.1.1
func (S3Adapter) FindFileMatches ¶ added in v0.1.1
func (a S3Adapter) FindFileMatches(filename string, matchFinder *MatchFinder) error
func (*S3Adapter) ObjectName ¶ added in v0.1.5
type SqlAdapter ¶
func (SqlAdapter) FetchTableData ¶
func (a SqlAdapter) FetchTableData(table table, limit int) (*tableData, error)
func (SqlAdapter) FetchTables ¶
func (a SqlAdapter) FetchTables() ([]table, error)
func (*SqlAdapter) Init ¶
func (a *SqlAdapter) Init(url string) error
func (*SqlAdapter) RowName ¶ added in v0.1.4
func (a *SqlAdapter) RowName() string
func (*SqlAdapter) Scan ¶ added in v0.1.6
func (a *SqlAdapter) Scan(scanOpts ScanOpts) ([]ruleMatch, error)
func (*SqlAdapter) TableName ¶ added in v0.1.4
func (a *SqlAdapter) TableName() string
type TextFormatter ¶ added in v0.1.7
type TextFormatter struct{}
TextFormatter prints the result as human readable text.
func (TextFormatter) PrintMatch ¶ added in v0.1.7
func (f TextFormatter) PrintMatch(writer io.Writer, match matchInfo) error
Click to show internal directories.
Click to hide internal directories.