mocks

package
v0.0.0-...-3382da6 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2021 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Analyser

type Analyser struct {
	mock.Mock
}

Analyser is an autogenerated mock type for the Analyser type

func (*Analyser) Execute

Execute provides a mock function with given fields: found

type BackupReport

type BackupReport struct {
	mock.Mock
}

BackupReport is an autogenerated mock type for the BackupReport type

func (*BackupReport) CountPerAlbum

func (_m *BackupReport) CountPerAlbum() map[string]*backupmodel.TypeCounter

CountPerAlbum provides a mock function with given fields:

func (*BackupReport) NewAlbums

func (_m *BackupReport) NewAlbums() []string

NewAlbums provides a mock function with given fields:

func (*BackupReport) Skipped

func (_m *BackupReport) Skipped() backupmodel.MediaCounter

Skipped provides a mock function with given fields:

func (*BackupReport) WaitToComplete

func (_m *BackupReport) WaitToComplete()

WaitToComplete provides a mock function with given fields:

type CatalogProxyAdapter

type CatalogProxyAdapter struct {
	mock.Mock
}

CatalogProxyAdapter is an autogenerated mock type for the CatalogProxyAdapter type

func (*CatalogProxyAdapter) Create

func (_m *CatalogProxyAdapter) Create(createRequest catalog.CreateAlbum) error

Create provides a mock function with given fields: createRequest

func (*CatalogProxyAdapter) FindAllAlbums

func (_m *CatalogProxyAdapter) FindAllAlbums() ([]*catalog.Album, error)

FindAllAlbums provides a mock function with given fields:

func (*CatalogProxyAdapter) FindSignatures

func (_m *CatalogProxyAdapter) FindSignatures(signatures []*catalog.MediaSignature) ([]*catalog.MediaSignature, error)

FindSignatures provides a mock function with given fields: signatures

func (*CatalogProxyAdapter) InsertMedias

func (_m *CatalogProxyAdapter) InsertMedias(medias []catalog.CreateMediaRequest) error

InsertMedias provides a mock function with given fields: medias

type ClosableMedia

type ClosableMedia struct {
	mock.Mock
}

ClosableMedia is an autogenerated mock type for the ClosableMedia type

func (*ClosableMedia) Close

func (_m *ClosableMedia) Close() error

Close provides a mock function with given fields:

type Config

type Config struct {
	mock.Mock
}

Config is an autogenerated mock type for the Config type

func (*Config) Get

func (_m *Config) Get(key string) interface{}

Get provides a mock function with given fields: key

func (*Config) GetAWSSession

func (_m *Config) GetAWSSession() *session.Session

GetAWSSession provides a mock function with given fields:

func (*Config) GetBool

func (_m *Config) GetBool(key string) bool

GetBool provides a mock function with given fields: key

func (*Config) GetInt

func (_m *Config) GetInt(key string) int

GetInt provides a mock function with given fields: key

func (*Config) GetIntOrDefault

func (_m *Config) GetIntOrDefault(key string, defaultValue int) int

GetIntOrDefault provides a mock function with given fields: key, defaultValue

func (*Config) GetString

func (_m *Config) GetString(key string) string

GetString provides a mock function with given fields: key

func (*Config) GetStringOrDefault

func (_m *Config) GetStringOrDefault(key string, defaultValue string) string

GetStringOrDefault provides a mock function with given fields: key, defaultValue

type CreateAlbumPort

type CreateAlbumPort struct {
	mock.Mock
}

CreateAlbumPort is an autogenerated mock type for the CreateAlbumPort type

func (*CreateAlbumPort) Create

func (_m *CreateAlbumPort) Create(createRequest ui.RecordCreation) error

Create provides a mock function with given fields: createRequest

type DeleteAlbumPort

type DeleteAlbumPort struct {
	mock.Mock
}

DeleteAlbumPort is an autogenerated mock type for the DeleteAlbumPort type

func (*DeleteAlbumPort) DeleteAlbum

func (_m *DeleteAlbumPort) DeleteAlbum(folderName string) error

DeleteAlbum provides a mock function with given fields: folderName

type DetailsReaderAdapter

type DetailsReaderAdapter struct {
	mock.Mock
}

DetailsReaderAdapter is an autogenerated mock type for the DetailsReaderAdapter type

func (*DetailsReaderAdapter) ReadDetails

ReadDetails provides a mock function with given fields: reader, options

