github.com/leonlxy/hyperledger@v1.0.0-alpha.0.20170427033203-34922035d248/protos/msp/msp_principal.pb.go (about)

     1  // Code generated by protoc-gen-go.
     2  // source: msp/msp_principal.proto
     3  // DO NOT EDIT!
     4  
     5  package msp
     6  
     7  import proto "github.com/golang/protobuf/proto"
     8  import fmt "fmt"
     9  import math "math"
    10  
    11  // Reference imports to suppress errors if they are not otherwise used.
    12  var _ = proto.Marshal
    13  var _ = fmt.Errorf
    14  var _ = math.Inf
    15  
    16  type MSPPrincipal_Classification int32
    17  
    18  const (
    19  	MSPPrincipal_ROLE MSPPrincipal_Classification = 0
    20  	// one of a member of MSP network, and the one of an
    21  	// administrator of an MSP network
    22  	MSPPrincipal_ORGANIZATION_UNIT MSPPrincipal_Classification = 1
    23  	// groupping of entities, per MSP affiliation
    24  	// E.g., this can well be represented by an MSP's
    25  	// Organization unit
    26  	MSPPrincipal_IDENTITY MSPPrincipal_Classification = 2
    27  )
    28  
    29  var MSPPrincipal_Classification_name = map[int32]string{
    30  	0: "ROLE",
    31  	1: "ORGANIZATION_UNIT",
    32  	2: "IDENTITY",
    33  }
    34  var MSPPrincipal_Classification_value = map[string]int32{
    35  	"ROLE":              0,
    36  	"ORGANIZATION_UNIT": 1,
    37  	"IDENTITY":          2,
    38  }
    39  
    40  func (x MSPPrincipal_Classification) String() string {
    41  	return proto.EnumName(MSPPrincipal_Classification_name, int32(x))
    42  }
    43  func (MSPPrincipal_Classification) EnumDescriptor() ([]byte, []int) {
    44  	return fileDescriptor2, []int{0, 0}
    45  }
    46  
    47  type MSPRole_MSPRoleType int32
    48  
    49  const (
    50  	MSPRole_MEMBER MSPRole_MSPRoleType = 0
    51  	MSPRole_ADMIN  MSPRole_MSPRoleType = 1
    52  )
    53  
    54  var MSPRole_MSPRoleType_name = map[int32]string{
    55  	0: "MEMBER",
    56  	1: "ADMIN",
    57  }
    58  var MSPRole_MSPRoleType_value = map[string]int32{
    59  	"MEMBER": 0,
    60  	"ADMIN":  1,
    61  }
    62  
    63  func (x MSPRole_MSPRoleType) String() string {
    64  	return proto.EnumName(MSPRole_MSPRoleType_name, int32(x))
    65  }
    66  func (MSPRole_MSPRoleType) EnumDescriptor() ([]byte, []int) { return fileDescriptor2, []int{2, 0} }
    67  
    68  // MSPPrincipal aims to represent an MSP-centric set of identities.
    69  // In particular, this structure allows for definition of
    70  //  - a group of identities that are member of the same MSP
    71  //  - a group of identities that are member of the same organization unit
    72  //    in the same MSP
    73  //  - a group of identities that are administering a specific MSP
    74  //  - a specific identity
    75  // Expressing these groups is done given two fields of the fields below
    76  //  - Classification, that defines the type of classification of identities
    77  //    in an MSP this principal would be defined on; Classification can take
    78  //    three values:
    79  //     (i)  ByMSPRole: that represents a classification of identities within
    80  //          MSP based on one of the two pre-defined MSP rules, "member" and "admin"
    81  //     (ii) ByOrganizationUnit: that represents a classification of identities
    82  //          within MSP based on the organization unit an identity belongs to
    83  //     (iii)ByIdentity that denotes that MSPPrincipal is mapped to a single
    84  //          identity/certificate; this would mean that the Principal bytes
    85  //          message
    86  type MSPPrincipal struct {
    87  	// Classification describes the way that one should process
    88  	// Principal. An Classification value of "ByOrganizationUnit" reflects
    89  	// that "Principal" contains the name of an organization this MSP
    90  	// handles. A Classification value "ByIdentity" means that
    91  	// "Principal" contains a specific identity. Default value
    92  	// denotes that Principal contains one of the groups by
    93  	// default supported by all MSPs ("admin" or "member").
    94  	PrincipalClassification MSPPrincipal_Classification `protobuf:"varint,1,opt,name=principal_classification,json=principalClassification,enum=common.MSPPrincipal_Classification" json:"principal_classification,omitempty"`
    95  	// Principal completes the policy principal definition. For the default
    96  	// principal types, Principal can be either "Admin" or "Member".
    97  	// For the ByOrganizationUnit/ByIdentity values of Classification,
    98  	// PolicyPrincipal acquires its value from an organization unit or
    99  	// identity, respectively.
   100  	Principal []byte `protobuf:"bytes,2,opt,name=principal,proto3" json:"principal,omitempty"`
   101  }
   102  
   103  func (m *MSPPrincipal) Reset()                    { *m = MSPPrincipal{} }
   104  func (m *MSPPrincipal) String() string            { return proto.CompactTextString(m) }
   105  func (*MSPPrincipal) ProtoMessage()               {}
   106  func (*MSPPrincipal) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} }
   107  
   108  // OrganizationUnit governs the organization of the Principal
   109  // field of a policy principal when a specific organization unity members
   110  // are to be defined within a policy principal.
   111  type OrganizationUnit struct {
   112  	// MSPIdentifier represents the identifier of the MSP this organization unit
   113  	// refers to
   114  	MspIdentifier string `protobuf:"bytes,1,opt,name=msp_identifier,json=mspIdentifier" json:"msp_identifier,omitempty"`
   115  	// OrganizationUnitIdentifier defines the organizational unit under the
   116  	// MSP identified with MSPIdentifier
   117  	OrganizationalUnitIdentifier string `protobuf:"bytes,2,opt,name=organizational_unit_identifier,json=organizationalUnitIdentifier" json:"organizational_unit_identifier,omitempty"`
   118  	// CertifiersIdentifier is the hash of certificates chain of trust
   119  	// related to this organizational unit
   120  	CertifiersIdentifier []byte `protobuf:"bytes,3,opt,name=certifiers_identifier,json=certifiersIdentifier,proto3" json:"certifiers_identifier,omitempty"`
   121  }
   122  
   123  func (m *OrganizationUnit) Reset()                    { *m = OrganizationUnit{} }
   124  func (m *OrganizationUnit) String() string            { return proto.CompactTextString(m) }
   125  func (*OrganizationUnit) ProtoMessage()               {}
   126  func (*OrganizationUnit) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1} }
   127  
   128  // MSPRole governs the organization of the Principal
   129  // field of an MSPPrincipal when it aims to define one of the
   130  // two dedicated roles within an MSP: Admin and Members.
   131  type MSPRole struct {
   132  	// MSPIdentifier represents the identifier of the MSP this principal
   133  	// refers to
   134  	MspIdentifier string `protobuf:"bytes,1,opt,name=msp_identifier,json=mspIdentifier" json:"msp_identifier,omitempty"`
   135  	// MSPRoleType defines which of the available, pre-defined MSP-roles
   136  	// an identiy should posess inside the MSP with identifier MSPidentifier
   137  	Role MSPRole_MSPRoleType `protobuf:"varint,2,opt,name=role,enum=common.MSPRole_MSPRoleType" json:"role,omitempty"`
   138  }
   139  
   140  func (m *MSPRole) Reset()                    { *m = MSPRole{} }
   141  func (m *MSPRole) String() string            { return proto.CompactTextString(m) }
   142  func (*MSPRole) ProtoMessage()               {}
   143  func (*MSPRole) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{2} }
   144  
   145  func init() {
   146  	proto.RegisterType((*MSPPrincipal)(nil), "common.MSPPrincipal")
   147  	proto.RegisterType((*OrganizationUnit)(nil), "common.OrganizationUnit")
   148  	proto.RegisterType((*MSPRole)(nil), "common.MSPRole")
   149  	proto.RegisterEnum("common.MSPPrincipal_Classification", MSPPrincipal_Classification_name, MSPPrincipal_Classification_value)
   150  	proto.RegisterEnum("common.MSPRole_MSPRoleType", MSPRole_MSPRoleType_name, MSPRole_MSPRoleType_value)
   151  }
   152  
   153  func init() { proto.RegisterFile("msp/msp_principal.proto", fileDescriptor2) }
   154  
   155  var fileDescriptor2 = []byte{
   156  	// 386 bytes of a gzipped FileDescriptorProto
   157  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x8c, 0x92, 0xdf, 0x8e, 0x93, 0x40,
   158  	0x14, 0x87, 0x77, 0xea, 0x5a, 0xb7, 0xc7, 0x4a, 0x70, 0xe2, 0x66, 0x9b, 0xb8, 0x31, 0x1b, 0xac,
   159  	0x49, 0xaf, 0x20, 0x69, 0x1f, 0xc0, 0xb4, 0x96, 0x18, 0x12, 0xf9, 0x93, 0x29, 0xbd, 0xb0, 0x17,
   160  	0x12, 0x4a, 0xa7, 0x74, 0x12, 0x60, 0x26, 0x03, 0xbd, 0xa8, 0x2f, 0xe0, 0x0b, 0xf9, 0x1a, 0xbe,
   161  	0x93, 0x01, 0x2c, 0x9d, 0x7a, 0xb5, 0x57, 0x30, 0xe7, 0xf7, 0x7d, 0x67, 0x66, 0xe0, 0xc0, 0x43,
   162  	0x5e, 0x0a, 0x2b, 0x2f, 0x45, 0x24, 0x24, 0x2b, 0x12, 0x26, 0xe2, 0xcc, 0x14, 0x92, 0x57, 0x1c,
   163  	0xf7, 0x13, 0x9e, 0xe7, 0xbc, 0x30, 0xfe, 0x20, 0x18, 0xba, 0xab, 0x20, 0x38, 0xc7, 0xf8, 0x07,
   164  	0x8c, 0x3a, 0x36, 0x4a, 0xb2, 0xb8, 0x2c, 0xd9, 0x9e, 0x25, 0x71, 0xc5, 0x78, 0x31, 0x42, 0x4f,
   165  	0x68, 0xa2, 0x4d, 0x3f, 0x9a, 0xad, 0x6b, 0xaa, 0x9e, 0xf9, 0xe5, 0x0a, 0x25, 0x0f, 0x5d, 0x93,
   166  	0xeb, 0x00, 0x3f, 0xc2, 0xa0, 0x8b, 0x46, 0xbd, 0x27, 0x34, 0x19, 0x92, 0x4b, 0xc1, 0xf8, 0x0c,
   167  	0xda, 0x7f, 0xfc, 0x1d, 0xdc, 0x12, 0xff, 0x9b, 0xad, 0xdf, 0xe0, 0x7b, 0x78, 0xeb, 0x93, 0xaf,
   168  	0x73, 0xcf, 0xd9, 0xcc, 0x43, 0xc7, 0xf7, 0xa2, 0xb5, 0xe7, 0x84, 0x3a, 0xc2, 0x43, 0xb8, 0x73,
   169  	0x96, 0xb6, 0x17, 0x3a, 0xe1, 0x77, 0xbd, 0x67, 0xfc, 0x46, 0xa0, 0xfb, 0x32, 0x8d, 0x0b, 0xf6,
   170  	0xb3, 0xf1, 0xd7, 0x05, 0xab, 0xf0, 0x27, 0xd0, 0xea, 0x6f, 0xc0, 0x76, 0xb4, 0xa8, 0xd8, 0x9e,
   171  	0x51, 0xd9, 0xdc, 0x64, 0x40, 0xde, 0xe4, 0xa5, 0x70, 0xba, 0x22, 0x5e, 0xc2, 0x07, 0xae, 0xa8,
   172  	0x71, 0x16, 0x1d, 0x0b, 0x56, 0xa9, 0x5a, 0xaf, 0xd1, 0x1e, 0xaf, 0xa9, 0x7a, 0x0b, 0xa5, 0xcb,
   173  	0x0c, 0xee, 0x13, 0x2a, 0xdb, 0x45, 0xa9, 0xca, 0x2f, 0x9a, 0xcb, 0xbe, 0xbb, 0x84, 0x17, 0xc9,
   174  	0xf8, 0x85, 0xe0, 0x95, 0xbb, 0x0a, 0x08, 0xcf, 0xe8, 0x73, 0x4f, 0x6b, 0xc1, 0xad, 0xe4, 0x19,
   175  	0x6d, 0xce, 0xa4, 0x4d, 0xdf, 0x2b, 0x3f, 0xa5, 0xee, 0x72, 0x7e, 0x86, 0x27, 0x41, 0x49, 0x03,
   176  	0x1a, 0x63, 0x78, 0xad, 0x14, 0x31, 0x40, 0xdf, 0xb5, 0xdd, 0x85, 0x4d, 0xf4, 0x1b, 0x3c, 0x80,
   177  	0x97, 0xf3, 0xa5, 0xeb, 0x78, 0x3a, 0x5a, 0x04, 0x30, 0xe6, 0x32, 0x35, 0x0f, 0x27, 0x41, 0x65,
   178  	0x46, 0x77, 0x29, 0x95, 0xe6, 0x3e, 0xde, 0x4a, 0x96, 0xb4, 0x83, 0x53, 0xfe, 0xdb, 0x67, 0x33,
   179  	0x49, 0x59, 0x75, 0x38, 0x6e, 0xeb, 0xa5, 0xa5, 0xc0, 0x56, 0x0b, 0x5b, 0x2d, 0x5c, 0x8f, 0xde,
   180  	0xb6, 0xdf, 0xbc, 0xcf, 0xfe, 0x06, 0x00, 0x00, 0xff, 0xff, 0xf1, 0xd3, 0xfe, 0xdb, 0x8c, 0x02,
   181  	0x00, 0x00,
   182  }