pbcommon

package
v0.0.0-...-e3e94bd Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Status_name = map[int32]string{
		0:   "UNKNOWN",
		200: "SUCCESS",
		400: "BAD_REQUEST",
		403: "FORBIDDEN",
		404: "NOT_FOUND",
		413: "REQUEST_ENTITY_TOO_LARGE",
		500: "INTERNAL_SERVER_ERROR",
		501: "NOT_IMPLEMENTED",
		503: "SERVICE_UNAVAILABLE",
	}
	Status_value = map[string]int32{
		"UNKNOWN":                  0,
		"SUCCESS":                  200,
		"BAD_REQUEST":              400,
		"FORBIDDEN":                403,
		"NOT_FOUND":                404,
		"REQUEST_ENTITY_TOO_LARGE": 413,
		"INTERNAL_SERVER_ERROR":    500,
		"NOT_IMPLEMENTED":          501,
		"SERVICE_UNAVAILABLE":      503,
	}
)

Enum value maps for Status.

View Source
var (
	HeaderType_name = map[int32]string{
		0: "MESSAGE",
		1: "CONFIG",
		2: "CONFIG_UPDATE",
		3: "ENDORSER_TRANSACTION",
		4: "ORDERER_TRANSACTION",
		5: "DELIVER_SEEK_INFO",
		6: "CHAINCODE_PACKAGE",
	}
	HeaderType_value = map[string]int32{
		"MESSAGE":              0,
		"CONFIG":               1,
		"CONFIG_UPDATE":        2,
		"ENDORSER_TRANSACTION": 3,
		"ORDERER_TRANSACTION":  4,
		"DELIVER_SEEK_INFO":    5,
		"CHAINCODE_PACKAGE":    6,
	}
)

Enum value maps for HeaderType.

View Source
var (
	BlockMetadataIndex_name = map[int32]string{
		0: "SIGNATURES",
		1: "LAST_CONFIG",
		2: "TRANSACTION_FILTER",
		3: "ORDERER",
		4: "COMMIT_HASH",
	}
	BlockMetadataIndex_value = map[string]int32{
		"SIGNATURES":         0,
		"LAST_CONFIG":        1,
		"TRANSACTION_FILTER": 2,
		"ORDERER":            3,
		"COMMIT_HASH":        4,
	}
)

Enum value maps for BlockMetadataIndex.

View Source
var (
	Policy_PolicyType_name = map[int32]string{
		0: "UNKNOWN",
		1: "SIGNATURE",
		2: "MSP",
		3: "IMPLICIT_META",
	}
	Policy_PolicyType_value = map[string]int32{
		"UNKNOWN":       0,
		"SIGNATURE":     1,
		"MSP":           2,
		"IMPLICIT_META": 3,
	}
)

Enum value maps for Policy_PolicyType.

View Source
var (
	ImplicitMetaPolicy_Rule_name = map[int32]string{
		0: "ANY",
		1: "ALL",
		2: "MAJORITY",
	}
	ImplicitMetaPolicy_Rule_value = map[string]int32{
		"ANY":      0,
		"ALL":      1,
		"MAJORITY": 2,
	}
)

Enum value maps for ImplicitMetaPolicy_Rule.

View Source
var File_common_proto protoreflect.FileDescriptor
View Source
var File_configtx_proto protoreflect.FileDescriptor
View Source
var File_configuration_proto protoreflect.FileDescriptor
View Source
var File_ledger_proto protoreflect.FileDescriptor
View Source
var File_policies_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type ApplicationPolicy

type ApplicationPolicy struct {

	// Types that are assignable to Type:
	//
	//	*ApplicationPolicy_SignaturePolicyEnvelope
	//	*ApplicationPolicy_ChannelConfigPolicyReference
	Type isApplicationPolicy_Type `protobuf_oneof:"Type"`
	// contains filtered or unexported fields
}

ApplicationPolicy 捕获了在应用程序级别设置和评估的不同策略类型。

func (*ApplicationPolicy) Descriptor deprecated

func (*ApplicationPolicy) Descriptor() ([]byte, []int)

Deprecated: Use ApplicationPolicy.ProtoReflect.Descriptor instead.

func (*ApplicationPolicy) GetChannelConfigPolicyReference

func (x *ApplicationPolicy) GetChannelConfigPolicyReference() string

func (*ApplicationPolicy) GetSignaturePolicyEnvelope

func (x *ApplicationPolicy) GetSignaturePolicyEnvelope() *SignaturePolicyEnvelope

func (*ApplicationPolicy) GetType

func (m *ApplicationPolicy) GetType() isApplicationPolicy_Type

func (*ApplicationPolicy) ProtoMessage

func (*ApplicationPolicy) ProtoMessage()

func (*ApplicationPolicy) ProtoReflect

func (x *ApplicationPolicy) ProtoReflect() protoreflect.Message

func (*ApplicationPolicy) Reset

func (x *ApplicationPolicy) Reset()

func (*ApplicationPolicy) String

func (x *ApplicationPolicy) String() string

type ApplicationPolicy_ChannelConfigPolicyReference

type ApplicationPolicy_ChannelConfigPolicyReference struct {
	// ChannelConfigPolicyReference 用于将策略指定为引用通道配置中定义的策略的字符串。
	ChannelConfigPolicyReference string `protobuf:"bytes,2,opt,name=channel_config_policy_reference,json=channelConfigPolicyReference,proto3,oneof"`
}

type ApplicationPolicy_SignaturePolicyEnvelope

type ApplicationPolicy_SignaturePolicyEnvelope struct {
	// 如果指定策略为 MSP principals 签名的组合(使用阈值门),则使用 SignaturePolicyEnvelope 类型。
	SignaturePolicyEnvelope *SignaturePolicyEnvelope `protobuf:"bytes,1,opt,name=signature_policy_envelope,json=signaturePolicyEnvelope,proto3,oneof"`
}

type Block

type Block struct {
	Header   *BlockHeader   `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	Data     *BlockData     `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	Metadata *BlockMetadata `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`
	// contains filtered or unexported fields
}

这是 orderer 和 peer 共享的区块。请注意,BlockHeader 链接到前 一个 BlockHeader,BlockData 哈希值嵌入到 BlockHeader 中。 这样, 数据包含在哈希值中,而元数据不包含在哈希值中。

func (*Block) Descriptor deprecated

func (*Block) Descriptor() ([]byte, []int)

Deprecated: Use Block.ProtoReflect.Descriptor instead.

func (*Block) GetData

func (x *Block) GetData() *BlockData

func (*Block) GetHeader

func (x *Block) GetHeader() *BlockHeader

func (*Block) GetMetadata

func (x *Block) GetMetadata() *BlockMetadata

func (*Block) ProtoMessage

func (*Block) ProtoMessage()

func (*Block) ProtoReflect

func (x *Block) ProtoReflect() protoreflect.Message

func (*Block) Reset

func (x *Block) Reset()

func (*Block) String

func (x *Block) String() string

type BlockData

