mocks

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2022 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BinaryChecker

type BinaryChecker struct {
	mock.Mock
}

BinaryChecker is an autogenerated mock type for the BinaryChecker type

func (*BinaryChecker) ExistsWithLatestVersion

func (_m *BinaryChecker) ExistsWithLatestVersion(name string, binaryPrefix string) (bool, string, error)

ExistsWithLatestVersion provides a mock function with given fields: name, binaryPrefix

type Client

type Client struct {
	mock.Mock
}

Client is an autogenerated mock type for the Client type

func (*Client) AddNode

func (_m *Client) AddNode(ctx context.Context, name string, execPath string, opts ...client.OpOption) (*rpcpb.AddNodeResponse, error)

AddNode provides a mock function with given fields: ctx, name, execPath, opts

func (*Client) AttachPeer

func (_m *Client) AttachPeer(ctx context.Context, nodeName string) (*rpcpb.AttachPeerResponse, error)

AttachPeer provides a mock function with given fields: ctx, nodeName

func (*Client) Close

func (_m *Client) Close() error

Close provides a mock function with given fields:

func (*Client) CreateBlockchains

func (_m *Client) CreateBlockchains(ctx context.Context, blockchainSpecs []*rpcpb.BlockchainSpec) (*rpcpb.CreateBlockchainsResponse, error)

CreateBlockchains provides a mock function with given fields: ctx, blockchainSpecs

func (*Client) CreateSubnets

func (_m *Client) CreateSubnets(ctx context.Context, opts ...client.OpOption) (*rpcpb.CreateSubnetsResponse, error)

CreateSubnets provides a mock function with given fields: ctx, opts

func (*Client) GetSnapshotNames

func (_m *Client) GetSnapshotNames(ctx context.Context) ([]string, error)

GetSnapshotNames provides a mock function with given fields: ctx

func (*Client) Health

func (_m *Client) Health(ctx context.Context) (*rpcpb.HealthResponse, error)

Health provides a mock function with given fields: ctx

func (*Client) LoadSnapshot

func (_m *Client) LoadSnapshot(ctx context.Context, snapshotName string, opts ...client.OpOption) (*rpcpb.LoadSnapshotResponse, error)

LoadSnapshot provides a mock function with given fields: ctx, snapshotName, opts

func (*Client) Ping

func (_m *Client) Ping(ctx context.Context) (*rpcpb.PingResponse, error)

Ping provides a mock function with given fields: ctx

func (*Client) RemoveNode

func (_m *Client) RemoveNode(ctx context.Context, name string) (*rpcpb.RemoveNodeResponse, error)

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

func (*Client) RemoveSnapshot

func (_m *Client) RemoveSnapshot(ctx context.Context, snapshotName string) (*rpcpb.RemoveSnapshotResponse, error)

RemoveSnapshot provides a mock function with given fields: ctx, snapshotName

func (*Client) RestartNode

func (_m *Client) RestartNode(ctx context.Context, name string, opts ...client.OpOption) (*rpcpb.RestartNodeResponse, error)

RestartNode provides a mock function with given fields: ctx, name, opts

func (*Client) SaveSnapshot

func (_m *Client) SaveSnapshot(ctx context.Context, snapshotName string) (*rpcpb.SaveSnapshotResponse, error)

SaveSnapshot provides a mock function with given fields: ctx, snapshotName

func (*Client) SendOutboundMessage

func (_m *Client) SendOutboundMessage(ctx context.Context, nodeName string, peerID string, op uint32, msgBody []byte) (*rpcpb.SendOutboundMessageResponse, error)

SendOutboundMessage provides a mock function with given fields: ctx, nodeName, peerID, op, msgBody

func (*Client) Start

func (_m *Client) Start(ctx context.Context, execPath string, opts ...client.OpOption) (*rpcpb.StartResponse, error)

Start provides a mock function with given fields: ctx, execPath, opts

func (*Client) Status

func (_m *Client) Status(ctx context.Context) (*rpcpb.StatusResponse, error)

Status provides a mock function with given fields: ctx

func (*Client) Stop

func (_m *Client) Stop(ctx context.Context) (*rpcpb.StopResponse, error)

Stop provides a mock function with given fields: ctx

func (*Client) StreamStatus

func (_m *Client) StreamStatus(ctx context.Context, pushInterval time.Duration) (<-chan *rpcpb.ClusterInfo, error)

StreamStatus provides a mock function with given fields: ctx, pushInterval

func (*Client) URIs

func (_m *Client) URIs(ctx context.Context) ([]string, error)

URIs provides a mock function with given fields: ctx

type PClient added in v0.2.1

type PClient struct {
	mock.Mock
}

PClient is an autogenerated mock type for the Client type

func (*PClient) AddDelegator added in v0.2.1

func (_m *PClient) AddDelegator(ctx context.Context, user api.UserPass, from []ids.ShortID, changeAddr ids.ShortID, rewardAddress ids.ShortID, nodeID ids.NodeID, stakeAmount uint64, startTime uint64, endTime uint64, options ...rpc.Option) (ids.ID, error)

AddDelegator provides a mock function with given fields: ctx, user, from, changeAddr, rewardAddress, nodeID, stakeAmount, startTime, endTime, options

func (*PClient) AddSubnetValidator added in v0.2.1

func (_m *PClient) AddSubnetValidator(ctx context.Context, user api.UserPass, from []ids.ShortID, changeAddr ids.ShortID, subnetID ids.ID, nodeID ids.NodeID, stakeAmount uint64, startTime uint64, endTime uint64, options ...rpc.Option) (ids.ID, error)

AddSubnetValidator provides a mock function with given fields: ctx, user, from, changeAddr, subnetID, nodeID, stakeAmount, startTime, endTime, options

func (*PClient) AddValidator added in v0.2.1

func (_m *PClient) AddValidator(ctx context.Context, user api.UserPass, from []ids.ShortID, changeAddr ids.ShortID, rewardAddress ids.ShortID, nodeID ids.NodeID, stakeAmount uint64, startTime uint64, endTime uint64, delegationFeeRate float32, options ...rpc.Option) (ids.ID, error)

AddValidator provides a mock function with given fields: ctx, user, from, changeAddr, rewardAddress, nodeID, stakeAmount, startTime, endTime, delegationFeeRate, options

func (*PClient) AwaitTxDecided added in v0.2.1

func (_m *PClient) AwaitTxDecided(ctx context.Context, txID ids.ID, freq time.Duration, options ...rpc.Option) (*platformvm.GetTxStatusResponse, error)

AwaitTxDecided provides a mock function with given fields: ctx, txID, freq, options

func (*PClient) CreateAddress added in v0.2.1

func (_m *PClient) CreateAddress(ctx context.Context, user api.UserPass, options ...rpc.Option) (ids.ShortID, error)

CreateAddress provides a mock function with given fields: ctx, user, options

func (*PClient) CreateBlockchain added in v0.2.1

func (_m *PClient) CreateBlockchain(ctx context.Context, user api.UserPass, from []ids.ShortID, changeAddr ids.ShortID, subnetID ids.ID, vmID string, fxIDs []string, name string, genesisData []byte, options ...rpc.Option) (ids.ID, error)

CreateBlockchain provides a mock function with given fields: ctx, user, from, changeAddr, subnetID, vmID, fxIDs, name, genesisData, options

func (*PClient) CreateSubnet added in v0.2.1

func (_m *PClient) CreateSubnet(ctx context.Context, user api.UserPass, from []ids.ShortID, changeAddr ids.ShortID, controlKeys []ids.ShortID, threshold uint32, options ...rpc.Option) (ids.ID, error)

CreateSubnet provides a mock function with given fields: ctx, user, from, changeAddr, controlKeys, threshold, options

func (*PClient) ExportAVAX added in v0.2.1

func (_m *PClient) ExportAVAX(ctx context.Context, user api.UserPass, from []ids.ShortID, changeAddr ids.ShortID, to ids.ShortID, toChainIDAlias string, amount uint64, options ...rpc.Option) (ids.ID, error)

ExportAVAX provides a mock function with given fields: ctx, user, from, changeAddr, to, toChainIDAlias, amount, options

func (*PClient) ExportKey added in v0.2.1

