Documentation ¶
Index ¶
- type MockSender
- type MockStorageClient
- func (c *MockStorageClient) DeleteBlobIfExists(container, name string) (bool, error)
- func (c *MockStorageClient) GetBlobService() azurestorage.BlobStorageClient
- func (c *MockStorageClient) ListBlobs(container string, params storage.ListBlobsParameters) (storage.BlobListResponse, error)
- func (c *MockStorageClient) NewClient(accountName, accountKey, blobServiceBaseURL, apiVersion string, useHTTPS bool) (azurestorage.Client, error)
- type Senders
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockSender ¶
type MockSender struct { *mocks.Sender // PathPattern, if non-empty, is assumed to be a regular expression // that must match the request path. PathPattern string }
MockSender is a wrapper around autorest/mocks.Sender, extending it with request path checking to ease testing.
func NewSenderWithValue ¶
func NewSenderWithValue(v interface{}) *MockSender
NewSenderWithValue returns a *mocks.Sender that marshals the provided object to JSON and sets it as the content. This function will panic if marshalling fails.
type MockStorageClient ¶
type MockStorageClient struct { testing.Stub ListBlobsFunc func(container string, _ storage.ListBlobsParameters) (storage.BlobListResponse, error) DeleteBlobIfExistsFunc func(container, name string) (bool, error) }
func (*MockStorageClient) DeleteBlobIfExists ¶
func (c *MockStorageClient) DeleteBlobIfExists(container, name string) (bool, error)
func (*MockStorageClient) GetBlobService ¶
func (c *MockStorageClient) GetBlobService() azurestorage.BlobStorageClient
func (*MockStorageClient) ListBlobs ¶
func (c *MockStorageClient) ListBlobs( container string, params storage.ListBlobsParameters, ) (storage.BlobListResponse, error)
func (*MockStorageClient) NewClient ¶
func (c *MockStorageClient) NewClient( accountName, accountKey, blobServiceBaseURL, apiVersion string, useHTTPS bool, ) (azurestorage.Client, error)
NewClient exists to satisfy users who want a NewClientFunc.
Click to show internal directories.
Click to hide internal directories.