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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HushPeerConn

type HushPeerConn struct {
	mock.Mock
}

HushPeerConn is an autogenerated mock type for the HushPeerConn type

func NewHushPeerConn

func NewHushPeerConn(t mockConstructorTestingTNewHushPeerConn) *HushPeerConn

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

func (*HushPeerConn) AddStateURI

func (_m *HushPeerConn) AddStateURI(stateURI string)

AddStateURI provides a mock function with given fields: stateURI

func (*HushPeerConn) Addresses

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

Addresses provides a mock function with given fields:

func (*HushPeerConn) Close

func (_m *HushPeerConn) Close() error

Close provides a mock function with given fields:

func (*HushPeerConn) DeviceUniqueID

func (_m *HushPeerConn) DeviceUniqueID() string

DeviceUniqueID provides a mock function with given fields:

func (*HushPeerConn) DialInfo

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

DialInfo provides a mock function with given fields:

func (*HushPeerConn) Dialable

func (_m *HushPeerConn) Dialable() bool

Dialable provides a mock function with given fields:

func (*HushPeerConn) Endpoint

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

Endpoint provides a mock function with given fields: dialInfo

func (*HushPeerConn) Endpoints

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

Endpoints provides a mock function with given fields:

func (*HushPeerConn) EnsureConnected

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

EnsureConnected provides a mock function with given fields: ctx

func (*HushPeerConn) Failures

func (_m *HushPeerConn) Failures() uint64

Failures provides a mock function with given fields:

func (*HushPeerConn) LastContact

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

LastContact provides a mock function with given fields:

func (*HushPeerConn) LastFailure

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

LastFailure provides a mock function with given fields:

func (*HushPeerConn) ProposeIndividualSession

func (_m *HushPeerConn) ProposeIndividualSession(ctx context.Context, encryptedProposal []byte) error

ProposeIndividualSession provides a mock function with given fields: ctx, encryptedProposal

func (*HushPeerConn) PublicKeys

PublicKeys provides a mock function with given fields: addr

func (*HushPeerConn) Ready

func (_m *HushPeerConn) Ready() bool

Ready provides a mock function with given fields:

func (*HushPeerConn) RemainingBackoff

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

RemainingBackoff provides a mock function with given fields:

func (*HushPeerConn) RemoveStateURI

func (_m *HushPeerConn) RemoveStateURI(stateURI string)

RemoveStateURI provides a mock function with given fields: stateURI

func (*HushPeerConn) RespondToIndividualSession

func (_m *HushPeerConn) RespondToIndividualSession(ctx context.Context, approval pb.IndividualSessionResponse) error

RespondToIndividualSession provides a mock function with given fields: ctx, approval

func (*HushPeerConn) SendDHPubkeyAttestations

func (_m *HushPeerConn) SendDHPubkeyAttestations(ctx context.Context, attestations []pb.DHPubkeyAttestation) error

SendDHPubkeyAttestations provides a mock function with given fields: ctx, attestations

func (*HushPeerConn) SendHushGroupMessage

func (_m *HushPeerConn) SendHushGroupMessage(ctx context.Context, msg pb.GroupMessage) error

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

func (*HushPeerConn) SendHushIndividualMessage

func (_m *HushPeerConn) SendHushIndividualMessage(ctx context.Context, msg pb.IndividualMessage) error

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

func (*HushPeerConn) SetDeviceUniqueID

func (_m *HushPeerConn) SetDeviceUniqueID(id string)

SetDeviceUniqueID provides a mock function with given fields: id

func (*HushPeerConn) StateURIs

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

StateURIs provides a mock function with given fields:

func (*HushPeerConn) Transport

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

Transport provides a mock function with given fields:

func (*HushPeerConn) UpdateConnStats

func (_m *HushPeerConn) UpdateConnStats(success bool)

UpdateConnStats provides a mock function with given fields: success

type HushProtocol

type HushProtocol struct {
	mock.Mock
}

HushProtocol is an autogenerated mock type for the HushProtocol type

func NewHushProtocol

func NewHushProtocol(t mockConstructorTestingTNewHushProtocol) *HushProtocol

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

func (*HushProtocol) Autoclose

func (_m *HushProtocol) Autoclose()

Autoclose provides a mock function with given fields:

func (*HushProtocol) AutocloseWithCleanup

func (_m *HushProtocol) AutocloseWithCleanup(closeFn func())

AutocloseWithCleanup provides a mock function with given fields: closeFn

func (*HushProtocol) Close

func (_m *HushProtocol) Close() error

Close provides a mock function with given fields:

func (*HushProtocol) Ctx

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

Ctx provides a mock function with given fields:

func (*HushProtocol) DecryptGroupMessage

func (_m *HushProtocol) DecryptGroupMessage(msg pb.GroupMessage) error

DecryptGroupMessage provides a mock function with given fields: msg

func (*HushProtocol) Done

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

Done provides a mock function with given fields:

func (*HushProtocol) EncryptGroupMessage

func (_m *HushProtocol) EncryptGroupMessage(sessionType string, messageID string, recipients []types.Address, plaintext []byte) error

EncryptGroupMessage provides a mock function with given fields: sessionType, messageID, recipients, plaintext

func (*HushProtocol) EncryptIndividualMessage

