Documentation ¶
Index ¶
- 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 ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements DB operations
type MockOperation ¶
MockOperation is an autogenerated mock type for the Operation type
func (*MockOperation) ApplyDownloadExpectation ¶
func (_m *MockOperation) ApplyDownloadExpectation(e OperationDownloadExpectation)
func (*MockOperation) ApplyDownloadExpectations ¶
func (_m *MockOperation) ApplyDownloadExpectations(expectations []OperationDownloadExpectation)
func (*MockOperation) ApplyNeedsUpdateExpectation ¶
func (_m *MockOperation) ApplyNeedsUpdateExpectation(e OperationNeedsUpdateExpectation)
func (*MockOperation) ApplyNeedsUpdateExpectations ¶
func (_m *MockOperation) ApplyNeedsUpdateExpectations(expectations []OperationNeedsUpdateExpectation)
func (*MockOperation) Download ¶
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 ¶
func (_m *MockOperation) NeedsUpdate(cliVersion string, skip bool) (bool, error)
NeedsUpdate provides a mock function with given fields: cliVersion, skip
type Operation ¶
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 ¶
type OperationDownloadExpectation ¶
type OperationDownloadExpectation struct { Args OperationDownloadArgs Returns OperationDownloadReturns }
type OperationDownloadReturns ¶
type OperationDownloadReturns struct {
Err error
}
type OperationNeedsUpdateExpectation ¶
type OperationNeedsUpdateExpectation struct { Args OperationNeedsUpdateArgs Returns OperationNeedsUpdateReturns }
type Option ¶
type Option func(*options)
Option is a functional option
func WithDBRepository ¶
WithDBRepository takes a dbRepository
func WithOCIArtifact ¶
WithOCIArtifact takes an OCI artifact
Click to show internal directories.
Click to hide internal directories.