interfaces

package
v0.0.0-...-aabf2b0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Detector

type Detector interface {
	Check(OutputFormatter, LoadedFile) error
	Inject(llm LlmConnector)
}

type File

type File interface {
	GetFilename() string
	GetFilepath() string
}

type Finding

type Finding interface {
	GetName() string

	GetFile() LoadedFile

	GetContainsValue() bool
	GetValue() string

	GetIsCompleteFileImportant() bool

	GetFindingPriority() FindingPriority
}

func GetFindingWithHighestPriority

func GetFindingWithHighestPriority(findings []Finding) Finding

type FindingInstance

type FindingInstance struct {
	File                    LoadedFile
	Name                    string
	Value                   string
	ContainsValue           bool
	IsCompleteFileImportant bool
	Priority                FindingPriority
}

func (FindingInstance) GetContainsValue

func (f FindingInstance) GetContainsValue() bool

func (FindingInstance) GetFile

func (f FindingInstance) GetFile() LoadedFile

func (FindingInstance) GetFindingPriority

func (f FindingInstance) GetFindingPriority() FindingPriority

func (FindingInstance) GetIsCompleteFileImportant

func (f FindingInstance) GetIsCompleteFileImportant() bool

func (FindingInstance) GetName

func (f FindingInstance) GetName() string

func (FindingInstance) GetValue

func (f FindingInstance) GetValue() string

type FindingPriority

type FindingPriority int
const (
	FindingPriorityInformative FindingPriority = iota + 1
	FindingPriorityLow
	FindingPriorityMedium
	FindingPriorityHigh
)

func (FindingPriority) ToString

func (p FindingPriority) ToString() string

type LlmConnector

type LlmConnector interface {
	GetBooleanResponse(string) (bool, error)
	GetResponseOutputModifier() string
}

type LoadedFile

type LoadedFile interface {
	GetFilename() string
	GetFilepath() string
	GetContent() []byte
}

type OutputFormatter

type OutputFormatter interface {
	Start()
	AddFinding(finding Finding)
	Finished()
}

Jump to

Keyboard shortcuts

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