Documentation
¶
Index ¶
Constants ¶
View Source
const ( ListComponentsEventName event.EventName = "ListComponents" CreateComponentEventName event.EventName = "CreateComponent" UpdateComponentEventName event.EventName = "UpdateComponent" DeleteComponentEventName event.EventName = "DeleteComponent" ListComponentCcrnsEventName event.EventName = "ListComponentCcrns" GetComponentIssueSeverityCountsEventName event.EventName = "GetComponentIssueSeverityCounts" )
Variables ¶
View Source
var CacheTtlCountComponents = 12 * time.Hour
View Source
var CacheTtlGetAllComponentCursors = 12 * time.Hour
View Source
var CacheTtlGetComponentCcrns = 12 * time.Hour
Functions ¶
This section is empty.
Types ¶
type ComponentHandler ¶
type ComponentHandler interface {
ListComponents(*entity.ComponentFilter, *entity.ListOptions) (*entity.List[entity.ComponentResult], error)
CreateComponent(context.Context, *entity.Component) (*entity.Component, error)
UpdateComponent(context.Context, *entity.Component) (*entity.Component, error)
DeleteComponent(context.Context, int64) error
ListComponentCcrns(*entity.ComponentFilter, *entity.ListOptions) ([]string, error)
GetComponentVulnerabilityCounts(*entity.ComponentFilter) ([]entity.IssueSeverityCounts, error)
}
func NewComponentHandler ¶
func NewComponentHandler(handlerContext common.HandlerContext) ComponentHandler
type ComponentHandlerError ¶
type ComponentHandlerError struct {
// contains filtered or unexported fields
}
func NewUserHandlerError ¶
func NewUserHandlerError(msg string) *ComponentHandlerError
func (*ComponentHandlerError) Error ¶
func (e *ComponentHandlerError) Error() string
type CreateComponentEvent ¶
func (*CreateComponentEvent) Name ¶
func (e *CreateComponentEvent) Name() event.EventName
type DeleteComponentEvent ¶
type DeleteComponentEvent struct {
ComponentID int64
}
func (*DeleteComponentEvent) Name ¶
func (e *DeleteComponentEvent) Name() event.EventName
type GetComponentIssueSeverityCountsEvent ¶ added in v1.18.0
type GetComponentIssueSeverityCountsEvent struct {
Filter *entity.ComponentFilter
Counts []entity.IssueSeverityCounts
}
func (*GetComponentIssueSeverityCountsEvent) Name ¶ added in v1.18.0
func (e *GetComponentIssueSeverityCountsEvent) Name() event.EventName
type ListComponentCcrnsEvent ¶
type ListComponentCcrnsEvent struct {
Filter *entity.ComponentFilter
Options *entity.ListOptions
CCRNs []string
}
func (*ListComponentCcrnsEvent) Name ¶
func (e *ListComponentCcrnsEvent) Name() event.EventName
type ListComponentsEvent ¶
type ListComponentsEvent struct {
Filter *entity.ComponentFilter
Options *entity.ListOptions
Components *entity.List[entity.ComponentResult]
}
func (*ListComponentsEvent) Name ¶
func (e *ListComponentsEvent) Name() event.EventName
type UpdateComponentEvent ¶
func (*UpdateComponentEvent) Name ¶
func (e *UpdateComponentEvent) Name() event.EventName
Click to show internal directories.
Click to hide internal directories.