Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyExpectations ¶
func ApplyExpectations(t *testing.T, mock interface{}, expectations ...*Expectation)
ApplyExpectation applies the specified expectations on a given mock.
Types ¶
type ClairClient ¶
func NewClairClient ¶
func NewClairClient() *ClairClient
func (*ClairClient) GetLayer ¶
func (cc *ClairClient) GetLayer(layerName string) (*clair.LayerEnvelope, error)
func (*ClairClient) GetVulnerabilityDatabaseUpdatedAt ¶ added in v1.0.1
func (cc *ClairClient) GetVulnerabilityDatabaseUpdatedAt() (*time.Time, error)
type Enqueuer ¶ added in v1.0.1
func NewEnqueuer ¶ added in v1.0.1
func NewEnqueuer() *Enqueuer
type Expectation ¶
type Expectation struct { Method string Args []interface{} ReturnArgs []interface{} }
Expectation represents an expectation of a method being called and its return values.
type RegistryClient ¶
func NewRegistryClient ¶
func NewRegistryClient() *RegistryClient
func (*RegistryClient) GetManifest ¶
func (c *RegistryClient) GetManifest(req harbor.ScanRequest) (distribution.Manifest, error)
type RegistryClientFactory ¶
func NewRegistryClientFactory ¶
func NewRegistryClientFactory() *RegistryClientFactory
func (*RegistryClientFactory) Get ¶
func (f *RegistryClientFactory) Get() registry.Client
type Store ¶ added in v1.0.1
func (*Store) UpdateReport ¶ added in v1.0.1
func (s *Store) UpdateReport(scanJobID string, report harbor.ScanReport) error
type Transformer ¶
func NewTransformer ¶
func NewTransformer() *Transformer
func (*Transformer) ToClairLayers ¶ added in v1.0.1
func (m *Transformer) ToClairLayers(req harbor.ScanRequest, manifest distribution.Manifest) []clair.Layer
func (*Transformer) ToHarborScanReport ¶ added in v1.0.1
func (m *Transformer) ToHarborScanReport(artifact harbor.Artifact, layer *clair.Layer) harbor.ScanReport
Click to show internal directories.
Click to hide internal directories.