Documentation ¶
Index ¶
- type HushPeerConn
- func (_m *HushPeerConn) AddStateURI(stateURI string)
- func (_m *HushPeerConn) Addresses() types.Set[types.Address]
- func (_m *HushPeerConn) Close() error
- func (_m *HushPeerConn) DeviceUniqueID() string
- func (_m *HushPeerConn) DialInfo() swarm.PeerDialInfo
- func (_m *HushPeerConn) Dialable() bool
- func (_m *HushPeerConn) Endpoint(dialInfo swarm.PeerDialInfo) (swarm.PeerEndpoint, bool)
- func (_m *HushPeerConn) Endpoints() map[swarm.PeerDialInfo]swarm.PeerEndpoint
- func (_m *HushPeerConn) EnsureConnected(ctx context.Context) error
- func (_m *HushPeerConn) Failures() uint64
- func (_m *HushPeerConn) LastContact() time.Time
- func (_m *HushPeerConn) LastFailure() time.Time
- func (_m *HushPeerConn) ProposeIndividualSession(ctx context.Context, encryptedProposal []byte) error
- func (_m *HushPeerConn) PublicKeys(addr types.Address) (*crypto.SigningPublicKey, *crypto.AsymEncPubkey)
- func (_m *HushPeerConn) Ready() bool
- func (_m *HushPeerConn) RemainingBackoff() time.Duration
- func (_m *HushPeerConn) RemoveStateURI(stateURI string)
- func (_m *HushPeerConn) RespondToIndividualSession(ctx context.Context, approval pb.IndividualSessionResponse) error
- func (_m *HushPeerConn) SendDHPubkeyAttestations(ctx context.Context, attestations []pb.DHPubkeyAttestation) error
- func (_m *HushPeerConn) SendHushGroupMessage(ctx context.Context, msg pb.GroupMessage) error
- func (_m *HushPeerConn) SendHushIndividualMessage(ctx context.Context, msg pb.IndividualMessage) error
- func (_m *HushPeerConn) SetDeviceUniqueID(id string)
- func (_m *HushPeerConn) StateURIs() types.Set[string]
- func (_m *HushPeerConn) Transport() swarm.Transport
- func (_m *HushPeerConn) UpdateConnStats(success bool)
- type HushProtocol
- func (_m *HushProtocol) Autoclose()
- func (_m *HushProtocol) AutocloseWithCleanup(closeFn func())
- func (_m *HushProtocol) Close() error
- func (_m *HushProtocol) Ctx() context.Context
- func (_m *HushProtocol) DecryptGroupMessage(msg pb.GroupMessage) error
- func (_m *HushProtocol) Done() <-chan struct{}
- func (_m *HushProtocol) EncryptGroupMessage(sessionType string, messageID string, recipients []types.Address, ...) error
- func (_m *HushProtocol) EncryptIndividualMessage(sessionType string, recipient types.Address, plaintext []byte) error
- func (_m *HushProtocol) EnsureIndividualSession(ctx context.Context, sessionType string, recipient types.Address) (pb.IndividualSessionProposal, bool, error)
- func (_m *HushProtocol) Go(ctx context.Context, name string, fn func(context.Context)) <-chan struct{}
- func (_m *HushProtocol) Name() string
- func (_m *HushProtocol) NewChild(ctx context.Context, name string) *process.Process
- func (_m *HushProtocol) OnGroupMessageDecrypted(sessionType string, handler protohush.GroupMessageDecryptedCallback)
- func (_m *HushProtocol) OnGroupMessageEncrypted(sessionType string, handler protohush.GroupMessageEncryptedCallback)
- func (_m *HushProtocol) OnIndividualMessageDecrypted(sessionType string, handler protohush.IndividualMessageDecryptedCallback)
- func (_m *HushProtocol) ProcessTree() map[string]interface{}
- func (_m *HushProtocol) ProposeIndividualSession(ctx context.Context, sessionType string, recipient types.Address, epoch uint64) (pb.IndividualSessionProposal, error)
- func (_m *HushProtocol) ProposeNextIndividualSession(ctx context.Context, sessionType string, recipient types.Address) (pb.IndividualSessionProposal, error)
- func (_m *HushProtocol) SpawnChild(ctx context.Context, child process.Spawnable) error
- func (_m *HushProtocol) Start() error
- func (_m *HushProtocol) State() process.State
- type HushTransport
- func (_m *HushTransport) Autoclose()
- func (_m *HushTransport) AutocloseWithCleanup(closeFn func())
- func (_m *HushTransport) Close() error
- func (_m *HushTransport) Ctx() context.Context
- func (_m *HushTransport) Done() <-chan struct{}
- func (_m *HushTransport) Go(ctx context.Context, name string, fn func(context.Context)) <-chan struct{}
- func (_m *HushTransport) Name() string
- func (_m *HushTransport) NewChild(ctx context.Context, name string) *process.Process
- func (_m *HushTransport) NewPeerConn(ctx context.Context, dialAddr string) (swarm.PeerConn, error)
- func (_m *HushTransport) OnIncomingDHPubkeyAttestations(handler protohush.IncomingDHPubkeyAttestationsCallback)
- func (_m *HushTransport) OnIncomingGroupMessage(handler protohush.IncomingGroupMessageCallback)
- func (_m *HushTransport) OnIncomingIndividualMessage(handler protohush.IncomingIndividualMessageCallback)
- func (_m *HushTransport) OnIncomingIndividualSessionProposal(handler protohush.IncomingIndividualSessionProposalCallback)
- func (_m *HushTransport) OnIncomingIndividualSessionResponse(handler protohush.IncomingIndividualSessionResponseCallback)
- func (_m *HushTransport) ProcessTree() map[string]interface{}
- func (_m *HushTransport) SpawnChild(ctx context.Context, child process.Spawnable) error
- func (_m *HushTransport) Start() error
- func (_m *HushTransport) State() process.State
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HushPeerConn ¶
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 ¶
func (_m *HushPeerConn) PublicKeys(addr types.Address) (*crypto.SigningPublicKey, *crypto.AsymEncPubkey)
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 ¶
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) 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 ¶
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 ¶
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) NewPeerConn ¶
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 ¶
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: