common

package
v0.0.0-...-7f57805 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: Apache-2.0 Imports: 6 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsByteArgs

func AsByteArgs(strArgs []string) [][]byte

AsByteArgs converts the given string array into an array of byte arrays so that they may be passed as chaincode arguments.

func GetChaincodePolicy

func GetChaincodePolicy(policyString string) (*common.SignaturePolicyEnvelope, error)

GetChaincodePolicy returns the signature policy from the given policy string

func GetCollectionConfigFromFile

func GetCollectionConfigFromFile(path string) ([]*pb.CollectionConfig, error)

GetCollectionConfigFromFile returns the collection config from the given file

func GetCollectionsConfigFromBytes

func GetCollectionsConfigFromBytes(bytes []byte) ([]*pb.CollectionConfig, error)

GetCollectionsConfigFromBytes returns the collection config from the given byte array

Types

type CollectionConfigJSON

type CollectionConfigJSON struct {
	Name            string `json:"name"`
	Policy          string `json:"policy"`
	RequiredCount   int32  `json:"requiredPeerCount"`
	MaxPeerCount    int32  `json:"maxPeerCount"`
	BlockToLive     uint64 `json:"blockToLive"`
	MemberOnlyRead  bool   `json:"memberOnlyRead"`
	MemberOnlyWrite bool   `json:"memberOnlyWrite"`
}

CollectionConfigJSON contains the parameters for a collection configuration

Jump to

Keyboard shortcuts

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