usecase

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GenerateOption

type GenerateOption struct {
	SiteType    string
	Style       string
	Taste       string
	Layout      string
	ColorScheme string
	Lang        string
	Extra       string
	MaxRetries  int
}

GenerateOption holds parameters for scenario generation.

type Option

type Option func(*UseCase)

Option configures the UseCase.

func WithLLMClient

func WithLLMClient(c gollem.LLMClient) Option

WithLLMClient sets the LLM client.

func WithLogger

func WithLogger(l *slog.Logger) Option

WithLogger sets the logger.

func WithPrinter

func WithPrinter(p interfaces.Printer) Option

WithPrinter sets the CLI printer.

type UseCase

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

UseCase orchestrates application operations.

func New

func New(opts ...Option) *UseCase

New creates a new UseCase.

func (*UseCase) Generate

func (u *UseCase) Generate(ctx context.Context, outputDir string, opt GenerateOption) (*scenario.Scenario, error)

Generate creates a new honeypot scenario using the LLM. outputDir is the directory where the LLM agent writes files.

func (*UseCase) LoadScenario

func (u *UseCase) LoadScenario(ctx context.Context, scenarioPath string) (*scenario.Scenario, error)

LoadScenario loads and validates a scenario from path.

func (*UseCase) Validate

func (u *UseCase) Validate(ctx context.Context, scenarioPath string) error

Validate checks a scenario for correctness.

Jump to

Keyboard shortcuts

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