mocks

package
v0.0.0-...-80c7550 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package mocks is a generated GoMock package.

Package mocks is a generated GoMock package.

Package mocks is a generated GoMock package.

Package mocks is a generated GoMock package.

Package mocks is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockBucket

type MockBucket struct {
	// contains filtered or unexported fields
}

MockBucket is a mock of Bucket interface

func NewMockBucket

func NewMockBucket(ctrl *gomock.Controller) *MockBucket

NewMockBucket creates a new mock instance

func (*MockBucket) Chroot

func (m *MockBucket) Chroot(dir string) interfaces.Bucket

Chroot mocks base method

func (*MockBucket) EXPECT

func (m *MockBucket) EXPECT() *MockBucketMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockBucket) Get

func (m *MockBucket) Get(ctx context.Context, filename string) (interfaces.Fetcher, error)

Get mocks base method

func (*MockBucket) IsLocked

func (m *MockBucket) IsLocked(ctx context.Context, filename string) (bool, error)

IsLocked mocks base method

func (*MockBucket) Lock

func (m *MockBucket) Lock(ctx context.Context, filename string) (*protos.LockToken, error)

Lock mocks base method

func (*MockBucket) Put

func (m *MockBucket) Put(ctx context.Context, filename string, file io.Reader, mtime time.Time) error

Put mocks base method

func (*MockBucket) PutAndLock

func (m *MockBucket) PutAndLock(ctx context.Context, filename string, file io.Reader, mtime time.Time) (*protos.LockToken, error)

PutAndLock mocks base method

func (*MockBucket) PutWithCacheTTL

func (m *MockBucket) PutWithCacheTTL(ctx context.Context, filename string, file io.Reader, mtime time.Time, ttl uint64) error

PutWithCacheTTL mocks base method

func (*MockBucket) Remove

func (m *MockBucket) Remove(ctx context.Context, filename string) error

Remove mocks base method

func (*MockBucket) Unlock

func (m *MockBucket) Unlock(ctx context.Context, filename string, token *protos.LockToken) error

Unlock mocks base method

type MockBucketMockRecorder

type MockBucketMockRecorder struct {
	// contains filtered or unexported fields
}

MockBucketMockRecorder is the mock recorder for MockBucket

func (*MockBucketMockRecorder) Chroot

func (mr *MockBucketMockRecorder) Chroot(dir interface{}) *gomock.Call

Chroot indicates an expected call of Chroot

func (*MockBucketMockRecorder) Get

func (mr *MockBucketMockRecorder) Get(ctx, filename interface{}) *gomock.Call

Get indicates an expected call of Get

func (*MockBucketMockRecorder) IsLocked

func (mr *MockBucketMockRecorder) IsLocked(ctx, filename interface{}) *gomock.Call

IsLocked indicates an expected call of IsLocked

func (*MockBucketMockRecorder) Lock

func (mr *MockBucketMockRecorder) Lock(ctx, filename interface{}) *gomock.Call

Lock indicates an expected call of Lock

func (*MockBucketMockRecorder) Put

func (mr *MockBucketMockRecorder) Put(ctx, filename, file, mtime interface{}) *gomock.Call

Put indicates an expected call of Put

func (*MockBucketMockRecorder) PutAndLock

func (mr *MockBucketMockRecorder) PutAndLock(ctx, filename, file, mtime interface{}) *gomock.Call

PutAndLock indicates an expected call of PutAndLock

func (*MockBucketMockRecorder) PutWithCacheTTL

func (mr *MockBucketMockRecorder) PutWithCacheTTL(ctx, filename, file, mtime, ttl interface{}) *gomock.Call

PutWithCacheTTL indicates an expected call of PutWithCacheTTL

func (*MockBucketMockRecorder) Remove

func (mr *MockBucketMockRecorder) Remove(ctx, filename interface{}) *gomock.Call

Remove indicates an expected call of Remove

func (*MockBucketMockRecorder) Unlock

func (mr *MockBucketMockRecorder) Unlock(ctx, filename, token interface{}) *gomock.Call

Unlock indicates an expected call of Unlock

type MockCore

type MockCore struct {
	// contains filtered or unexported fields
}

MockCore is a mock of Core interface

func NewMockCore

func NewMockCore(ctrl *gomock.Controller) *MockCore

NewMockCore creates a new mock instance

func (*MockCore) Blockstore

func (m *MockCore) Blockstore() go_ipfs_blockstore.Blockstore

Blockstore mocks base method

func (*MockCore) Close

func (m *MockCore) Close() error

Close mocks base method

func (*MockCore) EXPECT

func (m *MockCore) EXPECT() *MockCoreMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockCore) GarbageCollector

func (m *MockCore) GarbageCollector() interfaces.GarbageCollector

GarbageCollector mocks base method

func (*MockCore) Get

func (m *MockCore) Get(ctx context.Context, privateKey crypto.PrivKey, bucket, filename string) (interfaces.Fetcher, error)

Get mocks base method

func (*MockCore) GetAddrs

func (m *MockCore) GetAddrs() []string

GetAddrs mocks base method

func (*MockCore) GetID

func (m *MockCore) GetID() string

GetID mocks base method

func (*MockCore) GetIdentity

func (m *MockCore) GetIdentity() identity.Identity

GetIdentity mocks base method

func (*MockCore) Host

func (m *MockCore) Host() interfaces.Host

Host mocks base method

func (*MockCore) IsLocked

func (m *MockCore) IsLocked(ctx context.Context, publicKey crypto.PubKey, bucket, filename string) (bool, error)

IsLocked mocks base method

func (*MockCore) Lock

func (m *MockCore) Lock(ctx context.Context, privateKey crypto.PrivKey, bucket, filename string) (*protos.LockToken, error)

Lock mocks base method

func (*MockCore) PublishPublicKey

func (m *MockCore) PublishPublicKey(publicKey crypto.PubKey) error

PublishPublicKey mocks base method

func (*MockCore) Put

func (m *MockCore) Put(ctx context.Context, privateKey crypto.PrivKey, bucket, filename string, file io.Reader, mtime time.Time) error

Put mocks base method

func (*MockCore) PutAndLock

func (m *MockCore) PutAndLock(ctx context.Context, privateKey crypto.PrivKey, bucket, filename string, file io.Reader, mtime time.Time) (*protos.LockToken, error)

PutAndLock mocks base method

func (*MockCore) PutWithCacheTTL

func (m *MockCore) PutWithCacheTTL(ctx context.Context, privateKey crypto.PrivKey, bucket, filename string, file io.Reader, mtime time.Time, ttl uint64) error

PutWithCacheTTL mocks base method

func (*MockCore) Remove

func (m *MockCore) Remove(ctx context.Context, privateKey crypto.PrivKey, bucket, filename string) error

Remove mocks base method

func (*MockCore) Unlock

func (m *MockCore) Unlock(ctx context.Context, privateKey crypto.PrivKey, bucket, filename string, token *protos.LockToken) error

Unlock mocks base method

func (*MockCore) WithBucket

func (m *MockCore) WithBucket(privateKey crypto.PrivKey, bucket string) (interfaces.Bucket, error)

WithBucket mocks base method

func (*MockCore) WithBucketRoot

func (m *MockCore) WithBucketRoot(privateKey crypto.PrivKey, bucket, baseDir string) (interfaces.Bucket, error)

WithBucketRoot mocks base method

type MockCoreMockRecorder

type MockCoreMockRecorder struct {
	// contains filtered or unexported fields
}

MockCoreMockRecorder is the mock recorder for MockCore

func (*MockCoreMockRecorder) Blockstore

func (mr *MockCoreMockRecorder) Blockstore() *gomock.Call

Blockstore indicates an expected call of Blockstore

func (*MockCoreMockRecorder) Close

