Documentation
¶
Index ¶
- func CalcCertificateSHA256(b *pem.Block) []byte
- func ParseAnchorPeers(mspConfigGroup *common.ConfigGroup) ([]*peer.AnchorPeer, error)
- func ParseAnchorPeersFromBytes(b []byte) ([]*peer.AnchorPeer, error)
- func ParseApplicationConfig(cfg common.Config) (map[string]ApplicationConfig, error)
- func ParseBatchSizeFromBytes(b []byte) (*orderer.BatchSize, error)
- func ParseBlockDataHashingStructure(cfg common.Config) (*common.BlockDataHashingStructure, error)
- func ParseCapabilities(cfg common.Config) (*common.Capabilities, error)
- func ParseChaincodeAction(txAction *peer.TransactionAction) (*peer.ChaincodeAction, error)
- func ParseConsortium(cfg common.Config) (string, error)
- func ParseConsortiumFromBytes(b []byte) (string, error)
- func ParseHashingAlgorithm(cfg common.Config) (string, error)
- func ParseHashingAlgorithmFromBytes(b []byte) (string, error)
- func ParseOrderer(cfg common.Config) (map[string]OrdererConfig, error)
- func ParseOrdererBatchSize(cfg common.Config) (*orderer.BatchSize, error)
- func ParseOrdererBatchTimeout(cfg common.Config) (string, error)
- func ParseOrdererBatchTimeoutFromBytes(b []byte) (string, error)
- func ParseOrdererConsesusType(cfg common.Config) (*orderer.ConsensusType, error)
- func ParseOrdererConsesusTypeFromBytes(b []byte) (*orderer.ConsensusType, error)
- func ParseOrdererEndpoints(b []byte) ([]string, error)
- func ParseOrdererIdentity(cb *common.Block) (*msp.SerializedIdentity, error)
- func ParseParseBlockDataHashingStructureFromBytes(b []byte) (*common.BlockDataHashingStructure, error)
- func ParseParseCapabilitiesFromBytes(b []byte) (*common.Capabilities, error)
- func ParsePolicy(policiesCfg map[string]*common.ConfigPolicy) (map[PolicyKey]Policy, error)
- func ParseTransactionActionChaincode(txAction *peer.TransactionAction) (*peer.ChaincodeInvocationSpec, error)
- func ParseTransactionActionEndorsers(txAction *peer.TransactionAction) ([]*msp.SerializedIdentity, error)
- func ParseTransactionActionEvents(chaincodeAction *peer.ChaincodeAction) (*peer.ChaincodeEvent, error)
- func ParseTransactionActionReadWriteSet(chaincodeAction *peer.ChaincodeAction) ([]*kvrwset.KVRWSet, error)
- type ApplicationConfig
- type Block
- type CertType
- type Certificate
- type ChannelConfig
- type Envelope
- type Envelopes
- type MSP
- type OrdererConfig
- type Policy
- type PolicyKey
- type Transaction
- type TransactionAction
- type Transactions
- type TransactionsActions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalcCertificateSHA256 ¶
func ParseAnchorPeers ¶
func ParseAnchorPeers(mspConfigGroup *common.ConfigGroup) ([]*peer.AnchorPeer, error)
func ParseAnchorPeersFromBytes ¶
func ParseAnchorPeersFromBytes(b []byte) ([]*peer.AnchorPeer, error)
func ParseApplicationConfig ¶
func ParseApplicationConfig(cfg common.Config) (map[string]ApplicationConfig, error)
func ParseBlockDataHashingStructure ¶
func ParseBlockDataHashingStructure(cfg common.Config) (*common.BlockDataHashingStructure, error)
func ParseCapabilities ¶
func ParseCapabilities(cfg common.Config) (*common.Capabilities, error)
func ParseChaincodeAction ¶
func ParseChaincodeAction(txAction *peer.TransactionAction) (*peer.ChaincodeAction, error)
func ParseOrderer ¶
func ParseOrderer(cfg common.Config) (map[string]OrdererConfig, error)
func ParseOrdererBatchSize ¶
func ParseOrdererConsesusType ¶
func ParseOrdererConsesusType(cfg common.Config) (*orderer.ConsensusType, error)
func ParseOrdererConsesusTypeFromBytes ¶
func ParseOrdererConsesusTypeFromBytes(b []byte) (*orderer.ConsensusType, error)
func ParseOrdererEndpoints ¶
func ParseOrdererIdentity ¶
func ParseOrdererIdentity(cb *common.Block) (*msp.SerializedIdentity, error)
func ParseParseBlockDataHashingStructureFromBytes ¶
func ParseParseBlockDataHashingStructureFromBytes(b []byte) (*common.BlockDataHashingStructure, error)
func ParseParseCapabilitiesFromBytes ¶
func ParseParseCapabilitiesFromBytes(b []byte) (*common.Capabilities, error)
func ParsePolicy ¶
func ParseTransactionActionChaincode ¶
func ParseTransactionActionChaincode(txAction *peer.TransactionAction) (*peer.ChaincodeInvocationSpec, error)
func ParseTransactionActionEndorsers ¶
func ParseTransactionActionEndorsers(txAction *peer.TransactionAction) ([]*msp.SerializedIdentity, error)
func ParseTransactionActionEvents ¶
func ParseTransactionActionEvents(chaincodeAction *peer.ChaincodeAction) (*peer.ChaincodeEvent, error)
func ParseTransactionActionReadWriteSet ¶
func ParseTransactionActionReadWriteSet(chaincodeAction *peer.ChaincodeAction) ([]*kvrwset.KVRWSet, error)
Types ¶
type ApplicationConfig ¶
type ApplicationConfig struct { Name string `json:"name"` MSP MSP `json:"msp"` AnchorPeers []*peer.AnchorPeer `json:"anchor_peers"` }
type Block ¶
type Block struct { Header *common.BlockHeader `json:"header"` Envelopes []*Envelope `json:"envelopes"` OrdererIdentity *msp.SerializedIdentity `json:"orderer_identity"` }
func (*Block) ValidEnvelopes ¶
type Certificate ¶
type Certificate struct { FingerprintSHA256 []byte Data []byte MSPID string Type CertType MSPName string }
Certificate - describes certificate(can be ca, intermediate, admin) from msp
func NewCertificate ¶
func NewCertificate(cert []byte, t CertType, mspID, mspName string) (Certificate, error)
type ChannelConfig ¶
type ChannelConfig struct { Applications map[string]ApplicationConfig `json:"applications"` Orderers map[string]OrdererConfig `json:"orderers"` OrdererBatchSize orderer.BatchSize `json:"orderer_batch_size"` OrdererBatchTimeout string `json:"orderer_batch_timeout"` OrdererConsesusType orderer.ConsensusType `json:"orderer_consensus_type"` Consortium string `json:"consortium"` HashingAlgorithm string `json:"hashing_algorithm"` BlockDataHashingStructure common.BlockDataHashingStructure `json:"block_data_hashing_structure"` Capabilities common.Capabilities `json:"capabilities"` Policy map[PolicyKey]Policy `json:"policy"` }
func ParseChannelConfig ¶
func ParseChannelConfig(cc common.Config) (*ChannelConfig, error)
func (ChannelConfig) GetAllCertificates ¶
func (c ChannelConfig) GetAllCertificates() ([]Certificate, error)
GetAllCertificates - returns all(root, intermediate, admins) certificates from all MSP's
type Envelope ¶
type Envelope struct { Signature []byte `json:"signature"` ChannelHeader *common.ChannelHeader `json:"channel_header"` ValidationCode peer.TxValidationCode `json:"validation_code"` Transaction *Transaction `json:"transaction,omitempty"` ChannelConfig *ChannelConfig `json:"channel_config,omitempty"` }
func ParseEnvelope ¶
func ParseEnvelope(envelopeData []byte, validationCode peer.TxValidationCode) (*Envelope, error)
func ParseEnvelopes ¶
func ParseEnvelopes(blockData [][]byte, txFilter txflags.ValidationFlags) ([]*Envelope, error)
type MSP ¶
type MSP struct { Name string Config msp.FabricMSPConfig `json:"config"` Policy map[PolicyKey]Policy `json:"policy"` }
func (MSP) GetAllCertificates ¶
func (c MSP) GetAllCertificates() ([]Certificate, error)
GetAllCertificates - returns all certificates from MSP
type OrdererConfig ¶
type Policy ¶
type Policy struct { Type common.Policy_PolicyType `json:"-"` ImplicitMetaPolicy *common.ImplicitMetaPolicy `json:"implicit,omitempty"` // todo fix policy marshalling(or came with with new schema) // internally we have // Type isSignaturePolicy_Type `protobuf_oneof:"Type"` // where isSignaturePolicy_Type - interface and json unmarshalling be like "wtf?!" SignaturePolicy *common.SignaturePolicyEnvelope `json:"-"` }
Policy - can contain different policies: implicit, signature check type and for 'nil' before usage
type Transaction ¶
type Transaction struct { Actions TransactionsActions `json:"transaction_actions"` CreatorIdentity msp.SerializedIdentity `json:"creator_identity"` }
func ParseTransaction ¶
func ParseTransaction(payload *common.Payload, transactionType common.HeaderType) (*Transaction, error)
func (*Transaction) Events ¶
func (t *Transaction) Events() []*peer.ChaincodeEvent
type TransactionAction ¶
type TransactionAction struct { Event *peer.ChaincodeEvent `json:"event"` Endorsers []*msp.SerializedIdentity `json:"endorsers"` ReadWriteSets []*kvrwset.KVRWSet `json:"rw_sets"` ChaincodeInvocationSpec *peer.ChaincodeInvocationSpec `json:"cc_invocation_spec"` CreatorIdentity msp.SerializedIdentity `json:"creator_identity"` }
func ParseTxAction ¶
func ParseTxAction(txAction *peer.TransactionAction) (*TransactionAction, error)
func ParseTxActions ¶
func ParseTxActions(txActions []*peer.TransactionAction) ([]*TransactionAction, error)
type Transactions ¶
type Transactions []*Transaction
type TransactionsActions ¶
type TransactionsActions []*TransactionAction
Click to show internal directories.
Click to hide internal directories.