Files
versitygw/s3api/controllers/backend_moq_test.go
2023-07-05 19:06:19 -07:00

1575 lines
49 KiB
Go

// Code generated by moq; DO NOT EDIT.
// github.com/matryer/moq
package controllers
import (
"github.com/aws/aws-sdk-go-v2/service/s3"
"github.com/aws/aws-sdk-go-v2/service/s3/types"
"github.com/versity/versitygw/backend"
"github.com/versity/versitygw/s3response"
"io"
"sync"
)
// Ensure, that BackendMock does implement backend.Backend.
// If this is not the case, regenerate this file with moq.
var _ backend.Backend = &BackendMock{}
// BackendMock is a mock implementation of backend.Backend.
//
// func TestSomethingThatUsesBackend(t *testing.T) {
//
// // make and configure a mocked backend.Backend
// mockedBackend := &BackendMock{
// AbortMultipartUploadFunc: func(abortMultipartUploadInput *s3.AbortMultipartUploadInput) error {
// panic("mock out the AbortMultipartUpload method")
// },
// CompleteMultipartUploadFunc: func(bucket string, object string, uploadID string, parts []types.Part) (*s3.CompleteMultipartUploadOutput, error) {
// panic("mock out the CompleteMultipartUpload method")
// },
// CopyObjectFunc: func(srcBucket string, srcObject string, dstBucket string, dstObject string) (*s3.CopyObjectOutput, error) {
// panic("mock out the CopyObject method")
// },
// CreateMultipartUploadFunc: func(createMultipartUploadInput *s3.CreateMultipartUploadInput) (*s3.CreateMultipartUploadOutput, error) {
// panic("mock out the CreateMultipartUpload method")
// },
// DeleteBucketFunc: func(bucket string) error {
// panic("mock out the DeleteBucket method")
// },
// DeleteObjectFunc: func(bucket string, object string) error {
// panic("mock out the DeleteObject method")
// },
// DeleteObjectsFunc: func(bucket string, objects *s3.DeleteObjectsInput) error {
// panic("mock out the DeleteObjects method")
// },
// GetBucketAclFunc: func(bucket string) ([]byte, error) {
// panic("mock out the GetBucketAcl method")
// },
// GetObjectFunc: func(bucket string, object string, acceptRange string, writer io.Writer) (*s3.GetObjectOutput, error) {
// panic("mock out the GetObject method")
// },
// GetObjectAclFunc: func(bucket string, object string) (*s3.GetObjectAclOutput, error) {
// panic("mock out the GetObjectAcl method")
// },
// GetObjectAttributesFunc: func(bucket string, object string, attributes []string) (*s3.GetObjectAttributesOutput, error) {
// panic("mock out the GetObjectAttributes method")
// },
// GetTagsFunc: func(bucket string, object string) (map[string]string, error) {
// panic("mock out the GetTags method")
// },
// HeadBucketFunc: func(bucket string) (*s3.HeadBucketOutput, error) {
// panic("mock out the HeadBucket method")
// },
// HeadObjectFunc: func(bucket string, object string) (*s3.HeadObjectOutput, error) {
// panic("mock out the HeadObject method")
// },
// ListBucketsFunc: func() (s3response.ListAllMyBucketsResult, error) {
// panic("mock out the ListBuckets method")
// },
// ListMultipartUploadsFunc: func(listMultipartUploadsInput *s3.ListMultipartUploadsInput) (s3response.ListMultipartUploadsResponse, error) {
// panic("mock out the ListMultipartUploads method")
// },
// ListObjectPartsFunc: func(bucket string, object string, uploadID string, partNumberMarker int, maxParts int) (s3response.ListPartsResponse, error) {
// panic("mock out the ListObjectParts method")
// },
// ListObjectsFunc: func(bucket string, prefix string, marker string, delim string, maxkeys int) (*s3.ListObjectsOutput, error) {
// panic("mock out the ListObjects method")
// },
// ListObjectsV2Func: func(bucket string, prefix string, marker string, delim string, maxkeys int) (*s3.ListObjectsV2Output, error) {
// panic("mock out the ListObjectsV2 method")
// },
// PutBucketFunc: func(bucket string, owner string) error {
// panic("mock out the PutBucket method")
// },
// PutBucketAclFunc: func(bucket string, data []byte) error {
// panic("mock out the PutBucketAcl method")
// },
// PutObjectFunc: func(putObjectInput *s3.PutObjectInput) (string, error) {
// panic("mock out the PutObject method")
// },
// PutObjectAclFunc: func(putObjectAclInput *s3.PutObjectAclInput) error {
// panic("mock out the PutObjectAcl method")
// },
// PutObjectPartFunc: func(bucket string, object string, uploadID string, part int, length int64, r io.Reader) (string, error) {
// panic("mock out the PutObjectPart method")
// },
// RemoveTagsFunc: func(bucket string, object string) error {
// panic("mock out the RemoveTags method")
// },
// RestoreObjectFunc: func(bucket string, object string, restoreRequest *s3.RestoreObjectInput) error {
// panic("mock out the RestoreObject method")
// },
// SetTagsFunc: func(bucket string, object string, tags map[string]string) error {
// panic("mock out the SetTags method")
// },
// ShutdownFunc: func() {
// panic("mock out the Shutdown method")
// },
// StringFunc: func() string {
// panic("mock out the String method")
// },
// UploadPartCopyFunc: func(uploadPartCopyInput *s3.UploadPartCopyInput) (s3response.CopyObjectResult, error) {
// panic("mock out the UploadPartCopy method")
// },
// }
//
// // use mockedBackend in code that requires backend.Backend
// // and then make assertions.
//
// }
type BackendMock struct {
// AbortMultipartUploadFunc mocks the AbortMultipartUpload method.
AbortMultipartUploadFunc func(abortMultipartUploadInput *s3.AbortMultipartUploadInput) error
// CompleteMultipartUploadFunc mocks the CompleteMultipartUpload method.
CompleteMultipartUploadFunc func(bucket string, object string, uploadID string, parts []types.Part) (*s3.CompleteMultipartUploadOutput, error)
// CopyObjectFunc mocks the CopyObject method.
CopyObjectFunc func(srcBucket string, srcObject string, dstBucket string, dstObject string) (*s3.CopyObjectOutput, error)
// CreateMultipartUploadFunc mocks the CreateMultipartUpload method.
CreateMultipartUploadFunc func(createMultipartUploadInput *s3.CreateMultipartUploadInput) (*s3.CreateMultipartUploadOutput, error)
// DeleteBucketFunc mocks the DeleteBucket method.
DeleteBucketFunc func(bucket string) error
// DeleteObjectFunc mocks the DeleteObject method.
DeleteObjectFunc func(bucket string, object string) error
// DeleteObjectsFunc mocks the DeleteObjects method.
DeleteObjectsFunc func(bucket string, objects *s3.DeleteObjectsInput) error
// GetBucketAclFunc mocks the GetBucketAcl method.
GetBucketAclFunc func(bucket string) ([]byte, error)
// GetObjectFunc mocks the GetObject method.
GetObjectFunc func(bucket string, object string, acceptRange string, writer io.Writer) (*s3.GetObjectOutput, error)
// GetObjectAclFunc mocks the GetObjectAcl method.
GetObjectAclFunc func(bucket string, object string) (*s3.GetObjectAclOutput, error)
// GetObjectAttributesFunc mocks the GetObjectAttributes method.
GetObjectAttributesFunc func(bucket string, object string, attributes []string) (*s3.GetObjectAttributesOutput, error)
// GetTagsFunc mocks the GetTags method.
GetTagsFunc func(bucket string, object string) (map[string]string, error)
// HeadBucketFunc mocks the HeadBucket method.
HeadBucketFunc func(bucket string) (*s3.HeadBucketOutput, error)
// HeadObjectFunc mocks the HeadObject method.
HeadObjectFunc func(bucket string, object string) (*s3.HeadObjectOutput, error)
// ListBucketsFunc mocks the ListBuckets method.
ListBucketsFunc func() (s3response.ListAllMyBucketsResult, error)
// ListMultipartUploadsFunc mocks the ListMultipartUploads method.
ListMultipartUploadsFunc func(listMultipartUploadsInput *s3.ListMultipartUploadsInput) (s3response.ListMultipartUploadsResponse, error)
// ListObjectPartsFunc mocks the ListObjectParts method.
ListObjectPartsFunc func(bucket string, object string, uploadID string, partNumberMarker int, maxParts int) (s3response.ListPartsResponse, error)
// ListObjectsFunc mocks the ListObjects method.
ListObjectsFunc func(bucket string, prefix string, marker string, delim string, maxkeys int) (*s3.ListObjectsOutput, error)
// ListObjectsV2Func mocks the ListObjectsV2 method.
ListObjectsV2Func func(bucket string, prefix string, marker string, delim string, maxkeys int) (*s3.ListObjectsV2Output, error)
// PutBucketFunc mocks the PutBucket method.
PutBucketFunc func(bucket string, owner string) error
// PutBucketAclFunc mocks the PutBucketAcl method.
PutBucketAclFunc func(bucket string, data []byte) error
// PutObjectFunc mocks the PutObject method.
PutObjectFunc func(putObjectInput *s3.PutObjectInput) (string, error)
// PutObjectAclFunc mocks the PutObjectAcl method.
PutObjectAclFunc func(putObjectAclInput *s3.PutObjectAclInput) error
// PutObjectPartFunc mocks the PutObjectPart method.
PutObjectPartFunc func(bucket string, object string, uploadID string, part int, length int64, r io.Reader) (string, error)
// RemoveTagsFunc mocks the RemoveTags method.
RemoveTagsFunc func(bucket string, object string) error
// RestoreObjectFunc mocks the RestoreObject method.
RestoreObjectFunc func(bucket string, object string, restoreRequest *s3.RestoreObjectInput) error
// SetTagsFunc mocks the SetTags method.
SetTagsFunc func(bucket string, object string, tags map[string]string) error
// ShutdownFunc mocks the Shutdown method.
ShutdownFunc func()
// StringFunc mocks the String method.
StringFunc func() string
// UploadPartCopyFunc mocks the UploadPartCopy method.
UploadPartCopyFunc func(uploadPartCopyInput *s3.UploadPartCopyInput) (s3response.CopyObjectResult, error)
// calls tracks calls to the methods.
calls struct {
// AbortMultipartUpload holds details about calls to the AbortMultipartUpload method.
AbortMultipartUpload []struct {
// AbortMultipartUploadInput is the abortMultipartUploadInput argument value.
AbortMultipartUploadInput *s3.AbortMultipartUploadInput
}
// CompleteMultipartUpload holds details about calls to the CompleteMultipartUpload method.
CompleteMultipartUpload []struct {
// Bucket is the bucket argument value.
Bucket string
// Object is the object argument value.
Object string
// UploadID is the uploadID argument value.
UploadID string
// Parts is the parts argument value.
Parts []types.Part
}
// CopyObject holds details about calls to the CopyObject method.
CopyObject []struct {
// SrcBucket is the srcBucket argument value.
SrcBucket string
// SrcObject is the srcObject argument value.
SrcObject string
// DstBucket is the dstBucket argument value.
DstBucket string
// DstObject is the dstObject argument value.
DstObject string
}
// CreateMultipartUpload holds details about calls to the CreateMultipartUpload method.
CreateMultipartUpload []struct {
// CreateMultipartUploadInput is the createMultipartUploadInput argument value.
CreateMultipartUploadInput *s3.CreateMultipartUploadInput
}
// DeleteBucket holds details about calls to the DeleteBucket method.
DeleteBucket []struct {
// Bucket is the bucket argument value.
Bucket string
}
// DeleteObject holds details about calls to the DeleteObject method.
DeleteObject []struct {
// Bucket is the bucket argument value.
Bucket string
// Object is the object argument value.
Object string
}
// DeleteObjects holds details about calls to the DeleteObjects method.
DeleteObjects []struct {
// Bucket is the bucket argument value.
Bucket string
// Objects is the objects argument value.
Objects *s3.DeleteObjectsInput
}
// GetBucketAcl holds details about calls to the GetBucketAcl method.
GetBucketAcl []struct {
// Bucket is the bucket argument value.
Bucket string
}
// GetObject holds details about calls to the GetObject method.
GetObject []struct {
// Bucket is the bucket argument value.
Bucket string
// Object is the object argument value.
Object string
// AcceptRange is the acceptRange argument value.
AcceptRange string
// Writer is the writer argument value.
Writer io.Writer
}
// GetObjectAcl holds details about calls to the GetObjectAcl method.
GetObjectAcl []struct {
// Bucket is the bucket argument value.
Bucket string
// Object is the object argument value.
Object string
}
// GetObjectAttributes holds details about calls to the GetObjectAttributes method.
GetObjectAttributes []struct {
// Bucket is the bucket argument value.
Bucket string
// Object is the object argument value.
Object string
// Attributes is the attributes argument value.
Attributes []string
}
// GetTags holds details about calls to the GetTags method.
GetTags []struct {
// Bucket is the bucket argument value.
Bucket string
// Object is the object argument value.
Object string
}
// HeadBucket holds details about calls to the HeadBucket method.
HeadBucket []struct {
// Bucket is the bucket argument value.
Bucket string
}
// HeadObject holds details about calls to the HeadObject method.
HeadObject []struct {
// Bucket is the bucket argument value.
Bucket string
// Object is the object argument value.
Object string
}
// ListBuckets holds details about calls to the ListBuckets method.
ListBuckets []struct {
}
// ListMultipartUploads holds details about calls to the ListMultipartUploads method.
ListMultipartUploads []struct {
// ListMultipartUploadsInput is the listMultipartUploadsInput argument value.
ListMultipartUploadsInput *s3.ListMultipartUploadsInput
}
// ListObjectParts holds details about calls to the ListObjectParts method.
ListObjectParts []struct {
// Bucket is the bucket argument value.
Bucket string
// Object is the object argument value.
Object string
// UploadID is the uploadID argument value.
UploadID string
// PartNumberMarker is the partNumberMarker argument value.
PartNumberMarker int
// MaxParts is the maxParts argument value.
MaxParts int
}
// ListObjects holds details about calls to the ListObjects method.
ListObjects []struct {
// Bucket is the bucket argument value.
Bucket string
// Prefix is the prefix argument value.
Prefix string
// Marker is the marker argument value.
Marker string
// Delim is the delim argument value.
Delim string
// Maxkeys is the maxkeys argument value.
Maxkeys int
}
// ListObjectsV2 holds details about calls to the ListObjectsV2 method.
ListObjectsV2 []struct {
// Bucket is the bucket argument value.
Bucket string
// Prefix is the prefix argument value.
Prefix string
// Marker is the marker argument value.
Marker string
// Delim is the delim argument value.
Delim string
// Maxkeys is the maxkeys argument value.
Maxkeys int
}
// PutBucket holds details about calls to the PutBucket method.
PutBucket []struct {
// Bucket is the bucket argument value.
Bucket string
// Owner is the owner argument value.
Owner string
}
// PutBucketAcl holds details about calls to the PutBucketAcl method.
PutBucketAcl []struct {
// Bucket is the bucket argument value.
Bucket string
// Data is the data argument value.
Data []byte
}
// PutObject holds details about calls to the PutObject method.
PutObject []struct {
// PutObjectInput is the putObjectInput argument value.
PutObjectInput *s3.PutObjectInput
}
// PutObjectAcl holds details about calls to the PutObjectAcl method.
PutObjectAcl []struct {
// PutObjectAclInput is the putObjectAclInput argument value.
PutObjectAclInput *s3.PutObjectAclInput
}
// PutObjectPart holds details about calls to the PutObjectPart method.
PutObjectPart []struct {
// Bucket is the bucket argument value.
Bucket string
// Object is the object argument value.
Object string
// UploadID is the uploadID argument value.
UploadID string
// Part is the part argument value.
Part int
// Length is the length argument value.
Length int64
// R is the r argument value.
R io.Reader
}
// RemoveTags holds details about calls to the RemoveTags method.
RemoveTags []struct {
// Bucket is the bucket argument value.
Bucket string
// Object is the object argument value.
Object string
}
// RestoreObject holds details about calls to the RestoreObject method.
RestoreObject []struct {
// Bucket is the bucket argument value.
Bucket string
// Object is the object argument value.
Object string
// RestoreRequest is the restoreRequest argument value.
RestoreRequest *s3.RestoreObjectInput
}
// SetTags holds details about calls to the SetTags method.
SetTags []struct {
// Bucket is the bucket argument value.
Bucket string
// Object is the object argument value.
Object string
// Tags is the tags argument value.
Tags map[string]string
}
// Shutdown holds details about calls to the Shutdown method.
Shutdown []struct {
}
// String holds details about calls to the String method.
String []struct {
}
// UploadPartCopy holds details about calls to the UploadPartCopy method.
UploadPartCopy []struct {
// UploadPartCopyInput is the uploadPartCopyInput argument value.
UploadPartCopyInput *s3.UploadPartCopyInput
}
}
lockAbortMultipartUpload sync.RWMutex
lockCompleteMultipartUpload sync.RWMutex
lockCopyObject sync.RWMutex
lockCreateMultipartUpload sync.RWMutex
lockDeleteBucket sync.RWMutex
lockDeleteObject sync.RWMutex
lockDeleteObjects sync.RWMutex
lockGetBucketAcl sync.RWMutex
lockGetObject sync.RWMutex
lockGetObjectAcl sync.RWMutex
lockGetObjectAttributes sync.RWMutex
lockGetTags sync.RWMutex
lockHeadBucket sync.RWMutex
lockHeadObject sync.RWMutex
lockListBuckets sync.RWMutex
lockListMultipartUploads sync.RWMutex
lockListObjectParts sync.RWMutex
lockListObjects sync.RWMutex
lockListObjectsV2 sync.RWMutex
lockPutBucket sync.RWMutex
lockPutBucketAcl sync.RWMutex
lockPutObject sync.RWMutex
lockPutObjectAcl sync.RWMutex
lockPutObjectPart sync.RWMutex
lockRemoveTags sync.RWMutex
lockRestoreObject sync.RWMutex
lockSetTags sync.RWMutex
lockShutdown sync.RWMutex
lockString sync.RWMutex
lockUploadPartCopy sync.RWMutex
}
// AbortMultipartUpload calls AbortMultipartUploadFunc.
func (mock *BackendMock) AbortMultipartUpload(abortMultipartUploadInput *s3.AbortMultipartUploadInput) error {
if mock.AbortMultipartUploadFunc == nil {
panic("BackendMock.AbortMultipartUploadFunc: method is nil but Backend.AbortMultipartUpload was just called")
}
callInfo := struct {
AbortMultipartUploadInput *s3.AbortMultipartUploadInput
}{
AbortMultipartUploadInput: abortMultipartUploadInput,
}
mock.lockAbortMultipartUpload.Lock()
mock.calls.AbortMultipartUpload = append(mock.calls.AbortMultipartUpload, callInfo)
mock.lockAbortMultipartUpload.Unlock()
return mock.AbortMultipartUploadFunc(abortMultipartUploadInput)
}
// AbortMultipartUploadCalls gets all the calls that were made to AbortMultipartUpload.
// Check the length with:
//
// len(mockedBackend.AbortMultipartUploadCalls())
func (mock *BackendMock) AbortMultipartUploadCalls() []struct {
AbortMultipartUploadInput *s3.AbortMultipartUploadInput
} {
var calls []struct {
AbortMultipartUploadInput *s3.AbortMultipartUploadInput
}
mock.lockAbortMultipartUpload.RLock()
calls = mock.calls.AbortMultipartUpload
mock.lockAbortMultipartUpload.RUnlock()
return calls
}
// CompleteMultipartUpload calls CompleteMultipartUploadFunc.
func (mock *BackendMock) CompleteMultipartUpload(bucket string, object string, uploadID string, parts []types.Part) (*s3.CompleteMultipartUploadOutput, error) {
if mock.CompleteMultipartUploadFunc == nil {
panic("BackendMock.CompleteMultipartUploadFunc: method is nil but Backend.CompleteMultipartUpload was just called")
}
callInfo := struct {
Bucket string
Object string
UploadID string
Parts []types.Part
}{
Bucket: bucket,
Object: object,
UploadID: uploadID,
Parts: parts,
}
mock.lockCompleteMultipartUpload.Lock()
mock.calls.CompleteMultipartUpload = append(mock.calls.CompleteMultipartUpload, callInfo)
mock.lockCompleteMultipartUpload.Unlock()
return mock.CompleteMultipartUploadFunc(bucket, object, uploadID, parts)
}
// CompleteMultipartUploadCalls gets all the calls that were made to CompleteMultipartUpload.
// Check the length with:
//
// len(mockedBackend.CompleteMultipartUploadCalls())
func (mock *BackendMock) CompleteMultipartUploadCalls() []struct {
Bucket string
Object string
UploadID string
Parts []types.Part
} {
var calls []struct {
Bucket string
Object string
UploadID string
Parts []types.Part
}
mock.lockCompleteMultipartUpload.RLock()
calls = mock.calls.CompleteMultipartUpload
mock.lockCompleteMultipartUpload.RUnlock()
return calls
}
// CopyObject calls CopyObjectFunc.
func (mock *BackendMock) CopyObject(srcBucket string, srcObject string, dstBucket string, dstObject string) (*s3.CopyObjectOutput, error) {
if mock.CopyObjectFunc == nil {
panic("BackendMock.CopyObjectFunc: method is nil but Backend.CopyObject was just called")
}
callInfo := struct {
SrcBucket string
SrcObject string
DstBucket string
DstObject string
}{
SrcBucket: srcBucket,
SrcObject: srcObject,
DstBucket: dstBucket,
DstObject: dstObject,
}
mock.lockCopyObject.Lock()
mock.calls.CopyObject = append(mock.calls.CopyObject, callInfo)
mock.lockCopyObject.Unlock()
return mock.CopyObjectFunc(srcBucket, srcObject, dstBucket, dstObject)
}
// CopyObjectCalls gets all the calls that were made to CopyObject.
// Check the length with:
//
// len(mockedBackend.CopyObjectCalls())
func (mock *BackendMock) CopyObjectCalls() []struct {
SrcBucket string
SrcObject string
DstBucket string
DstObject string
} {
var calls []struct {
SrcBucket string
SrcObject string
DstBucket string
DstObject string
}
mock.lockCopyObject.RLock()
calls = mock.calls.CopyObject
mock.lockCopyObject.RUnlock()
return calls
}
// CreateMultipartUpload calls CreateMultipartUploadFunc.
func (mock *BackendMock) CreateMultipartUpload(createMultipartUploadInput *s3.CreateMultipartUploadInput) (*s3.CreateMultipartUploadOutput, error) {
if mock.CreateMultipartUploadFunc == nil {
panic("BackendMock.CreateMultipartUploadFunc: method is nil but Backend.CreateMultipartUpload was just called")
}
callInfo := struct {
CreateMultipartUploadInput *s3.CreateMultipartUploadInput
}{
CreateMultipartUploadInput: createMultipartUploadInput,
}
mock.lockCreateMultipartUpload.Lock()
mock.calls.CreateMultipartUpload = append(mock.calls.CreateMultipartUpload, callInfo)
mock.lockCreateMultipartUpload.Unlock()
return mock.CreateMultipartUploadFunc(createMultipartUploadInput)
}
// CreateMultipartUploadCalls gets all the calls that were made to CreateMultipartUpload.
// Check the length with:
//
// len(mockedBackend.CreateMultipartUploadCalls())
func (mock *BackendMock) CreateMultipartUploadCalls() []struct {
CreateMultipartUploadInput *s3.CreateMultipartUploadInput
} {
var calls []struct {
CreateMultipartUploadInput *s3.CreateMultipartUploadInput
}
mock.lockCreateMultipartUpload.RLock()
calls = mock.calls.CreateMultipartUpload
mock.lockCreateMultipartUpload.RUnlock()
return calls
}
// DeleteBucket calls DeleteBucketFunc.
func (mock *BackendMock) DeleteBucket(bucket string) error {
if mock.DeleteBucketFunc == nil {
panic("BackendMock.DeleteBucketFunc: method is nil but Backend.DeleteBucket was just called")
}
callInfo := struct {
Bucket string
}{
Bucket: bucket,
}
mock.lockDeleteBucket.Lock()
mock.calls.DeleteBucket = append(mock.calls.DeleteBucket, callInfo)
mock.lockDeleteBucket.Unlock()
return mock.DeleteBucketFunc(bucket)
}
// DeleteBucketCalls gets all the calls that were made to DeleteBucket.
// Check the length with:
//
// len(mockedBackend.DeleteBucketCalls())
func (mock *BackendMock) DeleteBucketCalls() []struct {
Bucket string
} {
var calls []struct {
Bucket string
}
mock.lockDeleteBucket.RLock()
calls = mock.calls.DeleteBucket
mock.lockDeleteBucket.RUnlock()
return calls
}
// DeleteObject calls DeleteObjectFunc.
func (mock *BackendMock) DeleteObject(bucket string, object string) error {
if mock.DeleteObjectFunc == nil {
panic("BackendMock.DeleteObjectFunc: method is nil but Backend.DeleteObject was just called")
}
callInfo := struct {
Bucket string
Object string
}{
Bucket: bucket,
Object: object,
}
mock.lockDeleteObject.Lock()
mock.calls.DeleteObject = append(mock.calls.DeleteObject, callInfo)
mock.lockDeleteObject.Unlock()
return mock.DeleteObjectFunc(bucket, object)
}
// DeleteObjectCalls gets all the calls that were made to DeleteObject.
// Check the length with:
//
// len(mockedBackend.DeleteObjectCalls())
func (mock *BackendMock) DeleteObjectCalls() []struct {
Bucket string
Object string
} {
var calls []struct {
Bucket string
Object string
}
mock.lockDeleteObject.RLock()
calls = mock.calls.DeleteObject
mock.lockDeleteObject.RUnlock()
return calls
}
// DeleteObjects calls DeleteObjectsFunc.
func (mock *BackendMock) DeleteObjects(bucket string, objects *s3.DeleteObjectsInput) error {
if mock.DeleteObjectsFunc == nil {
panic("BackendMock.DeleteObjectsFunc: method is nil but Backend.DeleteObjects was just called")
}
callInfo := struct {
Bucket string
Objects *s3.DeleteObjectsInput
}{
Bucket: bucket,
Objects: objects,
}
mock.lockDeleteObjects.Lock()
mock.calls.DeleteObjects = append(mock.calls.DeleteObjects, callInfo)
mock.lockDeleteObjects.Unlock()
return mock.DeleteObjectsFunc(bucket, objects)
}
// DeleteObjectsCalls gets all the calls that were made to DeleteObjects.
// Check the length with:
//
// len(mockedBackend.DeleteObjectsCalls())
func (mock *BackendMock) DeleteObjectsCalls() []struct {
Bucket string
Objects *s3.DeleteObjectsInput
} {
var calls []struct {
Bucket string
Objects *s3.DeleteObjectsInput
}
mock.lockDeleteObjects.RLock()
calls = mock.calls.DeleteObjects
mock.lockDeleteObjects.RUnlock()
return calls
}
// GetBucketAcl calls GetBucketAclFunc.
func (mock *BackendMock) GetBucketAcl(bucket string) ([]byte, error) {
if mock.GetBucketAclFunc == nil {
panic("BackendMock.GetBucketAclFunc: method is nil but Backend.GetBucketAcl was just called")
}
callInfo := struct {
Bucket string
}{
Bucket: bucket,
}
mock.lockGetBucketAcl.Lock()
mock.calls.GetBucketAcl = append(mock.calls.GetBucketAcl, callInfo)
mock.lockGetBucketAcl.Unlock()
return mock.GetBucketAclFunc(bucket)
}
// GetBucketAclCalls gets all the calls that were made to GetBucketAcl.
// Check the length with:
//
// len(mockedBackend.GetBucketAclCalls())
func (mock *BackendMock) GetBucketAclCalls() []struct {
Bucket string
} {
var calls []struct {
Bucket string
}
mock.lockGetBucketAcl.RLock()
calls = mock.calls.GetBucketAcl
mock.lockGetBucketAcl.RUnlock()
return calls
}
// GetObject calls GetObjectFunc.
func (mock *BackendMock) GetObject(bucket string, object string, acceptRange string, writer io.Writer) (*s3.GetObjectOutput, error) {
if mock.GetObjectFunc == nil {
panic("BackendMock.GetObjectFunc: method is nil but Backend.GetObject was just called")
}
callInfo := struct {
Bucket string
Object string
AcceptRange string
Writer io.Writer
}{
Bucket: bucket,
Object: object,
AcceptRange: acceptRange,
Writer: writer,
}
mock.lockGetObject.Lock()
mock.calls.GetObject = append(mock.calls.GetObject, callInfo)
mock.lockGetObject.Unlock()
return mock.GetObjectFunc(bucket, object, acceptRange, writer)
}
// GetObjectCalls gets all the calls that were made to GetObject.
// Check the length with:
//
// len(mockedBackend.GetObjectCalls())
func (mock *BackendMock) GetObjectCalls() []struct {
Bucket string
Object string
AcceptRange string
Writer io.Writer
} {
var calls []struct {
Bucket string
Object string
AcceptRange string
Writer io.Writer
}
mock.lockGetObject.RLock()
calls = mock.calls.GetObject
mock.lockGetObject.RUnlock()
return calls
}
// GetObjectAcl calls GetObjectAclFunc.
func (mock *BackendMock) GetObjectAcl(bucket string, object string) (*s3.GetObjectAclOutput, error) {
if mock.GetObjectAclFunc == nil {
panic("BackendMock.GetObjectAclFunc: method is nil but Backend.GetObjectAcl was just called")
}
callInfo := struct {
Bucket string
Object string
}{
Bucket: bucket,
Object: object,
}
mock.lockGetObjectAcl.Lock()
mock.calls.GetObjectAcl = append(mock.calls.GetObjectAcl, callInfo)
mock.lockGetObjectAcl.Unlock()
return mock.GetObjectAclFunc(bucket, object)
}
// GetObjectAclCalls gets all the calls that were made to GetObjectAcl.
// Check the length with:
//
// len(mockedBackend.GetObjectAclCalls())
func (mock *BackendMock) GetObjectAclCalls() []struct {
Bucket string
Object string
} {
var calls []struct {
Bucket string
Object string
}
mock.lockGetObjectAcl.RLock()
calls = mock.calls.GetObjectAcl
mock.lockGetObjectAcl.RUnlock()
return calls
}
// GetObjectAttributes calls GetObjectAttributesFunc.
func (mock *BackendMock) GetObjectAttributes(bucket string, object string, attributes []string) (*s3.GetObjectAttributesOutput, error) {
if mock.GetObjectAttributesFunc == nil {
panic("BackendMock.GetObjectAttributesFunc: method is nil but Backend.GetObjectAttributes was just called")
}
callInfo := struct {
Bucket string
Object string
Attributes []string
}{
Bucket: bucket,
Object: object,
Attributes: attributes,
}
mock.lockGetObjectAttributes.Lock()
mock.calls.GetObjectAttributes = append(mock.calls.GetObjectAttributes, callInfo)
mock.lockGetObjectAttributes.Unlock()
return mock.GetObjectAttributesFunc(bucket, object, attributes)
}
// GetObjectAttributesCalls gets all the calls that were made to GetObjectAttributes.
// Check the length with:
//
// len(mockedBackend.GetObjectAttributesCalls())
func (mock *BackendMock) GetObjectAttributesCalls() []struct {
Bucket string
Object string
Attributes []string
} {
var calls []struct {
Bucket string
Object string
Attributes []string
}
mock.lockGetObjectAttributes.RLock()
calls = mock.calls.GetObjectAttributes
mock.lockGetObjectAttributes.RUnlock()
return calls
}
// GetTags calls GetTagsFunc.
func (mock *BackendMock) GetTags(bucket string, object string) (map[string]string, error) {
if mock.GetTagsFunc == nil {
panic("BackendMock.GetTagsFunc: method is nil but Backend.GetTags was just called")
}
callInfo := struct {
Bucket string
Object string
}{
Bucket: bucket,
Object: object,
}
mock.lockGetTags.Lock()
mock.calls.GetTags = append(mock.calls.GetTags, callInfo)
mock.lockGetTags.Unlock()
return mock.GetTagsFunc(bucket, object)
}
// GetTagsCalls gets all the calls that were made to GetTags.
// Check the length with:
//
// len(mockedBackend.GetTagsCalls())
func (mock *BackendMock) GetTagsCalls() []struct {
Bucket string
Object string
} {
var calls []struct {
Bucket string
Object string
}
mock.lockGetTags.RLock()
calls = mock.calls.GetTags
mock.lockGetTags.RUnlock()
return calls
}
// HeadBucket calls HeadBucketFunc.
func (mock *BackendMock) HeadBucket(bucket string) (*s3.HeadBucketOutput, error) {
if mock.HeadBucketFunc == nil {
panic("BackendMock.HeadBucketFunc: method is nil but Backend.HeadBucket was just called")
}
callInfo := struct {
Bucket string
}{
Bucket: bucket,
}
mock.lockHeadBucket.Lock()
mock.calls.HeadBucket = append(mock.calls.HeadBucket, callInfo)
mock.lockHeadBucket.Unlock()
return mock.HeadBucketFunc(bucket)
}
// HeadBucketCalls gets all the calls that were made to HeadBucket.
// Check the length with:
//
// len(mockedBackend.HeadBucketCalls())
func (mock *BackendMock) HeadBucketCalls() []struct {
Bucket string
} {
var calls []struct {
Bucket string
}
mock.lockHeadBucket.RLock()
calls = mock.calls.HeadBucket
mock.lockHeadBucket.RUnlock()
return calls
}
// HeadObject calls HeadObjectFunc.
func (mock *BackendMock) HeadObject(bucket string, object string) (*s3.HeadObjectOutput, error) {
if mock.HeadObjectFunc == nil {
panic("BackendMock.HeadObjectFunc: method is nil but Backend.HeadObject was just called")
}
callInfo := struct {
Bucket string
Object string
}{
Bucket: bucket,
Object: object,
}
mock.lockHeadObject.Lock()
mock.calls.HeadObject = append(mock.calls.HeadObject, callInfo)
mock.lockHeadObject.Unlock()
return mock.HeadObjectFunc(bucket, object)
}
// HeadObjectCalls gets all the calls that were made to HeadObject.
// Check the length with:
//
// len(mockedBackend.HeadObjectCalls())
func (mock *BackendMock) HeadObjectCalls() []struct {
Bucket string
Object string
} {
var calls []struct {
Bucket string
Object string
}
mock.lockHeadObject.RLock()
calls = mock.calls.HeadObject
mock.lockHeadObject.RUnlock()
return calls
}
// ListBuckets calls ListBucketsFunc.
func (mock *BackendMock) ListBuckets() (s3response.ListAllMyBucketsResult, error) {
if mock.ListBucketsFunc == nil {
panic("BackendMock.ListBucketsFunc: method is nil but Backend.ListBuckets was just called")
}
callInfo := struct {
}{}
mock.lockListBuckets.Lock()
mock.calls.ListBuckets = append(mock.calls.ListBuckets, callInfo)
mock.lockListBuckets.Unlock()
return mock.ListBucketsFunc()
}
// ListBucketsCalls gets all the calls that were made to ListBuckets.
// Check the length with:
//
// len(mockedBackend.ListBucketsCalls())
func (mock *BackendMock) ListBucketsCalls() []struct {
} {
var calls []struct {
}
mock.lockListBuckets.RLock()
calls = mock.calls.ListBuckets
mock.lockListBuckets.RUnlock()
return calls
}
// ListMultipartUploads calls ListMultipartUploadsFunc.
func (mock *BackendMock) ListMultipartUploads(listMultipartUploadsInput *s3.ListMultipartUploadsInput) (s3response.ListMultipartUploadsResponse, error) {
if mock.ListMultipartUploadsFunc == nil {
panic("BackendMock.ListMultipartUploadsFunc: method is nil but Backend.ListMultipartUploads was just called")
}
callInfo := struct {
ListMultipartUploadsInput *s3.ListMultipartUploadsInput
}{
ListMultipartUploadsInput: listMultipartUploadsInput,
}
mock.lockListMultipartUploads.Lock()
mock.calls.ListMultipartUploads = append(mock.calls.ListMultipartUploads, callInfo)
mock.lockListMultipartUploads.Unlock()
return mock.ListMultipartUploadsFunc(listMultipartUploadsInput)
}
// ListMultipartUploadsCalls gets all the calls that were made to ListMultipartUploads.
// Check the length with:
//
// len(mockedBackend.ListMultipartUploadsCalls())
func (mock *BackendMock) ListMultipartUploadsCalls() []struct {
ListMultipartUploadsInput *s3.ListMultipartUploadsInput
} {
var calls []struct {
ListMultipartUploadsInput *s3.ListMultipartUploadsInput
}
mock.lockListMultipartUploads.RLock()
calls = mock.calls.ListMultipartUploads
mock.lockListMultipartUploads.RUnlock()
return calls
}
// ListObjectParts calls ListObjectPartsFunc.
func (mock *BackendMock) ListObjectParts(bucket string, object string, uploadID string, partNumberMarker int, maxParts int) (s3response.ListPartsResponse, error) {
if mock.ListObjectPartsFunc == nil {
panic("BackendMock.ListObjectPartsFunc: method is nil but Backend.ListObjectParts was just called")
}
callInfo := struct {
Bucket string
Object string
UploadID string
PartNumberMarker int
MaxParts int
}{
Bucket: bucket,
Object: object,
UploadID: uploadID,
PartNumberMarker: partNumberMarker,
MaxParts: maxParts,
}
mock.lockListObjectParts.Lock()
mock.calls.ListObjectParts = append(mock.calls.ListObjectParts, callInfo)
mock.lockListObjectParts.Unlock()
return mock.ListObjectPartsFunc(bucket, object, uploadID, partNumberMarker, maxParts)
}
// ListObjectPartsCalls gets all the calls that were made to ListObjectParts.
// Check the length with:
//
// len(mockedBackend.ListObjectPartsCalls())
func (mock *BackendMock) ListObjectPartsCalls() []struct {
Bucket string
Object string
UploadID string
PartNumberMarker int
MaxParts int
} {
var calls []struct {
Bucket string
Object string
UploadID string
PartNumberMarker int
MaxParts int
}
mock.lockListObjectParts.RLock()
calls = mock.calls.ListObjectParts
mock.lockListObjectParts.RUnlock()
return calls
}
// ListObjects calls ListObjectsFunc.
func (mock *BackendMock) ListObjects(bucket string, prefix string, marker string, delim string, maxkeys int) (*s3.ListObjectsOutput, error) {
if mock.ListObjectsFunc == nil {
panic("BackendMock.ListObjectsFunc: method is nil but Backend.ListObjects was just called")
}
callInfo := struct {
Bucket string
Prefix string
Marker string
Delim string
Maxkeys int
}{
Bucket: bucket,
Prefix: prefix,
Marker: marker,
Delim: delim,
Maxkeys: maxkeys,
}
mock.lockListObjects.Lock()
mock.calls.ListObjects = append(mock.calls.ListObjects, callInfo)
mock.lockListObjects.Unlock()
return mock.ListObjectsFunc(bucket, prefix, marker, delim, maxkeys)
}
// ListObjectsCalls gets all the calls that were made to ListObjects.
// Check the length with:
//
// len(mockedBackend.ListObjectsCalls())
func (mock *BackendMock) ListObjectsCalls() []struct {
Bucket string
Prefix string
Marker string
Delim string
Maxkeys int
} {
var calls []struct {
Bucket string
Prefix string
Marker string
Delim string
Maxkeys int
}
mock.lockListObjects.RLock()
calls = mock.calls.ListObjects
mock.lockListObjects.RUnlock()
return calls
}
// ListObjectsV2 calls ListObjectsV2Func.
func (mock *BackendMock) ListObjectsV2(bucket string, prefix string, marker string, delim string, maxkeys int) (*s3.ListObjectsV2Output, error) {
if mock.ListObjectsV2Func == nil {
panic("BackendMock.ListObjectsV2Func: method is nil but Backend.ListObjectsV2 was just called")
}
callInfo := struct {
Bucket string
Prefix string
Marker string
Delim string
Maxkeys int
}{
Bucket: bucket,
Prefix: prefix,
Marker: marker,
Delim: delim,
Maxkeys: maxkeys,
}
mock.lockListObjectsV2.Lock()
mock.calls.ListObjectsV2 = append(mock.calls.ListObjectsV2, callInfo)
mock.lockListObjectsV2.Unlock()
return mock.ListObjectsV2Func(bucket, prefix, marker, delim, maxkeys)
}
// ListObjectsV2Calls gets all the calls that were made to ListObjectsV2.
// Check the length with:
//
// len(mockedBackend.ListObjectsV2Calls())
func (mock *BackendMock) ListObjectsV2Calls() []struct {
Bucket string
Prefix string
Marker string
Delim string
Maxkeys int
} {
var calls []struct {
Bucket string
Prefix string
Marker string
Delim string
Maxkeys int
}
mock.lockListObjectsV2.RLock()
calls = mock.calls.ListObjectsV2
mock.lockListObjectsV2.RUnlock()
return calls
}
// PutBucket calls PutBucketFunc.
func (mock *BackendMock) PutBucket(bucket string, owner string) error {
if mock.PutBucketFunc == nil {
panic("BackendMock.PutBucketFunc: method is nil but Backend.PutBucket was just called")
}
callInfo := struct {
Bucket string
Owner string
}{
Bucket: bucket,
Owner: owner,
}
mock.lockPutBucket.Lock()
mock.calls.PutBucket = append(mock.calls.PutBucket, callInfo)
mock.lockPutBucket.Unlock()
return mock.PutBucketFunc(bucket, owner)
}
// PutBucketCalls gets all the calls that were made to PutBucket.
// Check the length with:
//
// len(mockedBackend.PutBucketCalls())
func (mock *BackendMock) PutBucketCalls() []struct {
Bucket string
Owner string
} {
var calls []struct {
Bucket string
Owner string
}
mock.lockPutBucket.RLock()
calls = mock.calls.PutBucket
mock.lockPutBucket.RUnlock()
return calls
}
// PutBucketAcl calls PutBucketAclFunc.
func (mock *BackendMock) PutBucketAcl(bucket string, data []byte) error {
if mock.PutBucketAclFunc == nil {
panic("BackendMock.PutBucketAclFunc: method is nil but Backend.PutBucketAcl was just called")
}
callInfo := struct {
Bucket string
Data []byte
}{
Bucket: bucket,
Data: data,
}
mock.lockPutBucketAcl.Lock()
mock.calls.PutBucketAcl = append(mock.calls.PutBucketAcl, callInfo)
mock.lockPutBucketAcl.Unlock()
return mock.PutBucketAclFunc(bucket, data)
}
// PutBucketAclCalls gets all the calls that were made to PutBucketAcl.
// Check the length with:
//
// len(mockedBackend.PutBucketAclCalls())
func (mock *BackendMock) PutBucketAclCalls() []struct {
Bucket string
Data []byte
} {
var calls []struct {
Bucket string
Data []byte
}
mock.lockPutBucketAcl.RLock()
calls = mock.calls.PutBucketAcl
mock.lockPutBucketAcl.RUnlock()
return calls
}
// PutObject calls PutObjectFunc.
func (mock *BackendMock) PutObject(putObjectInput *s3.PutObjectInput) (string, error) {
if mock.PutObjectFunc == nil {
panic("BackendMock.PutObjectFunc: method is nil but Backend.PutObject was just called")
}
callInfo := struct {
PutObjectInput *s3.PutObjectInput
}{
PutObjectInput: putObjectInput,
}
mock.lockPutObject.Lock()
mock.calls.PutObject = append(mock.calls.PutObject, callInfo)
mock.lockPutObject.Unlock()
return mock.PutObjectFunc(putObjectInput)
}
// PutObjectCalls gets all the calls that were made to PutObject.
// Check the length with:
//
// len(mockedBackend.PutObjectCalls())
func (mock *BackendMock) PutObjectCalls() []struct {
PutObjectInput *s3.PutObjectInput
} {
var calls []struct {
PutObjectInput *s3.PutObjectInput
}
mock.lockPutObject.RLock()
calls = mock.calls.PutObject
mock.lockPutObject.RUnlock()
return calls
}
// PutObjectAcl calls PutObjectAclFunc.
func (mock *BackendMock) PutObjectAcl(putObjectAclInput *s3.PutObjectAclInput) error {
if mock.PutObjectAclFunc == nil {
panic("BackendMock.PutObjectAclFunc: method is nil but Backend.PutObjectAcl was just called")
}
callInfo := struct {
PutObjectAclInput *s3.PutObjectAclInput
}{
PutObjectAclInput: putObjectAclInput,
}
mock.lockPutObjectAcl.Lock()
mock.calls.PutObjectAcl = append(mock.calls.PutObjectAcl, callInfo)
mock.lockPutObjectAcl.Unlock()
return mock.PutObjectAclFunc(putObjectAclInput)
}
// PutObjectAclCalls gets all the calls that were made to PutObjectAcl.
// Check the length with:
//
// len(mockedBackend.PutObjectAclCalls())
func (mock *BackendMock) PutObjectAclCalls() []struct {
PutObjectAclInput *s3.PutObjectAclInput
} {
var calls []struct {
PutObjectAclInput *s3.PutObjectAclInput
}
mock.lockPutObjectAcl.RLock()
calls = mock.calls.PutObjectAcl
mock.lockPutObjectAcl.RUnlock()
return calls
}
// PutObjectPart calls PutObjectPartFunc.
func (mock *BackendMock) PutObjectPart(bucket string, object string, uploadID string, part int, length int64, r io.Reader) (string, error) {
if mock.PutObjectPartFunc == nil {
panic("BackendMock.PutObjectPartFunc: method is nil but Backend.PutObjectPart was just called")
}
callInfo := struct {
Bucket string
Object string
UploadID string
Part int
Length int64
R io.Reader
}{
Bucket: bucket,
Object: object,
UploadID: uploadID,
Part: part,
Length: length,
R: r,
}
mock.lockPutObjectPart.Lock()
mock.calls.PutObjectPart = append(mock.calls.PutObjectPart, callInfo)
mock.lockPutObjectPart.Unlock()
return mock.PutObjectPartFunc(bucket, object, uploadID, part, length, r)
}
// PutObjectPartCalls gets all the calls that were made to PutObjectPart.
// Check the length with:
//
// len(mockedBackend.PutObjectPartCalls())
func (mock *BackendMock) PutObjectPartCalls() []struct {
Bucket string
Object string
UploadID string
Part int
Length int64
R io.Reader
} {
var calls []struct {
Bucket string
Object string
UploadID string
Part int
Length int64
R io.Reader
}
mock.lockPutObjectPart.RLock()
calls = mock.calls.PutObjectPart
mock.lockPutObjectPart.RUnlock()
return calls
}
// RemoveTags calls RemoveTagsFunc.
func (mock *BackendMock) RemoveTags(bucket string, object string) error {
if mock.RemoveTagsFunc == nil {
panic("BackendMock.RemoveTagsFunc: method is nil but Backend.RemoveTags was just called")
}
callInfo := struct {
Bucket string
Object string
}{
Bucket: bucket,
Object: object,
}
mock.lockRemoveTags.Lock()
mock.calls.RemoveTags = append(mock.calls.RemoveTags, callInfo)
mock.lockRemoveTags.Unlock()
return mock.RemoveTagsFunc(bucket, object)
}
// RemoveTagsCalls gets all the calls that were made to RemoveTags.
// Check the length with:
//
// len(mockedBackend.RemoveTagsCalls())
func (mock *BackendMock) RemoveTagsCalls() []struct {
Bucket string
Object string
} {
var calls []struct {
Bucket string
Object string
}
mock.lockRemoveTags.RLock()
calls = mock.calls.RemoveTags
mock.lockRemoveTags.RUnlock()
return calls
}
// RestoreObject calls RestoreObjectFunc.
func (mock *BackendMock) RestoreObject(bucket string, object string, restoreRequest *s3.RestoreObjectInput) error {
if mock.RestoreObjectFunc == nil {
panic("BackendMock.RestoreObjectFunc: method is nil but Backend.RestoreObject was just called")
}
callInfo := struct {
Bucket string
Object string
RestoreRequest *s3.RestoreObjectInput
}{
Bucket: bucket,
Object: object,
RestoreRequest: restoreRequest,
}
mock.lockRestoreObject.Lock()
mock.calls.RestoreObject = append(mock.calls.RestoreObject, callInfo)
mock.lockRestoreObject.Unlock()
return mock.RestoreObjectFunc(bucket, object, restoreRequest)
}
// RestoreObjectCalls gets all the calls that were made to RestoreObject.
// Check the length with:
//
// len(mockedBackend.RestoreObjectCalls())
func (mock *BackendMock) RestoreObjectCalls() []struct {
Bucket string
Object string
RestoreRequest *s3.RestoreObjectInput
} {
var calls []struct {
Bucket string
Object string
RestoreRequest *s3.RestoreObjectInput
}
mock.lockRestoreObject.RLock()
calls = mock.calls.RestoreObject
mock.lockRestoreObject.RUnlock()
return calls
}
// SetTags calls SetTagsFunc.
func (mock *BackendMock) SetTags(bucket string, object string, tags map[string]string) error {
if mock.SetTagsFunc == nil {
panic("BackendMock.SetTagsFunc: method is nil but Backend.SetTags was just called")
}
callInfo := struct {
Bucket string
Object string
Tags map[string]string
}{
Bucket: bucket,
Object: object,
Tags: tags,
}
mock.lockSetTags.Lock()
mock.calls.SetTags = append(mock.calls.SetTags, callInfo)
mock.lockSetTags.Unlock()
return mock.SetTagsFunc(bucket, object, tags)
}
// SetTagsCalls gets all the calls that were made to SetTags.
// Check the length with:
//
// len(mockedBackend.SetTagsCalls())
func (mock *BackendMock) SetTagsCalls() []struct {
Bucket string
Object string
Tags map[string]string
} {
var calls []struct {
Bucket string
Object string
Tags map[string]string
}
mock.lockSetTags.RLock()
calls = mock.calls.SetTags
mock.lockSetTags.RUnlock()
return calls
}
// Shutdown calls ShutdownFunc.
func (mock *BackendMock) Shutdown() {
if mock.ShutdownFunc == nil {
panic("BackendMock.ShutdownFunc: method is nil but Backend.Shutdown was just called")
}
callInfo := struct {
}{}
mock.lockShutdown.Lock()
mock.calls.Shutdown = append(mock.calls.Shutdown, callInfo)
mock.lockShutdown.Unlock()
mock.ShutdownFunc()
}
// ShutdownCalls gets all the calls that were made to Shutdown.
// Check the length with:
//
// len(mockedBackend.ShutdownCalls())
func (mock *BackendMock) ShutdownCalls() []struct {
} {
var calls []struct {
}
mock.lockShutdown.RLock()
calls = mock.calls.Shutdown
mock.lockShutdown.RUnlock()
return calls
}
// String calls StringFunc.
func (mock *BackendMock) String() string {
if mock.StringFunc == nil {
panic("BackendMock.StringFunc: method is nil but Backend.String was just called")
}
callInfo := struct {
}{}
mock.lockString.Lock()
mock.calls.String = append(mock.calls.String, callInfo)
mock.lockString.Unlock()
return mock.StringFunc()
}
// StringCalls gets all the calls that were made to String.
// Check the length with:
//
// len(mockedBackend.StringCalls())
func (mock *BackendMock) StringCalls() []struct {
} {
var calls []struct {
}
mock.lockString.RLock()
calls = mock.calls.String
mock.lockString.RUnlock()
return calls
}
// UploadPartCopy calls UploadPartCopyFunc.
func (mock *BackendMock) UploadPartCopy(uploadPartCopyInput *s3.UploadPartCopyInput) (s3response.CopyObjectResult, error) {
if mock.UploadPartCopyFunc == nil {
panic("BackendMock.UploadPartCopyFunc: method is nil but Backend.UploadPartCopy was just called")
}
callInfo := struct {
UploadPartCopyInput *s3.UploadPartCopyInput
}{
UploadPartCopyInput: uploadPartCopyInput,
}
mock.lockUploadPartCopy.Lock()
mock.calls.UploadPartCopy = append(mock.calls.UploadPartCopy, callInfo)
mock.lockUploadPartCopy.Unlock()
return mock.UploadPartCopyFunc(uploadPartCopyInput)
}
// UploadPartCopyCalls gets all the calls that were made to UploadPartCopy.
// Check the length with:
//
// len(mockedBackend.UploadPartCopyCalls())
func (mock *BackendMock) UploadPartCopyCalls() []struct {
UploadPartCopyInput *s3.UploadPartCopyInput
} {
var calls []struct {
UploadPartCopyInput *s3.UploadPartCopyInput
}
mock.lockUploadPartCopy.RLock()
calls = mock.calls.UploadPartCopy
mock.lockUploadPartCopy.RUnlock()
return calls
}