engine

package
v0.0.0-...-0fdbcee Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

© 2022 Sloan Childers

© 2022 Sloan Childers

Index

Constants

This section is empty.

Variables

View Source
var ErrRuleNotFound = errors.New("rule not found")

Functions

This section is empty.

Types

type Rule

type Rule struct {
	Signal      string
	Enabled     bool
	GJSON       string
	Query       string
	Description string
	TypeName    string           `json:"Type"`
	Type        osint.SignalType `json:"-"`
}

type RulesEngine

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

func NewRulesEngine

func NewRulesEngine(filepath string) *RulesEngine

func (*RulesEngine) Evaluate

func (x *RulesEngine) Evaluate(ruleName string, cidr *net.IPNet) ([]byte, error)

func (*RulesEngine) SignalValue

func (x *RulesEngine) SignalValue(cidr *net.IPNet, signal Signal) (gjson.Result, error)

type Signal

type Signal struct {
	URI         osint.SignalURI  `json:"-"`
	Name        string           `json:"Signal"`
	Enabled     bool             `json:"Enabled"`
	Gjson       string           `json:"GJSON"`
	Description string           `json:"Description"`
	TypeName    string           `json:"Type"`
	Type        osint.SignalType `json:"-"`
	Query       string           `json:"Query,omitempty"`
}

func (Signal) SignalName

func (x Signal) SignalName() string

type SignalDictionary

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

func NewSignalDictionary

func NewSignalDictionary() *SignalDictionary

func (*SignalDictionary) GetSignal

func (x *SignalDictionary) GetSignal(signalURI *osint.SignalURI) (Signal, error)

func (*SignalDictionary) ListSignals

func (x *SignalDictionary) ListSignals() []Signal

func (*SignalDictionary) ListSmrtSignals

func (x *SignalDictionary) ListSmrtSignals() map[string]Signal

Jump to

Keyboard shortcuts

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