type BlockData struct {

	// Data 里的每一条数据等于 proto.Marshal(Envelope)。
	Data [][]byte `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*BlockData) Descriptor deprecated

func (*BlockData) Descriptor() ([]byte, []int)

Deprecated: Use BlockData.ProtoReflect.Descriptor instead.

func (*BlockData) GetData

func (x *BlockData) GetData() [][]byte

func (*BlockData) ProtoMessage

func (*BlockData) ProtoMessage()

func (*BlockData) ProtoReflect

func (x *BlockData) ProtoReflect() protoreflect.Message

func (*BlockData) Reset

func (x *BlockData) Reset()

func (*BlockData) String

func (x *BlockData) String() string

type BlockDataHashStructure

type BlockDataHashStructure struct {

	// 宽度指定计算 BlockDataHash 时使用的 Merkle 树的宽度,以便复制平面散列,将此宽度设置为 MAX_UINT32
	Width uint32 `protobuf:"varint,1,opt,name=width,proto3" json:"width,omitempty"`
	// contains filtered or unexported fields
}

func (*BlockDataHashStructure) Descriptor deprecated

func (*BlockDataHashStructure) Descriptor() ([]byte, []int)

Deprecated: Use BlockDataHashStructure.ProtoReflect.Descriptor instead.

func (*BlockDataHashStructure) GetWidth

func (x *BlockDataHashStructure) GetWidth() uint32

func (*BlockDataHashStructure) ProtoMessage

func (*BlockDataHashStructure) ProtoMessage()

func (*BlockDataHashStructure) ProtoReflect

func (x *BlockDataHashStructure) ProtoReflect() protoreflect.Message

func (*BlockDataHashStructure) Reset

func (x *BlockDataHashStructure) Reset()

func (*BlockDataHashStructure) String

func (x *BlockDataHashStructure) String() string

type BlockHeader

type BlockHeader struct {
	Number       uint64 `protobuf:"varint,1,opt,name=number,proto3" json:"number,omitempty"`                                // 区块高度
	PreviousHash []byte `protobuf:"bytes,2,opt,name=previous_hash,json=previousHash,proto3" json:"previous_hash,omitempty"` // 上一个区块的哈希
	DataHash     []byte `protobuf:"bytes,3,opt,name=data_hash,json=dataHash,proto3" json:"data_hash,omitempty"`             // 区块哈希
	// contains filtered or unexported fields
}

func (*BlockHeader) Descriptor deprecated

func (*BlockHeader) Descriptor() ([]byte, []int)

Deprecated: Use BlockHeader.ProtoReflect.Descriptor instead.

func (*BlockHeader) GetDataHash

func (x *BlockHeader) GetDataHash() []byte

func (*BlockHeader) GetNumber

func (x *BlockHeader) GetNumber() uint64

func (*BlockHeader) GetPreviousHash

func (x *BlockHeader) GetPreviousHash() []byte

func (*BlockHeader) ProtoMessage

func (*BlockHeader) ProtoMessage()

func (*BlockHeader) ProtoReflect

func (x *BlockHeader) ProtoReflect() protoreflect.Message

func (*BlockHeader) Reset

func (x *BlockHeader) Reset()

func (*BlockHeader) String

func (x *BlockHeader) String() string

type BlockMetadata

type BlockMetadata struct {

	// Metadatas 里的每一条元数据等于 proto.Marshal(Metadata)。
	Metadatas [][]byte `protobuf:"bytes,1,rep,name=metadatas,proto3" json:"metadatas,omitempty"`
	// contains filtered or unexported fields
}

func (*BlockMetadata) Descriptor deprecated

func (*BlockMetadata) Descriptor() ([]byte, []int)

Deprecated: Use BlockMetadata.ProtoReflect.Descriptor instead.

func (*BlockMetadata) GetMetadatas

func (x *BlockMetadata) GetMetadatas() [][]byte

func (*BlockMetadata) ProtoMessage

func (*BlockMetadata) ProtoMessage()

func (*BlockMetadata) ProtoReflect

func (x *BlockMetadata) ProtoReflect() protoreflect.Message

func (*BlockMetadata) Reset

func (x *BlockMetadata) Reset()

func (*BlockMetadata) String

func (x *BlockMetadata) String() string

type BlockMetadataIndex

type BlockMetadataIndex int32

BlockMetadataIndex 该枚举列出了区块元数据数组的索引

const (
	BlockMetadataIndex_SIGNATURES BlockMetadataIndex = 0 // 区块签名的区块元数据数组位置
	// Deprecated: Do not use.
	BlockMetadataIndex_LAST_CONFIG        BlockMetadataIndex = 1 // 存储最后一个配置区块序列号的区块元数据数组位置
	BlockMetadataIndex_TRANSACTION_FILTER BlockMetadataIndex = 2 // 用于存储无效交易的序列化位数组过滤器
	// Deprecated: Do not use.
	BlockMetadataIndex_ORDERER     BlockMetadataIndex = 3 // 用于存储排序者的操作元数据
	BlockMetadataIndex_COMMIT_HASH BlockMetadataIndex = 4 // 用于存储 TRANSACTIONS_FILTER、State Updates(状态更新)的哈希值的区块元数据数组位置、 和上一个区块的 COMMIT_HASH
)

func (BlockMetadataIndex) Descriptor

func (BlockMetadataIndex) Enum

func (BlockMetadataIndex) EnumDescriptor deprecated

func (BlockMetadataIndex) EnumDescriptor() ([]byte, []int)

Deprecated: Use BlockMetadataIndex.Descriptor instead.

func (BlockMetadataIndex) Number

func (BlockMetadataIndex) String

func (x BlockMetadataIndex) String() string

func (BlockMetadataIndex) Type

type BlockchainInfo

type BlockchainInfo struct {
	Height            uint64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
	CurrentBlockHash  []byte `protobuf:"bytes,2,opt,name=current_block_hash,json=currentBlockHash,proto3" json:"current_block_hash,omitempty"`
	PreviousBlockHash []byte `protobuf:"bytes,3,opt,name=previous_block_hash,json=previousBlockHash,proto3" json:"previous_block_hash,omitempty"`
	// 如果通道是从快照引导的,则指定引导快照信息。如果通道不是从快照引导,则该信息为空。
	BootStrappingSnapshotInfo *BootstrappingSnapshotInfo `` /* 140-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*BlockchainInfo) Descriptor deprecated

func (*BlockchainInfo) Descriptor() ([]byte, []int)

Deprecated: Use BlockchainInfo.ProtoReflect.Descriptor instead.

func (*BlockchainInfo) GetBootStrappingSnapshotInfo

func (x *BlockchainInfo) GetBootStrappingSnapshotInfo() *BootstrappingSnapshotInfo

func (*BlockchainInfo) GetCurrentBlockHash

func (x *BlockchainInfo) GetCurrentBlockHash() []byte

func (*BlockchainInfo) GetHeight

func (x *BlockchainInfo) GetHeight() uint64

func (*BlockchainInfo) GetPreviousBlockHash

func (x *BlockchainInfo) GetPreviousBlockHash() []byte

func (*BlockchainInfo) ProtoMessage

func (*BlockchainInfo) ProtoMessage()

func (*BlockchainInfo) ProtoReflect

func (x *BlockchainInfo) ProtoReflect() protoreflect.Message

func (*BlockchainInfo) Reset

func (x *BlockchainInfo) Reset()

func (*BlockchainInfo) String

func (x *BlockchainInfo) String() string

type BootstrappingSnapshotInfo

type BootstrappingSnapshotInfo struct {
	LastBlockInSnapshot uint64 `protobuf:"varint,1,opt,name=last_block_in_snapshot,json=lastBlockInSnapshot,proto3" json:"last_block_in_snapshot,omitempty"`
	// contains filtered or unexported fields
}

包含引导快照的信息。

func (*BootstrappingSnapshotInfo) Descriptor deprecated

func (*BootstrappingSnapshotInfo) Descriptor() ([]byte, []int)

Deprecated: Use BootstrappingSnapshotInfo.ProtoReflect.Descriptor instead.

func (*BootstrappingSnapshotInfo) GetLastBlockInSnapshot

func (x *BootstrappingSnapshotInfo) GetLastBlockInSnapshot() uint64

func (*BootstrappingSnapshotInfo) ProtoMessage

func (*BootstrappingSnapshotInfo) ProtoMessage()

func (*BootstrappingSnapshotInfo) ProtoReflect

func (*BootstrappingSnapshotInfo) Reset

func (x *BootstrappingSnapshotInfo) Reset()

func (*BootstrappingSnapshotInfo) String

func (x *BootstrappingSnapshotInfo) String() string

type Capabilities

type Capabilities struct {
	Capabilities map[string]*Capability `` // 能力名字 ==> 空结构体。
	/* 165-byte string literal not displayed */
	// contains filtered or unexported fields
}

所具有的能力。

func (*Capabilities) Descriptor deprecated

func (*Capabilities) Descriptor() ([]byte, []int)

Deprecated: Use Capabilities.ProtoReflect.Descriptor instead.

func (*Capabilities) GetCapabilities

func (x *Capabilities) GetCapabilities() map[string]*Capability

func (*Capabilities) ProtoMessage

func (*Capabilities) ProtoMessage()

func (*Capabilities) ProtoReflect

func (x *Capabilities) ProtoReflect() protoreflect.Message

func (*Capabilities) Reset

func (x *Capabilities) Reset()

func (*Capabilities) String

func (x *Capabilities) String() string

type Capability

type Capability struct {
	// contains filtered or unexported fields
}

是一个空的结构体。

func (*Capability) Descriptor deprecated

func (*Capability) Descriptor() ([]byte, []int)

Deprecated: Use Capability.ProtoReflect.Descriptor instead.

func (*Capability) ProtoMessage

func (*Capability) ProtoMessage()

func (*Capability) ProtoReflect

func (x *Capability) ProtoReflect() protoreflect.Message

func (*Capability) Reset

func (x *Capability) Reset()

func (*Capability) String

func (x *Capability) String() string

type ChannelHeader

type ChannelHeader struct {
	Type int32 `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"`
	// Version 表示报文协议版本
	Version int32 `protobuf:"varint,2,opt,name=version,proto3" json:"version,omitempty"`
	// Timestamp 发件人创建消息的当地时间
	Timestamp *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	// 该消息绑定的信道的标识符
	ChannelId string `protobuf:"bytes,4,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
	// 端到端使用的唯一标识符。
	//   - 由终端用户或 SDK 等高层设置
	//   - 传递给认可者(认可者将检查唯一性)
	//   - 由于头被原封不动地传递,它将被提交者检索(这里也将进行唯一性检查)
	//   - 将存储在分类账中
	TxId string `protobuf:"bytes,5,opt,name=tx_id,json=txId,proto3" json:"tx_id,omitempty"`
	// 生成此标头的时间,时间是根据块高度定义的。生成响应的时间。该字段可确定一个逻辑时间窗口。只有满足以下两个条件,对等方才会接受提议响应:
	//  1. 报文中指定的时间是当前时间。
	//  2. 在此时间段内,该报文只出现过一次(即未被重放)。
	Epoch     uint64 `protobuf:"varint,6,opt,name=epoch,proto3" json:"epoch,omitempty"`
	Extension []byte `protobuf:"bytes,7,opt,name=extension,proto3" json:"extension,omitempty"`
	// 如果使用了互操作 TLS,则表示客户端 TLS 证书的哈希值
	TlsCertHash []byte `protobuf:"bytes,8,opt,name=tls_cert_hash,json=tlsCertHash,proto3" json:"tls_cert_hash,omitempty"`
	// contains filtered or unexported fields
}

func (*ChannelHeader) Descriptor deprecated

func (*ChannelHeader) Descriptor() ([]byte, []int)

Deprecated: Use ChannelHeader.ProtoReflect.Descriptor instead.

func (*ChannelHeader) GetChannelId

func (x *ChannelHeader) GetChannelId() string

func (*ChannelHeader) GetEpoch

func (x *ChannelHeader) GetEpoch() uint64

func (*ChannelHeader) GetExtension

func (x *ChannelHeader) GetExtension() []byte

func (*ChannelHeader) GetTimestamp

func (x *ChannelHeader) GetTimestamp() *timestamppb.Timestamp

func (*ChannelHeader) GetTlsCertHash

func (x *ChannelHeader) GetTlsCertHash() []byte

func (*ChannelHeader) GetTxId

func (x *ChannelHeader) GetTxId() string

func (*ChannelHeader) GetType

func (x *ChannelHeader) GetType() int32

func (*ChannelHeader) GetVersion

func (x *ChannelHeader) GetVersion() int32

func (*ChannelHeader) ProtoMessage

func (*ChannelHeader) ProtoMessage()

func (*ChannelHeader) ProtoReflect

func (x *ChannelHeader) ProtoReflect() protoreflect.Message

func (*ChannelHeader) Reset

func (x *ChannelHeader) Reset()

func (*ChannelHeader) String

func (x *ChannelHeader) String() string

type Config

type Config struct {
	Sequence     uint64       `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"`
	ChannelGroup *ConfigGroup `protobuf:"bytes,2,opt,name=channel_group,json=channelGroup,proto3" json:"channel_group,omitempty"`
	// contains filtered or unexported fields
}

