storage

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2020 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) DoesExist

func (m *MockStorage) DoesExist(ctx context.Context, path string) (bool, error)

DoesExist mocks base method

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

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) 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.

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