cached

package
v0.0.0-...-15ab7cc Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKVRead

func NewKVRead(key string, version *version.Height) *kvrwset.KVRead

NewKVRead helps constructing proto message kvrwset.KVRead

func NewVersion

func NewVersion(protoVersion *kvrwset.Version) *version.Height

NewVersion helps converting proto message kvrwset.Version to version.Height

Types

type Block

type Block struct {
	*common.Block
	// contains filtered or unexported fields
}

func WrapBlock

func WrapBlock(raw *common.Block) *Block

func (*Block) GetChannelId

func (b *Block) GetChannelId() (string, error)

func (*Block) IsConfigBlock

func (block *Block) IsConfigBlock() bool

IsConfigBlock validates whenever given block contains configuration update transaction

func (*Block) UnmarshalAll

func (b *Block) UnmarshalAll() error

func (*Block) UnmarshalAllEnvelopes

func (b *Block) UnmarshalAllEnvelopes() ([]*Envelope, error)

func (*Block) UnmarshalAllMetadata

func (b *Block) UnmarshalAllMetadata() ([]*Metadata, error)

func (*Block) UnmarshalSpecificEnvelope

func (b *Block) UnmarshalSpecificEnvelope(index int) (*Envelope, error)

func (*Block) UnmarshalSpecificMetadata

func (b *Block) UnmarshalSpecificMetadata(index common.BlockMetadataIndex) (*Metadata, error)

type ChaincodeAction

type ChaincodeAction struct {
	*peer.ChaincodeAction
	// contains filtered or unexported fields
}

func (*ChaincodeAction) UnmarshalEvents

func (act *ChaincodeAction) UnmarshalEvents() (*peer.ChaincodeEvent, error)

func (*ChaincodeAction) UnmarshalRwSet

func (act *ChaincodeAction) UnmarshalRwSet() (*TxRwSet, error)

type ChaincodeActionPayload

type ChaincodeActionPayload struct {
	*peer.ChaincodeActionPayload
	Action *ChaincodeEndorsedAction
	// contains filtered or unexported fields
}

func (*ChaincodeActionPayload) UnmarshalProposalPayload

func (pl *ChaincodeActionPayload) UnmarshalProposalPayload() (*ChaincodeProposalPayload, error)

type ChaincodeEndorsedAction

type ChaincodeEndorsedAction struct {
	*peer.ChaincodeEndorsedAction
	// contains filtered or unexported fields
}

func (*ChaincodeEndorsedAction) UnmarshalProposalResponsePayload

func (act *ChaincodeEndorsedAction) UnmarshalProposalResponsePayload() (*ProposalResponsePayload, error)

type ChaincodeInvocationSpec

type ChaincodeInvocationSpec struct {
	*peer.ChaincodeInvocationSpec
}

type ChaincodeProposalPayload

type ChaincodeProposalPayload struct {
	*peer.ChaincodeProposalPayload
	// contains filtered or unexported fields
}

func (*ChaincodeProposalPayload) UnmarshalInput

func (cpp *ChaincodeProposalPayload) UnmarshalInput() (*ChaincodeInvocationSpec, error)

type ChannelHeader

type ChannelHeader struct {
	*common.ChannelHeader
	// contains filtered or unexported fields
}

type CollHashedRwSet

type CollHashedRwSet struct {
	CollectionName string
	HashedRwSet    *kvrwset.HashedRWSet
	PvtRwSetHash   []byte
}

CollHashedRwSet encapsulates 'kvrwset.HashedRWSet' proto message for a specific collection

type CollPvtRwSet

type CollPvtRwSet struct {
	CollectionName string
	KvRwSet        *kvrwset.KVRWSet
}

CollPvtRwSet encapsulates 'kvrwset.KVRWSet' proto message for a private rwset for a specific collection KvRwSet in a private RwSet should not contain range query info

type Envelope

type Envelope struct {
	*common.Envelope
	// contains filtered or unexported fields
}

func (*Envelope) GetChaincodeAction

func (env *Envelope) GetChaincodeAction() (*ChaincodeAction, error)

func (*Envelope) GetChannelId

func (env *Envelope) GetChannelId() (string, error)

func (*Envelope) UnmarshalPayload

func (env *Envelope) UnmarshalPayload() (*Payload, error)

type GossipPayload