func (*DetailsReaderAdapter) Supports

func (_m *DetailsReaderAdapter) Supports(media backupmodel.FoundMedia, mediaType backupmodel.MediaType) bool

Supports provides a mock function with given fields: media, mediaType

type Downloader

type Downloader struct {
	mock.Mock
}

Downloader is an autogenerated mock type for the Downloader type

func (*Downloader) Execute

Execute provides a mock function with given fields: found

type DownloaderAdapter

type DownloaderAdapter struct {
	mock.Mock
}

DownloaderAdapter is an autogenerated mock type for the DownloaderAdapter type

func (*DownloaderAdapter) DownloadMedia

DownloadMedia provides a mock function with given fields: media

type ExistingRecordRepositoryPort

type ExistingRecordRepositoryPort struct {
	mock.Mock
}

ExistingRecordRepositoryPort is an autogenerated mock type for the ExistingRecordRepositoryPort type

func (*ExistingRecordRepositoryPort) FindExistingRecords

func (_m *ExistingRecordRepositoryPort) FindExistingRecords() ([]*ui.ExistingRecord, error)

FindExistingRecords provides a mock function with given fields:

type Filter

type Filter struct {
	mock.Mock
}

Filter is an autogenerated mock type for the Filter type

func (*Filter) Execute

func (_m *Filter) Execute(found backupmodel.FoundMedia) bool

Execute provides a mock function with given fields: found

type FoundMedia

type FoundMedia struct {
	mock.Mock
}

FoundMedia is an autogenerated mock type for the FoundMedia type

func (*FoundMedia) Filename

func (_m *FoundMedia) Filename() string

Filename provides a mock function with given fields:

func (*FoundMedia) LastModificationDate

func (_m *FoundMedia) LastModificationDate() time.Time

LastModificationDate provides a mock function with given fields:

func (*FoundMedia) ReadMedia

func (_m *FoundMedia) ReadMedia() (io.Reader, error)

ReadMedia provides a mock function with given fields:

func (*FoundMedia) SimpleSignature

func (_m *FoundMedia) SimpleSignature() *backupmodel.SimpleMediaSignature

SimpleSignature provides a mock function with given fields:

type FoundMediaWithHash

type FoundMediaWithHash struct {
	mock.Mock
}

FoundMediaWithHash is an autogenerated mock type for the FoundMediaWithHash type

func (*FoundMediaWithHash) Sha256Hash

func (_m *FoundMediaWithHash) Sha256Hash() string

Sha256Hash provides a mock function with given fields:

type InteractiveActionsPort

type InteractiveActionsPort struct {
	mock.Mock
}

InteractiveActionsPort is an autogenerated mock type for the InteractiveActionsPort type

func (*InteractiveActionsPort) Create

func (_m *InteractiveActionsPort) Create(createRequest ui.RecordCreation) error

Create provides a mock function with given fields: createRequest

func (*InteractiveActionsPort) DeleteAlbum

func (_m *InteractiveActionsPort) DeleteAlbum(folderName string) error

DeleteAlbum provides a mock function with given fields: folderName

func (*InteractiveActionsPort) RenameAlbum

func (_m *InteractiveActionsPort) RenameAlbum(folderName string, newName string, renameFolder bool) error

RenameAlbum provides a mock function with given fields: folderName, newName, renameFolder

func (*InteractiveActionsPort) UpdateAlbum

func (_m *InteractiveActionsPort) UpdateAlbum(folderName string, start time.Time, end time.Time) error

UpdateAlbum provides a mock function with given fields: folderName, start, end

type InteractiveRendererPort

type InteractiveRendererPort struct {
	mock.Mock
}

InteractiveRendererPort is an autogenerated mock type for the InteractiveRendererPort type

func (*InteractiveRendererPort) Height

func (_m *InteractiveRendererPort) Height() int

Height provides a mock function with given fields:

func (*InteractiveRendererPort) Print

func (_m *InteractiveRendererPort) Print(question string)

Print provides a mock function with given fields: question

func (*InteractiveRendererPort) ReadAnswer

func (_m *InteractiveRendererPort) ReadAnswer() (string, error)

ReadAnswer provides a mock function with given fields:

func (*InteractiveRendererPort) Render

Render provides a mock function with given fields: state

type Listener

type Listener struct {
	mock.Mock
}

Listener is an autogenerated mock type for the Listener type

