test

package
v0.0.0-...-c486877 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

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