maintenance

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: May 16, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidTask indicates that the task specified does not exist.
	ErrInvalidTask = errors.New("Invalid Task")

	// ErrInvalidOptions indicates that the options specified for a task are not valid.
	ErrInvalidOptions = errors.New("Invalid Options")
)

Functions

This section is empty.

Types

type ExpireFindingsTask

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

ExpireFindingsTask is a maintenance task responsible for expiring the findings that are OPEN and have not been found for a configurable time span.

func (*ExpireFindingsTask) Execute

func (t *ExpireFindingsTask) Execute() (TaskResult, error)

Execute executes the ExpireFindingsTask.

func (*ExpireFindingsTask) Name

func (t *ExpireFindingsTask) Name() string

Name returns this task name.

func (*ExpireFindingsTask) Type

func (t *ExpireFindingsTask) Type() string

Type returns this task type.

type PurgeOrphanTargetsTask added in v1.2.0

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

PurgeOrphanTargetsTask is a maintenance task responsible for removing orphan targets from the database. Orphan targets are targets that are not associated with any team.

func (*PurgeOrphanTargetsTask) Execute added in v1.2.0

func (t *PurgeOrphanTargetsTask) Execute() (TaskResult, error)

Execute executes the PurgeOrphanTargetsTask.

func (*PurgeOrphanTargetsTask) Name added in v1.2.0

func (t *PurgeOrphanTargetsTask) Name() string

Name returns this task name.

func (*PurgeOrphanTargetsTask) Type added in v1.2.0

func (t *PurgeOrphanTargetsTask) Type() string

Type returns this task type.

type Task

type Task interface {
	Name() string
	Type() string
	Execute() (TaskResult, error)
}

Task represents a maintenance task.

func NewTask

func NewTask(name, taskType string, opts interface{}, store store.VulnStore) (Task, error)

NewTask creates a new maintenance task given its name, rate and options.

type TaskResult

type TaskResult string

TaskResult is the resulting output from a task execution.

Jump to

Keyboard shortcuts

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