Documentation ¶
Overview ¶
Package storage contains Storage interface and its mock.
Package storage is a generated GoMock package.
Index ¶
- Variables
- type MockStorage
- func (m *MockStorage) EXPECT() *MockStorageMockRecorder
- func (m *MockStorage) List(ctx context.Context, prefix string, from uint64, limit uint16) ([]string, error)
- func (m *MockStorage) Ping(ctx context.Context) error
- func (m *MockStorage) Read(ctx context.Context, path string) (io.ReadCloser, error)
- func (m *MockStorage) Write(ctx context.Context, data io.Reader, size int64, path string) error
- type MockStorageMockRecorder
- func (mr *MockStorageMockRecorder) List(ctx, prefix, from, limit interface{}) *gomock.Call
- func (mr *MockStorageMockRecorder) Ping(ctx interface{}) *gomock.Call
- func (mr *MockStorageMockRecorder) Read(ctx, path interface{}) *gomock.Call
- func (mr *MockStorageMockRecorder) Write(ctx, data, size, path interface{}) *gomock.Call
- type Storage
Constants ¶
This section is empty.
Variables ¶
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
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.