github.com/kchristidis/fabric@v1.0.4-0.20171028114726-837acd08cde1/protos/msp/msp_principal.pb.go (about)

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