func (mr *MockCoreMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close

func (*MockCoreMockRecorder) GarbageCollector

func (mr *MockCoreMockRecorder) GarbageCollector() *gomock.Call

GarbageCollector indicates an expected call of GarbageCollector

func (*MockCoreMockRecorder) Get

func (mr *MockCoreMockRecorder) Get(ctx, privateKey, bucket, filename interface{}) *gomock.Call

Get indicates an expected call of Get

func (*MockCoreMockRecorder) GetAddrs

func (mr *MockCoreMockRecorder) GetAddrs() *gomock.Call

GetAddrs indicates an expected call of GetAddrs

func (*MockCoreMockRecorder) GetID

func (mr *MockCoreMockRecorder) GetID() *gomock.Call

GetID indicates an expected call of GetID

func (*MockCoreMockRecorder) GetIdentity

func (mr *MockCoreMockRecorder) GetIdentity() *gomock.Call

GetIdentity indicates an expected call of GetIdentity

func (*MockCoreMockRecorder) Host

func (mr *MockCoreMockRecorder) Host() *gomock.Call

Host indicates an expected call of Host

func (*MockCoreMockRecorder) IsLocked

func (mr *MockCoreMockRecorder) IsLocked(ctx, publicKey, bucket, filename interface{}) *gomock.Call

IsLocked indicates an expected call of IsLocked

func (*MockCoreMockRecorder) Lock

func (mr *MockCoreMockRecorder) Lock(ctx, privateKey, bucket, filename interface{}) *gomock.Call

Lock indicates an expected call of Lock

func (*MockCoreMockRecorder) PublishPublicKey

func (mr *MockCoreMockRecorder) PublishPublicKey(publicKey interface{}) *gomock.Call

PublishPublicKey indicates an expected call of PublishPublicKey

func (*MockCoreMockRecorder) Put

func (mr *MockCoreMockRecorder) Put(ctx, privateKey, bucket, filename, file, mtime interface{}) *gomock.Call

Put indicates an expected call of Put

func (*MockCoreMockRecorder) PutAndLock

func (mr *MockCoreMockRecorder) PutAndLock(ctx, privateKey, bucket, filename, file, mtime interface{}) *gomock.Call

PutAndLock indicates an expected call of PutAndLock

func (*MockCoreMockRecorder) PutWithCacheTTL

func (mr *MockCoreMockRecorder) PutWithCacheTTL(ctx, privateKey, bucket, filename, file, mtime, ttl interface{}) *gomock.Call

PutWithCacheTTL indicates an expected call of PutWithCacheTTL

func (*MockCoreMockRecorder) Remove

func (mr *MockCoreMockRecorder) Remove(ctx, privateKey, bucket, filename interface{}) *gomock.Call

Remove indicates an expected call of Remove

func (*MockCoreMockRecorder) Unlock

func (mr *MockCoreMockRecorder) Unlock(ctx, privateKey, bucket, filename, token interface{}) *gomock.Call

Unlock indicates an expected call of Unlock

func (*MockCoreMockRecorder) WithBucket

func (mr *MockCoreMockRecorder) WithBucket(privateKey, bucket interface{}) *gomock.Call

WithBucket indicates an expected call of WithBucket

func (*MockCoreMockRecorder) WithBucketRoot

func (mr *MockCoreMockRecorder) WithBucketRoot(privateKey, bucket, baseDir interface{}) *gomock.Call

WithBucketRoot indicates an expected call of WithBucketRoot

type MockFetcher

type MockFetcher struct {
	// contains filtered or unexported fields
}

MockFetcher is a mock of Fetcher interface

func NewMockFetcher

func NewMockFetcher(ctrl *gomock.Controller) *MockFetcher

NewMockFetcher creates a new mock instance

func (*MockFetcher) Close

func (m *MockFetcher) Close() error

Close mocks base method

func (*MockFetcher) Context

func (m *MockFetcher) Context() context.Context

Context mocks base method

func (*MockFetcher) EXPECT

func (m *MockFetcher) EXPECT() *MockFetcherMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockFetcher) Read

func (m *MockFetcher) Read(p []byte) (int, error)

Read mocks base method

func (*MockFetcher) Seek

func (m *MockFetcher) Seek(offset int64, whence int) (int64, error)

Seek mocks base method

func (*MockFetcher) Size

func (m *MockFetcher) Size() int64

Size mocks base method

type MockFetcherMockRecorder

type MockFetcherMockRecorder struct {
	// contains filtered or unexported fields
}

MockFetcherMockRecorder is the mock recorder for MockFetcher

func (*MockFetcherMockRecorder) Close

