Documentation ¶
Overview ¶
Package piece is a generated GoMock package.
Index ¶
- type MockPieceAPI
- func (m *MockPieceAPI) Delete(ctx context.Context, key string) error
- func (m *MockPieceAPI) EXPECT() *MockPieceAPIMockRecorder
- func (m *MockPieceAPI) Get(ctx context.Context, key string, offset, limit int64) (io.ReadCloser, error)
- func (m *MockPieceAPI) Put(ctx context.Context, key string, reader io.Reader) error
- type MockPieceAPIMockRecorder
- type PieceAPI
- type PieceStore
- func (p *PieceStore) Delete(ctx context.Context, key string) error
- func (p *PieceStore) Get(ctx context.Context, key string, offset, limit int64) (io.ReadCloser, error)
- func (p *PieceStore) Head(ctx context.Context, key string) (storage.Object, error)
- func (p *PieceStore) Put(ctx context.Context, key string, reader io.Reader) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockPieceAPI ¶ added in v0.2.4
type MockPieceAPI struct {
// contains filtered or unexported fields
}
MockPieceAPI is a mock of PieceAPI interface.
func NewMockPieceAPI ¶ added in v0.2.4
func NewMockPieceAPI(ctrl *gomock.Controller) *MockPieceAPI
NewMockPieceAPI creates a new mock instance.
func (*MockPieceAPI) Delete ¶ added in v0.2.4
func (m *MockPieceAPI) Delete(ctx context.Context, key string) error
Delete mocks base method.
func (*MockPieceAPI) EXPECT ¶ added in v0.2.4
func (m *MockPieceAPI) EXPECT() *MockPieceAPIMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockPieceAPI) Get ¶ added in v0.2.4
func (m *MockPieceAPI) Get(ctx context.Context, key string, offset, limit int64) (io.ReadCloser, error)
Get mocks base method.
type MockPieceAPIMockRecorder ¶ added in v0.2.4
type MockPieceAPIMockRecorder struct {
// contains filtered or unexported fields
}
MockPieceAPIMockRecorder is the mock recorder for MockPieceAPI.
func (*MockPieceAPIMockRecorder) Delete ¶ added in v0.2.4
func (mr *MockPieceAPIMockRecorder) Delete(ctx, key interface{}) *gomock.Call
Delete indicates an expected call of Delete.
func (*MockPieceAPIMockRecorder) Get ¶ added in v0.2.4
func (mr *MockPieceAPIMockRecorder) Get(ctx, key, offset, limit interface{}) *gomock.Call
Get indicates an expected call of Get.
func (*MockPieceAPIMockRecorder) Put ¶ added in v0.2.4
func (mr *MockPieceAPIMockRecorder) Put(ctx, key, reader interface{}) *gomock.Call
Put indicates an expected call of Put.
type PieceAPI ¶ added in v0.2.4
type PieceAPI interface { Get(ctx context.Context, key string, offset, limit int64) (io.ReadCloser, error) Put(ctx context.Context, key string, reader io.Reader) error Delete(ctx context.Context, key string) error }
PieceAPI for mock use
type PieceStore ¶
type PieceStore struct {
// contains filtered or unexported fields
}
func NewPieceStore ¶
func NewPieceStore(pieceConfig *storage.PieceStoreConfig) (*PieceStore, error)
NewPieceStore returns an instance of PieceStore
func (*PieceStore) Delete ¶
func (p *PieceStore) Delete(ctx context.Context, key string) error
Delete one piece in PieceStore
func (*PieceStore) Get ¶
func (p *PieceStore) Get(ctx context.Context, key string, offset, limit int64) (io.ReadCloser, error)
Get one piece from PieceStore
Click to show internal directories.
Click to hide internal directories.