func (*Config) Descriptor deprecated

func (*Config) Descriptor() ([]byte, []int)

Deprecated: Use Config.ProtoReflect.Descriptor instead.

func (*Config) GetChannelGroup

func (x *Config) GetChannelGroup() *ConfigGroup

func (*Config) GetSequence

func (x *Config) GetSequence() uint64

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) ProtoReflect

func (x *Config) ProtoReflect() protoreflect.Message

func (*Config) Reset

func (x *Config) Reset()

func (*Config) String

func (x *Config) String() string

type ConfigEnvelope

type ConfigEnvelope struct {
	Config     *Config   `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"`
	LastUpdate *Envelope `protobuf:"bytes,2,opt,name=last_update,json=lastUpdate,proto3" json:"last_update,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfigEnvelope) Descriptor deprecated

func (*ConfigEnvelope) Descriptor() ([]byte, []int)

Deprecated: Use ConfigEnvelope.ProtoReflect.Descriptor instead.

func (*ConfigEnvelope) GetConfig

func (x *ConfigEnvelope) GetConfig() *Config

func (*ConfigEnvelope) GetLastUpdate

func (x *ConfigEnvelope) GetLastUpdate() *Envelope

func (*ConfigEnvelope) ProtoMessage

func (*ConfigEnvelope) ProtoMessage()

func (*ConfigEnvelope) ProtoReflect

func (x *ConfigEnvelope) ProtoReflect() protoreflect.Message

func (*ConfigEnvelope) Reset

func (x *ConfigEnvelope) Reset()

func (*ConfigEnvelope) String

func (x *ConfigEnvelope) String() string

type ConfigGroup

type ConfigGroup struct {
	Version   uint64                   `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	Groups    map[string]*ConfigGroup  `` /* 153-byte string literal not displayed */
	Values    map[string]*ConfigValue  `` /* 153-byte string literal not displayed */
	Policies  map[string]*ConfigPolicy `` /* 157-byte string literal not displayed */
	ModPolicy string                   `protobuf:"bytes,5,opt,name=mod_policy,json=modPolicy,proto3" json:"mod_policy,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfigGroup) Descriptor deprecated

func (*ConfigGroup) Descriptor() ([]byte, []int)

Deprecated: Use ConfigGroup.ProtoReflect.Descriptor instead.

func (*ConfigGroup) GetGroups

func (x *ConfigGroup) GetGroups() map[string]*ConfigGroup

func (*ConfigGroup) GetModPolicy

func (x *ConfigGroup) GetModPolicy() string

func (*ConfigGroup) GetPolicies

func (x *ConfigGroup) GetPolicies() map[string]*ConfigPolicy

func (*ConfigGroup) GetValues

func (x *ConfigGroup) GetValues() map[string]*ConfigValue

func (*ConfigGroup) GetVersion

func (x *ConfigGroup) GetVersion() uint64

func (*ConfigGroup) ProtoMessage

func (*ConfigGroup) ProtoMessage()

func (*ConfigGroup) ProtoReflect

func (x *ConfigGroup) ProtoReflect() protoreflect.Message

func (*ConfigGroup) Reset

func (x *ConfigGroup) Reset()

func (*ConfigGroup) String

func (x *ConfigGroup) String() string

type ConfigPolicy

type ConfigPolicy struct {
	Version   uint64  `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	Policy    *Policy `protobuf:"bytes,2,opt,name=policy,proto3" json:"policy,omitempty"`
	ModPolicy string  `protobuf:"bytes,3,opt,name=mod_policy,json=modPolicy,proto3" json:"mod_policy,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfigPolicy) Descriptor deprecated

func (*ConfigPolicy) Descriptor() ([]byte, []int)

Deprecated: Use ConfigPolicy.ProtoReflect.Descriptor instead.

func (*ConfigPolicy) GetModPolicy

func (x *ConfigPolicy) GetModPolicy() string

func (*ConfigPolicy) GetPolicy

func (x *ConfigPolicy) GetPolicy() *Policy

func (*ConfigPolicy) GetVersion

func (x *ConfigPolicy) GetVersion() uint64

func (*ConfigPolicy) ProtoMessage

func (*ConfigPolicy) ProtoMessage()

func (*ConfigPolicy) ProtoReflect

func (x *ConfigPolicy) ProtoReflect() protoreflect.Message

func (*ConfigPolicy) Reset

func (x *ConfigPolicy) Reset()

func (*ConfigPolicy) String

func (x *ConfigPolicy) String() string

type ConfigSignature

type ConfigSignature struct {
	SignatureHeader []byte `protobuf:"bytes,1,opt,name=signature_header,json=signatureHeader,proto3" json:"signature_header,omitempty"`
	Signature       []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfigSignature) Descriptor deprecated

func (*ConfigSignature) Descriptor() ([]byte, []int)

Deprecated: Use ConfigSignature.ProtoReflect.Descriptor instead.

func (*ConfigSignature) GetSignature

func (x *ConfigSignature) GetSignature() []byte

func (*ConfigSignature) GetSignatureHeader

func (x *ConfigSignature) GetSignatureHeader() []byte

func (*ConfigSignature) ProtoMessage

func (*ConfigSignature) ProtoMessage()

func (*ConfigSignature) ProtoReflect

func (x *ConfigSignature) ProtoReflect() protoreflect.Message

func (*ConfigSignature) Reset

func (x *ConfigSignature) Reset()

func (*ConfigSignature) String

func (x *ConfigSignature) String() string

type ConfigUpdate

type ConfigUpdate struct {
	ChannelId    string            `protobuf:"bytes,1,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"` // 该配置更新适用于哪个通道。
	ReadSet      *ConfigGroup      `protobuf:"bytes,2,opt,name=read_set,json=readSet,proto3" json:"read_set,omitempty"`       // ReadSet 明确列出了已读取的配置部分,该部分应该是稀疏的,只设置了版本。
	WriteSet     *ConfigGroup      `protobuf:"bytes,3,opt,name=write_set,json=writeSet,proto3" json:"write_set,omitempty"`    // WriteSet 列出已写入配置的部分,其中应包括更新的版本。
	IsolatedData map[string][]byte ``                                                                                         // 不反映在生成的 Config 中,但仍需用于其他目的的数据。 例如,rscc_seed_data。
	/* 185-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*ConfigUpdate) Descriptor deprecated

func (*ConfigUpdate) Descriptor() ([]byte, []int)

Deprecated: Use ConfigUpdate.ProtoReflect.Descriptor instead.

func (*ConfigUpdate) GetChannelId

func (x *ConfigUpdate) GetChannelId() string

func (*ConfigUpdate) GetIsolatedData

func (x *ConfigUpdate) GetIsolatedData() map[string][]byte

func (*ConfigUpdate) GetReadSet

func (x *ConfigUpdate) GetReadSet() *ConfigGroup

func (*ConfigUpdate) GetWriteSet

func (x *ConfigUpdate) GetWriteSet() *ConfigGroup

func (*ConfigUpdate) ProtoMessage

func (*ConfigUpdate) ProtoMessage()

func (*ConfigUpdate) ProtoReflect

func (x *ConfigUpdate) ProtoReflect() protoreflect.Message

func (*ConfigUpdate) Reset

func (x *ConfigUpdate) Reset()

func (*ConfigUpdate) String

func (x *ConfigUpdate) String() string

type ConfigUpdateEnvelope

type ConfigUpdateEnvelope struct {
	ConfigUpdate []byte             `protobuf:"bytes,1,opt,name=config_update,json=configUpdate,proto3" json:"config_update,omitempty"`
	Signatures   []*ConfigSignature `protobuf:"bytes,2,rep,name=signatures,proto3" json:"signatures,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfigUpdateEnvelope) Descriptor deprecated

func (*ConfigUpdateEnvelope) Descriptor() ([]byte, []int)

Deprecated: Use ConfigUpdateEnvelope.ProtoReflect.Descriptor instead.

func (*ConfigUpdateEnvelope) GetConfigUpdate

func (x *ConfigUpdateEnvelope) GetConfigUpdate() []byte

func (*ConfigUpdateEnvelope) GetSignatures

func (x *ConfigUpdateEnvelope) GetSignatures() []*ConfigSignature

func (*ConfigUpdateEnvelope) ProtoMessage

func (*ConfigUpdateEnvelope) ProtoMessage()

func (*ConfigUpdateEnvelope) ProtoReflect

func (x *ConfigUpdateEnvelope) ProtoReflect() protoreflect.Message

func (*ConfigUpdateEnvelope) Reset

func (x *ConfigUpdateEnvelope) Reset()

func (*ConfigUpdateEnvelope) String

func (x *ConfigUpdateEnvelope) String() string

type ConfigValue

type ConfigValue struct {
	Version   uint64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	Value     []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	ModPolicy string `protobuf:"bytes,3,opt,name=mod_policy,json=modPolicy,proto3" json:"mod_policy,omitempty"`
	// contains filtered or unexported fields
}

func (*ConfigValue) Descriptor deprecated

func (*ConfigValue) Descriptor() ([]byte, []int)

Deprecated: Use ConfigValue.ProtoReflect.Descriptor instead.

func (*ConfigValue) GetModPolicy

func (x *ConfigValue) GetModPolicy() string

func (*ConfigValue) GetValue

func (x *ConfigValue) GetValue() []byte

func (*ConfigValue) GetVersion

func (x *ConfigValue) GetVersion() uint64

func (*ConfigValue) ProtoMessage

func (*ConfigValue) ProtoMessage()

func (*ConfigValue) ProtoReflect

func (x *ConfigValue) ProtoReflect() protoreflect.Message

func (*ConfigValue) Reset

func (x *ConfigValue) Reset()

func (*ConfigValue) String

func (x *ConfigValue) String() string

type Consenter

type Consenter struct {
	Id   uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	Host string `protobuf:"bytes,2,opt,name=host,proto3" json:"host,omitempty"`
	Port uint32 `protobuf:"varint,3,opt,name=port,proto3" json:"port,omitempty"`
	// MspId msp 的 id。
	MspId string `protobuf:"bytes,4,opt,name=msp_id,json=mspId,proto3" json:"msp_id,omitempty"`
	// Identity x509 证书的 ASN.1 DER PEM 格式的数据。
	Identity      []byte `protobuf:"bytes,5,opt,name=identity,proto3" json:"identity,omitempty"`
	ClientTlsCert []byte `protobuf:"bytes,6,opt,name=client_tls_cert,json=clientTlsCert,proto3" json:"client_tls_cert,omitempty"`
	ServerTlsCert []byte `protobuf:"bytes,7,opt,name=server_tls_cert,json=serverTlsCert,proto3" json:"server_tls_cert,omitempty"`
	// contains filtered or unexported fields
}

Consenter 代表一个共识节点

func (*Consenter) Descriptor deprecated

func (*Consenter) Descriptor() ([]byte, []int)

Deprecated: Use Consenter.ProtoReflect.Descriptor instead.

func (*Consenter) GetClientTlsCert

func (x *Consenter) GetClientTlsCert() []byte

func (*Consenter) GetHost

func (x *Consenter) GetHost() string

func (*Consenter) GetId

func (x *Consenter) GetId() uint32

func (*Consenter) GetIdentity

func (x *Consenter) GetIdentity() []byte

func (*Consenter) GetMspId

func (x *Consenter) GetMspId() string

func (*Consenter) GetPort

func (x *Consenter) GetPort() uint32

func (*Consenter) GetServerTlsCert

func (x *Consenter) GetServerTlsCert() []byte

func (*Consenter) ProtoMessage

func (*Consenter) ProtoMessage()

func (*Consenter) ProtoReflect

func (x *Consenter) ProtoReflect() protoreflect.Message

func (*Consenter) Reset

func (x *Consenter) Reset()

func (*Consenter) String

func (x *Consenter) String() string

type Consortium

type Consortium struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

Consortium 表示创建通道的联盟上下文信息。

func (*Consortium) Descriptor deprecated

func (*Consortium) Descriptor() ([]byte, []int)

Deprecated: Use Consortium.ProtoReflect.Descriptor instead.

func (*Consortium) GetName

func (x *Consortium) GetName() string

func (*Consortium) ProtoMessage

func (*Consortium) ProtoMessage()

func (*Consortium) ProtoReflect

func (x *Consortium) ProtoReflect() protoreflect.Message

func (*Consortium) Reset

func (x *Consortium) Reset()

func (*Consortium) String

func (x *Consortium) String() string

type Envelope

type Envelope struct {

	// 信封内的内容,proto.Marshal(Payload)
	Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
	// 消息生成者的签名
	Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

func (*Envelope) Descriptor deprecated

func (*Envelope) Descriptor() ([]byte, []int)

Deprecated: Use Envelope.ProtoReflect.Descriptor instead.

func (*Envelope) GetPayload

func (x *Envelope) GetPayload() []byte

func (*Envelope) GetSignature

func (x *Envelope) GetSignature() []byte

func (*Envelope) ProtoMessage

func (*Envelope) ProtoMessage()

func (*Envelope) ProtoReflect

func (x *Envelope) ProtoReflect() protoreflect.Message

func (*Envelope) Reset

func (x *Envelope) Reset()

func (*Envelope) String

func (x *Envelope) String() string

type HashAlgorithm

type HashAlgorithm struct {

	// 目前仅支持 SHA256。
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*HashAlgorithm) Descriptor deprecated

func (*HashAlgorithm) Descriptor() ([]byte, []int)

Deprecated: Use HashAlgorithm.ProtoReflect.Descriptor instead.

func (*HashAlgorithm) GetName

func (x *HashAlgorithm) GetName() string

func (*HashAlgorithm) ProtoMessage

func (*HashAlgorithm) ProtoMessage()

func (*HashAlgorithm) ProtoReflect

func (x *HashAlgorithm) ProtoReflect() protoreflect.Message

func (*HashAlgorithm) Reset

func (x *HashAlgorithm) Reset()

func (*HashAlgorithm) String

func (x *HashAlgorithm) String() string
type Header struct {
	ChannelHeader   []byte `protobuf:"bytes,1,opt,name=channel_header,json=channelHeader,proto3" json:"channel_header,omitempty"`
	SignatureHeader []byte `protobuf:"bytes,2,opt,name=signature_header,json=signatureHeader,proto3" json:"signature_header,omitempty"`
	// contains filtered or unexported fields
}

func (*Header) Descriptor deprecated

func (*Header) Descriptor() ([]byte, []int)

Deprecated: Use Header.ProtoReflect.Descriptor instead.

func (*Header) GetChannelHeader

func (x *Header) GetChannelHeader() []byte

func (*Header) GetSignatureHeader

func (x *Header) GetSignatureHeader() []byte

func (*Header) ProtoMessage

func (*Header) ProtoMessage()

func (*Header) ProtoReflect

func (x *Header) ProtoReflect() protoreflect.Message

func (*Header) Reset

func (x *Header) Reset()

func (*Header) String

func (x *Header) String() string

type HeaderType

type HeaderType int32
const (
	HeaderType_MESSAGE              HeaderType = 0 // 用于已签名但不透明的报文
	HeaderType_CONFIG               HeaderType = 1 // 用于表达通道配置的信息
	HeaderType_CONFIG_UPDATE        HeaderType = 2 // 用于更新通道配置的 transaction
	HeaderType_ENDORSER_TRANSACTION HeaderType = 3 // SDK 用于提交基于背书人的交易
	HeaderType_ORDERER_TRANSACTION  HeaderType = 4 // 用于排序者内部管理
	HeaderType_DELIVER_SEEK_INFO    HeaderType = 5 // 用作提交的信封信息的类型,以指示交付应用程序接口寻求
	HeaderType_CHAINCODE_PACKAGE    HeaderType = 6 // 用于打包链码工件以进行安装
)

func (HeaderType) Descriptor

func (HeaderType) Descriptor() protoreflect.EnumDescriptor

func (HeaderType) Enum

func (x HeaderType) Enum() *HeaderType

func (HeaderType) EnumDescriptor deprecated

func (HeaderType) EnumDescriptor() ([]byte, []int)

Deprecated: Use HeaderType.Descriptor instead.

func (HeaderType) Number

func (x HeaderType) Number() protoreflect.EnumNumber

func (HeaderType) String

func (x HeaderType) String() string

func (HeaderType) Type

type IdentifierHeader

type IdentifierHeader struct {
	Identifier uint32 `protobuf:"varint,1,opt,name=identifier,proto3" json:"identifier,omitempty"` // 代表信息创建者的唯一标识符,共识节点的编号
	Nonce      []byte `protobuf:"bytes,2,opt,name=nonce,proto3" json:"nonce,omitempty"`            // 只能使用一次的任意数字。可用于检测重放攻击。
	// contains filtered or unexported fields
}

当创建者可以通过 ID 被引用时,IdentifierHeader 可以替代 SignatureHeader。

func (*IdentifierHeader) Descriptor deprecated

func (*IdentifierHeader) Descriptor() ([]byte, []int)

Deprecated: Use IdentifierHeader.ProtoReflect.Descriptor instead.

func (*IdentifierHeader) GetIdentifier

func (x *IdentifierHeader) GetIdentifier() uint32

func (*IdentifierHeader) GetNonce

func (x *IdentifierHeader) GetNonce() []byte

func (*IdentifierHeader) ProtoMessage

func (*IdentifierHeader) ProtoMessage()

func (*IdentifierHeader) ProtoReflect

func (x *IdentifierHeader) ProtoReflect() protoreflect.Message

func (*IdentifierHeader) Reset

func (x *IdentifierHeader) Reset()

func (*IdentifierHeader) String

func (x *IdentifierHeader) String() string

type ImplicitMetaPolicy

type ImplicitMetaPolicy struct {
	SubPolicy string                  `protobuf:"bytes,1,opt,name=sub_policy,json=subPolicy,proto3" json:"sub_policy,omitempty"`
	Rule      ImplicitMetaPolicy_Rule `protobuf:"varint,2,opt,name=rule,proto3,enum=pbcommon.ImplicitMetaPolicy_Rule" json:"rule,omitempty"`
	// contains filtered or unexported fields
}

ImplicitMetaPolicy 是一种取决于配置层次性质的策略类型。它是隐式的,因为规则是根据子策略的数 量隐式生成的。说它是元策略,是因为它只取决于其他策略的结果。评估时,该策略会遍历所有直接子分组, 检索名称为 sub_policy 的策略,评估集合并应用该规则。例如,有 4 个子组,策略名称为 "foo", ImplicitMetaPolicy 会检索每个子组,检索每个子组的策略 "foo",对其进行评估,在 ANY 的情况下, 满足 1 个签名即可,ALL 需要 4 个签名,MAJORITY 需要 3 个签名。

func (*ImplicitMetaPolicy) Descriptor deprecated

func (*ImplicitMetaPolicy) Descriptor() ([]byte, []int)

Deprecated: Use ImplicitMetaPolicy.ProtoReflect.Descriptor instead.

func (*ImplicitMetaPolicy) GetRule

func (*ImplicitMetaPolicy) GetSubPolicy

func (x *ImplicitMetaPolicy) GetSubPolicy() string

func (*ImplicitMetaPolicy) ProtoMessage

func (*ImplicitMetaPolicy) ProtoMessage()

func (*ImplicitMetaPolicy) ProtoReflect

func (x *ImplicitMetaPolicy) ProtoReflect() protoreflect.Message

func (*ImplicitMetaPolicy) Reset

func (x *ImplicitMetaPolicy) Reset()

func (*ImplicitMetaPolicy) String

func (x *ImplicitMetaPolicy) String() string

type ImplicitMetaPolicy_Rule

type ImplicitMetaPolicy_Rule int32
const (
	ImplicitMetaPolicy_ANY      ImplicitMetaPolicy_Rule = 0 // 要求满足任意子策略,如果不存在子策略,则总是返回 true
	ImplicitMetaPolicy_ALL      ImplicitMetaPolicy_Rule = 1 // 要求满足所有子政策的要求
	ImplicitMetaPolicy_MAJORITY ImplicitMetaPolicy_Rule = 2 // 要求满足绝大多数(超过半数)次级政策的要求
)

func (ImplicitMetaPolicy_Rule) Descriptor

func (ImplicitMetaPolicy_Rule) Enum

func (ImplicitMetaPolicy_Rule) EnumDescriptor deprecated

func (ImplicitMetaPolicy_Rule) EnumDescriptor() ([]byte, []int)

Deprecated: Use ImplicitMetaPolicy_Rule.Descriptor instead.

func (ImplicitMetaPolicy_Rule) Number

func (ImplicitMetaPolicy_Rule) String

func (x ImplicitMetaPolicy_Rule) String() string

func (ImplicitMetaPolicy_Rule) Type

type LastConfig

type LastConfig struct {
	Index uint64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"`
	// contains filtered or unexported fields
}

LastConfig 是元数据信息的编码值,在 LAST_CONFIGURATION 块元数据索引中编码

func (*LastConfig) Descriptor deprecated

func (*LastConfig) Descriptor() ([]byte, []int)

Deprecated: Use LastConfig.ProtoReflect.Descriptor instead.

func (*LastConfig) GetIndex

func (x *LastConfig) GetIndex() uint64

func (*LastConfig) ProtoMessage

func (*LastConfig) ProtoMessage()

func (*LastConfig) ProtoReflect

func (x *LastConfig) ProtoReflect() protoreflect.Message

func (*LastConfig) Reset

func (x *LastConfig) Reset()

func (*LastConfig) String

func (x *LastConfig) String() string

type Metadata

type Metadata struct {
	Value      []byte               `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
	Signatures []*MetadataSignature `protobuf:"bytes,2,rep,name=signatures,proto3" json:"signatures,omitempty"`
	// contains filtered or unexported fields
}

Metadata 是用于编码区块元数据的通用结构

func (*Metadata) Descriptor deprecated

func (*Metadata) Descriptor() ([]byte, []int)

Deprecated: Use Metadata.ProtoReflect.Descriptor instead.

func (*Metadata) GetSignatures

func (x *Metadata) GetSignatures() []*MetadataSignature

func (*Metadata) GetValue

func (x *Metadata) GetValue() []byte

func (*Metadata) ProtoMessage

func (*Metadata) ProtoMessage()

func (*Metadata) ProtoReflect

func (x *Metadata) ProtoReflect() protoreflect.Message

func (*Metadata) Reset

func (x *Metadata) Reset()

func (*Metadata) String

func (x *Metadata) String() string

type MetadataSignature

type MetadataSignature struct {
	SignatureHeader  []byte `protobuf:"bytes,1,opt,name=signature_header,json=signatureHeader,proto3" json:"signature_header,omitempty"` // proto.Marshal(*SignatureHeader),SignatureHeader 里存储签名者的身份信息。
	Signature        []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"`
	IdentifierHeader []byte `protobuf:"bytes,3,opt,name=identifier_header,json=identifierHeader,proto3" json:"identifier_header,omitempty"` // 编码后的 IdentifierHeader。如果 SignatureHeader 为空,则用 ID 来标识创建者。
	// contains filtered or unexported fields
}

func (*MetadataSignature) Descriptor deprecated

func (*MetadataSignature) Descriptor() ([]byte, []int)

Deprecated: Use MetadataSignature.ProtoReflect.Descriptor instead.

func (*MetadataSignature) GetIdentifierHeader

func (x *MetadataSignature) GetIdentifierHeader() []byte

func (*MetadataSignature) GetSignature

func (x *MetadataSignature) GetSignature() []byte

func (*MetadataSignature) GetSignatureHeader

func (x *MetadataSignature) GetSignatureHeader() []byte

func (*MetadataSignature) ProtoMessage

func (*MetadataSignature) ProtoMessage()

func (*MetadataSignature) ProtoReflect

func (x *MetadataSignature) ProtoReflect() protoreflect.Message

func (*MetadataSignature) Reset

func (x *MetadataSignature) Reset()

func (*MetadataSignature) String

func (x *MetadataSignature) String() string

type OrdererAddress

type OrdererAddress struct {
	Addresses []string `protobuf:"bytes,1,rep,name=addresses,proto3" json:"addresses,omitempty"`
	// contains filtered or unexported fields
}

func (*OrdererAddress) Descriptor deprecated

func (*OrdererAddress) Descriptor() ([]byte, []int)

Deprecated: Use OrdererAddress.ProtoReflect.Descriptor instead.

func (*OrdererAddress) GetAddresses

func (x *OrdererAddress) GetAddresses() []string

func (*OrdererAddress) ProtoMessage

func (*OrdererAddress) ProtoMessage()

func (*OrdererAddress) ProtoReflect

func (x *OrdererAddress) ProtoReflect() protoreflect.Message

func (*OrdererAddress) Reset

func (x *OrdererAddress) Reset()

func (*OrdererAddress) String

func (x *OrdererAddress) String() string

type OrdererBlockMetadata

type OrdererBlockMetadata struct {
	LastConfig        *LastConfig `protobuf:"bytes,1,opt,name=last_config,json=lastConfig,proto3" json:"last_config,omitempty"`
	ConsenterMetadata []byte      `protobuf:"bytes,2,opt,name=consenter_metadata,json=consenterMetadata,proto3" json:"consenter_metadata,omitempty"`
	// contains filtered or unexported fields
}

OrdererBlockMetadata 定义了由排序服务设置的元数据。

func (*OrdererBlockMetadata) Descriptor deprecated

func (*OrdererBlockMetadata) Descriptor() ([]byte, []int)

Deprecated: Use OrdererBlockMetadata.ProtoReflect.Descriptor instead.

func (*OrdererBlockMetadata) GetConsenterMetadata

func (x *OrdererBlockMetadata) GetConsenterMetadata() []byte

func (*OrdererBlockMetadata) GetLastConfig

func (x *OrdererBlockMetadata) GetLastConfig() *LastConfig

func (*OrdererBlockMetadata) ProtoMessage

func (*OrdererBlockMetadata) ProtoMessage()

func (*OrdererBlockMetadata) ProtoReflect

func (x *OrdererBlockMetadata) ProtoReflect() protoreflect.Message

func (*OrdererBlockMetadata) Reset

func (x *OrdererBlockMetadata) Reset()

func (*OrdererBlockMetadata) String

func (x *OrdererBlockMetadata) String() string

type Orderers

type Orderers struct {
	Consenters []*Consenter `protobuf:"bytes,1,rep,name=consenters,proto3" json:"consenters,omitempty"`
	// contains filtered or unexported fields
}

func (*Orderers) Descriptor deprecated

func (*Orderers) Descriptor() ([]byte, []int)

Deprecated: Use Orderers.ProtoReflect.Descriptor instead.

func (*Orderers) GetConsenters

func (x *Orderers) GetConsenters() []*Consenter

func (*Orderers) ProtoMessage

func (*Orderers) ProtoMessage()

func (*Orderers) ProtoReflect

func (x *Orderers) ProtoReflect() protoreflect.Message

func (*Orderers) Reset

func (x *Orderers) Reset()

func (*Orderers) String

func (x *Orderers) String() string

type Payload

type Payload struct {

	// header 包含通道信息、消息生成者的身份和用于防重放的标识符
	Header *Header `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"`
	Data   []byte  `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

消息的有效载荷,包括消息头

func (*Payload) Descriptor deprecated

func (*Payload) Descriptor() ([]byte, []int)

Deprecated: Use Payload.ProtoReflect.Descriptor instead.

func (*Payload) GetData

func (x *Payload) GetData() []byte

func (*Payload) GetHeader

func (x *Payload) GetHeader() *Header

func (*Payload) ProtoMessage

func (*Payload) ProtoMessage()

func (*Payload) ProtoReflect

func (x *Payload) ProtoReflect() protoreflect.Message

func (*Payload) Reset

func (x *Payload) Reset()

func (*Payload) String

func (x *Payload) String() string

type Policy

type Policy struct {
	Type  int32  `protobuf:"varint,1,opt,name=type,proto3" json:"type,omitempty"`
	Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

Policy 表达了一个 orderer 可以评估的策略。

func (*Policy) Descriptor deprecated

func (*Policy) Descriptor() ([]byte, []int)

Deprecated: Use Policy.ProtoReflect.Descriptor instead.

func (*Policy) GetType

func (x *Policy) GetType() int32

func (*Policy) GetValue

func (x *Policy) GetValue() []byte

func (*Policy) ProtoMessage

func (*Policy) ProtoMessage()

func (*Policy) ProtoReflect

func (x *Policy) ProtoReflect() protoreflect.Message

func (*Policy) Reset

func (x *Policy) Reset()

func (*Policy) String

func (x *Policy) String() string

type Policy_PolicyType

type Policy_PolicyType int32
const (
	Policy_UNKNOWN       Policy_PolicyType = 0
	Policy_SIGNATURE     Policy_PolicyType = 1
	Policy_MSP           Policy_PolicyType = 2
	Policy_IMPLICIT_META Policy_PolicyType = 3
)

func (Policy_PolicyType) Descriptor

func (Policy_PolicyType) Enum

func (Policy_PolicyType) EnumDescriptor deprecated

func (Policy_PolicyType) EnumDescriptor() ([]byte, []int)

Deprecated: Use Policy_PolicyType.Descriptor instead.

func (Policy_PolicyType) Number

func (Policy_PolicyType) String

func (x Policy_PolicyType) String() string

func (Policy_PolicyType) Type

type SignatureHeader

type SignatureHeader struct {

	// 消息的创建者,proto.Marshal(pbmsp.SerializedIdentity)
	Creator []byte `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"`
	// 用于防范重放攻击
	Nonce []byte `protobuf:"bytes,2,opt,name=nonce,proto3" json:"nonce,omitempty"`
	// contains filtered or unexported fields
}

func (*SignatureHeader) Descriptor deprecated

func (*SignatureHeader) Descriptor() ([]byte, []int)

Deprecated: Use SignatureHeader.ProtoReflect.Descriptor instead.

func (*SignatureHeader) GetCreator

func (x *SignatureHeader) GetCreator() []byte

func (*SignatureHeader) GetNonce

func (x *SignatureHeader) GetNonce() []byte

func (*SignatureHeader) ProtoMessage

func (*SignatureHeader) ProtoMessage()

func (*SignatureHeader) ProtoReflect

func (x *SignatureHeader) ProtoReflect() protoreflect.Message

func (*SignatureHeader) Reset

func (x *SignatureHeader) Reset()

func (*SignatureHeader) String

func (x *SignatureHeader) String() string

type SignaturePolicy

type SignaturePolicy struct {

	// Types that are assignable to Type:
	//
	//	*SignaturePolicy_SignedBy
	//	*SignaturePolicy_NOutOf_
	Type isSignaturePolicy_Type `protobuf_oneof:"Type"`
	// contains filtered or unexported fields
}

SignaturePolicy 是一个递归消息结构,它定义了一个轻量级 DSL,用于描述比 "exactly this signature" 更复杂的策略。 NOutOf 运算符足以表达 AND 和 OR,当然也可以表达 N 个以下 M 个策略中的 N 个。SignedBy 表示签名来自有效证书,该 证书由字节中指定的可信机构签署。 如果是自签证书,则是证书本身,如果是传统证书,则是 CA。

func (*SignaturePolicy) Descriptor deprecated

func (*SignaturePolicy) Descriptor() ([]byte, []int)

Deprecated: Use SignaturePolicy.ProtoReflect.Descriptor instead.

func (*SignaturePolicy) GetNOutOf

func (x *SignaturePolicy) GetNOutOf() *SignaturePolicy_NOutOf

func (*SignaturePolicy) GetSignedBy

func (x *SignaturePolicy) GetSignedBy() int32

func (*SignaturePolicy) GetType

func (m *SignaturePolicy) GetType() isSignaturePolicy_Type

func (*SignaturePolicy) ProtoMessage

func (*SignaturePolicy) ProtoMessage()

func (*SignaturePolicy) ProtoReflect

func (x *SignaturePolicy) ProtoReflect() protoreflect.Message

func (*SignaturePolicy) Reset

func (x *SignaturePolicy) Reset()

func (*SignaturePolicy) String

func (x *SignaturePolicy) String() string

type SignaturePolicyEnvelope

type SignaturePolicyEnvelope struct {
	Version    int32                 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
	Rule       *SignaturePolicy      `protobuf:"bytes,2,opt,name=rule,proto3" json:"rule,omitempty"`
	Identities []*pbmsp.MSPPrincipal `protobuf:"bytes,3,rep,name=identities,proto3" json:"identities,omitempty"`
	// contains filtered or unexported fields
}

SignaturePolicyEnvelope 封装了签名策略,并包含一个版本以备未来增强之用。

func (*SignaturePolicyEnvelope) Descriptor deprecated

func (*SignaturePolicyEnvelope) Descriptor() ([]byte, []int)

Deprecated: Use SignaturePolicyEnvelope.ProtoReflect.Descriptor instead.

func (*SignaturePolicyEnvelope) GetIdentities

func (x *SignaturePolicyEnvelope) GetIdentities() []*pbmsp.MSPPrincipal

func (*SignaturePolicyEnvelope) GetRule

func (*SignaturePolicyEnvelope) GetVersion

func (x *SignaturePolicyEnvelope) GetVersion() int32

func (*SignaturePolicyEnvelope) ProtoMessage

func (*SignaturePolicyEnvelope) ProtoMessage()

func (*SignaturePolicyEnvelope) ProtoReflect

func (x *SignaturePolicyEnvelope) ProtoReflect() protoreflect.Message

func (*SignaturePolicyEnvelope) Reset

func (x *SignaturePolicyEnvelope) Reset()

func (*SignaturePolicyEnvelope) String

func (x *SignaturePolicyEnvelope) String() string

type SignaturePolicy_NOutOf

type SignaturePolicy_NOutOf struct {
	N     int32              `protobuf:"varint,1,opt,name=n,proto3" json:"n,omitempty"`
	Rules []*SignaturePolicy `protobuf:"bytes,2,rep,name=rules,proto3" json:"rules,omitempty"`
	// contains filtered or unexported fields
}

func (*SignaturePolicy_NOutOf) Descriptor deprecated

func (*SignaturePolicy_NOutOf) Descriptor() ([]byte, []int)

Deprecated: Use SignaturePolicy_NOutOf.ProtoReflect.Descriptor instead.

func (*SignaturePolicy_NOutOf) GetN

func (x *SignaturePolicy_NOutOf) GetN() int32

func (*SignaturePolicy_NOutOf) GetRules

func (x *SignaturePolicy_NOutOf) GetRules() []*SignaturePolicy

func (*SignaturePolicy_NOutOf) ProtoMessage

func (*SignaturePolicy_NOutOf) ProtoMessage()

func (*SignaturePolicy_NOutOf) ProtoReflect

func (x *SignaturePolicy_NOutOf) ProtoReflect() protoreflect.Message

func (*SignaturePolicy_NOutOf) Reset

func (x *SignaturePolicy_NOutOf) Reset()

func (*SignaturePolicy_NOutOf) String

func (x *SignaturePolicy_NOutOf) String() string

type SignaturePolicy_NOutOf_

type SignaturePolicy_NOutOf_ struct {
	NOutOf *SignaturePolicy_NOutOf `protobuf:"bytes,2,opt,name=n_out_of,json=nOutOf,proto3,oneof"`
}

type SignaturePolicy_SignedBy

type SignaturePolicy_SignedBy struct {
	SignedBy int32 `protobuf:"varint,1,opt,name=signed_by,json=signedBy,proto3,oneof"`
}

type Status

type Status int32
const (
	Status_UNKNOWN                  Status = 0
	Status_SUCCESS                  Status = 200
	Status_BAD_REQUEST              Status = 400
	Status_FORBIDDEN                Status = 403
	Status_NOT_FOUND                Status = 404
	Status_REQUEST_ENTITY_TOO_LARGE Status = 413
	Status_INTERNAL_SERVER_ERROR    Status = 500
	Status_NOT_IMPLEMENTED          Status = 501
	Status_SERVICE_UNAVAILABLE      Status = 503
)

func (Status) Descriptor

func (Status) Descriptor() protoreflect.EnumDescriptor

func (Status) Enum

func (x Status) Enum() *Status

func (Status) EnumDescriptor deprecated

func (Status) EnumDescriptor() ([]byte, []int)

Deprecated: Use Status.Descriptor instead.

func (Status) Number

func (x Status) Number() protoreflect.EnumNumber

func (Status) String

func (x Status) String() string

func (Status) Type

func (Status) Type() protoreflect.EnumType

Jump to

Keyboard shortcuts

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