storage

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package storage contains Storage interface and its mock.

Package storage is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

ErrNotFound means that file is not found.

Functions

This section is empty.

Types

type MockStorage

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

MockStorage is a mock of Storage interface

func NewMockStorage

func NewMockStorage(ctrl *gomock.Controller) *MockStorage

NewMockStorage creates a new mock instance

func (*MockStorage) EXPECT

func (m *MockStorage) EXPECT() *MockStorageMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockStorage) List added in v0.2.4

func (m *MockStorage) List(ctx context.Context, prefix string, from uint64, limit uint16) ([]string, error)

List mocks base method

func (*MockStorage) Ping

func (m *MockStorage) Ping(ctx context.Context) error

Ping mocks base method

func (*MockStorage) Read

func (m *MockStorage) Read(ctx context.Context, path string) (io.ReadCloser, error)

Read mocks base method

func (*MockStorage) Write

func (m *MockStorage) Write(ctx context.Context, data io.Reader, size int64, path string) error

Write mocks base method

type MockStorageMockRecorder

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

MockStorageMockRecorder is the mock recorder for MockStorage

func (*MockStorageMockRecorder) List added in v0.2.4

func (mr *MockStorageMockRecorder) List(ctx, prefix, from, limit interface{}) *gomock.Call

List indicates an expected call of List

func (*MockStorageMockRecorder) Ping

func (mr *MockStorageMockRecorder) Ping(ctx interface{}) *gomock.Call

Ping indicates an expected call of Ping

func (*MockStorageMockRecorder) Read

func (mr *MockStorageMockRecorder) Read(ctx, path interface{}) *gomock.Call

Read indicates an expected call of Read

func (*MockStorageMockRecorder) Write

func (mr *MockStorageMockRecorder) Write(ctx, data, size, path interface{}) *gomock.Call

Write indicates an expected call of Write

type Storage

type Storage interface {
	health.Pinger

	List(ctx context.Context, prefix string, from uint64, limit uint16) ([]string, error)
	Read(ctx context.Context, path string) (io.ReadCloser, error)
	Write(ctx context.Context, data io.Reader, size int64, path string) error
}

Storage is interface which provides access to user's data.

Directories

Path Synopsis
Package s3 contains implementation Storage interface with any s3-compatible storage.
Package s3 contains implementation Storage interface with any s3-compatible storage.

Jump to

Keyboard shortcuts

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