signature

package
v1.3.6 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultSignatureConfig added in v1.3.0

type DefaultSignatureConfig struct {
	TTYDetectedSignatureEnabled bool
}

type Signature

type Signature interface {
	GetMetadata() SignatureMetadata

	OnEvent(event *types.Event) *castpb.SignatureFinding
}

func DefaultSignatures

func DefaultSignatures(log *logging.Logger, cfg DefaultSignatureConfig) []Signature

func NewStdViaSocketSignature

func NewStdViaSocketSignature(log *logging.Logger) Signature

func NewTTYDetectedSignature added in v1.3.0

func NewTTYDetectedSignature() Signature

type SignatureEngine

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

func NewEngine

func NewEngine(signatures []Signature, log *logging.Logger, cfg SignatureEngineConfig) *SignatureEngine

func (*SignatureEngine) EventInput

func (e *SignatureEngine) EventInput() chan<- *types.Event

func (*SignatureEngine) Events

func (e *SignatureEngine) Events() <-chan *castpb.Event

func (*SignatureEngine) QueueEvent

func (e *SignatureEngine) QueueEvent(event *types.Event)

func (*SignatureEngine) Run

func (e *SignatureEngine) Run(ctx context.Context) error

func (*SignatureEngine) TargetEvents

func (e *SignatureEngine) TargetEvents() []events.ID

type SignatureEngineConfig

type SignatureEngineConfig struct {
	InputChanSize          int `validate:"required"`
	OutputChanSize         int `validate:"required"`
	DefaultSignatureConfig DefaultSignatureConfig
}

type SignatureMetadata

type SignatureMetadata struct {
	ID           castpb.SignatureEventID
	Name         string
	Version      string
	TargetEvents []events.ID
}

type StdioViaSocket

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

func (*StdioViaSocket) GetMetadata

func (*StdioViaSocket) GetMetadata() SignatureMetadata

func (*StdioViaSocket) OnEvent

func (s *StdioViaSocket) OnEvent(event *types.Event) *v1.SignatureFinding

type TTYDetected added in v1.3.0

type TTYDetected struct{}

func (*TTYDetected) GetMetadata added in v1.3.0

func (*TTYDetected) GetMetadata() SignatureMetadata

func (*TTYDetected) OnEvent added in v1.3.0

func (s *TTYDetected) OnEvent(event *types.Event) *v1.SignatureFinding

Jump to

Keyboard shortcuts

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