func (_m *PClient) ExportKey(ctx context.Context, user api.UserPass, address ids.ShortID, options ...rpc.Option) (*crypto.PrivateKeySECP256K1R, error)

ExportKey provides a mock function with given fields: ctx, user, address, options

func (*PClient) GetAtomicUTXOs added in v0.2.1

func (_m *PClient) GetAtomicUTXOs(ctx context.Context, addrs []ids.ShortID, sourceChain string, limit uint32, startAddress ids.ShortID, startUTXOID ids.ID, options ...rpc.Option) ([][]byte, ids.ShortID, ids.ID, error)

GetAtomicUTXOs provides a mock function with given fields: ctx, addrs, sourceChain, limit, startAddress, startUTXOID, options

func (*PClient) GetBalance added in v0.2.1

func (_m *PClient) GetBalance(ctx context.Context, addrs []ids.ShortID, options ...rpc.Option) (*platformvm.GetBalanceResponse, error)

GetBalance provides a mock function with given fields: ctx, addrs, options

func (*PClient) GetBlock added in v0.2.1

func (_m *PClient) GetBlock(ctx context.Context, blockID ids.ID, options ...rpc.Option) ([]byte, error)

GetBlock provides a mock function with given fields: ctx, blockID, options

func (*PClient) GetBlockchainStatus added in v0.2.1

func (_m *PClient) GetBlockchainStatus(ctx context.Context, blockchainID string, options ...rpc.Option) (status.BlockchainStatus, error)

GetBlockchainStatus provides a mock function with given fields: ctx, blockchainID, options

func (*PClient) GetBlockchains added in v0.2.1

func (_m *PClient) GetBlockchains(ctx context.Context, options ...rpc.Option) ([]platformvm.APIBlockchain, error)

GetBlockchains provides a mock function with given fields: ctx, options

func (*PClient) GetCurrentSupply added in v0.2.1

func (_m *PClient) GetCurrentSupply(ctx context.Context, options ...rpc.Option) (uint64, error)

GetCurrentSupply provides a mock function with given fields: ctx, options

func (*PClient) GetCurrentValidators added in v0.2.1

func (_m *PClient) GetCurrentValidators(ctx context.Context, subnetID ids.ID, nodeIDs []ids.NodeID, options ...rpc.Option) ([]platformvm.ClientPrimaryValidator, error)

GetCurrentValidators provides a mock function with given fields: ctx, subnetID, nodeIDs, options

func (*PClient) GetHeight added in v0.2.1

func (_m *PClient) GetHeight(ctx context.Context, options ...rpc.Option) (uint64, error)

GetHeight provides a mock function with given fields: ctx, options

func (*PClient) GetMaxStakeAmount added in v0.2.1

func (_m *PClient) GetMaxStakeAmount(ctx context.Context, subnetID ids.ID, nodeID ids.NodeID, startTime uint64, endTime uint64, options ...rpc.Option) (uint64, error)

GetMaxStakeAmount provides a mock function with given fields: ctx, subnetID, nodeID, startTime, endTime, options

func (*PClient) GetMinStake added in v0.2.1

func (_m *PClient) GetMinStake(ctx context.Context, options ...rpc.Option) (uint64, uint64, error)

GetMinStake provides a mock function with given fields: ctx, options

func (*PClient) GetPendingValidators added in v0.2.1

func (_m *PClient) GetPendingValidators(ctx context.Context, subnetID ids.ID, nodeIDs []ids.NodeID, options ...rpc.Option) ([]interface{}, []interface{}, error)

GetPendingValidators provides a mock function with given fields: ctx, subnetID, nodeIDs, options

func (*PClient) GetRewardUTXOs added in v0.2.1

func (_m *PClient) GetRewardUTXOs(_a0 context.Context, _a1 *api.GetTxArgs, _a2 ...rpc.Option) ([][]byte, error)

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

func (*PClient) GetStake added in v0.2.1

func (_m *PClient) GetStake(ctx context.Context, addrs []ids.ShortID, options ...rpc.Option) (uint64, [][]byte, error)

GetStake provides a mock function with given fields: ctx, addrs, options

func (*PClient) GetStakingAssetID added in v0.2.1

