endorsertx

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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

func ValidateChannelID(channelID string) error

ValidateChannelID makes sure that proposed channel IDs comply with the following restrictions:

  1. Contain only lower case ASCII alphanumerics, dots '.', and dashes '-'
  2. Are shorter than 250 characters.
  3. 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)

Jump to

Keyboard shortcuts

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