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: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PeerConn

type PeerConn struct {
	mock.Mock
}

PeerConn is an autogenerated mock type for the PeerConn type

func NewPeerConn

func NewPeerConn(t mockConstructorTestingTNewPeerConn) *PeerConn

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

func (*PeerConn) AddStateURI

func (_m *PeerConn) AddStateURI(stateURI string)

AddStateURI provides a mock function with given fields: stateURI

func (*PeerConn) Addresses

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

Addresses provides a mock function with given fields:

func (*PeerConn) Close

func (_m *PeerConn) Close() error

Close provides a mock function with given fields:

func (*PeerConn) DeviceUniqueID

func (_m *PeerConn) DeviceUniqueID() string

DeviceUniqueID provides a mock function with given fields:

func (*PeerConn) DialInfo

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

DialInfo provides a mock function with given fields:

func (*PeerConn) Dialable

func (_m *PeerConn) Dialable() bool

Dialable provides a mock function with given fields:

func (*PeerConn) Endpoint

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

Endpoint provides a mock function with given fields: dialInfo

func (*PeerConn) Endpoints

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

Endpoints provides a mock function with given fields:

func (*PeerConn) EnsureConnected

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

EnsureConnected provides a mock function with given fields: ctx

func (*PeerConn) Failures

func (_m *PeerConn) Failures() uint64

Failures provides a mock function with given fields:

func (*PeerConn) LastContact

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

LastContact provides a mock function with given fields:

func (*PeerConn) LastFailure

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

LastFailure provides a mock function with given fields:

func (*PeerConn) PublicKeys

func (_m *PeerConn) PublicKeys(addr types.Address) (*crypto.SigningPublicKey, *crypto.AsymEncPubkey)

PublicKeys provides a mock function with given fields: addr

func (*PeerConn) Ready

func (_m *PeerConn) Ready() bool

Ready provides a mock function with given fields:

func (*PeerConn) RemainingBackoff

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

RemainingBackoff provides a mock function with given fields:

func (*PeerConn) RemoveStateURI

func (_m *PeerConn) RemoveStateURI(stateURI string)

RemoveStateURI provides a mock function with given fields: stateURI

func (*PeerConn) SetDeviceUniqueID

func (_m *PeerConn) SetDeviceUniqueID(id string)

SetDeviceUniqueID provides a mock function with given fields: id

func (*PeerConn) StateURIs

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

StateURIs provides a mock function with given fields:

func (*PeerConn) Transport

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

Transport provides a mock function with given fields:

func (*PeerConn) UpdateConnStats

func (_m *PeerConn) UpdateConnStats(success bool)

UpdateConnStats provides a mock function with given fields: success

type PeerStore

type PeerStore struct {
	mock.Mock
}

PeerStore is an autogenerated mock type for the PeerStore type

func NewPeerStore

func NewPeerStore(t mockConstructorTestingTNewPeerStore) *PeerStore

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

func (*PeerStore) AddDialInfo

func (_m *PeerStore) AddDialInfo(dialInfo swarm.PeerDialInfo, deviceUniqueID string) swarm.PeerEndpoint

AddDialInfo provides a mock function with given fields: dialInfo, deviceUniqueID

func (*PeerStore) AddVerifiedCredentials

func (_m *PeerStore) AddVerifiedCredentials(dialInfo swarm.PeerDialInfo, deviceUniqueID string, address types.Address, sigpubkey *crypto.SigningPublicKey, encpubkey *crypto.AsymEncPubkey) swarm.PeerEndpoint

AddVerifiedCredentials provides a mock function with given fields: dialInfo, deviceUniqueID, address, sigpubkey, encpubkey

func (*PeerStore) AllDialInfos

func (_m *PeerStore) AllDialInfos() map[swarm.PeerDialInfo]struct{}

AllDialInfos provides a mock function with given fields:

func (*PeerStore) Autoclose

func (_m *PeerStore) Autoclose()

Autoclose provides a mock function with given fields:

func (*PeerStore) AutocloseWithCleanup

func (_m *PeerStore) AutocloseWithCleanup(closeFn func())

AutocloseWithCleanup provides a mock function with given fields: closeFn

func (*PeerStore) Close

func (_m *PeerStore) Close() error

Close provides a mock function with given fields:

func (*PeerStore) Ctx

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

Ctx provides a mock function with given fields:

func (*PeerStore) DebugPrint

func (_m *PeerStore) DebugPrint()

DebugPrint provides a mock function with given fields:

func (*PeerStore) Done

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

Done provides a mock function with given fields:

func (*PeerStore) Go

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

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

