cmn

package
v0.0.0-...-5b4ad39 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrUserIDNotEtalon         = "user id not equals to etalon"
	ErrAddressNotEtalon        = "address not equals to etalon"
	ErrCannotUnmarshalResponse = "cannot unmarshal acl response"
)

Variables

View Source
var (
	TestAccountNotListed = &pb.AccountInfo{
		KycHash:     "test",
		GrayListed:  false,
		BlackListed: false,
	}

	TestAccountGraylisted = &pb.AccountInfo{
		KycHash:     "test",
		GrayListed:  true,
		BlackListed: false,
	}

	TestAccountBlacklisted = &pb.AccountInfo{
		KycHash:     "test",
		GrayListed:  false,
		BlackListed: true,
	}

	TestAccountBothLists = &pb.AccountInfo{
		KycHash:     "test",
		GrayListed:  true,
		BlackListed: true,
	}

	TestHaveRight   = &pb.HaveRight{HaveRight: true}
	TestHaveNoRight = &pb.HaveRight{HaveRight: false}
)

Functions

func CheckAccountInfo

func CheckAccountInfo(etalon *pb.AccountInfo) func([]byte) string

func CheckAddress

func CheckAddress(etalon *mocks.UserFoundation) func([]byte) string

func CheckAddressGraylisted

func CheckAddressGraylisted(message string) func([]byte) string

func CheckAddressRightForNominee

func CheckAddressRightForNominee(haveRight bool) func(b []byte) string

func CheckAddresses

func CheckAddresses(users ...*mocks.UserFoundation) func([]byte) string

func CheckGetAccountAllRights

func CheckGetAccountAllRights(accountRights []*pb.Right, user *mocks.UserFoundation) func([]byte) string

func CheckGetAccountOperationRight

func CheckGetAccountOperationRight(etalon *pb.HaveRight) func([]byte) string

func CheckGetAddressesListForNominee

func CheckGetAddressesListForNominee(addresses []string) func([]byte) string

func CheckGetOperationAllRights

func CheckGetOperationAllRights(etalon *pb.OperationRights, user *mocks.UserFoundation) func([]byte) string

func CheckKeys

func CheckKeys(account *pb.AccountInfo, user *mocks.UserFoundation) func([]byte) string

func CheckRights

func CheckRights(etalonRightsSet []*pb.Right, aclRightsSet []*pb.Right, user *mocks.UserFoundation) string

func DeployACLWithError

func DeployACLWithError(
	network *nwo.Network,
	components *nwo.Components,
	testDir string,
	aclCfg *aclpb.ACLConfig,
	errorMsg string,
)

func DeployChaincodeFoundationWithError

func DeployChaincodeFoundationWithError(
	network *nwo.Network,
	channel string,
	components *nwo.Components,
	path string,
	ctor string,
	testDir string,
	errorMsg string,
)

func DeployChaincodeWithError

func DeployChaincodeWithError(n *nwo.Network, channel string, orderer *nwo.Orderer, chaincode nwo.Chaincode, peers []*nwo.Peer, errorMsg string)

DeployChaincodeWithError is a helper that will install chaincode to all peers that are connected to the specified channel, approve the chaincode on one of the peers of each organization in the network, commit the chaincode definition on the channel using one of the peers, and wait for the chaincode commit to complete on all the peers. It uses the _lifecycle implementation. NOTE V2_0 capabilities must be enabled for this functionality to work.

func InitChaincodeWithError

func InitChaincodeWithError(n *nwo.Network, channel string, orderer *nwo.Orderer, chaincode nwo.Chaincode, peers []*nwo.Peer, errorMsg string)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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