mocks

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChAPI added in v0.4.0

type ChAPI struct {
	mock.Mock
}

ChAPI is an autogenerated mock type for the ChAPI type

func (*ChAPI) ChallengeDurSecs added in v0.4.0

func (_m *ChAPI) ChallengeDurSecs() uint64

ChallengeDurSecs provides a mock function with given fields:

func (*ChAPI) Close added in v0.4.0

func (_m *ChAPI) Close(_a0 context.Context) (perun.ChInfo, error)

Close provides a mock function with given fields: _a0

func (*ChAPI) Currency added in v0.4.0

func (_m *ChAPI) Currency() string

Currency provides a mock function with given fields:

func (*ChAPI) GetChInfo added in v0.4.0

func (_m *ChAPI) GetChInfo() perun.ChInfo

GetChInfo provides a mock function with given fields:

func (*ChAPI) ID added in v0.4.0

func (_m *ChAPI) ID() string

ID provides a mock function with given fields:

func (*ChAPI) Parts added in v0.4.0

func (_m *ChAPI) Parts() []string

Parts provides a mock function with given fields:

func (*ChAPI) RespondChUpdate added in v0.4.0

func (_m *ChAPI) RespondChUpdate(_a0 context.Context, _a1 string, _a2 bool) (perun.ChInfo, error)

RespondChUpdate provides a mock function with given fields: _a0, _a1, _a2

func (*ChAPI) SendChUpdate added in v0.4.0

func (_m *ChAPI) SendChUpdate(_a0 context.Context, _a1 perun.StateUpdater) (perun.ChInfo, error)

SendChUpdate provides a mock function with given fields: _a0, _a1

func (*ChAPI) SubChUpdates added in v0.4.0

func (_m *ChAPI) SubChUpdates(_a0 perun.ChUpdateNotifier) error

SubChUpdates provides a mock function with given fields: _a0

func (*ChAPI) UnsubChUpdates added in v0.4.0

func (_m *ChAPI) UnsubChUpdates() error

UnsubChUpdates provides a mock function with given fields:

type ChClient added in v0.4.0

type ChClient struct {
	mock.Mock
}

ChClient is an autogenerated mock type for the ChClient type

func (*ChClient) Channel added in v0.4.0

func (_m *ChClient) Channel(_a0 [32]byte) (perun.Channel, error)

Channel provides a mock function with given fields: _a0

func (*ChClient) Close added in v0.4.0

func (_m *ChClient) Close() error

Close provides a mock function with given fields:

func (*ChClient) EnablePersistence added in v0.4.0

func (_m *ChClient) EnablePersistence(_a0 persistence.PersistRestorer)

EnablePersistence provides a mock function with given fields: _a0

func (*ChClient) Handle added in v0.4.0

func (_m *ChClient) Handle(_a0 client.ProposalHandler, _a1 client.UpdateHandler)

Handle provides a mock function with given fields: _a0, _a1

func (*ChClient) Log added in v0.4.0

func (_m *ChClient) Log() log.Logger

Log provides a mock function with given fields:

func (*ChClient) OnNewChannel added in v0.4.0

func (_m *ChClient) OnNewChannel(handler func(perun.Channel))

OnNewChannel provides a mock function with given fields: handler

func (*ChClient) ProposeChannel added in v0.4.0

func (_m *ChClient) ProposeChannel(_a0 context.Context, _a1 client.ChannelProposal) (perun.Channel, error)

ProposeChannel provides a mock function with given fields: _a0, _a1

func (*ChClient) Register added in v0.4.0

func (_m *ChClient) Register(offChainAddr wallet.Address, commAddr string)

Register provides a mock function with given fields: offChainAddr, commAddr

func (*ChClient) Restore added in v0.4.0

func (_m *ChClient) Restore(_a0 context.Context) error

Restore provides a mock function with given fields: _a0

func (*ChClient) RestoreChs added in v0.4.0

func (_m *ChClient) RestoreChs(_a0 func(perun.Channel)) error

RestoreChs provides a mock function with given fields: _a0

type ChProposalResponder added in v0.5.0

type ChProposalResponder struct {
	mock.Mock
}

ChProposalResponder is an autogenerated mock type for the ChProposalResponder type