func (*Listener) Execute

func (_m *Listener) Execute(_a0 config.Config)

Execute provides a mock function with given fields: _a0

type MediaScannerAdapter

type MediaScannerAdapter struct {
	mock.Mock
}

MediaScannerAdapter is an autogenerated mock type for the MediaScannerAdapter type

func (*MediaScannerAdapter) FindMediaRecursively

func (_m *MediaScannerAdapter) FindMediaRecursively(volume backupmodel.VolumeToBackup, callback func(backupmodel.FoundMedia)) (uint, uint, error)

FindMediaRecursively provides a mock function with given fields: volume, callback

type MoveMediaOperator

type MoveMediaOperator struct {
	mock.Mock
}

MoveMediaOperator is an autogenerated mock type for the MoveMediaOperator type

func (*MoveMediaOperator) Continue

func (_m *MoveMediaOperator) Continue() bool

Continue provides a mock function with given fields:

func (*MoveMediaOperator) Move

Move provides a mock function with given fields: source, dest

func (*MoveMediaOperator) UpdateStatus

func (_m *MoveMediaOperator) UpdateStatus(done int, total int) error

UpdateStatus provides a mock function with given fields: done, total

type OnlineStorageAdapter

type OnlineStorageAdapter struct {
	mock.Mock
}

OnlineStorageAdapter is an autogenerated mock type for the OnlineStorageAdapter type

func (*OnlineStorageAdapter) MoveFile

func (_m *OnlineStorageAdapter) MoveFile(owner string, folderName string, filename string, destFolderName string) (string, error)

MoveFile provides a mock function with given fields: owner, folderName, filename, destFolderName

func (*OnlineStorageAdapter) UploadFile

func (_m *OnlineStorageAdapter) UploadFile(owner string, media backupmodel.ReadableMedia, folderName string, filename string) (string, error)

UploadFile provides a mock function with given fields: owner, media, folderName, filename

type PostAnalyseFilter

type PostAnalyseFilter struct {
	mock.Mock
}

PostAnalyseFilter is an autogenerated mock type for the PostAnalyseFilter type

func (*PostAnalyseFilter) AcceptAnalysedMedia

func (_m *PostAnalyseFilter) AcceptAnalysedMedia(media *backupmodel.AnalysedMedia, folderName string) bool

AcceptAnalysedMedia provides a mock function with given fields: media, folderName

type PreCompletion

type PreCompletion struct {
	mock.Mock
}

PreCompletion is an autogenerated mock type for the PreCompletion type

func (*PreCompletion) Execute

func (_m *PreCompletion) Execute() error

Execute provides a mock function with given fields:

type PrintReadTerminalPort

type PrintReadTerminalPort struct {
	mock.Mock
}

PrintReadTerminalPort is an autogenerated mock type for the PrintReadTerminalPort type

func (*PrintReadTerminalPort) Print

func (_m *PrintReadTerminalPort) Print(question string)

Print provides a mock function with given fields: question

func (*PrintReadTerminalPort) ReadAnswer

func (_m *PrintReadTerminalPort) ReadAnswer() (string, error)

ReadAnswer provides a mock function with given fields:

type ReadableMedia

type ReadableMedia struct {
	mock.Mock
}

ReadableMedia is an autogenerated mock type for the ReadableMedia type

func (*ReadableMedia) ReadMedia

func (_m *ReadableMedia) ReadMedia() (io.Reader, error)

ReadMedia provides a mock function with given fields:

func (*ReadableMedia) SimpleSignature

func (_m *ReadableMedia) SimpleSignature() *backupmodel.SimpleMediaSignature

SimpleSignature provides a mock function with given fields:

type RecordRepositoryPort

type RecordRepositoryPort struct {
	mock.Mock
}

RecordRepositoryPort is an autogenerated mock type for the RecordRepositoryPort type

func (*RecordRepositoryPort) FindSuggestionRecords

func (_m *RecordRepositoryPort) FindSuggestionRecords() ([]*ui.SuggestionRecord, error)

FindRecords provides a mock function with given fields:

type RenameAlbumPort

type RenameAlbumPort struct {
	mock.Mock
}

RenameAlbumPort is an autogenerated mock type for the RenameAlbumPort type

func (*RenameAlbumPort) RenameAlbum

func (_m *RenameAlbumPort) RenameAlbum(folderName string, newName string, renameFolder bool) error

