Documentation ¶
Index ¶
- Variables
- func MetadataPath(cacheDir string) string
- type Client
- type Metadata
- 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) ApplyUpdateMetadataExpectation(e OperationUpdateMetadataExpectation)
- func (_m *MockOperation) ApplyUpdateMetadataExpectations(expectations []OperationUpdateMetadataExpectation)
- func (_m *MockOperation) Download(ctx context.Context, cacheDir string, light bool) error
- func (_m *MockOperation) NeedsUpdate(cliVersion string, skip bool, light bool) (bool, error)
- func (_m *MockOperation) UpdateMetadata(cacheDir string) error
- type Operation
- type OperationDownloadArgs
- type OperationDownloadExpectation
- type OperationDownloadReturns
- type OperationNeedsUpdateArgs
- type OperationNeedsUpdateExpectation
- type OperationNeedsUpdateReturns
- type OperationUpdateMetadataArgs
- type OperationUpdateMetadataExpectation
- type OperationUpdateMetadataReturns
Constants ¶
This section is empty.
Variables ¶
View Source
var SuperSet = wire.NewSet( indicator.NewProgressBar, wire.Struct(new(clock.RealClock)), wire.Bind(new(clock.Clock), new(clock.RealClock)), wire.Struct(new(db.Config)), wire.Bind(new(dbOperation), new(db.Config)), github.NewClient, wire.Bind(new(github.Operation), new(github.Client)), afero.NewOsFs, NewMetadata, NewClient, wire.Bind(new(Operation), new(Client)), )
SuperSet binds the dependencies
Functions ¶
func MetadataPath ¶ added in v0.6.0
MetadataPath returns the metaData file path
Types ¶
type Client ¶ added in v0.2.0
type Client struct {
// contains filtered or unexported fields
}
Client implements DB operations
func NewClient ¶ added in v0.2.0
func NewClient(dbc dbOperation, githubClient github.Operation, pb indicator.ProgressBar, clock clock.Clock, metadata Metadata) Client
NewClient is the factory method for DB client
func (Client) NeedsUpdate ¶ added in v0.3.0
NeedsUpdate check is DB needs update
func (Client) UpdateMetadata ¶ added in v0.6.0
UpdateMetadata updates the DB metadata
type Metadata ¶ added in v0.6.0
type Metadata struct {
// contains filtered or unexported fields
}
Metadata defines the file meta
func NewMetadata ¶ added in v0.6.0
NewMetadata is the factory method for file Metadata
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) ApplyUpdateMetadataExpectation ¶ added in v0.6.0
func (_m *MockOperation) ApplyUpdateMetadataExpectation(e OperationUpdateMetadataExpectation)
func (*MockOperation) ApplyUpdateMetadataExpectations ¶ added in v0.6.0
func (_m *MockOperation) ApplyUpdateMetadataExpectations(expectations []OperationUpdateMetadataExpectation)
func (*MockOperation) Download ¶ added in v0.6.0
Download provides a mock function with given fields: ctx, cacheDir, light
func (*MockOperation) NeedsUpdate ¶ added in v0.6.0
NeedsUpdate provides a mock function with given fields: cliVersion, skip, light
func (*MockOperation) UpdateMetadata ¶ added in v0.6.0
func (_m *MockOperation) UpdateMetadata(cacheDir string) error
UpdateMetadata provides a mock function with given fields: cacheDir
type Operation ¶ added in v0.2.0
type Operation interface { NeedsUpdate(cliVersion string, light, skip bool) (need bool, err error) Download(ctx context.Context, cacheDir string, light bool) (err error) UpdateMetadata(cacheDir string) (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 OperationUpdateMetadataArgs ¶ added in v0.6.0
type OperationUpdateMetadataExpectation ¶ added in v0.6.0
type OperationUpdateMetadataExpectation struct { Args OperationUpdateMetadataArgs Returns OperationUpdateMetadataReturns }
type OperationUpdateMetadataReturns ¶ added in v0.6.0
type OperationUpdateMetadataReturns struct {
Err error
}
Click to show internal directories.
Click to hide internal directories.