func (*ChProposalResponder) Accept added in v0.5.0

Accept provides a mock function with given fields: _a0, _a1

func (*ChProposalResponder) Reject added in v0.5.0

func (_m *ChProposalResponder) Reject(ctx context.Context, reason string) error

Reject provides a mock function with given fields: ctx, reason

type ChUpdateResponder added in v0.5.0

type ChUpdateResponder struct {
	mock.Mock
}

ChUpdateResponder is an autogenerated mock type for the ChUpdateResponder type

func (*ChUpdateResponder) Accept added in v0.5.0

func (_m *ChUpdateResponder) Accept(ctx context.Context) error

Accept provides a mock function with given fields: ctx

func (*ChUpdateResponder) Reject added in v0.5.0

func (_m *ChUpdateResponder) Reject(ctx context.Context, reason string) error

Reject provides a mock function with given fields: ctx, reason

type Channel added in v0.5.0

type Channel struct {
	mock.Mock
}

Channel is an autogenerated mock type for the Channel type

func (*Channel) Close added in v0.5.0

func (_m *Channel) Close() error

Close provides a mock function with given fields:

func (*Channel) ID added in v0.5.0

func (_m *Channel) ID() [32]byte

ID provides a mock function with given fields:

func (*Channel) Idx added in v0.5.0

func (_m *Channel) Idx() uint16

Idx provides a mock function with given fields:

func (*Channel) IsClosed added in v0.5.0

func (_m *Channel) IsClosed() bool

IsClosed provides a mock function with given fields:

func (*Channel) OnUpdate added in v0.5.0

func (_m *Channel) OnUpdate(cb func(*channel.State, *channel.State))

OnUpdate provides a mock function with given fields: cb

func (*Channel) Params added in v0.5.0

func (_m *Channel) Params() *channel.Params

Params provides a mock function with given fields:

func (*Channel) Peers added in v0.5.0

func (_m *Channel) Peers() []wallet.Address

Peers provides a mock function with given fields:

func (*Channel) Phase added in v0.5.0

func (_m *Channel) Phase() channel.Phase

Phase provides a mock function with given fields:

func (*Channel) Settle added in v0.5.0

func (_m *Channel) Settle(ctx context.Context) error

Settle provides a mock function with given fields: ctx

func (*Channel) SettleSecondary added in v0.5.0

func (_m *Channel) SettleSecondary(ctx context.Context) error

SettleSecondary provides a mock function with given fields: ctx

func (*Channel) State added in v0.5.0

func (_m *Channel) State() *channel.State

State provides a mock function with given fields:

func (*Channel) UpdateBy added in v0.5.0

func (_m *Channel) UpdateBy(ctx context.Context, update func(*channel.State)) error

UpdateBy provides a mock function with given fields: ctx, update

func (*Channel) Watch added in v0.5.0

func (_m *Channel) Watch() error

Watch provides a mock function with given fields:

type ChannelProposal added in v0.5.0

type ChannelProposal struct {
	mock.Mock
}

ChannelProposal is an autogenerated mock type for the ChannelProposal type

func (*ChannelProposal) Decode added in v0.5.0

func (_m *ChannelProposal) Decode(_a0 io.Reader) error

Decode provides a mock function with given fields: _a0

func (*ChannelProposal) Encode added in v0.5.0

func (_m *ChannelProposal) Encode(_a0 io.Writer) error

Encode provides a mock function with given fields: _a0

func (*ChannelProposal) Proposal added in v0.5.0

func (_m *ChannelProposal) Proposal() *client.BaseChannelProposal

Proposal provides a mock function with given fields:

func (*ChannelProposal) Type added in v0.5.0

func (_m *ChannelProposal) Type() wire.Type

Type provides a mock function with given fields:

type Closer added in v0.4.0

type Closer struct {
	mock.Mock
}

Closer is an autogenerated mock type for the Closer type

func (*Closer) Close added in v0.4.0

func (_m *Closer) Close() error

Close provides a mock function with given fields:

type CommBackend

type CommBackend struct {
	mock.Mock
}

CommBackend is an autogenerated mock type for the CommBackend type

func (*CommBackend) NewDialer

func (_m *CommBackend) NewDialer() perun.Dialer

NewDialer provides a mock function with given fields:

func (*CommBackend) NewListener

func (_m *CommBackend) NewListener(address string) (net.Listener, error)

NewListener provides a mock function with given fields: address

type Dialer

type Dialer struct {
	mock.Mock
}

Dialer is an autogenerated mock type for the Dialer type

func (*Dialer) Close

func (_m *Dialer) Close() error

Close provides a mock function with given fields:

func (*Dialer) Dial

func (_m *Dialer) Dial(ctx context.Context, addr wallet.Address) (net.Conn, error)

Dial provides a mock function with given fields: ctx, addr

func (*Dialer) Register

func (_m *Dialer) Register(offChainAddr wallet.Address, commAddr string)

Register provides a mock function with given fields: offChainAddr, commAddr

type Listener

type Listener struct {
	mock.Mock
}

Listener is an autogenerated mock type for the Listener type

func (*Listener) Accept

func (_m *Listener) Accept() (net.Conn, error)

Accept provides a mock function with given fields:

func (*Listener) Close

func (_m *Listener) Close() error

Close provides a mock function with given fields:

type Registerer

type Registerer struct {
	mock.Mock
}

Registerer is an autogenerated mock type for the Registerer type

func (*Registerer) Register

func (_m *Registerer) Register(offChainAddr wallet.Address, commAddr string)

Register provides a mock function with given fields: offChainAddr, commAddr

type SessionAPI

type SessionAPI struct {
	mock.Mock
}

SessionAPI is an autogenerated mock type for the SessionAPI type

func (*SessionAPI) AddPeerID added in v0.5.0

func (_m *SessionAPI) AddPeerID(_a0 perun.PeerID) error

AddPeerID provides a mock function with given fields: _a0

func (*SessionAPI) Close added in v0.4.0

func (_m *SessionAPI) Close(force bool) ([]perun.ChInfo, error)

Close provides a mock function with given fields: force

func (*SessionAPI) GetCh

func (_m *SessionAPI) GetCh(_a0 string) (perun.ChAPI, error)

GetCh provides a mock function with given fields: _a0

func (*SessionAPI) GetChsInfo added in v0.4.0

func (_m *SessionAPI) GetChsInfo() []perun.ChInfo

GetChsInfo provides a mock function with given fields:

func (*SessionAPI) GetPeerID added in v0.5.0

func (_m *SessionAPI) GetPeerID(alias string) (perun.PeerID, error)

GetPeerID provides a mock function with given fields: alias

func (*SessionAPI) ID

func (_m *SessionAPI) ID() string

ID provides a mock function with given fields:

func (*SessionAPI) OpenCh

func (_m *SessionAPI) OpenCh(_a0 context.Context, _a1 perun.BalInfo, _a2 perun.App, _a3 uint64) (perun.ChInfo, error)

OpenCh provides a mock function with given fields: _a0, _a1, _a2, _a3

func (*SessionAPI) RespondChProposal

func (_m *SessionAPI) RespondChProposal(_a0 context.Context, _a1 string, _a2 bool) (perun.ChInfo, error)

RespondChProposal provides a mock function with given fields: _a0, _a1, _a2

func (*SessionAPI) SubChProposals

func (_m *SessionAPI) SubChProposals(_a0 perun.ChProposalNotifier) error

SubChProposals provides a mock function with given fields: _a0

func (*SessionAPI) UnsubChProposals

func (_m *SessionAPI) UnsubChProposals() error

UnsubChProposals provides a mock function with given fields:

type WireBus

type WireBus struct {
	mock.Mock
}

WireBus is an autogenerated mock type for the WireBus type

func (*WireBus) Close

func (_m *WireBus) Close() error

Close provides a mock function with given fields:

func (*WireBus) Publish

func (_m *WireBus) Publish(_a0 context.Context, _a1 *wire.Envelope) error

Publish provides a mock function with given fields: _a0, _a1

func (*WireBus) SubscribeClient

func (_m *WireBus) SubscribeClient(c wire.Consumer, clientAddr wallet.Address) error

SubscribeClient provides a mock function with given fields: c, clientAddr

Jump to

Keyboard shortcuts

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