RenameAlbum provides a mock function with given fields: folderName, newName, renameFolder

type RepositoryPort

type RepositoryPort struct {
	mock.Mock
}

RepositoryPort is an autogenerated mock type for the RepositoryPort type

func (*RepositoryPort) CountMedias

func (_m *RepositoryPort) CountMedias(folderName string) (int, error)

CountMedias provides a mock function with given fields: folderName

func (*RepositoryPort) DeleteEmptyAlbum

func (_m *RepositoryPort) DeleteEmptyAlbum(folderName string) error

DeleteEmptyAlbum provides a mock function with given fields: folderName

func (*RepositoryPort) DeleteEmptyMoveTransaction

func (_m *RepositoryPort) DeleteEmptyMoveTransaction(transactionId string) error

DeleteEmptyMoveTransaction provides a mock function with given fields: transactionId

func (*RepositoryPort) FindAlbum

func (_m *RepositoryPort) FindAlbum(folderName string) (*catalog.Album, error)

FindAlbum provides a mock function with given fields: folderName

func (*RepositoryPort) FindAllAlbums

func (_m *RepositoryPort) FindAllAlbums() ([]*catalog.Album, error)

FindAllAlbums provides a mock function with given fields:

func (*RepositoryPort) FindExistingSignatures

func (_m *RepositoryPort) FindExistingSignatures(signatures []*catalog.MediaSignature) ([]*catalog.MediaSignature, error)

FindExistingSignatures provides a mock function with given fields: signatures

func (*RepositoryPort) FindFilesToMove

func (_m *RepositoryPort) FindFilesToMove(transactionId string, pageToken string) ([]*catalog.MovedMedia, string, error)

FindFilesToMove provides a mock function with given fields: transactionId, pageToken

func (*RepositoryPort) FindMedias

func (_m *RepositoryPort) FindMedias(folderName string, filter catalog.FindMediaFilter) (*catalog.MediaPage, error)

FindMedias provides a mock function with given fields: folderName, filter

func (*RepositoryPort) FindReadyMoveTransactions

func (_m *RepositoryPort) FindReadyMoveTransactions() ([]*catalog.MoveTransaction, error)

FindReadyMoveTransactions provides a mock function with given fields:

func (*RepositoryPort) InsertAlbum

func (_m *RepositoryPort) InsertAlbum(album catalog.Album) error

InsertAlbum provides a mock function with given fields: album

func (*RepositoryPort) InsertMedias

func (_m *RepositoryPort) InsertMedias(media []catalog.CreateMediaRequest) error

InsertMedias provides a mock function with given fields: media

func (*RepositoryPort) UpdateAlbum

func (_m *RepositoryPort) UpdateAlbum(album catalog.Album) error

UpdateAlbum provides a mock function with given fields: album

func (*RepositoryPort) UpdateMedias

func (_m *RepositoryPort) UpdateMedias(filter *catalog.UpdateMediaFilter, newFolderName string) (string, int, error)

UpdateMedias provides a mock function with given fields: filter, newFolderName

func (*RepositoryPort) UpdateMediasLocation

func (_m *RepositoryPort) UpdateMediasLocation(transactionId string, moves []*catalog.MovedMedia) error

UpdateMediasLocation provides a mock function with given fields: transactionId, moves

type Segment

type Segment struct {
	mock.Mock
}

Segment is an autogenerated mock type for the Segment type

func (*Segment) Content

func (_m *Segment) Content(options screen.RenderingOptions) string

Content provides a mock function with given fields: options

type Source

type Source struct {
	mock.Mock
}

Source is an autogenerated mock type for the Source type

func (*Source) Execute

func (_m *Source) Execute(medias chan backupmodel.FoundMedia) (uint, uint, error)

Execute provides a mock function with given fields: medias

type Stream

type Stream struct {
	mock.Mock
}

Stream is an autogenerated mock type for the Stream type

func (*Stream) Count

func (_m *Stream) Count() int64

Count provides a mock function with given fields:

func (*Stream) Error

func (_m *Stream) Error() error

Error provides a mock function with given fields:

func (*Stream) HasNext

func (_m *Stream) HasNext() bool

HasNext provides a mock function with given fields:

func (*Stream) Next

func (_m *Stream) Next() map[string]*dynamodb.AttributeValue

Next provides a mock function with given fields:

type SuggestionRecordRepositoryPort

type SuggestionRecordRepositoryPort struct {
	mock.Mock
}

