Documentation ¶
Index ¶
- Constants
- Variables
- func NewDefaultTopology() *topology.Topology
- func NewPlatformFactory() *platformFactory
- func NewTopology() *topology.Topology
- func NewTopologyWithName(name string) *topology.Topology
- func Options(o *node.Options) *opts.Options
- func WithAnonymousIdentity() node.Option
- func WithClientRole() node.Option
- func WithDefaultIdentityByHSM() node.Option
- func WithDefaultIdentityWithLabel(label string) node.Option
- func WithDefaultNetwork(Network string) node.Option
- func WithIdemixIdentity(label string) node.Option
- func WithNetworkOrganization(Network, Organization string) node.Option
- func WithOrganization(Organization string) node.Option
- func WithOrionVaultPersistence(network, db, creator string) node.Option
- func WithPeerRole() node.Option
- func WithX509Identity(label string) node.Option
- func WithX509IdentityByHSM(label string) node.Option
- type BuilderClient
- type Chaincode
- type Channel
- type Identity
- type Orderer
- type Org
- type Peer
- type Platform
- func (p *Platform) Channels() []*fabric.Channel
- func (p *Platform) Cleanup()
- func (p *Platform) ConnectionProfile(name string, ca bool) *network.ConnectionProfile
- func (p *Platform) DefaultIdemixOrgMSPDir() string
- func (p *Platform) DeleteVault(id string)
- func (p *Platform) DeployChaincode(chaincode *topology.ChannelChaincode)
- func (p *Platform) GenerateArtifacts()
- func (p *Platform) GenerateConfigTree()
- func (p *Platform) InvokeChaincode(cc *topology.ChannelChaincode, method string, args ...[]byte) []byte
- func (p *Platform) Load()
- func (p *Platform) Members() []grouper.Member
- func (p *Platform) Name() string
- func (p *Platform) Orderers() []*fabric.Orderer
- func (p *Platform) OrgMSPID(orgName string) string
- func (p *Platform) PeerChaincodeAddress(peerName string) string
- func (p *Platform) PeerOrgs() []*fabric.Org
- func (p *Platform) PeersByID(id string) *Peer
- func (p *Platform) PeersByOrg(fabricHost string, orgName string, includeAll bool) []*fabric.Peer
- func (p *Platform) PostRun(load bool)
- func (p *Platform) Topology() *topology.Topology
- func (p *Platform) Type() string
- func (p *Platform) UpdateChaincode(chaincodeId string, version string, path string, packageFile string)
- func (p *Platform) UserByOrg(orgName string, user string) *fabric.User
- func (p *Platform) UsersByOrg(orgName string) []*fabric.User
- type User
Constants ¶
View Source
const ( ClientRole = "client" PeerRole = "peer" )
View Source
const CCEnvDefaultImage = "hyperledger/fabric-ccenv:latest"
View Source
const (
TopologyName = "fabric"
)
Variables ¶
View Source
var ( ImplicitMetaReaders = &topology.Policy{Name: "Readers", Type: "ImplicitMeta", Rule: "ANY Readers"} ImplicitMetaWriters = &topology.Policy{Name: "Writers", Type: "ImplicitMeta", Rule: "ANY Writers"} ImplicitMetaAdmins = &topology.Policy{Name: "Admins", Type: "ImplicitMeta", Rule: "ANY Admins"} ImplicitMetaLifecycleEndorsement = &topology.Policy{Name: "LifecycleEndorsement", Type: "ImplicitMeta", Rule: "MAJORITY Endorsement"} ImplicitMetaEndorsement = &topology.Policy{Name: "Endorsement", Type: "ImplicitMeta", Rule: "ANY Endorsement"} )
View Source
var RequiredImages = []string{CCEnvDefaultImage}
Functions ¶
func NewDefaultTopology ¶
NewDefaultTopology is a configuration with two organizations and one peer per org.
func NewPlatformFactory ¶
func NewPlatformFactory() *platformFactory
func NewTopology ¶
NewTopology returns a new topology whose name is empty
func NewTopologyWithName ¶
NewTopologyWithName is a configuration with two organizations and one peer per org
func WithAnonymousIdentity ¶
WithAnonymousIdentity adds support for anonymous identity
func WithClientRole ¶
func WithDefaultIdentityByHSM ¶
WithDefaultIdentityByHSM to make the default identity to be HSM identity
func WithDefaultIdentityWithLabel ¶
WithDefaultIdentityWithLabel sets the label of the default identity
func WithDefaultNetwork ¶
func WithIdemixIdentity ¶
func WithNetworkOrganization ¶
func WithOrganization ¶
func WithOrionVaultPersistence ¶
WithOrionVaultPersistence is a configuration with orion vault persistence
func WithPeerRole ¶
func WithX509Identity ¶
func WithX509IdentityByHSM ¶
Types ¶
type BuilderClient ¶
type Platform ¶
func Network ¶
Network returns the fabric network from the passed context bound to the passed id. It returns nil, if nothing is found
func NewPlatform ¶
func (*Platform) ConnectionProfile ¶
func (p *Platform) ConnectionProfile(name string, ca bool) *network.ConnectionProfile
ConnectionProfile returns Fabric connection profile
func (*Platform) DefaultIdemixOrgMSPDir ¶
func (*Platform) DeleteVault ¶
func (*Platform) DeployChaincode ¶
func (p *Platform) DeployChaincode(chaincode *topology.ChannelChaincode)
func (*Platform) GenerateArtifacts ¶
func (p *Platform) GenerateArtifacts()
func (*Platform) GenerateConfigTree ¶
func (p *Platform) GenerateConfigTree()
func (*Platform) InvokeChaincode ¶
func (*Platform) PeerChaincodeAddress ¶
func (*Platform) PeersByOrg ¶
Click to show internal directories.
Click to hide internal directories.