engine

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

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

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