Documentation
¶
Index ¶
- type FakeS3Storage
- func (fake *FakeS3Storage) Delete(key string) error
- func (fake *FakeS3Storage) Fetch(key string) (io.ReadCloser, error)
- func (fake *FakeS3Storage) FileSystem() *afero.Afero
- func (fake *FakeS3Storage) PresignedURL(key string, contentType string) (string, error)
- func (fake *FakeS3Storage) Store(key string, data io.ReadSeeker, _ string, _ *string) (*storage.StoreResult, error)
- func (fake *FakeS3Storage) Tags(_ string) (map[string]string, error)
- func (fake *FakeS3Storage) TempFileSystem() *afero.Afero
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeS3Storage ¶
type FakeS3Storage struct {
// contains filtered or unexported fields
}
FakeS3Storage is used for local testing to stub out calls to S3.
func NewFakeS3Storage ¶
func NewFakeS3Storage(willSucceed bool) *FakeS3Storage
NewFakeS3Storage creates a new FakeS3Storage for testing purposes.
func (*FakeS3Storage) Delete ¶
func (fake *FakeS3Storage) Delete(key string) error
Delete removes a file.
func (*FakeS3Storage) Fetch ¶
func (fake *FakeS3Storage) Fetch(key string) (io.ReadCloser, error)
Fetch returns the file at the given key
func (*FakeS3Storage) FileSystem ¶
func (fake *FakeS3Storage) FileSystem() *afero.Afero
FileSystem returns the underlying afero filesystem
func (*FakeS3Storage) PresignedURL ¶
func (fake *FakeS3Storage) PresignedURL(key string, contentType string) (string, error)
PresignedURL returns a URL that can be used to retrieve a file.
func (*FakeS3Storage) Store ¶
func (fake *FakeS3Storage) Store(key string, data io.ReadSeeker, _ string, _ *string) (*storage.StoreResult, error)
Store stores a file.
func (*FakeS3Storage) Tags ¶
func (fake *FakeS3Storage) Tags(_ string) (map[string]string, error)
Tags returns the tags for a specified key
func (*FakeS3Storage) TempFileSystem ¶
func (fake *FakeS3Storage) TempFileSystem() *afero.Afero
TempFileSystem returns the underlying afero filesystem
Click to show internal directories.
Click to hide internal directories.