usecase

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnhanceIgnorePolicy added in v0.2.2

func EnhanceIgnorePolicy(ctx context.Context,
	dbClient interfaces.Database,
	genAI interfaces.GenAI,
	input EnhanceIgnorePolicyInput,
) error

func NewPolicyDirectory added in v0.2.2

func NewPolicyDirectory(ctx context.Context, dir string) error

func Play added in v0.2.1

func Play(ctx context.Context, input PlayInput) error

Types

type EnhanceIgnorePolicyInput added in v0.2.2

type EnhanceIgnorePolicyInput struct {
	AlertIDs         []types.AlertID
	BasePolicyFile   string
	TestDataDir      string
	TestDataRegoPath string
	OverWrite        bool
}

func (EnhanceIgnorePolicyInput) Validate added in v0.2.2

func (x EnhanceIgnorePolicyInput) Validate() error

type Option

type Option func(*UseCase)

func WithDatabase

func WithDatabase(db interfaces.Database) Option

func WithGenAI

func WithGenAI(genAI interfaces.GenAI) Option

type PlayInput added in v0.2.1

type PlayInput struct {
	ScenarioPath string
	OutDir       string
	Targets      []string
	CoreOptions  []chain.Option
}

func (PlayInput) Validate added in v0.2.1

func (x PlayInput) Validate() error

type UseCase

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

func New

func New(options ...Option) *UseCase

Jump to

Keyboard shortcuts

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