Help us shape the future of Go! Take the 2026 Go Developer Survey

flaw

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHttpController

func NewHttpController(flawRepository repository, flawService flawService) *flawHttpController

func NewService

func NewService(flawRepository flawRepository, flawEventRepository flawEventRepository, assetRepository assetRepository, cveRepository cveRepository) *service

Types

type FlawDTO

type FlawDTO struct {
	ID                string            `json:"id"`
	ScannerID         string            `json:"scanner"`
	Message           *string           `json:"message"`
	AssetID           string            `json:"assetId"`
	State             models.FlawState  `json:"state"`
	CVE               *models.CVE       `json:"cve"`
	CVEID             string            `json:"cveId"`
	Component         *models.Component `json:"component"`
	ComponentPurl     string            `json:"componentPurl"`
	Effort            *int              `json:"effort"`
	RiskAssessment    *int              `json:"riskAssessment"`
	RawRiskAssessment *float64          `json:"rawRiskAssessment"`
	Priority          *int              `json:"priority"`
	ArbitraryJsonData map[string]any    `json:"arbitraryJsonData"`
	LastDetected      time.Time         `json:"lastDetected"`
	CreatedAt         time.Time         `json:"createdAt"`
	TicketID          *string           `json:"ticketId"`
	TicketURL         *string           `json:"ticketUrl"`
}

func FlawToDto added in v0.4.19

func FlawToDto(f models.Flaw) FlawDTO

type FlawEventDTO

type FlawEventDTO struct {
	ID     uuid.UUID            `json:"id"`
	Type   models.FlawEventType `json:"type"`
	FlawID string               `json:"flawId"`
	UserID string               `json:"userId"`

	Justification *string `json:"justification"`

	ArbitraryJsonData map[string]any `json:"arbitraryJsonData"`

	CreatedAt time.Time `json:"createdAt"`
}

func (FlawEventDTO) ToModel

func (dto FlawEventDTO) ToModel() models.FlawEvent

type FlawEventHttpController

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

func NewEventHttpController

func NewEventHttpController(flawEventRepository ctrFlawEventRepository) *FlawEventHttpController

func (FlawEventHttpController) Create

func (c FlawEventHttpController) Create(ctx core.Context) error

type FlawStatus

type FlawStatus struct {
	StatusType    string `json:"status"`
	Justification string `json:"justification"`
}

type FlawsByPackage added in v0.5.1

type FlawsByPackage struct {
	PackageName string    `json:"packageName"`
	AvgRisk     float64   `json:"avgRisk"`
	MaxRisk     float64   `json:"maxRisk"`
	FlawCount   int       `json:"flawCount"`
	TotalRisk   float64   `json:"totalRisk"`
	Flaws       []FlawDTO `json:"flaws"`
}

Jump to

Keyboard shortcuts

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