mocks

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CopyObject

type CopyObject struct{ Mock[s3.CopyObjectOutput] }

func (CopyObject) CopyObject

func (mock CopyObject) CopyObject(ctx context.Context, params *s3.CopyObjectInput, optFns ...func(*s3.Options)) (*s3.CopyObjectOutput, error)

type DeleteObject

type DeleteObject struct{ Mock[s3.DeleteObjectOutput] }

func (DeleteObject) DeleteObject

func (mock DeleteObject) DeleteObject(ctx context.Context, params *s3.DeleteObjectInput, optFns ...func(*s3.Options)) (*s3.DeleteObjectOutput, error)

type GetObject

type GetObject struct{ Mock[s3.GetObjectOutput] }

func (GetObject) GetObject

func (mock GetObject) GetObject(ctx context.Context, input *s3.GetObjectInput, opts ...func(*s3.Options)) (*s3.GetObjectOutput, error)

type HeadObject

type HeadObject struct{ Mock[s3.HeadObjectOutput] }

func (HeadObject) HeadObject

func (mock HeadObject) HeadObject(ctx context.Context, input *s3.HeadObjectInput, opts ...func(*s3.Options)) (*s3.HeadObjectOutput, error)

type ListObject

type ListObject struct{ Mock[s3.ListObjectsV2Output] }

func (ListObject) ListObjectsV2

func (mock ListObject) ListObjectsV2(ctx context.Context, params *s3.ListObjectsV2Input, optFns ...func(*s3.Options)) (*s3.ListObjectsV2Output, error)

type Mock

type Mock[T any] struct {
	stream.S3
	stream.S3Upload
	stream.S3Signer
	Delay     *time.Duration
	ExpectKey string
	ExpectVal string
	ReturnVal *T
	ReturnErr error
}

func (Mock[T]) Assert

func (mock Mock[T]) Assert(ctx context.Context, inputKey *string) error

type PresignGetObject

type PresignGetObject struct{ Mock[v4.PresignedHTTPRequest] }

func (PresignGetObject) PresignGetObject

func (mock PresignGetObject) PresignGetObject(ctx context.Context, params *s3.GetObjectInput, optFns ...func(*s3.PresignOptions)) (*v4.PresignedHTTPRequest, error)

type PresignPutObject

type PresignPutObject struct{ Mock[v4.PresignedHTTPRequest] }

func (PresignPutObject) PresignPutObject

func (mock PresignPutObject) PresignPutObject(ctx context.Context, params *s3.PutObjectInput, optFns ...func(*s3.PresignOptions)) (*v4.PresignedHTTPRequest, error)

type PutObject

type PutObject struct{ Mock[manager.UploadOutput] }

func (PutObject) Upload

func (mock PutObject) Upload(ctx context.Context, input *s3.PutObjectInput, opts ...func(*manager.Uploader)) (*manager.UploadOutput, error)

Jump to

Keyboard shortcuts

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