mocks

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2021 License: Apache-2.0 Imports: 13 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, perun.APIError)

Close provides a mock function with given fields: _a0

func (*ChAPI) Currency added in v0.4.0

func (_m *ChAPI) Currency(symbol string) (int, perun.Currency, bool)

Currency provides a mock function with given fields: symbol

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, perun.APIError)

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, perun.APIError)

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) perun.APIError

SubChUpdates provides a mock function with given fields: _a0

func (*ChAPI) UnsubChUpdates added in v0.4.0

func (_m *ChAPI) UnsubChUpdates() perun.APIError

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) (session.PChannel, 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(session.PChannel))

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) (session.PChannel, error)

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

func (*ChClient) Register added in v0.4.0

func (_m *ChClient) Register(offChainAddr wire.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(databaseDir string, timeout time.Duration, handler func(session.PChannel)) error

RestoreChs provides a mock function with given fields: databaseDir, timeout, handler

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 ChannelProposal added in v0.5.0

type ChannelProposal struct {
	mock.Mock
}

ChannelProposal is an autogenerated mock type for the ChannelProposal type

func (*ChannelProposal) Base added in v0.6.0

Base provides a mock function with given fields:

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) Matches added in v0.6.0

Matches provides a mock function with given fields: _a0

func (*ChannelProposal) ProposalID added in v0.6.0

func (_m *ChannelProposal) ProposalID() [32]byte

ProposalID 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:

func (*ChannelProposal) Valid added in v0.6.0

func (_m *ChannelProposal) Valid() error

Valid 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 wire.Address) (net.Conn, error)

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

func (*Dialer) Register

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

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

type PChannel added in v0.6.0

type PChannel struct {
	mock.Mock
}

PChannel is an autogenerated mock type for the PChannel type

func (*PChannel) Close added in v0.6.0

func (_m *PChannel) Close() error

Close provides a mock function with given fields:

func (*PChannel) ID added in v0.6.0

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

ID provides a mock function with given fields:

func (*PChannel) Idx added in v0.6.0

func (_m *PChannel) Idx() channel.Index

Idx provides a mock function with given fields:

func (*PChannel) IsClosed added in v0.6.0

func (_m *PChannel) IsClosed() bool

IsClosed provides a mock function with given fields:

func (*PChannel) OnUpdate added in v0.6.0

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

OnUpdate provides a mock function with given fields: cb

func (*PChannel) Params added in v0.6.0

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

Params provides a mock function with given fields:

func (*PChannel) Peers added in v0.6.0

func (_m *PChannel) Peers() []wire.Address

Peers provides a mock function with given fields:

func (*PChannel) Phase added in v0.6.0

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

Phase provides a mock function with given fields:

func (*PChannel) Settle added in v0.6.0

func (_m *PChannel) Settle(ctx context.Context, isSecondary bool) error

Settle provides a mock function with given fields: ctx, isSecondary

func (*PChannel) State added in v0.6.0

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

State provides a mock function with given fields:

func (*PChannel) UpdateBy added in v0.6.0

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

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

func (*PChannel) Watch added in v0.6.0

Watch provides a mock function with given fields: _a0

type ROContractRegistry added in v0.6.0

type ROContractRegistry struct {
	mock.Mock
}

ROContractRegistry is an autogenerated mock type for the ROContractRegistry type

func (*ROContractRegistry) Adjudicator added in v0.6.0

func (_m *ROContractRegistry) Adjudicator() wallet.Address

Adjudicator provides a mock function with given fields:

func (*ROContractRegistry) Asset added in v0.6.0

func (_m *ROContractRegistry) Asset(symbol string) (wallet.Address, bool)

Asset provides a mock function with given fields: symbol

func (*ROContractRegistry) AssetETH added in v0.6.0

func (_m *ROContractRegistry) AssetETH() wallet.Address

AssetETH provides a mock function with given fields:

func (*ROContractRegistry) Assets added in v0.6.0

func (_m *ROContractRegistry) Assets() map[string]string

Assets provides a mock function with given fields:

func (*ROContractRegistry) Symbol added in v0.6.0

func (_m *ROContractRegistry) Symbol(asset wallet.Address) (string, bool)

Symbol provides a mock function with given fields: asset

func (*ROContractRegistry) Token added in v0.6.0

func (_m *ROContractRegistry) Token(symbol string) (wallet.Address, bool)

Token provides a mock function with given fields: symbol

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 wire.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) perun.APIError

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, perun.APIError)

Close provides a mock function with given fields: force

func (*SessionAPI) DeployAssetERC20 added in v0.6.0

func (_m *SessionAPI) DeployAssetERC20(tokenERC20 string) (string, perun.APIError)

DeployAssetERC20 provides a mock function with given fields: tokenERC20

func (*SessionAPI) GetCh

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

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, perun.APIError)

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, perun.APIError)

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, perun.APIError)

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

func (*SessionAPI) SubChProposals

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

SubChProposals provides a mock function with given fields: _a0

func (*SessionAPI) UnsubChProposals

func (_m *SessionAPI) UnsubChProposals() perun.APIError

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 wire.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