engine

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: Apache-2.0 Imports: 13 Imported by: 0 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 Config

type Config struct {
	Rules        []Rule         `json:"rules"`
	CallbackWait *time.Duration `json:"callback_wait"`
}

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

func New

func New() (*Engine, error)

func (*Engine) LoadConfig

func (e *Engine) LoadConfig(reader io.Reader) error

func (*Engine) Process

func (e *Engine) Process(contents io.Reader) (Result, error)

func (*Engine) QueueCallback added in v1.1.0

func (e *Engine) QueueCallback(c string, r *Result)

func (*Engine) RuleCount

func (e *Engine) RuleCount() int

type Result

type Result struct {
	ID            string
	Sha1          string
	Sha256        string
	ContentLength uint64
	Findings      []string
	ContentType   string
	CreationDate  string
	Metadata      map[string]string
	Error         string
}

type Rule

type Rule struct {
	Format  string `json:"format"`
	Content string `json:"content"`
	Result  string `json:"result"`
}

Jump to

Keyboard shortcuts

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