func (_m *PClient) GetStakingAssetID(_a0 context.Context, _a1 ids.ID, _a2 ...rpc.Option) (ids.ID, error)

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

func (*PClient) GetSubnets added in v0.2.1

func (_m *PClient) GetSubnets(_a0 context.Context, _a1 []ids.ID, _a2 ...rpc.Option) ([]platformvm.ClientSubnet, error)

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

func (*PClient) GetTimestamp added in v0.2.1

func (_m *PClient) GetTimestamp(ctx context.Context, options ...rpc.Option) (time.Time, error)

GetTimestamp provides a mock function with given fields: ctx, options

func (*PClient) GetTotalStake added in v0.2.1

func (_m *PClient) GetTotalStake(ctx context.Context, subnetID ids.ID, options ...rpc.Option) (uint64, error)

GetTotalStake provides a mock function with given fields: ctx, subnetID, options

func (*PClient) GetTx added in v0.2.1

func (_m *PClient) GetTx(ctx context.Context, txID ids.ID, options ...rpc.Option) ([]byte, error)

GetTx provides a mock function with given fields: ctx, txID, options

func (*PClient) GetTxStatus added in v0.2.1

func (_m *PClient) GetTxStatus(ctx context.Context, txID ids.ID, options ...rpc.Option) (*platformvm.GetTxStatusResponse, error)

GetTxStatus provides a mock function with given fields: ctx, txID, options

func (*PClient) GetUTXOs added in v0.2.1

func (_m *PClient) GetUTXOs(ctx context.Context, addrs []ids.ShortID, limit uint32, startAddress ids.ShortID, startUTXOID ids.ID, options ...rpc.Option) ([][]byte, ids.ShortID, ids.ID, error)

GetUTXOs provides a mock function with given fields: ctx, addrs, limit, startAddress, startUTXOID, options

func (*PClient) GetValidatorsAt added in v0.2.1

func (_m *PClient) GetValidatorsAt(ctx context.Context, subnetID ids.ID, height uint64, options ...rpc.Option) (map[ids.NodeID]uint64, error)

GetValidatorsAt provides a mock function with given fields: ctx, subnetID, height, options

func (*PClient) ImportAVAX added in v0.2.1

func (_m *PClient) ImportAVAX(ctx context.Context, user api.UserPass, from []ids.ShortID, changeAddr ids.ShortID, to ids.ShortID, sourceChain string, options ...rpc.Option) (ids.ID, error)

ImportAVAX provides a mock function with given fields: ctx, user, from, changeAddr, to, sourceChain, options

func (*PClient) ImportKey added in v0.2.1

func (_m *PClient) ImportKey(ctx context.Context, user api.UserPass, privateKey *crypto.PrivateKeySECP256K1R, options ...rpc.Option) (ids.ShortID, error)

ImportKey provides a mock function with given fields: ctx, user, privateKey, options

func (*PClient) IssueTx added in v0.2.1

func (_m *PClient) IssueTx(ctx context.Context, tx []byte, options ...rpc.Option) (ids.ID, error)

IssueTx provides a mock function with given fields: ctx, tx, options

func (*PClient) ListAddresses added in v0.2.1

func (_m *PClient) ListAddresses(ctx context.Context, user api.UserPass, options ...rpc.Option) ([]ids.ShortID, error)

ListAddresses provides a mock function with given fields: ctx, user, options

func (*PClient) SampleValidators added in v0.2.1

func (_m *PClient) SampleValidators(ctx context.Context, subnetID ids.ID, sampleSize uint16, options ...rpc.Option) ([]ids.NodeID, error)

SampleValidators provides a mock function with given fields: ctx, subnetID, sampleSize, options

func (*PClient) ValidatedBy added in v0.2.1

func (_m *PClient) ValidatedBy(ctx context.Context, blockchainID ids.ID, options ...rpc.Option) (ids.ID, error)

ValidatedBy provides a mock function with given fields: ctx, blockchainID, options

func (*PClient) Validates added in v0.2.1

func (_m *PClient) Validates(ctx context.Context, subnetID ids.ID, options ...rpc.Option) ([]ids.ID, error)

Validates provides a mock function with given fields: ctx, subnetID, options

