testutil

package
v0.0.1-alpha1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAddress

func GetAddress(pubKey cryptotypes.PubKey) string

func NewBaseAccount

func NewBaseAccount(pubKey cryptotypes.PubKey, accountNumber, sequence uint64) *authtypes.BaseAccount

Types

type MockGrpcClient

type MockGrpcClient struct {
	// contains filtered or unexported fields
}

func NewMockGrpcClient

func NewMockGrpcClient(
	accounts []authtypes.AccountI,
	deals []datadealtypes.Deal,
	pools []datapooltypes.Pool,
	regOracles []oracletypes.Oracle,
	dpRedeemHistories []datapooltypes.DataPassRedeemHistory,
	dataCerts []datapooltypes.DataCert,
) MockGrpcClient

func (MockGrpcClient) Close

func (m MockGrpcClient) Close() error

func (MockGrpcClient) GetAccount

func (m MockGrpcClient) GetAccount(panaceaAddr string) (authtypes.AccountI, error)

func (MockGrpcClient) GetDataCerts

func (m MockGrpcClient) GetDataCerts(poolID, round uint64) ([]datapooltypes.DataCert, error)

func (MockGrpcClient) GetDataPassRedeemHistory

func (m MockGrpcClient) GetDataPassRedeemHistory(redeemer string, poolID uint64) (datapooltypes.DataPassRedeemHistory, error)

func (MockGrpcClient) GetDeal

func (m MockGrpcClient) GetDeal(id string) (datadealtypes.Deal, error)

func (MockGrpcClient) GetPool

func (m MockGrpcClient) GetPool(id string) (datapooltypes.Pool, error)

func (MockGrpcClient) GetPubKey

func (m MockGrpcClient) GetPubKey(panaceaAddr string) (types.PubKey, error)

func (MockGrpcClient) GetRegisteredOracle

func (m MockGrpcClient) GetRegisteredOracle(address string) (*oracletypes.Oracle, error)

type MockStore

type MockStore struct {
	// contains filtered or unexported fields
}

func NewMockStore

func NewMockStore() MockStore

func (MockStore) DownloadFile

func (m MockStore) DownloadFile(path, name string) ([]byte, error)

func (MockStore) MakeDownloadURL

func (m MockStore) MakeDownloadURL(path, name string) string

func (MockStore) MakeRandomFilename

func (m MockStore) MakeRandomFilename() string

func (MockStore) UploadFile

func (m MockStore) UploadFile(path, name string, data []byte) error

Jump to

Keyboard shortcuts

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