func (mr *MockFetcherMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close

func (*MockFetcherMockRecorder) Context

func (mr *MockFetcherMockRecorder) Context() *gomock.Call

Context indicates an expected call of Context

func (*MockFetcherMockRecorder) Read

func (mr *MockFetcherMockRecorder) Read(p interface{}) *gomock.Call

Read indicates an expected call of Read

func (*MockFetcherMockRecorder) Seek

func (mr *MockFetcherMockRecorder) Seek(offset, whence interface{}) *gomock.Call

Seek indicates an expected call of Seek

func (*MockFetcherMockRecorder) Size

func (mr *MockFetcherMockRecorder) Size() *gomock.Call

Size indicates an expected call of Size

type MockGarbageCollector

type MockGarbageCollector struct {
	// contains filtered or unexported fields
}

MockGarbageCollector is a mock of GarbageCollector interface

func NewMockGarbageCollector

func NewMockGarbageCollector(ctrl *gomock.Controller) *MockGarbageCollector

NewMockGarbageCollector creates a new mock instance

func (*MockGarbageCollector) Collect

func (m *MockGarbageCollector) Collect() error

Collect mocks base method

func (*MockGarbageCollector) EXPECT

EXPECT returns an object that allows the caller to indicate expected use

func (*MockGarbageCollector) Locker

func (m *MockGarbageCollector) Locker() sync.Locker

Locker mocks base method

func (*MockGarbageCollector) Schedule

func (m *MockGarbageCollector) Schedule() error

Schedule mocks base method

func (*MockGarbageCollector) Start

func (m *MockGarbageCollector) Start() error

Start mocks base method

type MockGarbageCollectorMockRecorder

type MockGarbageCollectorMockRecorder struct {
	// contains filtered or unexported fields
}

MockGarbageCollectorMockRecorder is the mock recorder for MockGarbageCollector

func (*MockGarbageCollectorMockRecorder) Collect

Collect indicates an expected call of Collect

func (*MockGarbageCollectorMockRecorder) Locker

Locker indicates an expected call of Locker

func (*MockGarbageCollectorMockRecorder) Schedule

Schedule indicates an expected call of Schedule

func (*MockGarbageCollectorMockRecorder) Start

Start indicates an expected call of Start

type MockHost

type MockHost struct {
	// contains filtered or unexported fields
}

MockHost is a mock of Host interface

func NewMockHost

func NewMockHost(ctrl *gomock.Controller) *MockHost

NewMockHost creates a new mock instance

func (*MockHost) Announce

func (m *MockHost) Announce() error

Announce mocks base method

func (*MockHost) Close

func (m *MockHost) Close() error

Close mocks base method

func (*MockHost) CreateBlockStream

func (m *MockHost) CreateBlockStream(ctx context.Context, blockMeta *protos.BlockMetadata, peer *go_libp2p_peerstore.PeerInfo) (io.Reader, error)

CreateBlockStream mocks base method

func (*MockHost) EXPECT

func (m *MockHost) EXPECT() *MockHostMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockHost) FindProviders

func (m *MockHost) FindProviders(ctx context.Context, blockMeta *protos.BlockMetadata) <-chan go_libp2p_peerstore.PeerInfo

FindProviders mocks base method

func (*MockHost) GetAddrs

func (m *MockHost) GetAddrs() []string

GetAddrs mocks base method

func (*MockHost) GetContent

func (m *MockHost) GetContent(ctx context.Context, publicKey crypto.PubKey, bucket, filename string) (*protos.CrabObject, error)

GetContent mocks base method

func (*MockHost) GetID

func (m *MockHost) GetID() string

GetID mocks base method

func (*MockHost) GetSwarmPublicKey

func (m *MockHost) GetSwarmPublicKey(ctx context.Context, hash string) (crypto.PubKey, error)

GetSwarmPublicKey mocks base method

func (*MockHost) IsLocked

func (m *MockHost) IsLocked(ctx context.Context, publicKey crypto.PubKey, bucket, filename string) (bool, error)

IsLocked mocks base method

func (*MockHost) Lock

func (m *MockHost) Lock(ctx context.Context, privateKey crypto.PrivKey, bucket, filename string) (*protos.LockToken, error)

Lock mocks base method

func (*MockHost) Provide

func (m *MockHost) Provide(ctx context.Context, cid go_cid.Cid) error

Provide mocks base method

func (*MockHost) Publish

func (m *MockHost) Publish(ctx context.Context, privateKey crypto.PrivKey, cipherKey []byte, bucket, filename string, blockMap interfaces.BlockMap, mtime time.Time, size int64) error

Publish mocks base method

func (*MockHost) PublishAndLock

func (m *MockHost) PublishAndLock(ctx context.Context, privateKey crypto.PrivKey, cipherKey []byte, bucket, filename string, blockMap interfaces.BlockMap, mtime time.Time, size int64) (*protos.LockToken, error)

PublishAndLock mocks base method

func (*MockHost) PublishWithCacheTTL

func (m *MockHost) PublishWithCacheTTL(ctx context.Context, privateKey crypto.PrivKey, cipherKey []byte, bucket, filename string, blockMap interfaces.BlockMap, mtime time.Time, size int64, ttl uint64) error

PublishWithCacheTTL mocks base method

func (*MockHost) PutPublicKey

func (m *MockHost) PutPublicKey(publicKey crypto.PubKey) error

PutPublicKey mocks base method

func (*MockHost) Remove

