blobstorage

package
v0.0.0-...-6b385f4 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LocalStorageDeps

type LocalStorageDeps struct {
	dig.In

	RootLogger *slog.Logger

	// config
	LocalStorageFolder string `name:"config.blobstorage.localFolder"`
}

type MockStorage

type MockStorage struct {
	mock.Mock
}

MockStorage is an autogenerated mock type for the Storage type

func NewMockStorage

func NewMockStorage(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockStorage

NewMockStorage creates a new instance of MockStorage. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockStorage) Delete

func (_m *MockStorage) Delete(ctx context.Context, key string) error

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

func (*MockStorage) Download

func (_m *MockStorage) Download(ctx context.Context, key string, out io.Writer) error

Download provides a mock function with given fields: ctx, key, out

func (*MockStorage) EXPECT

func (_m *MockStorage) EXPECT() *MockStorage_Expecter

func (*MockStorage) Upload

func (_m *MockStorage) Upload(ctx context.Context, key string, contents io.Reader) error

Upload provides a mock function with given fields: ctx, key, contents

type MockStorage_Delete_Call

type MockStorage_Delete_Call struct {
	*mock.Call
}

MockStorage_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'

func (*MockStorage_Delete_Call) Return

func (*MockStorage_Delete_Call) Run

func (*MockStorage_Delete_Call) RunAndReturn

type MockStorage_Download_Call

type MockStorage_Download_Call struct {
	*mock.Call
}

MockStorage_Download_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Download'

func (*MockStorage_Download_Call) Return

func (*MockStorage_Download_Call) Run

func (*MockStorage_Download_Call) RunAndReturn

type MockStorage_Expecter

type MockStorage_Expecter struct {
	// contains filtered or unexported fields
}

func (*MockStorage_Expecter) Delete

func (_e *MockStorage_Expecter) Delete(ctx interface{}, key interface{}) *MockStorage_Delete_Call

Delete is a helper method to define mock.On call

  • ctx context.Context
  • key string

func (*MockStorage_Expecter) Download

func (_e *MockStorage_Expecter) Download(ctx interface{}, key interface{}, out interface{}) *MockStorage_Download_Call

Download is a helper method to define mock.On call

  • ctx context.Context
  • key string
  • out io.Writer

func (*MockStorage_Expecter) Upload

func (_e *MockStorage_Expecter) Upload(ctx interface{}, key interface{}, contents interface{}) *MockStorage_Upload_Call

Upload is a helper method to define mock.On call

  • ctx context.Context
  • key string
  • contents io.Reader

type MockStorage_Upload_Call

type MockStorage_Upload_Call struct {
	*mock.Call
}

MockStorage_Upload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Upload'

func (*MockStorage_Upload_Call) Return

func (*MockStorage_Upload_Call) Run

func (_c *MockStorage_Upload_Call) Run(run func(ctx context.Context, key string, contents io.Reader)) *MockStorage_Upload_Call

func (*MockStorage_Upload_Call) RunAndReturn

type Storage

type Storage interface {
	Upload(ctx context.Context, key string, contents io.Reader) error
	Download(ctx context.Context, key string, out io.Writer) error
	Delete(ctx context.Context, key string) error
}

func NewLocalStorage

func NewLocalStorage(deps LocalStorageDeps) Storage

Jump to

Keyboard shortcuts

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