type GossipPayload struct {
	Data        *Block `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	PrivateData [][]byte
}
type Header struct {
	*common.Header
	// contains filtered or unexported fields
}

func (*Header) UnmarshalChaincodeHeaderExtension

func (hdr *Header) UnmarshalChaincodeHeaderExtension() (*peer.ChaincodeHeaderExtension, error)

func (*Header) UnmarshalChannelHeader

func (hdr *Header) UnmarshalChannelHeader() (*ChannelHeader, error)

func (*Header) UnmarshalSignatureHeader

func (hdr *Header) UnmarshalSignatureHeader() (*common.SignatureHeader, error)

type Metadata

type Metadata struct {
	*common.Metadata
	// contains filtered or unexported fields
}

func (*Metadata) UnmarshalAllSignatureHeaders

func (meta *Metadata) UnmarshalAllSignatureHeaders() ([]*common.SignatureHeader, error)

func (*Metadata) UnmarshalSpecificSignatureHeader

func (meta *Metadata) UnmarshalSpecificSignatureHeader(index int) (*common.SignatureHeader, error)

type NsPvtRwSet

type NsPvtRwSet struct {
	NameSpace     string
	CollPvtRwSets []*CollPvtRwSet
}

NsPvtRwSet represents 'rwset.NsPvtReadWriteSet' proto message

type NsRwSet

type NsRwSet struct {
	NameSpace        string
	KvRwSet          *kvrwset.KVRWSet
	CollHashedRwSets []*CollHashedRwSet
}

NsRwSet encapsulates 'kvrwset.KVRWSet' proto message for a specific name space (chaincode)

type Payload

type Payload struct {
	*common.Payload

	Header *Header
	// contains filtered or unexported fields
}

func (*Payload) UnmarshalChaincodeAction

func (pl *Payload) UnmarshalChaincodeAction() (*ChaincodeAction, error)

func (*Payload) UnmarshalTransaction

func (pl *Payload) UnmarshalTransaction() (*Transaction, error)

type ProposalResponsePayload

type ProposalResponsePayload struct {
	*peer.ProposalResponsePayload
	// contains filtered or unexported fields
}

func (*ProposalResponsePayload) UnmarshalChaincodeAction

func (respPl *ProposalResponsePayload) UnmarshalChaincodeAction() (*ChaincodeAction, error)

type Transaction

type Transaction struct {
	*peer.Transaction
	Actions []*TransactionAction
}

func (*Transaction) UnmarshalChaincodeActionPayload

func (tx *Transaction) UnmarshalChaincodeActionPayload() (*ChaincodeActionPayload, error)

type TransactionAction

type TransactionAction struct {
	*peer.TransactionAction
	// contains filtered or unexported fields
}

func (*TransactionAction) UnmarshalChaincodeActionPayload

func (act *TransactionAction) UnmarshalChaincodeActionPayload() (*ChaincodeActionPayload, error)

func (*TransactionAction) UnmarshalSignatureHeader

func (act *TransactionAction) UnmarshalSignatureHeader() (*common.SignatureHeader, error)

type TxPvtRwSet

type TxPvtRwSet struct {
	NsPvtRwSet []*NsPvtRwSet
}

TxPvtRwSet represents 'rwset.TxPvtReadWriteSet' proto message

func TxPvtRwSetFromProtoMsg

func TxPvtRwSetFromProtoMsg(protoMsg *rwset.TxPvtReadWriteSet) (*TxPvtRwSet, error)

func (*TxPvtRwSet) FromProtoBytes

func (txPvtRwSet *TxPvtRwSet) FromProtoBytes(protoBytes []byte) error

FromProtoBytes deserializes protobytes into 'TxPvtReadWriteSet' proto message and populates 'TxPvtRwSet'

func (*TxPvtRwSet) ToProtoBytes

func (txPvtRwSet *TxPvtRwSet) ToProtoBytes() ([]byte, error)

ToProtoBytes constructs 'TxPvtReadWriteSet' proto message and serializes using protobuf Marshal

type TxRwSet

type TxRwSet struct {
	NsRwSets []*NsRwSet
}

TxRwSet acts as a proxy of 'rwset.TxReadWriteSet' proto message and helps constructing Read-write set specifically for KV data model

func TxRwSetFromProtoMsg

func TxRwSetFromProtoMsg(protoMsg *rwset.TxReadWriteSet) (*TxRwSet, error)

func (*TxRwSet) FromProtoBytes

func (txRwSet *TxRwSet) FromProtoBytes(protoBytes []byte) error

FromProtoBytes deserializes protobytes into TxReadWriteSet proto message and populates 'TxRwSet'

func (*TxRwSet) GetPvtDataHash

func (txRwSet *TxRwSet) GetPvtDataHash(ns, coll string) []byte

GetPvtDataHash returns the PvtRwSetHash for a given namespace and collection

func (*TxRwSet) NumCollections

func (txRwSet *TxRwSet) NumCollections() int

func (*TxRwSet) ToProtoBytes

func (txRwSet *TxRwSet) ToProtoBytes() ([]byte, error)

ToProtoBytes constructs TxReadWriteSet proto message and serializes using protobuf Marshal

Jump to

Keyboard shortcuts

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