func (*PeerStore) IsKnownPeer

func (_m *PeerStore) IsKnownPeer(dialInfo swarm.PeerDialInfo) bool

IsKnownPeer provides a mock function with given fields: dialInfo

func (*PeerStore) Name

func (_m *PeerStore) Name() string

Name provides a mock function with given fields:

func (*PeerStore) NewChild

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

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

func (*PeerStore) OnNewUnverifiedPeer

func (_m *PeerStore) OnNewUnverifiedPeer(fn func(swarm.PeerDialInfo))

OnNewUnverifiedPeer provides a mock function with given fields: fn

func (*PeerStore) OnNewVerifiedPeer

func (_m *PeerStore) OnNewVerifiedPeer(fn func(swarm.PeerDevice))

OnNewVerifiedPeer provides a mock function with given fields: fn

func (*PeerStore) PeerEndpoint

func (_m *PeerStore) PeerEndpoint(dialInfo swarm.PeerDialInfo) swarm.PeerEndpoint

PeerEndpoint provides a mock function with given fields: dialInfo

func (*PeerStore) PeerWithDeviceUniqueID

func (_m *PeerStore) PeerWithDeviceUniqueID(deviceUniqueID string) (swarm.PeerDevice, bool)

PeerWithDeviceUniqueID provides a mock function with given fields: deviceUniqueID

func (*PeerStore) Peers

func (_m *PeerStore) Peers() []swarm.PeerDevice

Peers provides a mock function with given fields:

func (*PeerStore) PeersFromTransport

func (_m *PeerStore) PeersFromTransport(transportName string) []swarm.PeerEndpoint

PeersFromTransport provides a mock function with given fields: transportName

func (*PeerStore) PeersServingStateURI

func (_m *PeerStore) PeersServingStateURI(stateURI string) []swarm.PeerDevice

PeersServingStateURI provides a mock function with given fields: stateURI

func (*PeerStore) PeersWithAddress

func (_m *PeerStore) PeersWithAddress(address types.Address) []swarm.PeerDevice

PeersWithAddress provides a mock function with given fields: address

func (*PeerStore) ProcessTree

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

ProcessTree provides a mock function with given fields:

func (*PeerStore) RemovePeers

func (_m *PeerStore) RemovePeers(deviceUniqueIDs []string) error

RemovePeers provides a mock function with given fields: deviceUniqueIDs

func (*PeerStore) SpawnChild

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

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

func (*PeerStore) Start

func (_m *PeerStore) Start() error

Start provides a mock function with given fields:

func (*PeerStore) State

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

State provides a mock function with given fields:

func (*PeerStore) UnverifiedPeers

func (_m *PeerStore) UnverifiedPeers() []swarm.PeerDialInfo

UnverifiedPeers provides a mock function with given fields:

func (*PeerStore) VerifiedPeers

func (_m *PeerStore) VerifiedPeers() []swarm.PeerDevice

VerifiedPeers provides a mock function with given fields:

type Protocol

type Protocol struct {
	mock.Mock
}

Protocol is an autogenerated mock type for the Protocol type

func (*Protocol) Close

func (_m *Protocol) Close()

Close provides a mock function with given fields:

func (*Protocol) Name

func (_m *Protocol) Name() string

Name provides a mock function with given fields:

func (*Protocol) Start

func (_m *Protocol) Start()

Start provides a mock function with given fields:

type Transport

type Transport struct {
	mock.Mock
}

Transport is an autogenerated mock type for the Transport type

func NewTransport

func NewTransport(t mockConstructorTestingTNewTransport) *Transport

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

func (*Transport) Autoclose

func (_m *Transport) Autoclose()

Autoclose provides a mock function with given fields:

func (*Transport) AutocloseWithCleanup

func (_m *Transport) AutocloseWithCleanup(closeFn func())

AutocloseWithCleanup provides a mock function with given fields: closeFn

func (*Transport) Close

func (_m *Transport) Close() error

Close provides a mock function with given fields:

func (*Transport) Ctx

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

Ctx provides a mock function with given fields:

func (*Transport) Done

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

Done provides a mock function with given fields:

func (*Transport) Go

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

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

func (*Transport) Name

func (_m *Transport) Name() string

Name provides a mock function with given fields:

func (*Transport) NewChild

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

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

func (*Transport) NewPeerConn

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

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

func (*Transport) ProcessTree

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

ProcessTree provides a mock function with given fields:

func (*Transport) SpawnChild

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

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

func (*Transport) Start

func (_m *Transport) Start() error

Start provides a mock function with given fields:

func (*Transport) State

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

State 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