piece

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package piece is a generated GoMock package.

Index

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

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.

func (*MockPieceAPI) Put added in v0.2.4

func (m *MockPieceAPI) Put(ctx context.Context, key string, reader io.Reader) error

Put 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 any) *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 any) *gomock.Call

Get indicates an expected call of Get.

func (*MockPieceAPIMockRecorder) Put added in v0.2.4

func (mr *MockPieceAPIMockRecorder) Put(ctx, key, reader any) *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

func (*PieceStore) Head added in v0.2.4

func (p *PieceStore) Head(ctx context.Context, key string) (storage.Object, error)

Head returns piece info in PieceStore

func (*PieceStore) Put

func (p *PieceStore) Put(ctx context.Context, key string, reader io.Reader) error

Put one piece to PieceStore

Jump to

Keyboard shortcuts

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