flaw

package
v0.4.19 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: AGPL-3.0 Imports: 12 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"`
	ComponentPurlOrCpe string            `json:"componentPurlOrCpe"`
	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"`
}

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"`
}

Jump to

Keyboard shortcuts

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