Documentation ¶
Index ¶
- Constants
- Variables
- type Client
- type MockOperation
- func (_m *MockOperation) ApplyDownloadExpectation(e OperationDownloadExpectation)
- func (_m *MockOperation) ApplyDownloadExpectations(expectations []OperationDownloadExpectation)
- func (_m *MockOperation) ApplyNeedsUpdateExpectation(e OperationNeedsUpdateExpectation)
- func (_m *MockOperation) ApplyNeedsUpdateExpectations(expectations []OperationNeedsUpdateExpectation)
- func (_m *MockOperation) Download(ctx context.Context, dst string, opt types.RegistryOptions) error
- func (_m *MockOperation) NeedsUpdate(cliVersion string, skip bool) (bool, error)
- type Operation
- type OperationDownloadArgs
- type OperationDownloadExpectation
- type OperationDownloadReturns
- type OperationNeedsUpdateArgs
- type OperationNeedsUpdateExpectation
- type OperationNeedsUpdateReturns
- type Option
Constants ¶
View Source
const (
SchemaVersion = db.SchemaVersion
)
Variables ¶
View Source
var (
DefaultRepository = fmt.Sprintf("%s:%d", "ghcr.io/aquasecurity/trivy-db", db.SchemaVersion)
)
Functions ¶
This section is empty.
Types ¶
type Client ¶ added in v0.2.0
type Client struct {
// contains filtered or unexported fields
}
Client implements DB operations
type MockOperation ¶ added in v0.6.0
MockOperation is an autogenerated mock type for the Operation type
func (*MockOperation) ApplyDownloadExpectation ¶ added in v0.6.0
func (_m *MockOperation) ApplyDownloadExpectation(e OperationDownloadExpectation)
func (*MockOperation) ApplyDownloadExpectations ¶ added in v0.6.0
func (_m *MockOperation) ApplyDownloadExpectations(expectations []OperationDownloadExpectation)
func (*MockOperation) ApplyNeedsUpdateExpectation ¶ added in v0.6.0
func (_m *MockOperation) ApplyNeedsUpdateExpectation(e OperationNeedsUpdateExpectation)
func (*MockOperation) ApplyNeedsUpdateExpectations ¶ added in v0.6.0
func (_m *MockOperation) ApplyNeedsUpdateExpectations(expectations []OperationNeedsUpdateExpectation)
func (*MockOperation) Download ¶ added in v0.6.0
func (_m *MockOperation) Download(ctx context.Context, dst string, opt types.RegistryOptions) error
Download provides a mock function with given fields: ctx, dst
func (*MockOperation) NeedsUpdate ¶ added in v0.6.0
func (_m *MockOperation) NeedsUpdate(cliVersion string, skip bool) (bool, error)
NeedsUpdate provides a mock function with given fields: cliVersion, skip
type Operation ¶ added in v0.2.0
type Operation interface { NeedsUpdate(cliVersion string, skip bool) (need bool, err error) Download(ctx context.Context, dst string, opt types.RegistryOptions) (err error) }
Operation defines the DB operations
type OperationDownloadArgs ¶ added in v0.6.0
type OperationDownloadExpectation ¶ added in v0.6.0
type OperationDownloadExpectation struct { Args OperationDownloadArgs Returns OperationDownloadReturns }
type OperationDownloadReturns ¶ added in v0.6.0
type OperationDownloadReturns struct {
Err error
}
type OperationNeedsUpdateArgs ¶ added in v0.6.0
type OperationNeedsUpdateExpectation ¶ added in v0.6.0
type OperationNeedsUpdateExpectation struct { Args OperationNeedsUpdateArgs Returns OperationNeedsUpdateReturns }
type OperationNeedsUpdateReturns ¶ added in v0.6.0
type Option ¶ added in v0.23.0
type Option func(*options)
Option is a functional option
func WithDBRepository ¶ added in v0.25.1
WithDBRepository takes a dbRepository
func WithOCIArtifact ¶ added in v0.23.0
WithOCIArtifact takes an OCI artifact
Click to show internal directories.
Click to hide internal directories.