func (_m *HushProtocol) EncryptIndividualMessage(sessionType string, recipient types.Address, plaintext []byte) error

EncryptIndividualMessage provides a mock function with given fields: sessionType, recipient, plaintext

func (*HushProtocol) EnsureIndividualSession

func (_m *HushProtocol) EnsureIndividualSession(ctx context.Context, sessionType string, recipient types.Address) (pb.IndividualSessionProposal, bool, error)

EnsureIndividualSession provides a mock function with given fields: ctx, sessionType, recipient

func (*HushProtocol) Go

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

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

func (*HushProtocol) Name

func (_m *HushProtocol) Name() string

Name provides a mock function with given fields:

func (*HushProtocol) NewChild

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

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

func (*HushProtocol) OnGroupMessageDecrypted

func (_m *HushProtocol) OnGroupMessageDecrypted(sessionType string, handler protohush.GroupMessageDecryptedCallback)

OnGroupMessageDecrypted provides a mock function with given fields: sessionType, handler

func (*HushProtocol) OnGroupMessageEncrypted

func (_m *HushProtocol) OnGroupMessageEncrypted(sessionType string, handler protohush.GroupMessageEncryptedCallback)

OnGroupMessageEncrypted provides a mock function with given fields: sessionType, handler

func (*HushProtocol) OnIndividualMessageDecrypted

func (_m *HushProtocol) OnIndividualMessageDecrypted(sessionType string, handler protohush.IndividualMessageDecryptedCallback)

OnIndividualMessageDecrypted provides a mock function with given fields: sessionType, handler

func (*HushProtocol) ProcessTree

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

ProcessTree provides a mock function with given fields:

func (*HushProtocol) ProposeIndividualSession

func (_m *HushProtocol) ProposeIndividualSession(ctx context.Context, sessionType string, recipient types.Address, epoch uint64) (pb.IndividualSessionProposal, error)

ProposeIndividualSession provides a mock function with given fields: ctx, sessionType, recipient, epoch

func (*HushProtocol) ProposeNextIndividualSession

func (_m *HushProtocol) ProposeNextIndividualSession(ctx context.Context, sessionType string, recipient types.Address) (pb.IndividualSessionProposal, error)

ProposeNextIndividualSession provides a mock function with given fields: ctx, sessionType, recipient

func (*HushProtocol) SpawnChild

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

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

func (*HushProtocol) Start

func (_m *HushProtocol) Start() error

Start provides a mock function with given fields:

func (*HushProtocol) State

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

State provides a mock function with given fields:

type HushTransport

type HushTransport struct {
	mock.Mock
}

HushTransport is an autogenerated mock type for the HushTransport type

func NewHushTransport

func NewHushTransport(t mockConstructorTestingTNewHushTransport) *HushTransport

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

func (*HushTransport) Autoclose

func (_m *HushTransport) Autoclose()

Autoclose provides a mock function with given fields:

func (*HushTransport) AutocloseWithCleanup

func (_m *HushTransport) AutocloseWithCleanup(closeFn func())

AutocloseWithCleanup provides a mock function with given fields: closeFn

func (*HushTransport) Close

func (_m *HushTransport) Close() error

Close provides a mock function with given fields:

func (*HushTransport) Ctx

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

Ctx provides a mock function with given fields:

func (*HushTransport) Done

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

Done provides a mock function with given fields:

func (*HushTransport) Go

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

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

func (*HushTransport) Name

func (_m *HushTransport) Name() string

Name provides a mock function with given fields:

func (*HushTransport) NewChild

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

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

func (*HushTransport) NewPeerConn

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

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

func (*HushTransport) OnIncomingDHPubkeyAttestations

func (_m *HushTransport) OnIncomingDHPubkeyAttestations(handler protohush.IncomingDHPubkeyAttestationsCallback)

OnIncomingDHPubkeyAttestations provides a mock function with given fields: handler

func (*HushTransport) OnIncomingGroupMessage

func (_m *HushTransport) OnIncomingGroupMessage(handler protohush.IncomingGroupMessageCallback)

OnIncomingGroupMessage provides a mock function with given fields: handler

func (*HushTransport) OnIncomingIndividualMessage

func (_m *HushTransport) OnIncomingIndividualMessage(handler protohush.IncomingIndividualMessageCallback)

OnIncomingIndividualMessage provides a mock function with given fields: handler

func (*HushTransport) OnIncomingIndividualSessionProposal

func (_m *HushTransport) OnIncomingIndividualSessionProposal(handler protohush.IncomingIndividualSessionProposalCallback)

OnIncomingIndividualSessionProposal provides a mock function with given fields: handler

func (*HushTransport) OnIncomingIndividualSessionResponse

func (_m *HushTransport) OnIncomingIndividualSessionResponse(handler protohush.IncomingIndividualSessionResponseCallback)

OnIncomingIndividualSessionResponse provides a mock function with given fields: handler

func (*HushTransport) ProcessTree

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

ProcessTree provides a mock function with given fields:

func (*HushTransport) SpawnChild

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

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

func (*HushTransport) Start

func (_m *HushTransport) Start() error

Start provides a mock function with given fields:

func (*HushTransport) State

func (_m *HushTransport) 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