state

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2023 License: MIT Imports: 2 Imported by: 36

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrAssetUnreachable indicates that the asset to be scanned is not reachable.
	ErrAssetUnreachable = errors.New("Asset is Unreachable")
	// ErrNonPublicAsset indicates that the asset is not publicly exposed and therefore won't be scanned.
	ErrNonPublicAsset = errors.New("Asset is not public")
)

Functions

This section is empty.

Types

type ProgressReporter

type ProgressReporter interface {
	SetProgress(float32)
}

ProgressReporter is intended to be used by the sdk.

type ProgressReporterHandler

type ProgressReporterHandler func(progress float32)

ProgressReporterHandler allows to define a ProgressReporter using a function instead of a struct.

func (ProgressReporterHandler) SetProgress

func (p ProgressReporterHandler) SetProgress(progress float32)

SetProgress implements the required ProgressReporter interface from a function.

type State

type State struct {
	ProgressReporter
	*report.ResultData
}

State defines the fields and function a check must use to generare a result and inform about the progress of the its execution. The type is not intended be instanciated by external packages, the instances to be used will be provided by the sdk.

Jump to

Keyboard shortcuts

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