fabric: github.com/hyperledger/fabric/common/chaincode Index | Files

package chaincode

import "github.com/hyperledger/fabric/common/chaincode"

Index

Package Files

metadata.go

type InstalledChaincode Uses

type InstalledChaincode struct {
    Name    string
    Version string
    Id      []byte
}

InstalledChaincode defines metadata about an installed chaincode

type Metadata Uses

type Metadata struct {
    Name              string
    Version           string
    Policy            []byte
    Id                []byte
    CollectionsConfig []byte
}

Metadata defines channel-scoped metadata of a chaincode

type MetadataMapping Uses

type MetadataMapping struct {
    sync.RWMutex
    // contains filtered or unexported fields
}

MetadataMapping defines a mapping from chaincode name to Metadata

func NewMetadataMapping Uses

func NewMetadataMapping() *MetadataMapping

NewMetadataMapping creates a new metadata mapping

func (*MetadataMapping) Aggregate Uses

func (m *MetadataMapping) Aggregate() MetadataSet

Aggregate aggregates all Metadata to a MetadataSet

func (*MetadataMapping) Lookup Uses

func (m *MetadataMapping) Lookup(cc string) (Metadata, bool)

Lookup returns the Metadata that is associated with the given chaincode

func (*MetadataMapping) Update Uses

func (m *MetadataMapping) Update(ccMd Metadata)

Update updates the chaincode metadata in the mapping

type MetadataSet Uses

type MetadataSet []Metadata

MetadataSet defines an aggregation of Metadata

func (MetadataSet) AsChaincodes Uses

func (ccs MetadataSet) AsChaincodes() []*gossip.Chaincode

AsChaincodes converts this MetadataSet to a slice of gossip.Chaincodes

Package chaincode imports 2 packages (graph) and is imported by 8 packages. Updated 2018-07-05. Refresh now. Tools for package owners.