updater

package
v0.0.0-...-c12cb85 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCmd

func GetCmd() *cobra.Command

func Run

func Run(cmd types.ICommand) error

Types

type IUpdater

type IUpdater interface {
	GetAllAvailableBooks(cmd types.ICommand, series []types.Series) (types.ISBNBooks, error)
	UpdateLibrary(ctx context.Context, library types.ILibrary, availableBooks types.ISBNBooks) (types.ISBNBooks, error)
}

func GetUpdater

func GetUpdater(cmd types.ICommand) IUpdater

func NewUpdater

func NewUpdater() IUpdater

type IUpdaterMock

type IUpdaterMock struct {
	mock.Mock
}

IUpdaterMock is an autogenerated mock type for the IUpdater type

func NewIUpdaterMock

func NewIUpdaterMock(t interface {
	mock.TestingT
	Cleanup(func())
}) *IUpdaterMock

NewIUpdaterMock creates a new instance of IUpdaterMock. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*IUpdaterMock) GetAllAvailableBooks

func (_m *IUpdaterMock) GetAllAvailableBooks(ctx types.ICommand, series []types.Series) (types.ISBNBooks, error)

GetAllAvailableBooks provides a mock function with given fields: ctx, series

func (*IUpdaterMock) UpdateLibrary

func (_m *IUpdaterMock) UpdateLibrary(ctx context.Context, library types.ILibrary, availableBooks types.ISBNBooks) (types.ISBNBooks, error)

UpdateLibrary provides a mock function with given fields: ctx, library, availableBooks

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL