mocks

package
v0.0.0-...-2c4dd60 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	mock.Mock
}

Store is an autogenerated mock type for the Store type

func NewStore

func NewStore(t mockConstructorTestingTNewStore) *Store

NewStore creates a new instance of Store. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Store) AddSubscribedStateURI

func (_m *Store) AddSubscribedStateURI(stateURI string) error

AddSubscribedStateURI provides a mock function with given fields: stateURI

func (*Store) DebugPrint

func (_m *Store) DebugPrint()

DebugPrint provides a mock function with given fields:

func (*Store) EncryptedTx

func (_m *Store) EncryptedTx(stateURI string, txID state.Version) (pb.GroupMessage, error)

EncryptedTx provides a mock function with given fields: stateURI, txID

func (*Store) MarkTxSeenByPeer

func (_m *Store) MarkTxSeenByPeer(deviceUniqueID string, stateURI string, txID state.Version) error

MarkTxSeenByPeer provides a mock function with given fields: deviceUniqueID, stateURI, txID

func (*Store) MaxPeersPerSubscription

func (_m *Store) MaxPeersPerSubscription() uint64

MaxPeersPerSubscription provides a mock function with given fields:

func (*Store) OnNewSubscribedStateURI

func (_m *Store) OnNewSubscribedStateURI(handler func(string)) func()

OnNewSubscribedStateURI provides a mock function with given fields: handler

func (*Store) PruneTxSeenRecordsOlderThan

func (_m *Store) PruneTxSeenRecordsOlderThan(threshold time.Duration) error

PruneTxSeenRecordsOlderThan provides a mock function with given fields: threshold

func (*Store) RemoveSubscribedStateURI

func (_m *Store) RemoveSubscribedStateURI(stateURI string) error

RemoveSubscribedStateURI provides a mock function with given fields: stateURI

func (*Store) SaveEncryptedTx

func (_m *Store) SaveEncryptedTx(stateURI string, txID state.Version, etx pb.GroupMessage) error

SaveEncryptedTx provides a mock function with given fields: stateURI, txID, etx

func (*Store) SetMaxPeersPerSubscription

func (_m *Store) SetMaxPeersPerSubscription(max uint64) error

SetMaxPeersPerSubscription provides a mock function with given fields: max

func (*Store) SubscribedStateURIs

func (_m *Store) SubscribedStateURIs() types.Set[string]

SubscribedStateURIs provides a mock function with given fields:

func (*Store) TxSeenByPeer

func (_m *Store) TxSeenByPeer(deviceUniqueID string, stateURI string, txID state.Version) bool

TxSeenByPeer provides a mock function with given fields: deviceUniqueID, stateURI, txID

type TreePeerConn

type TreePeerConn struct {
	mock.Mock
}

TreePeerConn is an autogenerated mock type for the TreePeerConn type

func NewTreePeerConn

func NewTreePeerConn(t mockConstructorTestingTNewTreePeerConn) *TreePeerConn

NewTreePeerConn creates a new instance of TreePeerConn. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*TreePeerConn) Ack

func (_m *TreePeerConn) Ack(stateURI string, txID state.Version) error

Ack provides a mock function with given fields: stateURI, txID

func (*TreePeerConn) AddStateURI

func (_m *TreePeerConn) AddStateURI(stateURI string)

AddStateURI provides a mock function with given fields: stateURI

func (*TreePeerConn) Addresses

func (_m *TreePeerConn) Addresses() types.Set[types.Address]

Addresses provides a mock function with given fields:

func (*TreePeerConn) AnnounceP2PStateURI

func (_m *TreePeerConn) AnnounceP2PStateURI(ctx context.Context, stateURI string) error

AnnounceP2PStateURI provides a mock function with given fields: ctx, stateURI

func (*TreePeerConn) Close

func (_m *TreePeerConn) Close() error

Close provides a mock function with given fields:

func (*TreePeerConn) DeviceUniqueID

func (_m *TreePeerConn) DeviceUniqueID() string

DeviceUniqueID provides a mock function with given fields:

func (*TreePeerConn) DialInfo

func (_m *TreePeerConn) DialInfo() swarm.PeerDialInfo

DialInfo provides a mock function with given fields:

func (*TreePeerConn) Dialable

func (_m *TreePeerConn) Dialable() bool

Dialable provides a mock function with given fields:

func (*TreePeerConn) Endpoint

func (_m *TreePeerConn) Endpoint(dialInfo swarm.PeerDialInfo) (swarm.PeerEndpoint, bool)

Endpoint provides a mock function with given fields: dialInfo

func (*TreePeerConn) Endpoints

func (_m *TreePeerConn) Endpoints() map[swarm.PeerDialInfo]swarm.PeerEndpoint

Endpoints provides a mock function with given fields:

func (*TreePeerConn) EnsureConnected

func (_m *TreePeerConn) EnsureConnected(ctx context.Context) error

EnsureConnected provides a mock function with given fields: ctx

func (*TreePeerConn) Failures

func (_m *TreePeerConn) Failures() uint64

Failures provides a mock function with given fields:

func (*TreePeerConn) LastContact

func (_m *TreePeerConn) LastContact() time.Time

LastContact provides a mock function with given fields:

func (*TreePeerConn) LastFailure

func (_m *TreePeerConn) LastFailure() time.Time

LastFailure provides a mock function with given fields:

func (*TreePeerConn) PublicKeys

PublicKeys provides a mock function with given fields: addr

func (*TreePeerConn) Ready

func (_m *TreePeerConn) Ready() bool

Ready provides a mock function with given fields:

func (*TreePeerConn) RemainingBackoff

func (_m *TreePeerConn) RemainingBackoff() time.Duration

RemainingBackoff provides a mock function with given fields:

func (*TreePeerConn) RemoveStateURI

func (_m *TreePeerConn) RemoveStateURI(stateURI string)

RemoveStateURI provides a mock function with given fields: stateURI

func (*TreePeerConn) SendPrivateTx

func (_m *TreePeerConn) SendPrivateTx(ctx context.Context, encryptedTx pb.GroupMessage) error

SendPrivateTx provides a mock function with given fields: ctx, encryptedTx

func (*TreePeerConn) SendTx

func (_m *TreePeerConn) SendTx(ctx context.Context, tx treepb.Tx) error

SendTx provides a mock function with given fields: ctx, tx

func (*TreePeerConn) SetDeviceUniqueID

func (_m *TreePeerConn) SetDeviceUniqueID(id string)

SetDeviceUniqueID provides a mock function with given fields: id

func (*TreePeerConn) StateURIs

func (_m *TreePeerConn) StateURIs() types.Set[string]

StateURIs provides a mock function with given fields:

func (*TreePeerConn) Subscribe

func (_m *TreePeerConn) Subscribe(ctx context.Context, stateURI string) (prototree.ReadableSubscription, error)

Subscribe provides a mock function with given fields: ctx, stateURI

func (*TreePeerConn) Transport

func (_m *TreePeerConn) Transport() swarm.Transport

Transport provides a mock function with given fields:

func (*TreePeerConn) UpdateConnStats

func (_m *TreePeerConn) UpdateConnStats(success bool)

UpdateConnStats provides a mock function with given fields: success

type TreeProtocol

type TreeProtocol struct {
	mock.Mock
}

TreeProtocol is an autogenerated mock type for the TreeProtocol type

func NewTreeProtocol

func NewTreeProtocol(t mockConstructorTestingTNewTreeProtocol) *TreeProtocol

NewTreeProtocol creates a new instance of TreeProtocol. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*TreeProtocol) Autoclose

func (_m *TreeProtocol) Autoclose()

Autoclose provides a mock function with given fields:

func (*TreeProtocol) AutocloseWithCleanup

func (_m *TreeProtocol) AutocloseWithCleanup(closeFn func())

AutocloseWithCleanup provides a mock function with given fields: closeFn

func (*TreeProtocol) Close

func (_m *TreeProtocol) Close() error

Close provides a mock function with given fields:

func (*TreeProtocol) Ctx

func (_m *TreeProtocol) Ctx() context.Context

Ctx provides a mock function with given fields:

func (*TreeProtocol) Done

func (_m *TreeProtocol) Done() <-chan struct{}

Done provides a mock function with given fields:

func (*TreeProtocol) Go

func (_m *TreeProtocol) Go(ctx context.Context, name string, fn func(context.Context)) <-chan struct{}

Go provides a mock function with given fields: ctx, name, fn

func (*TreeProtocol) InProcessSubscription

func (_m *TreeProtocol) InProcessSubscription(ctx context.Context, stateURI string, subscriptionType prototree.SubscriptionType, keypath state.Keypath, fetchHistoryOpts *prototree.FetchHistoryOpts) (prototree.ReadableSubscription, error)

InProcessSubscription provides a mock function with given fields: ctx, stateURI, subscriptionType, keypath, fetchHistoryOpts

func (*TreeProtocol) Name

func (_m *TreeProtocol) Name() string

Name provides a mock function with given fields:

func (*TreeProtocol) NewChild

func (_m *TreeProtocol) NewChild(ctx context.Context, name string) *process.Process

NewChild provides a mock function with given fields: ctx, name

func (*TreeProtocol) ProcessTree

func (_m *TreeProtocol) ProcessTree() map[string]interface{}

ProcessTree provides a mock function with given fields:

func (*TreeProtocol) ProvidersOfStateURI

func (_m *TreeProtocol) ProvidersOfStateURI(ctx context.Context, stateURI string) <-chan prototree.TreePeerConn

ProvidersOfStateURI provides a mock function with given fields: ctx, stateURI

func (*TreeProtocol) SendTx

func (_m *TreeProtocol) SendTx(ctx context.Context, tx pb.Tx) error

SendTx provides a mock function with given fields: ctx, tx

func (*TreeProtocol) SpawnChild

func (_m *TreeProtocol) SpawnChild(ctx context.Context, child process.Spawnable) error

SpawnChild provides a mock function with given fields: ctx, child

func (*TreeProtocol) Start

func (_m *TreeProtocol) Start() error

Start provides a mock function with given fields:

func (*TreeProtocol) State

func (_m *TreeProtocol) State() process.State

State provides a mock function with given fields:

func (*TreeProtocol) Subscribe

func (_m *TreeProtocol) Subscribe(ctx context.Context, stateURI string) error

Subscribe provides a mock function with given fields: ctx, stateURI

func (*TreeProtocol) SubscribeStateURIs

func (_m *TreeProtocol) SubscribeStateURIs() (prototree.StateURISubscription, error)

SubscribeStateURIs provides a mock function with given fields:

func (*TreeProtocol) Unsubscribe

func (_m *TreeProtocol) Unsubscribe(stateURI string) error

Unsubscribe provides a mock function with given fields: stateURI

type TreeTransport

type TreeTransport struct {
	mock.Mock
}

TreeTransport is an autogenerated mock type for the TreeTransport type

func NewTreeTransport

func NewTreeTransport(t mockConstructorTestingTNewTreeTransport) *TreeTransport

NewTreeTransport creates a new instance of TreeTransport. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*TreeTransport) AnnounceStateURIs

func (_m *TreeTransport) AnnounceStateURIs(ctx context.Context, stateURIs types.Set[string])

AnnounceStateURIs provides a mock function with given fields: ctx, stateURIs

func (*TreeTransport) Autoclose

func (_m *TreeTransport) Autoclose()

Autoclose provides a mock function with given fields:

func (*TreeTransport) AutocloseWithCleanup

func (_m *TreeTransport) AutocloseWithCleanup(closeFn func())

AutocloseWithCleanup provides a mock function with given fields: closeFn

func (*TreeTransport) Close

func (_m *TreeTransport) Close() error

Close provides a mock function with given fields:

func (*TreeTransport) Ctx

func (_m *TreeTransport) Ctx() context.Context

Ctx provides a mock function with given fields:

func (*TreeTransport) Done

func (_m *TreeTransport) Done() <-chan struct{}

Done provides a mock function with given fields:

func (*TreeTransport) Go

func (_m *TreeTransport) Go(ctx context.Context, name string, fn func(context.Context)) <-chan struct{}

Go provides a mock function with given fields: ctx, name, fn

func (*TreeTransport) Name

func (_m *TreeTransport) Name() string

Name provides a mock function with given fields:

func (*TreeTransport) NewChild

func (_m *TreeTransport) NewChild(ctx context.Context, name string) *process.Process

NewChild provides a mock function with given fields: ctx, name

func (*TreeTransport) NewPeerConn

func (_m *TreeTransport) NewPeerConn(ctx context.Context, dialAddr string) (swarm.PeerConn, error)

NewPeerConn provides a mock function with given fields: ctx, dialAddr

func (*TreeTransport) OnAckReceived

func (_m *TreeTransport) OnAckReceived(handler prototree.AckReceivedCallback)

OnAckReceived provides a mock function with given fields: handler

func (*TreeTransport) OnP2PStateURIReceived

func (_m *TreeTransport) OnP2PStateURIReceived(handler prototree.P2PStateURIReceivedCallback)

OnP2PStateURIReceived provides a mock function with given fields: handler

func (*TreeTransport) OnPrivateTxReceived

func (_m *TreeTransport) OnPrivateTxReceived(handler prototree.PrivateTxReceivedCallback)

OnPrivateTxReceived provides a mock function with given fields: handler

func (*TreeTransport) OnTxReceived

func (_m *TreeTransport) OnTxReceived(handler prototree.TxReceivedCallback)

OnTxReceived provides a mock function with given fields: handler

func (*TreeTransport) OnWritableSubscriptionOpened

func (_m *TreeTransport) OnWritableSubscriptionOpened(handler prototree.WritableSubscriptionOpenedCallback)

OnWritableSubscriptionOpened provides a mock function with given fields: handler

func (*TreeTransport) ProcessTree

func (_m *TreeTransport) ProcessTree() map[string]interface{}

ProcessTree provides a mock function with given fields:

func (*TreeTransport) ProvidersOfStateURI

func (_m *TreeTransport) ProvidersOfStateURI(ctx context.Context, stateURI string) (<-chan prototree.TreePeerConn, error)

ProvidersOfStateURI provides a mock function with given fields: ctx, stateURI

func (*TreeTransport) SpawnChild

func (_m *TreeTransport) SpawnChild(ctx context.Context, child process.Spawnable) error

SpawnChild provides a mock function with given fields: ctx, child

func (*TreeTransport) Start

func (_m *TreeTransport) Start() error

Start provides a mock function with given fields:

func (*TreeTransport) State

func (_m *TreeTransport) State() process.State

State provides a mock function with given fields:

type WritableSubscriptionImpl

type WritableSubscriptionImpl struct {
	mock.Mock
}

WritableSubscriptionImpl is an autogenerated mock type for the WritableSubscriptionImpl type

func NewWritableSubscriptionImpl

func NewWritableSubscriptionImpl(t mockConstructorTestingTNewWritableSubscriptionImpl) *WritableSubscriptionImpl

NewWritableSubscriptionImpl creates a new instance of WritableSubscriptionImpl. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*WritableSubscriptionImpl) Autoclose

func (_m *WritableSubscriptionImpl) Autoclose()

Autoclose provides a mock function with given fields:

func (*WritableSubscriptionImpl) AutocloseWithCleanup

func (_m *WritableSubscriptionImpl) AutocloseWithCleanup(closeFn func())

AutocloseWithCleanup provides a mock function with given fields: closeFn

func (*WritableSubscriptionImpl) Close

func (_m *WritableSubscriptionImpl) Close() error

Close provides a mock function with given fields:

func (*WritableSubscriptionImpl) Ctx

Ctx provides a mock function with given fields:

func (*WritableSubscriptionImpl) Done

func (_m *WritableSubscriptionImpl) Done() <-chan struct{}

Done provides a mock function with given fields:

func (*WritableSubscriptionImpl) Go

func (_m *WritableSubscriptionImpl) Go(ctx context.Context, name string, fn func(context.Context)) <-chan struct{}

Go provides a mock function with given fields: ctx, name, fn

func (*WritableSubscriptionImpl) Name

func (_m *WritableSubscriptionImpl) Name() string

Name provides a mock function with given fields:

func (*WritableSubscriptionImpl) NewChild

func (_m *WritableSubscriptionImpl) NewChild(ctx context.Context, name string) *process.Process

NewChild provides a mock function with given fields: ctx, name

func (*WritableSubscriptionImpl) ProcessTree

func (_m *WritableSubscriptionImpl) ProcessTree() map[string]interface{}

ProcessTree provides a mock function with given fields:

func (*WritableSubscriptionImpl) Put

Put provides a mock function with given fields: ctx, msg

func (*WritableSubscriptionImpl) SpawnChild

func (_m *WritableSubscriptionImpl) SpawnChild(ctx context.Context, child process.Spawnable) error

SpawnChild provides a mock function with given fields: ctx, child

func (*WritableSubscriptionImpl) Start

func (_m *WritableSubscriptionImpl) Start() error

Start provides a mock function with given fields:

func (*WritableSubscriptionImpl) State

State provides a mock function with given fields:

func (*WritableSubscriptionImpl) String

func (_m *WritableSubscriptionImpl) String() string

String provides a mock function with given fields:

Jump to

Keyboard shortcuts

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