Documentation ¶
Overview ¶
Package hashr implements core functionality for hashR.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Exporter ¶
type Exporter interface { // Export exports samples to a given data sink. Export(ctx context.Context, repoName, repoPath, sourceID, sourceHash, sourcePath, sourceDescription string, samples []common.Sample) error // Name returns exporter name. Name() string }
Exporter represents exporter instance that will be used to export extracted data.
type HashR ¶
type HashR struct { Importers []Importer Processor Processor Exporters []Exporter Storage Storage ProcessingWorkerCount int ExportWorkerCount int CacheDir string Dev bool Export bool ExportPath string SourcesForReprocessing []string // contains filtered or unexported fields }
HashR holds data related to running instance of HashR.
type Importer ¶
type Importer interface { // DiscoverRepo returns slice of objects that satisfy Source interface. DiscoverRepo() ([]Source, error) // RepoName() returns repository name. RepoName() string // RepoPath() returns repository path. RepoPath() string }
Importer represents importer instance that will be used to import data for processing.
type ProcessingSource ¶
type ProcessingSource struct { ID string Repo string RepoPath string RemoteSourcePath string Sha256 string Status status ImportedAt int64 PreprocessingDuration time.Duration ProcessingDuration time.Duration ExportDuration time.Duration SampleCount int ExportCount int Error string }
ProcessingSource holds data related to a processing source.
type Processor ¶
type Processor interface { // ImageExport runs image_export.py binary and returns local path to the folder with extracted // data. ImageExport(string) (string, error) }
Processor represents processor instance that will be used to process source data.
type Source ¶
type Source interface { // ID returns non-unique ID for a given source. ID() string // RepoName returns source repository name. RepoName() string // RepoPath returns source repository path. RepoPath() string // LocalPath returns path to the source on the local file system. LocalPath() string // RemotePath returns path to the source in the remote location. RemotePath() string // Preprocess does the necessary preprocessing (extracting, mounting) to ingest the data in // Plaso. Preprocess() (string, error) // QuickSHA256Hash returns SHA256 digest, that is used to check if a given source data was // already processed.Given the fact that some repositories will hold a lot of data, the intent // here is to use the least resource demanding method to return a source digest. QuickSHA256Hash() (string, error) // Description provides additional description of the source. Description() string }
Source represents data to be processed.
Click to show internal directories.
Click to hide internal directories.