Documentation ¶
Index ¶
- type MockDownloader
- func (mock *MockDownloader) Download(writerAt io.WriterAt, getObjectInput *s3.GetObjectInput, ...) (int64, error)
- func (mock *MockDownloader) DownloadCalls() []struct{ ... }
- func (mock *MockDownloader) DownloadWithContext(contextMoqParam context.Context, writerAt io.WriterAt, ...) (int64, error)
- func (mock *MockDownloader) DownloadWithContextCalls() []struct{ ... }
- type MockUploader
- func (mock *MockUploader) Upload(uploadInput *s3manager.UploadInput, fns ...func(*s3manager.Uploader)) (*s3manager.UploadOutput, error)
- func (mock *MockUploader) UploadCalls() []struct{ ... }
- func (mock *MockUploader) UploadWithContext(contextMoqParam context.Context, uploadInput *s3manager.UploadInput, ...) (*s3manager.UploadOutput, error)
- func (mock *MockUploader) UploadWithContextCalls() []struct{ ... }
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockDownloader ¶
type MockDownloader struct { // DownloadFunc mocks the Download method. DownloadFunc func(writerAt io.WriterAt, getObjectInput *s3.GetObjectInput, fns ...func(*s3manager.Downloader)) (int64, error) // DownloadWithContextFunc mocks the DownloadWithContext method. DownloadWithContextFunc func(contextMoqParam context.Context, writerAt io.WriterAt, getObjectInput *s3.GetObjectInput, fns ...func(*s3manager.Downloader)) (int64, error) // contains filtered or unexported fields }
MockDownloader is a mock implementation of iface.DownloaderAPI.
func TestSomethingThatUsesDownloaderAPI(t *testing.T) { // make and configure a mocked iface.DownloaderAPI mockedDownloaderAPI := &MockDownloader{ DownloadFunc: func(writerAt io.WriterAt, getObjectInput *s3.GetObjectInput, fns ...func(*s3manager.Downloader)) (int64, error) { panic("mock out the Download method") }, DownloadWithContextFunc: func(contextMoqParam context.Context, writerAt io.WriterAt, getObjectInput *s3.GetObjectInput, fns ...func(*s3manager.Downloader)) (int64, error) { panic("mock out the DownloadWithContext method") }, } // use mockedDownloaderAPI in code that requires iface.DownloaderAPI // and then make assertions. }
func (*MockDownloader) Download ¶
func (mock *MockDownloader) Download(writerAt io.WriterAt, getObjectInput *s3.GetObjectInput, fns ...func(*s3manager.Downloader)) (int64, error)
Download calls DownloadFunc.
func (*MockDownloader) DownloadCalls ¶
func (mock *MockDownloader) DownloadCalls() []struct { WriterAt io.WriterAt GetObjectInput *s3.GetObjectInput Fns []func(*s3manager.Downloader) }
DownloadCalls gets all the calls that were made to Download. Check the length with:
len(mockedDownloaderAPI.DownloadCalls())
func (*MockDownloader) DownloadWithContext ¶
func (mock *MockDownloader) DownloadWithContext(contextMoqParam context.Context, writerAt io.WriterAt, getObjectInput *s3.GetObjectInput, fns ...func(*s3manager.Downloader)) (int64, error)
DownloadWithContext calls DownloadWithContextFunc.
func (*MockDownloader) DownloadWithContextCalls ¶
func (mock *MockDownloader) DownloadWithContextCalls() []struct { ContextMoqParam context.Context WriterAt io.WriterAt GetObjectInput *s3.GetObjectInput Fns []func(*s3manager.Downloader) }
DownloadWithContextCalls gets all the calls that were made to DownloadWithContext. Check the length with:
len(mockedDownloaderAPI.DownloadWithContextCalls())
type MockUploader ¶
type MockUploader struct { // UploadFunc mocks the Upload method. UploadFunc func(uploadInput *s3manager.UploadInput, fns ...func(*s3manager.Uploader)) (*s3manager.UploadOutput, error) // UploadWithContextFunc mocks the UploadWithContext method. UploadWithContextFunc func(contextMoqParam context.Context, uploadInput *s3manager.UploadInput, fns ...func(*s3manager.Uploader)) (*s3manager.UploadOutput, error) // contains filtered or unexported fields }
MockUploader is a mock implementation of iface.UploaderAPI.
func TestSomethingThatUsesUploaderAPI(t *testing.T) { // make and configure a mocked iface.UploaderAPI mockedUploaderAPI := &MockUploader{ UploadFunc: func(uploadInput *s3manager.UploadInput, fns ...func(*s3manager.Uploader)) (*s3manager.UploadOutput, error) { panic("mock out the Upload method") }, UploadWithContextFunc: func(contextMoqParam context.Context, uploadInput *s3manager.UploadInput, fns ...func(*s3manager.Uploader)) (*s3manager.UploadOutput, error) { panic("mock out the UploadWithContext method") }, } // use mockedUploaderAPI in code that requires iface.UploaderAPI // and then make assertions. }
func (*MockUploader) Upload ¶
func (mock *MockUploader) Upload(uploadInput *s3manager.UploadInput, fns ...func(*s3manager.Uploader)) (*s3manager.UploadOutput, error)
Upload calls UploadFunc.
func (*MockUploader) UploadCalls ¶
func (mock *MockUploader) UploadCalls() []struct { UploadInput *s3manager.UploadInput Fns []func(*s3manager.Uploader) }
UploadCalls gets all the calls that were made to Upload. Check the length with:
len(mockedUploaderAPI.UploadCalls())
func (*MockUploader) UploadWithContext ¶
func (mock *MockUploader) UploadWithContext(contextMoqParam context.Context, uploadInput *s3manager.UploadInput, fns ...func(*s3manager.Uploader)) (*s3manager.UploadOutput, error)
UploadWithContext calls UploadWithContextFunc.
func (*MockUploader) UploadWithContextCalls ¶
func (mock *MockUploader) UploadWithContextCalls() []struct { ContextMoqParam context.Context UploadInput *s3manager.UploadInput Fns []func(*s3manager.Uploader) }
UploadWithContextCalls gets all the calls that were made to UploadWithContext. Check the length with:
len(mockedUploaderAPI.UploadWithContextCalls())