Documentation ¶
Overview ¶
Package common is a generated protocol buffer package.
It is generated from these files:
common/common.proto common/configuration.proto common/msp_principal.proto
It has these top-level messages:
LastConfiguration Metadata MetadataSignature Header ChainHeader SignatureHeader Payload Envelope Block BlockHeader BlockData BlockMetadata ConfigurationEnvelope ConfigurationTemplate SignedConfigurationItem ConfigurationItem ConfigurationSignature Policy SignaturePolicyEnvelope SignaturePolicy HashingAlgorithm BlockDataHashingStructure OrdererAddresses MSPPrincipal OrganizationUnit MSPRole
Index ¶
- Variables
- type Block
- type BlockData
- type BlockDataHashingStructure
- type BlockHeader
- type BlockMetadata
- type BlockMetadataIndex
- type ChainHeader
- type ConfigurationEnvelope
- type ConfigurationItem
- type ConfigurationItem_ConfigurationType
- type ConfigurationSignature
- type ConfigurationTemplate
- type Envelope
- type HashingAlgorithm
- type Header
- type HeaderType
- type LastConfiguration
- type MSPPrincipal
- type MSPPrincipal_Classification
- type MSPRole
- type MSPRole_MSPRoleType
- type Metadata
- type MetadataSignature
- type OrdererAddresses
- type OrganizationUnit
- type Payload
- type Policy
- type Policy_PolicyType
- type Signable
- type SignatureHeader
- type SignaturePolicy
- func (*SignaturePolicy) Descriptor() ([]byte, []int)
- func (m *SignaturePolicy) GetFrom() *SignaturePolicy_NOutOf
- func (m *SignaturePolicy) GetSignedBy() int32
- func (m *SignaturePolicy) GetType() isSignaturePolicy_Type
- func (*SignaturePolicy) ProtoMessage()
- func (m *SignaturePolicy) Reset()
- func (m *SignaturePolicy) String() string
- func (*SignaturePolicy) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, ...)
- type SignaturePolicyEnvelope
- func (*SignaturePolicyEnvelope) Descriptor() ([]byte, []int)
- func (m *SignaturePolicyEnvelope) GetIdentities() []*MSPPrincipal
- func (m *SignaturePolicyEnvelope) GetPolicy() *SignaturePolicy
- func (*SignaturePolicyEnvelope) ProtoMessage()
- func (m *SignaturePolicyEnvelope) Reset()
- func (m *SignaturePolicyEnvelope) String() string
- type SignaturePolicy_From
- type SignaturePolicy_NOutOf
- type SignaturePolicy_SignedBy
- type SignedConfigurationItem
- func (sci *SignedConfigurationItem) AsSignedData() ([]*SignedData, error)
- func (*SignedConfigurationItem) Descriptor() ([]byte, []int)
- func (m *SignedConfigurationItem) GetSignatures() []*ConfigurationSignature
- func (*SignedConfigurationItem) ProtoMessage()
- func (m *SignedConfigurationItem) Reset()
- func (m *SignedConfigurationItem) String() string
- type SignedData
- type Status
Constants ¶
This section is empty.
Variables ¶
var BlockMetadataIndex_name = map[int32]string{
0: "SIGNATURES",
1: "LAST_CONFIGURATION",
2: "TRANSACTIONS_FILTER",
3: "ORDERER",
}
var BlockMetadataIndex_value = map[string]int32{
"SIGNATURES": 0,
"LAST_CONFIGURATION": 1,
"TRANSACTIONS_FILTER": 2,
"ORDERER": 3,
}
var ConfigurationItem_ConfigurationType_name = map[int32]string{
0: "Policy",
1: "Chain",
2: "Orderer",
3: "Peer",
4: "MSP",
}
var ConfigurationItem_ConfigurationType_value = map[string]int32{
"Policy": 0,
"Chain": 1,
"Orderer": 2,
"Peer": 3,
"MSP": 4,
}
var HeaderType_name = map[int32]string{
0: "MESSAGE",
1: "CONFIGURATION_TRANSACTION",
2: "CONFIGURATION_ITEM",
3: "ENDORSER_TRANSACTION",
4: "ORDERER_TRANSACTION",
5: "DELIVER_SEEK_INFO",
}
var HeaderType_value = map[string]int32{
"MESSAGE": 0,
"CONFIGURATION_TRANSACTION": 1,
"CONFIGURATION_ITEM": 2,
"ENDORSER_TRANSACTION": 3,
"ORDERER_TRANSACTION": 4,
"DELIVER_SEEK_INFO": 5,
}
var MSPPrincipal_Classification_name = map[int32]string{
0: "ByMSPRole",
1: "ByOrganizationUnit",
2: "ByIdentity",
}
var MSPPrincipal_Classification_value = map[string]int32{
"ByMSPRole": 0,
"ByOrganizationUnit": 1,
"ByIdentity": 2,
}
var MSPRole_MSPRoleType_name = map[int32]string{
0: "Member",
1: "Admin",
}
var MSPRole_MSPRoleType_value = map[string]int32{
"Member": 0,
"Admin": 1,
}
var Policy_PolicyType_name = map[int32]string{
0: "UNKNOWN",
1: "SIGNATURE",
2: "MSP",
}
var Policy_PolicyType_value = map[string]int32{
"UNKNOWN": 0,
"SIGNATURE": 1,
"MSP": 2,
}
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",
503: "SERVICE_UNAVAILABLE",
}
var 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,
"SERVICE_UNAVAILABLE": 503,
}
Functions ¶
This section is empty.
Types ¶
type Block ¶
type Block struct { Header *BlockHeader `protobuf:"bytes,1,opt,name=Header" json:"Header,omitempty"` Data *BlockData `protobuf:"bytes,2,opt,name=Data" json:"Data,omitempty"` Metadata *BlockMetadata `protobuf:"bytes,3,opt,name=Metadata" json:"Metadata,omitempty"` }
This is finalized block structure to be shared among the orderer and peer Note that the BlockHeader chains to the previous BlockHeader, and the BlockData hash is embedded in the BlockHeader. This makes it natural and obvious that the Data is included in the hash, but the Metadata is not.
func (*Block) Descriptor ¶
func (*Block) GetHeader ¶
func (m *Block) GetHeader() *BlockHeader
func (*Block) GetMetadata ¶
func (m *Block) GetMetadata() *BlockMetadata
func (*Block) ProtoMessage ¶
func (*Block) ProtoMessage()
type BlockData ¶
type BlockData struct {
Data [][]byte `protobuf:"bytes,1,rep,name=Data,proto3" json:"Data,omitempty"`
}
func (*BlockData) Descriptor ¶
func (*BlockData) ProtoMessage ¶
func (*BlockData) ProtoMessage()
type BlockDataHashingStructure ¶
type BlockDataHashingStructure struct { // width specifies the width of the Merkle tree to use when computing the BlockDataHash // in order to replicate flat hashing, set this width to MAX_UINT32 Width uint32 `protobuf:"varint,1,opt,name=width" json:"width,omitempty"` }
BlockDataHashingStructure is encoded into the configuration transaction as a configuration item of type Chain with a Key of "BlockDataHashingStructure" and a Value of HashingAlgorithm as marshaled protobuf bytes
func (*BlockDataHashingStructure) Descriptor ¶
func (*BlockDataHashingStructure) Descriptor() ([]byte, []int)
func (*BlockDataHashingStructure) ProtoMessage ¶
func (*BlockDataHashingStructure) ProtoMessage()
func (*BlockDataHashingStructure) Reset ¶
func (m *BlockDataHashingStructure) Reset()
func (*BlockDataHashingStructure) String ¶
func (m *BlockDataHashingStructure) String() string
type BlockHeader ¶
type BlockHeader struct { Number uint64 `protobuf:"varint,1,opt,name=Number" json:"Number,omitempty"` PreviousHash []byte `protobuf:"bytes,2,opt,name=PreviousHash,proto3" json:"PreviousHash,omitempty"` DataHash []byte `protobuf:"bytes,3,opt,name=DataHash,proto3" json:"DataHash,omitempty"` }
BlockHeader is the element of the block which forms the block chain The block header is hashed using the configured chain hashing algorithm over the ASN.1 encoding of the BlockHeader
func (*BlockHeader) Bytes ¶
func (b *BlockHeader) Bytes() []byte
Bytes returns the ASN.1 marshaled representation of the block header.
func (*BlockHeader) Descriptor ¶
func (*BlockHeader) Descriptor() ([]byte, []int)
func (*BlockHeader) Hash ¶
func (b *BlockHeader) Hash() []byte
Hash returns the hash of the block header. XXX This method will be removed shortly to allow for confgurable hashing algorithms
func (*BlockHeader) ProtoMessage ¶
func (*BlockHeader) ProtoMessage()
func (*BlockHeader) Reset ¶
func (m *BlockHeader) Reset()
func (*BlockHeader) String ¶
func (m *BlockHeader) String() string
type BlockMetadata ¶
type BlockMetadata struct {
Metadata [][]byte `protobuf:"bytes,1,rep,name=Metadata,proto3" json:"Metadata,omitempty"`
}
func (*BlockMetadata) Descriptor ¶
func (*BlockMetadata) Descriptor() ([]byte, []int)
func (*BlockMetadata) ProtoMessage ¶
func (*BlockMetadata) ProtoMessage()
func (*BlockMetadata) Reset ¶
func (m *BlockMetadata) Reset()
func (*BlockMetadata) String ¶
func (m *BlockMetadata) String() string
type BlockMetadataIndex ¶
type BlockMetadataIndex int32
This enum enlists indexes of the block metadata array
const ( BlockMetadataIndex_SIGNATURES BlockMetadataIndex = 0 BlockMetadataIndex_LAST_CONFIGURATION BlockMetadataIndex = 1 BlockMetadataIndex_TRANSACTIONS_FILTER BlockMetadataIndex = 2 BlockMetadataIndex_ORDERER BlockMetadataIndex = 3 )
func (BlockMetadataIndex) EnumDescriptor ¶
func (BlockMetadataIndex) EnumDescriptor() ([]byte, []int)
func (BlockMetadataIndex) String ¶
func (x BlockMetadataIndex) String() string
type ChainHeader ¶
type ChainHeader struct { Type int32 `protobuf:"varint,1,opt,name=type" json:"type,omitempty"` // Version indicates message protocol version Version int32 `protobuf:"varint,2,opt,name=version" json:"version,omitempty"` // Timestamp is the local time when the message was created // by the sender Timestamp *google_protobuf.Timestamp `protobuf:"bytes,3,opt,name=timestamp" json:"timestamp,omitempty"` // Identifier of the chain this message is bound for ChainID string `protobuf:"bytes,4,opt,name=chainID" json:"chainID,omitempty"` // An unique identifier that is used end-to-end. // - set by higher layers such as end user or SDK // - passed to the endorser (which will check for uniqueness) // - as the header is passed along unchanged, it will be // be retrieved by the committer (uniqueness check here as well) // - to be stored in the ledger TxID string `protobuf:"bytes,5,opt,name=txID" json:"txID,omitempty"` // The epoch in which this header was generated, where epoch is defined based on block height // Epoch in which the response has been generated. This field identifies a // logical window of time. A proposal response is accepted by a peer only if // two conditions hold: // 1. the epoch specified in the message is the current epoch // 2. this message has been only seen once during this epoch (i.e. it hasn't // been replayed) Epoch uint64 `protobuf:"varint,6,opt,name=epoch" json:"epoch,omitempty"` // Extension that may be attached based on the header type Extension []byte `protobuf:"bytes,7,opt,name=extension,proto3" json:"extension,omitempty"` }
Header is a generic replay prevention and identity message to include in a signed payload
func (*ChainHeader) Descriptor ¶
func (*ChainHeader) Descriptor() ([]byte, []int)
func (*ChainHeader) GetTimestamp ¶
func (m *ChainHeader) GetTimestamp() *google_protobuf.Timestamp
func (*ChainHeader) ProtoMessage ¶
func (*ChainHeader) ProtoMessage()
func (*ChainHeader) Reset ¶
func (m *ChainHeader) Reset()
func (*ChainHeader) String ¶
func (m *ChainHeader) String() string
type ConfigurationEnvelope ¶
type ConfigurationEnvelope struct {
Items []*SignedConfigurationItem `protobuf:"bytes,1,rep,name=Items" json:"Items,omitempty"`
}
ConfigurationEnvelope is designed to contain _all_ configuration for a chain with no dependency on previous configuration transactions.
It is generated with the following scheme:
- Retrieve the existing configuration
- Note the highest configuration sequence number, store it and increment it by one
- Modify desired ConfigurationItems, setting each LastModified to the stored and incremented sequence number a) Note that the ConfigurationItem has a ChainHeader header attached to it, who's type is set to CONFIGURATION_ITEM
- Update SignedConfigurationItem with appropriate signatures over the modified ConfigurationItem a) Each signature is of type ConfigurationSignature b) The ConfigurationSignature signature is over the concatenation of signatureHeader and the ConfigurationItem bytes (which includes a ChainHeader)
- Submit new Configuration for ordering in Envelope signed by submitter a) The Envelope Payload has data set to the marshaled ConfigurationEnvelope b) The Envelope Payload has a header of type Header.Type.CONFIGURATION_TRANSACTION
The configuration manager will verify:
- All configuration items and the envelope refer to the correct chain
- Some configuration item has been added or modified
- No existing configuration item has been ommitted
- All configuration changes have a LastModification of one more than the last configuration's highest LastModification number
- All configuration changes satisfy the corresponding modification policy
func (*ConfigurationEnvelope) Descriptor ¶
func (*ConfigurationEnvelope) Descriptor() ([]byte, []int)
func (*ConfigurationEnvelope) GetItems ¶
func (m *ConfigurationEnvelope) GetItems() []*SignedConfigurationItem
func (*ConfigurationEnvelope) ProtoMessage ¶
func (*ConfigurationEnvelope) ProtoMessage()
func (*ConfigurationEnvelope) Reset ¶
func (m *ConfigurationEnvelope) Reset()
func (*ConfigurationEnvelope) String ¶
func (m *ConfigurationEnvelope) String() string
type ConfigurationItem ¶
type ConfigurationItem struct { Header *ChainHeader `protobuf:"bytes,1,opt,name=Header" json:"Header,omitempty"` Type ConfigurationItem_ConfigurationType `protobuf:"varint,2,opt,name=Type,enum=common.ConfigurationItem_ConfigurationType" json:"Type,omitempty"` LastModified uint64 `protobuf:"varint,3,opt,name=LastModified" json:"LastModified,omitempty"` ModificationPolicy string `protobuf:"bytes,4,opt,name=ModificationPolicy" json:"ModificationPolicy,omitempty"` Key string `protobuf:"bytes,5,opt,name=Key" json:"Key,omitempty"` Value []byte `protobuf:"bytes,6,opt,name=Value,proto3" json:"Value,omitempty"` }
func (*ConfigurationItem) Descriptor ¶
func (*ConfigurationItem) Descriptor() ([]byte, []int)
func (*ConfigurationItem) GetHeader ¶
func (m *ConfigurationItem) GetHeader() *ChainHeader
func (*ConfigurationItem) ProtoMessage ¶
func (*ConfigurationItem) ProtoMessage()
func (*ConfigurationItem) Reset ¶
func (m *ConfigurationItem) Reset()
func (*ConfigurationItem) String ¶
func (m *ConfigurationItem) String() string
type ConfigurationItem_ConfigurationType ¶
type ConfigurationItem_ConfigurationType int32
const ( ConfigurationItem_Policy ConfigurationItem_ConfigurationType = 0 ConfigurationItem_Chain ConfigurationItem_ConfigurationType = 1 ConfigurationItem_Orderer ConfigurationItem_ConfigurationType = 2 ConfigurationItem_Peer ConfigurationItem_ConfigurationType = 3 ConfigurationItem_MSP ConfigurationItem_ConfigurationType = 4 )
func (ConfigurationItem_ConfigurationType) EnumDescriptor ¶
func (ConfigurationItem_ConfigurationType) EnumDescriptor() ([]byte, []int)
func (ConfigurationItem_ConfigurationType) String ¶
func (x ConfigurationItem_ConfigurationType) String() string
type ConfigurationSignature ¶
type ConfigurationSignature struct { SignatureHeader []byte `protobuf:"bytes,1,opt,name=signatureHeader,proto3" json:"signatureHeader,omitempty"` Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` }
func (*ConfigurationSignature) Descriptor ¶
func (*ConfigurationSignature) Descriptor() ([]byte, []int)
func (*ConfigurationSignature) ProtoMessage ¶
func (*ConfigurationSignature) ProtoMessage()
func (*ConfigurationSignature) Reset ¶
func (m *ConfigurationSignature) Reset()
func (*ConfigurationSignature) String ¶
func (m *ConfigurationSignature) String() string
type ConfigurationTemplate ¶
type ConfigurationTemplate struct {
Items []*ConfigurationItem `protobuf:"bytes,1,rep,name=Items" json:"Items,omitempty"`
}
ConfigurationTemplate is used as a serialization format to share configuration templates The orderer supplies a configuration template to the user to use when constructing a new chain creation transaction, so this is used to facilitate that.
func (*ConfigurationTemplate) Descriptor ¶
func (*ConfigurationTemplate) Descriptor() ([]byte, []int)
func (*ConfigurationTemplate) GetItems ¶
func (m *ConfigurationTemplate) GetItems() []*ConfigurationItem
func (*ConfigurationTemplate) ProtoMessage ¶
func (*ConfigurationTemplate) ProtoMessage()
func (*ConfigurationTemplate) Reset ¶
func (m *ConfigurationTemplate) Reset()
func (*ConfigurationTemplate) String ¶
func (m *ConfigurationTemplate) String() string
type Envelope ¶
type Envelope struct { // A marshaled Payload Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"` // A signature by the creator specified in the Payload header Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` }
Envelope wraps a Payload with a signature so that the message may be authenticated
func (*Envelope) AsSignedData ¶
func (env *Envelope) AsSignedData() ([]*SignedData, error)
AsSignedData returns the signatures for the Envelope as SignedData slice of length 1 or an error indicating why this was not possible
func (*Envelope) Descriptor ¶
func (*Envelope) ProtoMessage ¶
func (*Envelope) ProtoMessage()
type HashingAlgorithm ¶
type HashingAlgorithm struct { // Currently supported algorithms are: SHAKE256 Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` }
HashingAlgorithm is encoded into the configuration transaction as a configuration item of type Chain with a Key of "HashingAlgorithm" and a Value of HashingAlgorithm as marshaled protobuf bytes
func (*HashingAlgorithm) Descriptor ¶
func (*HashingAlgorithm) Descriptor() ([]byte, []int)
func (*HashingAlgorithm) ProtoMessage ¶
func (*HashingAlgorithm) ProtoMessage()
func (*HashingAlgorithm) Reset ¶
func (m *HashingAlgorithm) Reset()
func (*HashingAlgorithm) String ¶
func (m *HashingAlgorithm) String() string
type Header ¶
type Header struct { ChainHeader *ChainHeader `protobuf:"bytes,1,opt,name=chainHeader" json:"chainHeader,omitempty"` SignatureHeader *SignatureHeader `protobuf:"bytes,2,opt,name=signatureHeader" json:"signatureHeader,omitempty"` }
func (*Header) Descriptor ¶
func (*Header) GetChainHeader ¶
func (m *Header) GetChainHeader() *ChainHeader
func (*Header) GetSignatureHeader ¶
func (m *Header) GetSignatureHeader() *SignatureHeader
func (*Header) ProtoMessage ¶
func (*Header) ProtoMessage()
type HeaderType ¶
type HeaderType int32
const ( HeaderType_MESSAGE HeaderType = 0 HeaderType_CONFIGURATION_TRANSACTION HeaderType = 1 HeaderType_CONFIGURATION_ITEM HeaderType = 2 HeaderType_ENDORSER_TRANSACTION HeaderType = 3 HeaderType_ORDERER_TRANSACTION HeaderType = 4 HeaderType_DELIVER_SEEK_INFO HeaderType = 5 )
func (HeaderType) EnumDescriptor ¶
func (HeaderType) EnumDescriptor() ([]byte, []int)
func (HeaderType) String ¶
func (x HeaderType) String() string
type LastConfiguration ¶
type LastConfiguration struct {
Index uint64 `protobuf:"varint,1,opt,name=index" json:"index,omitempty"`
}
LastConfiguration is the encoded value for the Metadata message which is encoded in the LAST_CONFIGURATION block metadata index
func (*LastConfiguration) Descriptor ¶
func (*LastConfiguration) Descriptor() ([]byte, []int)
func (*LastConfiguration) ProtoMessage ¶
func (*LastConfiguration) ProtoMessage()
func (*LastConfiguration) Reset ¶
func (m *LastConfiguration) Reset()
func (*LastConfiguration) String ¶
func (m *LastConfiguration) String() string
type MSPPrincipal ¶
type MSPPrincipal struct { // Classification describes the way that one should process // Principal. An Classification value of "ByOrganizationUnit" reflects // that "Principal" contains the name of an organization this MSP // handles. A Classification value "ByIdentity" means that // "Principal" contains a specific identity. Default value // denotes that Principal contains one of the groups by // default supported by all MSPs ("admin" or "member"). PrincipalClassification MSPPrincipal_Classification `` /* 133-byte string literal not displayed */ // Principal completes the policy principal definition. For the default // principal types, Principal can be either "Admin" or "Member". // For the ByOrganizationUnit/ByIdentity values of Classification, // PolicyPrincipal acquires its value from an organization unit or // identity, respectively. Principal []byte `protobuf:"bytes,2,opt,name=Principal,proto3" json:"Principal,omitempty"` }
MSPPrincipal aims to represent an MSP-centric set of identities. In particular, this structure allows for definition of
- a group of identities that are member of the same MSP
- a group of identities that are member of the same organization unit in the same MSP
- a group of identities that are administering a specific MSP
- a specific identity
Expressing these groups is done given two fields of the fields below
- Classification, that defines the type of classification of identities in an MSP this principal would be defined on; Classification can take three values: (i) ByMSPRole: that represents a classification of identities within MSP based on one of the two pre-defined MSP rules, "member" and "admin" (ii) ByOrganizationUnit: that represents a classification of identities within MSP based on the organization unit an identity belongs to (iii)ByIdentity that denotes that MSPPrincipal is mapped to a single identity/certificate; this would mean that the Principal bytes message
func (*MSPPrincipal) Descriptor ¶
func (*MSPPrincipal) Descriptor() ([]byte, []int)
func (*MSPPrincipal) ProtoMessage ¶
func (*MSPPrincipal) ProtoMessage()
func (*MSPPrincipal) Reset ¶
func (m *MSPPrincipal) Reset()
func (*MSPPrincipal) String ¶
func (m *MSPPrincipal) String() string
type MSPPrincipal_Classification ¶
type MSPPrincipal_Classification int32
const ( MSPPrincipal_ByMSPRole MSPPrincipal_Classification = 0 // one of a member of MSP network, and the one of an // administrator of an MSP network MSPPrincipal_ByOrganizationUnit MSPPrincipal_Classification = 1 // groupping of entities, per MSP affiliation // E.g., this can well be represented by an MSP's // Organization unit MSPPrincipal_ByIdentity MSPPrincipal_Classification = 2 )
func (MSPPrincipal_Classification) EnumDescriptor ¶
func (MSPPrincipal_Classification) EnumDescriptor() ([]byte, []int)
func (MSPPrincipal_Classification) String ¶
func (x MSPPrincipal_Classification) String() string
type MSPRole ¶
type MSPRole struct { // MSPIdentifier represents the identifier of the MSP this principal // refers to MSPIdentifier string `protobuf:"bytes,1,opt,name=MSPIdentifier" json:"MSPIdentifier,omitempty"` // MSPRoleType defines which of the available, pre-defined MSP-roles // an identiy should posess inside the MSP with identifier MSPidentifier Role MSPRole_MSPRoleType `protobuf:"varint,2,opt,name=Role,enum=common.MSPRole_MSPRoleType" json:"Role,omitempty"` }
MSPRole governs the organization of the Principal field of an MSPPrincipal when it aims to define one of the two dedicated roles within an MSP: Admin and Members.
func (*MSPRole) Descriptor ¶
func (*MSPRole) ProtoMessage ¶
func (*MSPRole) ProtoMessage()
type MSPRole_MSPRoleType ¶
type MSPRole_MSPRoleType int32
const ( MSPRole_Member MSPRole_MSPRoleType = 0 MSPRole_Admin MSPRole_MSPRoleType = 1 )
func (MSPRole_MSPRoleType) EnumDescriptor ¶
func (MSPRole_MSPRoleType) EnumDescriptor() ([]byte, []int)
func (MSPRole_MSPRoleType) String ¶
func (x MSPRole_MSPRoleType) 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" json:"signatures,omitempty"` }
Metadata is a common structure to be used to encode block metadata
func (*Metadata) Descriptor ¶
func (*Metadata) GetSignatures ¶
func (m *Metadata) GetSignatures() []*MetadataSignature
func (*Metadata) ProtoMessage ¶
func (*Metadata) ProtoMessage()
type MetadataSignature ¶
type MetadataSignature struct { SignatureHeader []byte `protobuf:"bytes,1,opt,name=signatureHeader,proto3" json:"signatureHeader,omitempty"` Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` }
func (*MetadataSignature) Descriptor ¶
func (*MetadataSignature) Descriptor() ([]byte, []int)
func (*MetadataSignature) ProtoMessage ¶
func (*MetadataSignature) ProtoMessage()
func (*MetadataSignature) Reset ¶
func (m *MetadataSignature) Reset()
func (*MetadataSignature) String ¶
func (m *MetadataSignature) String() string
type OrdererAddresses ¶
type OrdererAddresses struct {
Addresses []string `protobuf:"bytes,1,rep,name=addresses" json:"addresses,omitempty"`
}
OrdererAddresses is encoded into the configuration transaction as a configuration item of type Chain with a Key of "OrdererAddresses" and a Value of OrdererAddresses as marshaled protobuf bytes
func (*OrdererAddresses) Descriptor ¶
func (*OrdererAddresses) Descriptor() ([]byte, []int)
func (*OrdererAddresses) ProtoMessage ¶
func (*OrdererAddresses) ProtoMessage()
func (*OrdererAddresses) Reset ¶
func (m *OrdererAddresses) Reset()
func (*OrdererAddresses) String ¶
func (m *OrdererAddresses) String() string
type OrganizationUnit ¶
type OrganizationUnit struct { // MSPIdentifier represents the identifier of the MSP this organization unit // refers to MSPIdentifier string `protobuf:"bytes,1,opt,name=MSPIdentifier" json:"MSPIdentifier,omitempty"` // OrganizationUnitIdentifier defines the organization unit under the // MSP identified with MSPIdentifier OrganizationUnitIdentifier string `protobuf:"bytes,2,opt,name=OrganizationUnitIdentifier" json:"OrganizationUnitIdentifier,omitempty"` }
OrganizationUnit governs the organization of the Principal field of a policy principal when a specific organization unity members are to be defined within a policy principal.
func (*OrganizationUnit) Descriptor ¶
func (*OrganizationUnit) Descriptor() ([]byte, []int)
func (*OrganizationUnit) ProtoMessage ¶
func (*OrganizationUnit) ProtoMessage()
func (*OrganizationUnit) Reset ¶
func (m *OrganizationUnit) Reset()
func (*OrganizationUnit) String ¶
func (m *OrganizationUnit) String() string
type Payload ¶
type Payload struct { // Header is included to provide identity and prevent replay Header *Header `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"` // Data, the encoding of which is defined by the type in the header Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` }
Payload is the message contents (and header to allow for signing)
func (*Payload) Descriptor ¶
func (*Payload) ProtoMessage ¶
func (*Payload) ProtoMessage()
type Policy ¶
type Policy struct { Type int32 `protobuf:"varint,1,opt,name=type" json:"type,omitempty"` Policy []byte `protobuf:"bytes,2,opt,name=policy,proto3" json:"policy,omitempty"` }
Policy expresses a policy which the orderer can evaluate, because there has been some desire expressed to support multiple policy engines, this is typed as a oneof for now
func (*Policy) Descriptor ¶
func (*Policy) ProtoMessage ¶
func (*Policy) ProtoMessage()
type Policy_PolicyType ¶
type Policy_PolicyType int32
const ( Policy_UNKNOWN Policy_PolicyType = 0 Policy_SIGNATURE Policy_PolicyType = 1 Policy_MSP Policy_PolicyType = 2 )
func (Policy_PolicyType) EnumDescriptor ¶
func (Policy_PolicyType) EnumDescriptor() ([]byte, []int)
func (Policy_PolicyType) String ¶
func (x Policy_PolicyType) String() string
type Signable ¶
type Signable interface { // AsSignedData returns the set of signatures for a structure as SignedData or an error indicating why this was not possible AsSignedData() ([]*SignedData, error) }
Signable types are those which can map their contents to a set of SignedData
type SignatureHeader ¶
type SignatureHeader struct { // Creator of the message, specified as a certificate chain Creator []byte `protobuf:"bytes,1,opt,name=creator,proto3" json:"creator,omitempty"` // Arbitrary number that may only be used once. Can be used to detect replay attacks. Nonce []byte `protobuf:"bytes,2,opt,name=nonce,proto3" json:"nonce,omitempty"` }
func (*SignatureHeader) Descriptor ¶
func (*SignatureHeader) Descriptor() ([]byte, []int)
func (*SignatureHeader) ProtoMessage ¶
func (*SignatureHeader) ProtoMessage()
func (*SignatureHeader) Reset ¶
func (m *SignatureHeader) Reset()
func (*SignatureHeader) String ¶
func (m *SignatureHeader) String() string
type SignaturePolicy ¶
type SignaturePolicy struct { // Types that are valid to be assigned to Type: // *SignaturePolicy_SignedBy // *SignaturePolicy_From Type isSignaturePolicy_Type `protobuf_oneof:"Type"` }
SignaturePolicy is a recursive message structure which defines a featherweight DSL for describing policies which are more complicated than 'exactly this signature'. The NOutOf operator is sufficent to express AND as well as OR, as well as of course N out of the following M policies SignedBy implies that the signature is from a valid certificate which is signed by the trusted authority specified in the bytes. This will be the certificate itself for a self-signed certificate and will be the CA for more traditional certificates
func (*SignaturePolicy) Descriptor ¶
func (*SignaturePolicy) Descriptor() ([]byte, []int)
func (*SignaturePolicy) GetFrom ¶
func (m *SignaturePolicy) GetFrom() *SignaturePolicy_NOutOf
func (*SignaturePolicy) GetSignedBy ¶
func (m *SignaturePolicy) GetSignedBy() int32
func (*SignaturePolicy) GetType ¶
func (m *SignaturePolicy) GetType() isSignaturePolicy_Type
func (*SignaturePolicy) ProtoMessage ¶
func (*SignaturePolicy) ProtoMessage()
func (*SignaturePolicy) Reset ¶
func (m *SignaturePolicy) Reset()
func (*SignaturePolicy) String ¶
func (m *SignaturePolicy) String() string
func (*SignaturePolicy) XXX_OneofFuncs ¶
func (*SignaturePolicy) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{})
XXX_OneofFuncs is for the internal use of the proto package.
type SignaturePolicyEnvelope ¶
type SignaturePolicyEnvelope struct { Version int32 `protobuf:"varint,1,opt,name=Version" json:"Version,omitempty"` Policy *SignaturePolicy `protobuf:"bytes,2,opt,name=Policy" json:"Policy,omitempty"` Identities []*MSPPrincipal `protobuf:"bytes,3,rep,name=Identities" json:"Identities,omitempty"` }
SignaturePolicyEnvelope wraps a SignaturePolicy and includes a version for future enhancements
func (*SignaturePolicyEnvelope) Descriptor ¶
func (*SignaturePolicyEnvelope) Descriptor() ([]byte, []int)
func (*SignaturePolicyEnvelope) GetIdentities ¶
func (m *SignaturePolicyEnvelope) GetIdentities() []*MSPPrincipal
func (*SignaturePolicyEnvelope) GetPolicy ¶
func (m *SignaturePolicyEnvelope) GetPolicy() *SignaturePolicy
func (*SignaturePolicyEnvelope) ProtoMessage ¶
func (*SignaturePolicyEnvelope) ProtoMessage()
func (*SignaturePolicyEnvelope) Reset ¶
func (m *SignaturePolicyEnvelope) Reset()
func (*SignaturePolicyEnvelope) String ¶
func (m *SignaturePolicyEnvelope) String() string
type SignaturePolicy_From ¶
type SignaturePolicy_From struct {
From *SignaturePolicy_NOutOf `protobuf:"bytes,2,opt,name=From,oneof"`
}
type SignaturePolicy_NOutOf ¶
type SignaturePolicy_NOutOf struct { N int32 `protobuf:"varint,1,opt,name=N" json:"N,omitempty"` Policies []*SignaturePolicy `protobuf:"bytes,2,rep,name=Policies" json:"Policies,omitempty"` }
func (*SignaturePolicy_NOutOf) Descriptor ¶
func (*SignaturePolicy_NOutOf) Descriptor() ([]byte, []int)
func (*SignaturePolicy_NOutOf) GetPolicies ¶
func (m *SignaturePolicy_NOutOf) GetPolicies() []*SignaturePolicy
func (*SignaturePolicy_NOutOf) ProtoMessage ¶
func (*SignaturePolicy_NOutOf) ProtoMessage()
func (*SignaturePolicy_NOutOf) Reset ¶
func (m *SignaturePolicy_NOutOf) Reset()
func (*SignaturePolicy_NOutOf) String ¶
func (m *SignaturePolicy_NOutOf) String() string
type SignaturePolicy_SignedBy ¶
type SignaturePolicy_SignedBy struct {
SignedBy int32 `protobuf:"varint,1,opt,name=SignedBy,oneof"`
}
type SignedConfigurationItem ¶
type SignedConfigurationItem struct { ConfigurationItem []byte `protobuf:"bytes,1,opt,name=ConfigurationItem,proto3" json:"ConfigurationItem,omitempty"` Signatures []*ConfigurationSignature `protobuf:"bytes,2,rep,name=Signatures" json:"Signatures,omitempty"` }
This message may change slightly depending on the finalization of signature schemes for transactions
func (*SignedConfigurationItem) AsSignedData ¶
func (sci *SignedConfigurationItem) AsSignedData() ([]*SignedData, error)
AsSignedData returns the set of signatures for the SignedCOnfigurationItem as SignedData or an error indicating why this was not possible
func (*SignedConfigurationItem) Descriptor ¶
func (*SignedConfigurationItem) Descriptor() ([]byte, []int)
func (*SignedConfigurationItem) GetSignatures ¶
func (m *SignedConfigurationItem) GetSignatures() []*ConfigurationSignature
func (*SignedConfigurationItem) ProtoMessage ¶
func (*SignedConfigurationItem) ProtoMessage()
func (*SignedConfigurationItem) Reset ¶
func (m *SignedConfigurationItem) Reset()
func (*SignedConfigurationItem) String ¶
func (m *SignedConfigurationItem) String() string
type SignedData ¶
SignedData is used to represent the general triplet required to verify a signature This is intended to be generic across crypto schemes, while most crypto schemes will include the signing identity and a nonce within the Data, this is left to the crypto implementation
type Status ¶
type Status int32
These status codes are intended to resemble selected HTTP status codes