objectstore

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2023 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DownloadOptions

type DownloadOptions struct {
	ContentRange *string
}

DownloadOptions provides options for downloading an object from the object store

type MockObjectStore

type MockObjectStore struct {
	mock.Mock
}

MockObjectStore is an autogenerated mock type for the ObjectStore type

func NewMockObjectStore

func NewMockObjectStore(t mockConstructorTestingTNewMockObjectStore) *MockObjectStore

NewMockObjectStore creates a new instance of MockObjectStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockObjectStore) DoesObjectExist

func (_m *MockObjectStore) DoesObjectExist(ctx context.Context, key string) (bool, error)

DoesObjectExist provides a mock function with given fields: ctx, key

func (*MockObjectStore) DownloadObject

func (_m *MockObjectStore) DownloadObject(ctx context.Context, key string, w io.WriterAt, option *DownloadOptions) error

DownloadObject provides a mock function with given fields: ctx, key, w, option

func (*MockObjectStore) GetObjectStream

func (_m *MockObjectStore) GetObjectStream(ctx context.Context, key string, options *DownloadOptions) (io.ReadCloser, error)

GetObjectStream provides a mock function with given fields: ctx, key, options

func (*MockObjectStore) GetPresignedURL

func (_m *MockObjectStore) GetPresignedURL(ctx context.Context, key string) (string, error)

GetPresignedURL provides a mock function with given fields: ctx, key

func (*MockObjectStore) UploadObject

func (_m *MockObjectStore) UploadObject(ctx context.Context, key string, body io.Reader) error

UploadObject provides a mock function with given fields: ctx, key, body

type ObjectStore

type ObjectStore interface {
	UploadObject(ctx context.Context, key string, body io.Reader) error
	DownloadObject(ctx context.Context, key string, w io.WriterAt, option *DownloadOptions) error
	GetObjectStream(ctx context.Context, key string, options *DownloadOptions) (io.ReadCloser, error)
	GetPresignedURL(ctx context.Context, key string) (string, error)
	DoesObjectExist(ctx context.Context, key string) (bool, error)
}

ObjectStore interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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