Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ChannelAllowedChars tracks the permitted characters for a channel name ChannelAllowedChars = "[a-z][a-z0-9.-]*" // MaxLength tracks the maximum length of a channel name MaxLength = 249 )
Functions ¶
func ValidateChannelID ¶
ValidateChannelID makes sure that proposed channel IDs comply with the following restrictions:
- Contain only lower case ASCII alphanumerics, dots '.', and dashes '-'
- Are shorter than 250 characters.
- Start with a letter
This is the intersection of the Kafka restrictions and CouchDB restrictions with the following exception: '.' is converted to '_' in the CouchDB naming This is to accommodate existing channel names with '.', especially in the behave tests which rely on the dot notation for their sluggification.
note: this function is a copy of the same in common/configtx/validator.go
Types ¶
type EndorserTx ¶
type EndorserTx struct {
ComputedTxID string
ChannelID string
ChaincodeID *peer.ChaincodeID
Creator []byte
Response *peer.Response
Events []byte
Results []byte
Endorsements []*peer.Endorsement
Type int32
Version int32
Epoch uint64
Nonce []byte
}
EndorserTx represents a parsed common.Envelope protobuf
func UnmarshalEndorserTxAndValidate ¶
func UnmarshalEndorserTxAndValidate(txenv *tx.Envelope) (*EndorserTx, error)
UnmarshalEndorserTxAndValidate receives a tx.Envelope containing a partially unmarshalled endorser transaction and returns an EndorserTx instance (or an error)