6 Star 46 Fork 28

Hyperledger/fabric

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
msp_principal.pb.go 13.95 KB
一键复制 编辑 原始数据 按行查看 历史
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: msp/msp_principal.proto
package msp
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
type MSPPrincipal_Classification int32
const (
MSPPrincipal_ROLE MSPPrincipal_Classification = 0
// one of a member of MSP network, and the one of an
// administrator of an MSP network
MSPPrincipal_ORGANIZATION_UNIT MSPPrincipal_Classification = 1
// groupping of entities, per MSP affiliation
// E.g., this can well be represented by an MSP's
// Organization unit
MSPPrincipal_IDENTITY MSPPrincipal_Classification = 2
// identity
MSPPrincipal_ANONYMITY MSPPrincipal_Classification = 3
// an identity to be anonymous or nominal.
MSPPrincipal_COMBINED MSPPrincipal_Classification = 4
)
var MSPPrincipal_Classification_name = map[int32]string{
0: "ROLE",
1: "ORGANIZATION_UNIT",
2: "IDENTITY",
3: "ANONYMITY",
4: "COMBINED",
}
var MSPPrincipal_Classification_value = map[string]int32{
"ROLE": 0,
"ORGANIZATION_UNIT": 1,
"IDENTITY": 2,
"ANONYMITY": 3,
"COMBINED": 4,
}
func (x MSPPrincipal_Classification) String() string {
return proto.EnumName(MSPPrincipal_Classification_name, int32(x))
}
func (MSPPrincipal_Classification) EnumDescriptor() ([]byte, []int) {
return fileDescriptor2, []int{0, 0}
}
type MSPRole_MSPRoleType int32
const (
MSPRole_MEMBER MSPRole_MSPRoleType = 0
MSPRole_ADMIN MSPRole_MSPRoleType = 1
MSPRole_CLIENT MSPRole_MSPRoleType = 2
MSPRole_PEER MSPRole_MSPRoleType = 3
)
var MSPRole_MSPRoleType_name = map[int32]string{
0: "MEMBER",
1: "ADMIN",
2: "CLIENT",
3: "PEER",
}
var MSPRole_MSPRoleType_value = map[string]int32{
"MEMBER": 0,
"ADMIN": 1,
"CLIENT": 2,
"PEER": 3,
}
func (x MSPRole_MSPRoleType) String() string {
return proto.EnumName(MSPRole_MSPRoleType_name, int32(x))
}
func (MSPRole_MSPRoleType) EnumDescriptor() ([]byte, []int) { return fileDescriptor2, []int{2, 0} }
type MSPIdentityAnonymity_MSPIdentityAnonymityType int32
const (
MSPIdentityAnonymity_NOMINAL MSPIdentityAnonymity_MSPIdentityAnonymityType = 0
MSPIdentityAnonymity_ANONYMOUS MSPIdentityAnonymity_MSPIdentityAnonymityType = 1
)
var MSPIdentityAnonymity_MSPIdentityAnonymityType_name = map[int32]string{
0: "NOMINAL",
1: "ANONYMOUS",
}
var MSPIdentityAnonymity_MSPIdentityAnonymityType_value = map[string]int32{
"NOMINAL": 0,
"ANONYMOUS": 1,
}
func (x MSPIdentityAnonymity_MSPIdentityAnonymityType) String() string {
return proto.EnumName(MSPIdentityAnonymity_MSPIdentityAnonymityType_name, int32(x))
}
func (MSPIdentityAnonymity_MSPIdentityAnonymityType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor2, []int{3, 0}
}
// 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
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 `protobuf:"varint,1,opt,name=principal_classification,json=principalClassification,enum=common.MSPPrincipal_Classification" json:"principal_classification,omitempty"`
// 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.
// For the Combined Classification type, the Principal is a marshalled
// CombinedPrincipal.
Principal []byte `protobuf:"bytes,2,opt,name=principal,proto3" json:"principal,omitempty"`
}
func (m *MSPPrincipal) Reset() { *m = MSPPrincipal{} }
func (m *MSPPrincipal) String() string { return proto.CompactTextString(m) }
func (*MSPPrincipal) ProtoMessage() {}
func (*MSPPrincipal) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} }
func (m *MSPPrincipal) GetPrincipalClassification() MSPPrincipal_Classification {
if m != nil {
return m.PrincipalClassification
}
return MSPPrincipal_ROLE
}
func (m *MSPPrincipal) GetPrincipal() []byte {
if m != nil {
return m.Principal
}
return nil
}
// 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.
type OrganizationUnit struct {
// MSPIdentifier represents the identifier of the MSP this organization unit
// refers to
MspIdentifier string `protobuf:"bytes,1,opt,name=msp_identifier,json=mspIdentifier" json:"msp_identifier,omitempty"`
// OrganizationUnitIdentifier defines the organizational unit under the
// MSP identified with MSPIdentifier
OrganizationalUnitIdentifier string `protobuf:"bytes,2,opt,name=organizational_unit_identifier,json=organizationalUnitIdentifier" json:"organizational_unit_identifier,omitempty"`
// CertifiersIdentifier is the hash of certificates chain of trust
// related to this organizational unit
CertifiersIdentifier []byte `protobuf:"bytes,3,opt,name=certifiers_identifier,json=certifiersIdentifier,proto3" json:"certifiers_identifier,omitempty"`
}
func (m *OrganizationUnit) Reset() { *m = OrganizationUnit{} }
func (m *OrganizationUnit) String() string { return proto.CompactTextString(m) }
func (*OrganizationUnit) ProtoMessage() {}
func (*OrganizationUnit) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1} }
func (m *OrganizationUnit) GetMspIdentifier() string {
if m != nil {
return m.MspIdentifier
}
return ""
}
func (m *OrganizationUnit) GetOrganizationalUnitIdentifier() string {
if m != nil {
return m.OrganizationalUnitIdentifier
}
return ""
}
func (m *OrganizationUnit) GetCertifiersIdentifier() []byte {
if m != nil {
return m.CertifiersIdentifier
}
return nil
}
// 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.
type MSPRole struct {
// MSPIdentifier represents the identifier of the MSP this principal
// refers to
MspIdentifier string `protobuf:"bytes,1,opt,name=msp_identifier,json=mspIdentifier" json:"msp_identifier,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"`
}
func (m *MSPRole) Reset() { *m = MSPRole{} }
func (m *MSPRole) String() string { return proto.CompactTextString(m) }
func (*MSPRole) ProtoMessage() {}
func (*MSPRole) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{2} }
func (m *MSPRole) GetMspIdentifier() string {
if m != nil {
return m.MspIdentifier
}
return ""
}
func (m *MSPRole) GetRole() MSPRole_MSPRoleType {
if m != nil {
return m.Role
}
return MSPRole_MEMBER
}
// MSPIdentityAnonymity can be used to enforce an identity to be anonymous or nominal.
type MSPIdentityAnonymity struct {
AnonymityType MSPIdentityAnonymity_MSPIdentityAnonymityType `protobuf:"varint,1,opt,name=anonymity_type,json=anonymityType,enum=common.MSPIdentityAnonymity_MSPIdentityAnonymityType" json:"anonymity_type,omitempty"`
}
func (m *MSPIdentityAnonymity) Reset() { *m = MSPIdentityAnonymity{} }
func (m *MSPIdentityAnonymity) String() string { return proto.CompactTextString(m) }
func (*MSPIdentityAnonymity) ProtoMessage() {}
func (*MSPIdentityAnonymity) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{3} }
func (m *MSPIdentityAnonymity) GetAnonymityType() MSPIdentityAnonymity_MSPIdentityAnonymityType {
if m != nil {
return m.AnonymityType
}
return MSPIdentityAnonymity_NOMINAL
}
// CombinedPrincipal governs the organization of the Principal
// field of a policy principal when principal_classification has
// indicated that a combined form of principals is required
type CombinedPrincipal struct {
// Principals refer to combined principals
Principals []*MSPPrincipal `protobuf:"bytes,1,rep,name=principals" json:"principals,omitempty"`
}
func (m *CombinedPrincipal) Reset() { *m = CombinedPrincipal{} }
func (m *CombinedPrincipal) String() string { return proto.CompactTextString(m) }
func (*CombinedPrincipal) ProtoMessage() {}
func (*CombinedPrincipal) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{4} }
func (m *CombinedPrincipal) GetPrincipals() []*MSPPrincipal {
if m != nil {
return m.Principals
}
return nil
}
func init() {
proto.RegisterType((*MSPPrincipal)(nil), "common.MSPPrincipal")
proto.RegisterType((*OrganizationUnit)(nil), "common.OrganizationUnit")
proto.RegisterType((*MSPRole)(nil), "common.MSPRole")
proto.RegisterType((*MSPIdentityAnonymity)(nil), "common.MSPIdentityAnonymity")
proto.RegisterType((*CombinedPrincipal)(nil), "common.CombinedPrincipal")
proto.RegisterEnum("common.MSPPrincipal_Classification", MSPPrincipal_Classification_name, MSPPrincipal_Classification_value)
proto.RegisterEnum("common.MSPRole_MSPRoleType", MSPRole_MSPRoleType_name, MSPRole_MSPRoleType_value)
proto.RegisterEnum("common.MSPIdentityAnonymity_MSPIdentityAnonymityType", MSPIdentityAnonymity_MSPIdentityAnonymityType_name, MSPIdentityAnonymity_MSPIdentityAnonymityType_value)
}
func init() { proto.RegisterFile("msp/msp_principal.proto", fileDescriptor2) }
var fileDescriptor2 = []byte{
// 519 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x93, 0xdf, 0x6a, 0xdb, 0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, 0x00, 0x1d, 0x6f, 0x17, 0x2c, 0xb3, 0x3c, 0x66, 0xcf, 0x0e, 0xfa, 0x28, 0xcd, 0xf3, 0x97,
0xea, 0xc5, 0x64, 0x39, 0x69, 0xdb, 0x93, 0x43, 0xf5, 0x13, 0xf4, 0xfe, 0x85, 0xe2, 0x26, 0x9c,
0x53, 0xcb, 0x24, 0x54, 0x9f, 0xa1, 0x93, 0x83, 0x27, 0xac, 0xc5, 0x1c, 0x29, 0x2a, 0x81, 0xcb,
0x89, 0x08, 0x57, 0x3c, 0x62, 0xeb, 0x83, 0xed, 0x3f, 0x00, 0xec, 0x5d, 0x98, 0xf6, 0x94, 0x7e,
0x7d, 0xd0, 0x1c, 0x75, 0x5f, 0x32, 0xba, 0x23, 0x71, 0x63, 0x1b, 0xde, 0x89, 0x64, 0xab, 0x3d,
0xe6, 0x31, 0x4b, 0x02, 0xb6, 0xde, 0xb2, 0x44, 0xdb, 0x78, 0xab, 0x84, 0xfb, 0xd5, 0x2b, 0x4b,
0x9f, 0x1b, 0xdc, 0x0f, 0xb6, 0x3c, 0x7b, 0x7c, 0x5a, 0x15, 0xe1, 0x50, 0x82, 0x87, 0x15, 0x3c,
0xac, 0xe0, 0xe2, 0x9d, 0xae, 0xce, 0xca, 0xff, 0xdb, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x40,
0x36, 0xd2, 0xf9, 0xb9, 0x03, 0x00, 0x00,
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hyperledger/fabric.git
git@gitee.com:hyperledger/fabric.git
hyperledger
fabric
fabric
v1.2.0

搜索帮助