Documentation ¶
Overview ¶
Package storage contains Storage interface and its mock.
Package storage is a generated GoMock package.
Index ¶
- Variables
- type MockStorage
- func (m *MockStorage) DoesExist(ctx context.Context, path string) (bool, error)
- func (m *MockStorage) EXPECT() *MockStorageMockRecorder
- 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) DoesExist(ctx, path 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 ¶
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) 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) DoesExist ¶
func (mr *MockStorageMockRecorder) DoesExist(ctx, path interface{}) *gomock.Call
DoesExist indicates an expected call of DoesExist
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 Read(ctx context.Context, path string) (io.ReadCloser, error) Write(ctx context.Context, data io.Reader, size int64, path string) error DoesExist(ctx context.Context, path string) (bool, error) }
Storage is interface which provides access to user's data.
Click to show internal directories.
Click to hide internal directories.