testutil

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2017 License: Apache-2.0, Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrivUserFromSecret

func PrivUserFromSecret(secret string) *types.PrivUser

PrivUserFromSecret generates a new PrivUser from a secret

func PrivUserWithLegalEntityFromSecret

func PrivUserWithLegalEntityFromSecret(secret string, e *types.LegalEntity, perms types.Perm) *types.PrivUser

PrivUserWithLegalEntityFromSecret generates a PrivUser from a secret and populate the inner User with LegalEntity's address and the given permissions.

func RandAccount

func RandAccount(e *types.LegalEntity) *types.Account

RandAccount generate an Account for a given LegalEntity if not nil.

func RandAccounts

func RandAccounts(num int, e *types.LegalEntity) []*types.Account

RandAccounts generates num random accounts for the given LegalEntity.

func RandCH

func RandCH() *types.LegalEntity

RandCH creates a new CH

func RandCustodian

func RandCustodian(creatorAddr []byte) *types.LegalEntity

RandCustodian creates a new Custodian

func RandEntity

func RandEntity(t byte, permissions types.Perm) *types.LegalEntity

RandEntity generates a LegalEntity

func RandGCM

func RandGCM(creatorAddr []byte) *types.LegalEntity

RandGCM creates a new GCM

func RandICM

func RandICM(creatorAddr []byte) *types.LegalEntity

RandICM creates a new ICM

func RandUsers

func RandUsers(num int) []*types.PrivUser

RandUsers generates num random PrivUsers

func RandUsersWithLegalEntity

func RandUsersWithLegalEntity(num int, e *types.LegalEntity, perms types.Perm) []*types.PrivUser

RandUsersWithLegalEntity generates num random PrivUsers and attach them a LegalEntity

func RandWallet

func RandWallet(currency types.Currency, minBalanceMul, maxBalanceMul int64) types.Wallet

RandWallet creates a new Wallet with a random Balance

func RandWallets

func RandWallets(num int, minBalanceMul, maxBalanceMul int64) []types.Wallet

RandWallets generates num random Wallets

Types

This section is empty.

Directories

Path Synopsis
mocks

Jump to

Keyboard shortcuts

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