Documentation ¶
Index ¶
- Constants
- Variables
- type Adapter
- type AsyncAdapter
- type BaseAdapter
- func (b *BaseAdapter) CreateScanResponse(repository string, shaDigest string) harbor.ScanResponse
- func (b *BaseAdapter) DecodeScanResponseID(scanResponseID harbor.ScanRequestID) (repository string, shaDigest string)
- func (b *BaseAdapter) GetMetadata() (harbor.ScannerAdapterMetadata, error)
- func (b *BaseAdapter) ToHarborVulnerabilityReport(repository string, shaDigest string, ...) (harbor.VulnerabilityReport, error)
- type Logger
Constants ¶
View Source
const (
DefaultAsyncAdapterRefreshRate = 20 * time.Second
)
Variables ¶
View Source
var ( ErrScanRequestIDNotFound = errors.New("scanRequestID cannot be found") ErrVulnerabilityReportNotReady = errors.New("image is being scanned and report is still not ready") )
View Source
var ErrInlineScanError = errors.New("error executing the inline scanner")
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter interface { GetMetadata() (harbor.ScannerAdapterMetadata, error) Scan(req harbor.ScanRequest) (harbor.ScanResponse, error) GetVulnerabilityReport(scanResponseID harbor.ScanRequestID) (harbor.VulnerabilityReport, error) }
func NewBackendAdapter ¶
func NewInlineAdapter ¶
type AsyncAdapter ¶ added in v0.6.0
type AsyncAdapter struct {
// contains filtered or unexported fields
}
AsyncAdapter is just a wrapper of the underlying real adapter (e.g. inlineAdapter) whose only goal is to make all the long-running operations non-blocking.
func NewAsyncAdapter ¶ added in v0.6.0
func (*AsyncAdapter) GetMetadata ¶ added in v0.6.0
func (a *AsyncAdapter) GetMetadata() (harbor.ScannerAdapterMetadata, error)
func (*AsyncAdapter) GetVulnerabilityReport ¶ added in v0.6.0
func (a *AsyncAdapter) GetVulnerabilityReport(scanID harbor.ScanRequestID) (harbor.VulnerabilityReport, error)
func (*AsyncAdapter) Scan ¶ added in v0.6.0
func (a *AsyncAdapter) Scan(req harbor.ScanRequest) (harbor.ScanResponse, error)
type BaseAdapter ¶
type BaseAdapter struct {
// contains filtered or unexported fields
}
func (*BaseAdapter) CreateScanResponse ¶
func (b *BaseAdapter) CreateScanResponse(repository string, shaDigest string) harbor.ScanResponse
func (*BaseAdapter) DecodeScanResponseID ¶
func (b *BaseAdapter) DecodeScanResponseID(scanResponseID harbor.ScanRequestID) (repository string, shaDigest string)
func (*BaseAdapter) GetMetadata ¶
func (b *BaseAdapter) GetMetadata() (harbor.ScannerAdapterMetadata, error)
func (*BaseAdapter) ToHarborVulnerabilityReport ¶
func (b *BaseAdapter) ToHarborVulnerabilityReport(repository string, shaDigest string, vulnerabilityReport *secure.VulnerabilityReport) (harbor.VulnerabilityReport, error)
type Logger ¶ added in v0.4.0
type Logger interface { Writer() *io.PipeWriter Debug(args ...interface{}) Debugf(format string, args ...interface{}) Info(args ...interface{}) Infof(format string, args ...interface{}) Warn(args ...interface{}) Warnf(format string, args ...interface{}) Error(args ...interface{}) Errorf(format string, args ...interface{}) }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.