SuggestionRecordRepositoryPort is an autogenerated mock type for the SuggestionRecordRepositoryPort type

func (*SuggestionRecordRepositoryPort) FindSuggestionRecords

func (_m *SuggestionRecordRepositoryPort) FindSuggestionRecords() ([]*ui.SuggestionRecord, error)

FindSuggestionRecords provides a mock function with given fields:

type TrackAnalysed

type TrackAnalysed struct {
	mock.Mock
}

TrackAnalysed is an autogenerated mock type for the TrackAnalysed type

func (*TrackAnalysed) OnAnalysed

func (_m *TrackAnalysed) OnAnalysed(done backupmodel.MediaCounter, total backupmodel.MediaCounter)

OnAnalysed provides a mock function with given fields: done, total

type TrackDownloaded

type TrackDownloaded struct {
	mock.Mock
}

TrackDownloaded is an autogenerated mock type for the TrackDownloaded type

func (*TrackDownloaded) OnDownloaded

func (_m *TrackDownloaded) OnDownloaded(done backupmodel.MediaCounter, total backupmodel.MediaCounter)

OnDownloaded provides a mock function with given fields: done, total

type TrackScanComplete

type TrackScanComplete struct {
	mock.Mock
}

TrackScanComplete is an autogenerated mock type for the TrackScanComplete type

func (*TrackScanComplete) OnScanComplete

func (_m *TrackScanComplete) OnScanComplete(total backupmodel.MediaCounter)

OnScanComplete provides a mock function with given fields: total

type TrackUploaded

type TrackUploaded struct {
	mock.Mock
}

TrackUploaded is an autogenerated mock type for the TrackUploaded type

func (*TrackUploaded) OnUploaded

func (_m *TrackUploaded) OnUploaded(done backupmodel.MediaCounter, total backupmodel.MediaCounter)

OnUploaded provides a mock function with given fields: done, total

type UpdateAlbumPort

type UpdateAlbumPort struct {
	mock.Mock
}

UpdateAlbumPort is an autogenerated mock type for the UpdateAlbumPort type

func (*UpdateAlbumPort) UpdateAlbum

func (_m *UpdateAlbumPort) UpdateAlbum(folderName string, start time.Time, end time.Time) error

UpdateAlbum provides a mock function with given fields: folderName, start, end

type Uploader

type Uploader struct {
	mock.Mock
}

Uploader is an autogenerated mock type for the Uploader type

func (*Uploader) Execute

func (_m *Uploader) Execute(buffer []*backupmodel.AnalysedMedia, progressChannel chan *backupmodel.ProgressEvent) error

Execute provides a mock function with given fields: buffer, progressChannel

type UserInputPort

type UserInputPort struct {
	mock.Mock
}

UserInputPort is an autogenerated mock type for the UserInputPort type

func (*UserInputPort) StartListening

func (_m *UserInputPort) StartListening()

StartListening provides a mock function with given fields:

type VolumeManagerPort

type VolumeManagerPort struct {
	mock.Mock
}

VolumeManagerPort is an autogenerated mock type for the VolumeManagerPort type

func (*VolumeManagerPort) OnMountedVolume

func (_m *VolumeManagerPort) OnMountedVolume(volume backupmodel.VolumeToBackup)

OnMountedVolume provides a mock function with given fields: volume

func (*VolumeManagerPort) OnUnMountedVolume

func (_m *VolumeManagerPort) OnUnMountedVolume(uuid string)

OnUnMountedVolume provides a mock function with given fields: uuid

type VolumeRepositoryAdapter

type VolumeRepositoryAdapter struct {
	mock.Mock
}

VolumeRepositoryAdapter is an autogenerated mock type for the VolumeRepositoryAdapter type

func (*VolumeRepositoryAdapter) RestoreLastSnapshot

func (_m *VolumeRepositoryAdapter) RestoreLastSnapshot(volumeId string) ([]backupmodel.SimpleMediaSignature, error)

RestoreLastSnapshot provides a mock function with given fields: volumeId

func (*VolumeRepositoryAdapter) StoreSnapshot

func (_m *VolumeRepositoryAdapter) StoreSnapshot(volumeId string, backupId string, signatures []backupmodel.SimpleMediaSignature) error

StoreSnapshot provides a mock function with given fields: volumeId, backupId, signatures

Jump to

Keyboard shortcuts

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