type PluginBinaryDownloader

type PluginBinaryDownloader struct {
	mock.Mock
}

PluginBinaryDownloader is an autogenerated mock type for the PluginBinaryDownloader type

func (*PluginBinaryDownloader) Download

func (_m *PluginBinaryDownloader) Download(vmIDs map[string]string, pluginDir string, binDir string) error

Download provides a mock function with given fields: vmIDs, pluginDir, binDir

func (*PluginBinaryDownloader) DownloadVM added in v0.2.0

func (_m *PluginBinaryDownloader) DownloadVM(vmName string, vmID string, pluginDir string, binDir string) error

DownloadVM provides a mock function with given fields: vmName, vmID, pluginDir, binDir

type ProcessChecker

type ProcessChecker struct {
	mock.Mock
}

ProcessChecker is an autogenerated mock type for the ProcessChecker type

func (*ProcessChecker) IsServerProcessRunning

func (_m *ProcessChecker) IsServerProcessRunning(app *application.Avalanche) (bool, error)

IsServerProcessRunning provides a mock function with given fields: app

type Prompter added in v0.2.0

type Prompter struct {
	mock.Mock
}

Prompter is an autogenerated mock type for the Prompter type

func (*Prompter) CaptureAddress added in v0.2.0

func (_m *Prompter) CaptureAddress(promptStr string) (common.Address, error)

CaptureAddress provides a mock function with given fields: promptStr

func (*Prompter) CaptureDate added in v0.2.0

func (_m *Prompter) CaptureDate(promptStr string) (time.Time, error)

CaptureDate provides a mock function with given fields: promptStr

func (*Prompter) CaptureDuration added in v0.2.0

func (_m *Prompter) CaptureDuration(promptStr string) (time.Duration, error)

CaptureDuration provides a mock function with given fields: promptStr

func (*Prompter) CaptureExistingFilepath added in v0.2.0

func (_m *Prompter) CaptureExistingFilepath(promptStr string) (string, error)

CaptureExistingFilepath provides a mock function with given fields: promptStr

func (*Prompter) CaptureIndex added in v0.2.0

func (_m *Prompter) CaptureIndex(promptStr string, options []common.Address) (int, error)

CaptureIndex provides a mock function with given fields: promptStr, options

func (*Prompter) CaptureList added in v0.2.0

func (_m *Prompter) CaptureList(promptStr string, options []string) (string, error)

CaptureList provides a mock function with given fields: promptStr, options

func (*Prompter) CaptureNoYes added in v0.2.0

func (_m *Prompter) CaptureNoYes(promptStr string) (bool, error)

CaptureNoYes provides a mock function with given fields: promptStr

func (*Prompter) CaptureNodeID added in v0.2.0

func (_m *Prompter) CaptureNodeID(promptStr string) (ids.NodeID, error)

CaptureNodeID provides a mock function with given fields: promptStr

func (*Prompter) CapturePChainAddress added in v0.2.0

func (_m *Prompter) CapturePChainAddress(promptStr string, network models.Network) (string, error)

CapturePChainAddress provides a mock function with given fields: promptStr, network

func (*Prompter) CapturePositiveBigInt added in v0.2.0

func (_m *Prompter) CapturePositiveBigInt(promptStr string) (*big.Int, error)

CapturePositiveBigInt provides a mock function with given fields: promptStr

func (*Prompter) CaptureString added in v0.2.0

func (_m *Prompter) CaptureString(promptStr string) (string, error)

CaptureString provides a mock function with given fields: promptStr

func (*Prompter) CaptureUint64 added in v0.2.0

func (_m *Prompter) CaptureUint64(promptStr string) (uint64, error)

CaptureUint64 provides a mock function with given fields: promptStr

func (*Prompter) CaptureWeight added in v0.2.0

func (_m *Prompter) CaptureWeight(promptStr string) (uint64, error)

CaptureWeight provides a mock function with given fields: promptStr

func (*Prompter) CaptureYesNo added in v0.2.0

func (_m *Prompter) CaptureYesNo(promptStr string) (bool, error)

CaptureYesNo provides a mock function with given fields: promptStr

Jump to

Keyboard shortcuts

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