func (m *MockHost) Remove(ctx context.Context, privateKey crypto.PrivKey, bucket, filename string) error

Remove mocks base method

func (*MockHost) Reprovide

func (m *MockHost) Reprovide(ctx context.Context, withBlocks bool) error

Reprovide mocks base method

func (*MockHost) Unlock

func (m *MockHost) Unlock(ctx context.Context, privateKey crypto.PrivKey, bucket, filename string, token *protos.LockToken) error

Unlock mocks base method

type MockHostMockRecorder

type MockHostMockRecorder struct {
	// contains filtered or unexported fields
}

MockHostMockRecorder is the mock recorder for MockHost

func (*MockHostMockRecorder) Announce

func (mr *MockHostMockRecorder) Announce() *gomock.Call

Announce indicates an expected call of Announce

func (*MockHostMockRecorder) Close

func (mr *MockHostMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close

func (*MockHostMockRecorder) CreateBlockStream

func (mr *MockHostMockRecorder) CreateBlockStream(ctx, blockMeta, peer interface{}) *gomock.Call

CreateBlockStream indicates an expected call of CreateBlockStream

func (*MockHostMockRecorder) FindProviders

func (mr *MockHostMockRecorder) FindProviders(ctx, blockMeta interface{}) *gomock.Call

FindProviders indicates an expected call of FindProviders

func (*MockHostMockRecorder) GetAddrs

func (mr *MockHostMockRecorder) GetAddrs() *gomock.Call

GetAddrs indicates an expected call of GetAddrs

func (*MockHostMockRecorder) GetContent

func (mr *MockHostMockRecorder) GetContent(ctx, publicKey, bucket, filename interface{}) *gomock.Call

GetContent indicates an expected call of GetContent

func (*MockHostMockRecorder) GetID

func (mr *MockHostMockRecorder) GetID() *gomock.Call

GetID indicates an expected call of GetID

func (*MockHostMockRecorder) GetSwarmPublicKey

func (mr *MockHostMockRecorder) GetSwarmPublicKey(ctx, hash interface{}) *gomock.Call

GetSwarmPublicKey indicates an expected call of GetSwarmPublicKey

func (*MockHostMockRecorder) IsLocked

func (mr *MockHostMockRecorder) IsLocked(ctx, publicKey, bucket, filename interface{}) *gomock.Call

IsLocked indicates an expected call of IsLocked

func (*MockHostMockRecorder) Lock

func (mr *MockHostMockRecorder) Lock(ctx, privateKey, bucket, filename interface{}) *gomock.Call

Lock indicates an expected call of Lock

func (*MockHostMockRecorder) Provide

func (mr *MockHostMockRecorder) Provide(ctx, cid interface{}) *gomock.Call

Provide indicates an expected call of Provide

func (*MockHostMockRecorder) Publish

func (mr *MockHostMockRecorder) Publish(ctx, privateKey, cipherKey, bucket, filename, blockMap, mtime, size interface{}) *gomock.Call

Publish indicates an expected call of Publish

func (*MockHostMockRecorder) PublishAndLock

func (mr *MockHostMockRecorder) PublishAndLock(ctx, privateKey, cipherKey, bucket, filename, blockMap, mtime, size interface{}) *gomock.Call

PublishAndLock indicates an expected call of PublishAndLock

func (*MockHostMockRecorder) PublishWithCacheTTL

func (mr *MockHostMockRecorder) PublishWithCacheTTL(ctx, privateKey, cipherKey, bucket, filename, blockMap, mtime, size, ttl interface{}) *gomock.Call

PublishWithCacheTTL indicates an expected call of PublishWithCacheTTL

func (*MockHostMockRecorder) PutPublicKey

func (mr *MockHostMockRecorder) PutPublicKey(publicKey interface{}) *gomock.Call

PutPublicKey indicates an expected call of PutPublicKey

func (*MockHostMockRecorder) Remove

func (mr *MockHostMockRecorder) Remove(ctx, privateKey, bucket, filename interface{}) *gomock.Call

Remove indicates an expected call of Remove

func (*MockHostMockRecorder) Reprovide

func (mr *MockHostMockRecorder) Reprovide(ctx, withBlocks interface{}) *gomock.Call

Reprovide indicates an expected call of Reprovide

func (*MockHostMockRecorder) Unlock

func (mr *MockHostMockRecorder) Unlock(ctx, privateKey, bucket, filename, token interface{}) *gomock.Call

Unlock indicates an expected call of Unlock

Jump to

Keyboard shortcuts

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