github.com/ZihuaZhang/fabric-protos-go@v1.0.7/peer/collection.pb.go (about)

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // source: peer/collection.proto
     3  
     4  package peer
     5  
     6  import (
     7  	fmt "fmt"
     8  	proto "github.com/golang/protobuf/proto"
     9  	common "github.com/ZihuaZhang/fabric-protos-go/common"
    10  	math "math"
    11  )
    12  
    13  // Reference imports to suppress errors if they are not otherwise used.
    14  var _ = proto.Marshal
    15  var _ = fmt.Errorf
    16  var _ = math.Inf
    17  
    18  // This is a compile-time assertion to ensure that this generated file
    19  // is compatible with the proto package it is being compiled against.
    20  // A compilation error at this line likely means your copy of the
    21  // proto package needs to be updated.
    22  const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
    23  
    24  // CollectionConfigPackage represents an array of CollectionConfig
    25  // messages; the extra struct is required because repeated oneof is
    26  // forbidden by the protobuf syntax
    27  type CollectionConfigPackage struct {
    28  	Config               []*CollectionConfig `protobuf:"bytes,1,rep,name=config,proto3" json:"config,omitempty"`
    29  	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
    30  	XXX_unrecognized     []byte              `json:"-"`
    31  	XXX_sizecache        int32               `json:"-"`
    32  }
    33  
    34  func (m *CollectionConfigPackage) Reset()         { *m = CollectionConfigPackage{} }
    35  func (m *CollectionConfigPackage) String() string { return proto.CompactTextString(m) }
    36  func (*CollectionConfigPackage) ProtoMessage()    {}
    37  func (*CollectionConfigPackage) Descriptor() ([]byte, []int) {
    38  	return fileDescriptor_d8182e05ac5917d8, []int{0}
    39  }
    40  
    41  func (m *CollectionConfigPackage) XXX_Unmarshal(b []byte) error {
    42  	return xxx_messageInfo_CollectionConfigPackage.Unmarshal(m, b)
    43  }
    44  func (m *CollectionConfigPackage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    45  	return xxx_messageInfo_CollectionConfigPackage.Marshal(b, m, deterministic)
    46  }
    47  func (m *CollectionConfigPackage) XXX_Merge(src proto.Message) {
    48  	xxx_messageInfo_CollectionConfigPackage.Merge(m, src)
    49  }
    50  func (m *CollectionConfigPackage) XXX_Size() int {
    51  	return xxx_messageInfo_CollectionConfigPackage.Size(m)
    52  }
    53  func (m *CollectionConfigPackage) XXX_DiscardUnknown() {
    54  	xxx_messageInfo_CollectionConfigPackage.DiscardUnknown(m)
    55  }
    56  
    57  var xxx_messageInfo_CollectionConfigPackage proto.InternalMessageInfo
    58  
    59  func (m *CollectionConfigPackage) GetConfig() []*CollectionConfig {
    60  	if m != nil {
    61  		return m.Config
    62  	}
    63  	return nil
    64  }
    65  
    66  // CollectionConfig defines the configuration of a collection object;
    67  // it currently contains a single, static type.
    68  // Dynamic collections are deferred.
    69  type CollectionConfig struct {
    70  	// Types that are valid to be assigned to Payload:
    71  	//
    72  	//	*CollectionConfig_StaticCollectionConfig
    73  	Payload              isCollectionConfig_Payload `protobuf_oneof:"payload"`
    74  	XXX_NoUnkeyedLiteral struct{}                   `json:"-"`
    75  	XXX_unrecognized     []byte                     `json:"-"`
    76  	XXX_sizecache        int32                      `json:"-"`
    77  }
    78  
    79  func (m *CollectionConfig) Reset()         { *m = CollectionConfig{} }
    80  func (m *CollectionConfig) String() string { return proto.CompactTextString(m) }
    81  func (*CollectionConfig) ProtoMessage()    {}
    82  func (*CollectionConfig) Descriptor() ([]byte, []int) {
    83  	return fileDescriptor_d8182e05ac5917d8, []int{1}
    84  }
    85  
    86  func (m *CollectionConfig) XXX_Unmarshal(b []byte) error {
    87  	return xxx_messageInfo_CollectionConfig.Unmarshal(m, b)
    88  }
    89  func (m *CollectionConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
    90  	return xxx_messageInfo_CollectionConfig.Marshal(b, m, deterministic)
    91  }
    92  func (m *CollectionConfig) XXX_Merge(src proto.Message) {
    93  	xxx_messageInfo_CollectionConfig.Merge(m, src)
    94  }
    95  func (m *CollectionConfig) XXX_Size() int {
    96  	return xxx_messageInfo_CollectionConfig.Size(m)
    97  }
    98  func (m *CollectionConfig) XXX_DiscardUnknown() {
    99  	xxx_messageInfo_CollectionConfig.DiscardUnknown(m)
   100  }
   101  
   102  var xxx_messageInfo_CollectionConfig proto.InternalMessageInfo
   103  
   104  type isCollectionConfig_Payload interface {
   105  	isCollectionConfig_Payload()
   106  }
   107  
   108  type CollectionConfig_StaticCollectionConfig struct {
   109  	StaticCollectionConfig *StaticCollectionConfig `protobuf:"bytes,1,opt,name=static_collection_config,json=staticCollectionConfig,proto3,oneof"`
   110  }
   111  
   112  func (*CollectionConfig_StaticCollectionConfig) isCollectionConfig_Payload() {}
   113  
   114  func (m *CollectionConfig) GetPayload() isCollectionConfig_Payload {
   115  	if m != nil {
   116  		return m.Payload
   117  	}
   118  	return nil
   119  }
   120  
   121  func (m *CollectionConfig) GetStaticCollectionConfig() *StaticCollectionConfig {
   122  	if x, ok := m.GetPayload().(*CollectionConfig_StaticCollectionConfig); ok {
   123  		return x.StaticCollectionConfig
   124  	}
   125  	return nil
   126  }
   127  
   128  // XXX_OneofWrappers is for the internal use of the proto package.
   129  func (*CollectionConfig) XXX_OneofWrappers() []interface{} {
   130  	return []interface{}{
   131  		(*CollectionConfig_StaticCollectionConfig)(nil),
   132  	}
   133  }
   134  
   135  // StaticCollectionConfig constitutes the configuration parameters of a
   136  // static collection object. Static collections are collections that are
   137  // known at chaincode instantiation time, and that cannot be changed.
   138  // Dynamic collections are deferred.
   139  type StaticCollectionConfig struct {
   140  	// the name of the collection inside the denoted chaincode
   141  	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
   142  	// a reference to a policy residing / managed in the config block
   143  	// to define which orgs have access to this collection’s private data
   144  	MemberOrgsPolicy *CollectionPolicyConfig `protobuf:"bytes,2,opt,name=member_orgs_policy,json=memberOrgsPolicy,proto3" json:"member_orgs_policy,omitempty"`
   145  	// The minimum number of peers private data will be sent to upon
   146  	// endorsement. The endorsement would fail if dissemination to at least
   147  	// this number of peers is not achieved.
   148  	RequiredPeerCount int32 `protobuf:"varint,3,opt,name=required_peer_count,json=requiredPeerCount,proto3" json:"required_peer_count,omitempty"`
   149  	// The maximum number of peers that private data will be sent to
   150  	// upon endorsement. This number has to be bigger than required_peer_count.
   151  	MaximumPeerCount int32 `protobuf:"varint,4,opt,name=maximum_peer_count,json=maximumPeerCount,proto3" json:"maximum_peer_count,omitempty"`
   152  	// The number of blocks after which the collection data expires.
   153  	// For instance if the value is set to 10, a key last modified by block number 100
   154  	// will be purged at block number 111. A zero value is treated same as MaxUint64
   155  	BlockToLive uint64 `protobuf:"varint,5,opt,name=block_to_live,json=blockToLive,proto3" json:"block_to_live,omitempty"`
   156  	// The member only read access denotes whether only collection member clients
   157  	// can read the private data (if set to true), or even non members can
   158  	// read the data (if set to false, for example if you want to implement more granular
   159  	// access logic in the chaincode)
   160  	MemberOnlyRead bool `protobuf:"varint,6,opt,name=member_only_read,json=memberOnlyRead,proto3" json:"member_only_read,omitempty"`
   161  	// The member only write access denotes whether only collection member clients
   162  	// can write the private data (if set to true), or even non members can
   163  	// write the data (if set to false, for example if you want to implement more granular
   164  	// access logic in the chaincode)
   165  	MemberOnlyWrite bool `protobuf:"varint,7,opt,name=member_only_write,json=memberOnlyWrite,proto3" json:"member_only_write,omitempty"`
   166  	// a reference to a policy residing / managed in the config block
   167  	// to define the endorsement policy for this collection
   168  	EndorsementPolicy    *ApplicationPolicy `protobuf:"bytes,8,opt,name=endorsement_policy,json=endorsementPolicy,proto3" json:"endorsement_policy,omitempty"`
   169  	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
   170  	XXX_unrecognized     []byte             `json:"-"`
   171  	XXX_sizecache        int32              `json:"-"`
   172  }
   173  
   174  func (m *StaticCollectionConfig) Reset()         { *m = StaticCollectionConfig{} }
   175  func (m *StaticCollectionConfig) String() string { return proto.CompactTextString(m) }
   176  func (*StaticCollectionConfig) ProtoMessage()    {}
   177  func (*StaticCollectionConfig) Descriptor() ([]byte, []int) {
   178  	return fileDescriptor_d8182e05ac5917d8, []int{2}
   179  }
   180  
   181  func (m *StaticCollectionConfig) XXX_Unmarshal(b []byte) error {
   182  	return xxx_messageInfo_StaticCollectionConfig.Unmarshal(m, b)
   183  }
   184  func (m *StaticCollectionConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   185  	return xxx_messageInfo_StaticCollectionConfig.Marshal(b, m, deterministic)
   186  }
   187  func (m *StaticCollectionConfig) XXX_Merge(src proto.Message) {
   188  	xxx_messageInfo_StaticCollectionConfig.Merge(m, src)
   189  }
   190  func (m *StaticCollectionConfig) XXX_Size() int {
   191  	return xxx_messageInfo_StaticCollectionConfig.Size(m)
   192  }
   193  func (m *StaticCollectionConfig) XXX_DiscardUnknown() {
   194  	xxx_messageInfo_StaticCollectionConfig.DiscardUnknown(m)
   195  }
   196  
   197  var xxx_messageInfo_StaticCollectionConfig proto.InternalMessageInfo
   198  
   199  func (m *StaticCollectionConfig) GetName() string {
   200  	if m != nil {
   201  		return m.Name
   202  	}
   203  	return ""
   204  }
   205  
   206  func (m *StaticCollectionConfig) GetMemberOrgsPolicy() *CollectionPolicyConfig {
   207  	if m != nil {
   208  		return m.MemberOrgsPolicy
   209  	}
   210  	return nil
   211  }
   212  
   213  func (m *StaticCollectionConfig) GetRequiredPeerCount() int32 {
   214  	if m != nil {
   215  		return m.RequiredPeerCount
   216  	}
   217  	return 0
   218  }
   219  
   220  func (m *StaticCollectionConfig) GetMaximumPeerCount() int32 {
   221  	if m != nil {
   222  		return m.MaximumPeerCount
   223  	}
   224  	return 0
   225  }
   226  
   227  func (m *StaticCollectionConfig) GetBlockToLive() uint64 {
   228  	if m != nil {
   229  		return m.BlockToLive
   230  	}
   231  	return 0
   232  }
   233  
   234  func (m *StaticCollectionConfig) GetMemberOnlyRead() bool {
   235  	if m != nil {
   236  		return m.MemberOnlyRead
   237  	}
   238  	return false
   239  }
   240  
   241  func (m *StaticCollectionConfig) GetMemberOnlyWrite() bool {
   242  	if m != nil {
   243  		return m.MemberOnlyWrite
   244  	}
   245  	return false
   246  }
   247  
   248  func (m *StaticCollectionConfig) GetEndorsementPolicy() *ApplicationPolicy {
   249  	if m != nil {
   250  		return m.EndorsementPolicy
   251  	}
   252  	return nil
   253  }
   254  
   255  // Collection policy configuration. Initially, the configuration can only
   256  // contain a SignaturePolicy. In the future, the SignaturePolicy may be a
   257  // more general Policy. Instead of containing the actual policy, the
   258  // configuration may in the future contain a string reference to a policy.
   259  type CollectionPolicyConfig struct {
   260  	// Types that are valid to be assigned to Payload:
   261  	//
   262  	//	*CollectionPolicyConfig_SignaturePolicy
   263  	Payload              isCollectionPolicyConfig_Payload `protobuf_oneof:"payload"`
   264  	XXX_NoUnkeyedLiteral struct{}                         `json:"-"`
   265  	XXX_unrecognized     []byte                           `json:"-"`
   266  	XXX_sizecache        int32                            `json:"-"`
   267  }
   268  
   269  func (m *CollectionPolicyConfig) Reset()         { *m = CollectionPolicyConfig{} }
   270  func (m *CollectionPolicyConfig) String() string { return proto.CompactTextString(m) }
   271  func (*CollectionPolicyConfig) ProtoMessage()    {}
   272  func (*CollectionPolicyConfig) Descriptor() ([]byte, []int) {
   273  	return fileDescriptor_d8182e05ac5917d8, []int{3}
   274  }
   275  
   276  func (m *CollectionPolicyConfig) XXX_Unmarshal(b []byte) error {
   277  	return xxx_messageInfo_CollectionPolicyConfig.Unmarshal(m, b)
   278  }
   279  func (m *CollectionPolicyConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
   280  	return xxx_messageInfo_CollectionPolicyConfig.Marshal(b, m, deterministic)
   281  }
   282  func (m *CollectionPolicyConfig) XXX_Merge(src proto.Message) {
   283  	xxx_messageInfo_CollectionPolicyConfig.Merge(m, src)
   284  }
   285  func (m *CollectionPolicyConfig) XXX_Size() int {
   286  	return xxx_messageInfo_CollectionPolicyConfig.Size(m)
   287  }
   288  func (m *CollectionPolicyConfig) XXX_DiscardUnknown() {
   289  	xxx_messageInfo_CollectionPolicyConfig.DiscardUnknown(m)
   290  }
   291  
   292  var xxx_messageInfo_CollectionPolicyConfig proto.InternalMessageInfo
   293  
   294  type isCollectionPolicyConfig_Payload interface {
   295  	isCollectionPolicyConfig_Payload()
   296  }
   297  
   298  type CollectionPolicyConfig_SignaturePolicy struct {
   299  	SignaturePolicy *common.SignaturePolicyEnvelope `protobuf:"bytes,1,opt,name=signature_policy,json=signaturePolicy,proto3,oneof"`
   300  }
   301  
   302  func (*CollectionPolicyConfig_SignaturePolicy) isCollectionPolicyConfig_Payload() {}
   303  
   304  func (m *CollectionPolicyConfig) GetPayload() isCollectionPolicyConfig_Payload {
   305  	if m != nil {
   306  		return m.Payload
   307  	}
   308  	return nil
   309  }
   310  
   311  func (m *CollectionPolicyConfig) GetSignaturePolicy() *common.SignaturePolicyEnvelope {
   312  	if x, ok := m.GetPayload().(*CollectionPolicyConfig_SignaturePolicy); ok {
   313  		return x.SignaturePolicy
   314  	}
   315  	return nil
   316  }
   317  
   318  // XXX_OneofWrappers is for the internal use of the proto package.
   319  func (*CollectionPolicyConfig) XXX_OneofWrappers() []interface{} {
   320  	return []interface{}{
   321  		(*CollectionPolicyConfig_SignaturePolicy)(nil),
   322  	}
   323  }
   324  
   325  func init() {
   326  	proto.RegisterType((*CollectionConfigPackage)(nil), "protos.CollectionConfigPackage")
   327  	proto.RegisterType((*CollectionConfig)(nil), "protos.CollectionConfig")
   328  	proto.RegisterType((*StaticCollectionConfig)(nil), "protos.StaticCollectionConfig")
   329  	proto.RegisterType((*CollectionPolicyConfig)(nil), "protos.CollectionPolicyConfig")
   330  }
   331  
   332  func init() { proto.RegisterFile("peer/collection.proto", fileDescriptor_d8182e05ac5917d8) }
   333  
   334  var fileDescriptor_d8182e05ac5917d8 = []byte{
   335  	// 479 bytes of a gzipped FileDescriptorProto
   336  	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x93, 0xd1, 0x6a, 0xdb, 0x3e,
   337  	0x18, 0xc5, 0x9b, 0x7f, 0xd2, 0xb4, 0x55, 0xf8, 0xaf, 0x89, 0x46, 0x33, 0xaf, 0x17, 0x5b, 0xf0,
   338  	0x95, 0x19, 0xad, 0x33, 0xba, 0x27, 0x58, 0xc3, 0x20, 0xb0, 0xc0, 0x82, 0x3a, 0x18, 0xf4, 0xc6,
   339  	0x28, 0xf2, 0x57, 0x57, 0x54, 0x96, 0x5c, 0x49, 0xce, 0xe6, 0x77, 0xd9, 0xc3, 0x0e, 0x4b, 0x71,
   340  	0xed, 0x86, 0x5c, 0x25, 0x9c, 0xf3, 0x3b, 0x9f, 0x3e, 0x1d, 0x64, 0x74, 0x51, 0x00, 0xe8, 0x39,
   341  	0x53, 0x42, 0x00, 0xb3, 0x5c, 0xc9, 0xb8, 0xd0, 0xca, 0x2a, 0x3c, 0x74, 0x3f, 0xe6, 0xf2, 0x82,
   342  	0xa9, 0x3c, 0x57, 0x72, 0x5e, 0x28, 0xc1, 0x19, 0x07, 0xe3, 0xed, 0xcb, 0x89, 0x4b, 0x39, 0xb1,
   343  	0xf2, 0x52, 0xf8, 0x1d, 0xbd, 0x5b, 0xbc, 0x4c, 0x59, 0x28, 0xf9, 0xc0, 0xb3, 0x35, 0x65, 0x4f,
   344  	0x34, 0x03, 0xfc, 0x19, 0x0d, 0x99, 0x13, 0x82, 0xde, 0xac, 0x1f, 0x8d, 0x6e, 0x02, 0x1f, 0x31,
   345  	0xf1, 0x7e, 0x80, 0xec, 0xb8, 0xb0, 0x42, 0xe3, 0x7d, 0x0f, 0xdf, 0xa3, 0xc0, 0x58, 0x6a, 0x39,
   346  	0x4b, 0xda, 0x6d, 0x93, 0x97, 0xb9, 0xbd, 0x68, 0x74, 0xf3, 0xa1, 0x99, 0x7b, 0xe7, 0xb8, 0xfd,
   347  	0x09, 0xcb, 0x23, 0x32, 0x35, 0x07, 0x9d, 0xdb, 0x33, 0x74, 0x52, 0xd0, 0x4a, 0x28, 0x9a, 0x86,
   348  	0x7f, 0xfb, 0x68, 0x7a, 0x38, 0x8f, 0x31, 0x1a, 0x48, 0x9a, 0x83, 0x3b, 0xed, 0x8c, 0xb8, 0xff,
   349  	0x78, 0x85, 0x70, 0x0e, 0xf9, 0x06, 0x74, 0xa2, 0x74, 0x66, 0x12, 0x5f, 0x49, 0xf0, 0xdf, 0xeb,
   350  	0x7d, 0xda, 0x49, 0x6b, 0xe7, 0xef, 0x6e, 0x3b, 0xf6, 0xc9, 0x1f, 0x3a, 0x33, 0x5e, 0xc7, 0x31,
   351  	0x7a, 0xab, 0xe1, 0xb9, 0xe4, 0x1a, 0xd2, 0xa4, 0xae, 0x38, 0x61, 0xaa, 0x94, 0x36, 0xe8, 0xcf,
   352  	0x7a, 0xd1, 0x31, 0x99, 0x34, 0xd6, 0x1a, 0x40, 0x2f, 0x6a, 0x03, 0x5f, 0x21, 0x9c, 0xd3, 0x3f,
   353  	0x3c, 0x2f, 0xf3, 0x2e, 0x3e, 0x70, 0xf8, 0x78, 0xe7, 0xb4, 0x74, 0x88, 0xfe, 0xdf, 0x08, 0xc5,
   354  	0x9e, 0x12, 0xab, 0x12, 0xc1, 0xb7, 0x10, 0x1c, 0xcf, 0x7a, 0xd1, 0x80, 0x8c, 0x9c, 0xf8, 0x53,
   355  	0xad, 0xf8, 0x16, 0x70, 0x84, 0xc6, 0xcd, 0x7d, 0xa4, 0xa8, 0x12, 0x0d, 0x34, 0x0d, 0x86, 0xb3,
   356  	0x5e, 0x74, 0x4a, 0xde, 0xec, 0xb6, 0x95, 0xa2, 0x22, 0x40, 0x53, 0xfc, 0x09, 0x4d, 0xba, 0xe4,
   357  	0x6f, 0xcd, 0x2d, 0x04, 0x27, 0x0e, 0x3d, 0x6f, 0xd1, 0x5f, 0xb5, 0x8c, 0x97, 0x08, 0x83, 0x4c,
   358  	0x95, 0x36, 0x90, 0x83, 0xb4, 0x4d, 0x4b, 0xa7, 0xae, 0xa5, 0xf7, 0x4d, 0x4b, 0x5f, 0x8b, 0x42,
   359  	0x70, 0x46, 0xdb, 0x9a, 0xc8, 0xa4, 0x13, 0xf2, 0x52, 0xf8, 0x8c, 0xa6, 0x87, 0xdb, 0xc4, 0x2b,
   360  	0x34, 0x36, 0x3c, 0x93, 0xd4, 0x96, 0x1a, 0x9a, 0x13, 0xfc, 0xbb, 0xf8, 0x18, 0xfb, 0x57, 0x1c,
   361  	0xdf, 0x35, 0xbe, 0x0f, 0x7e, 0x93, 0x5b, 0x10, 0xaa, 0x80, 0xe5, 0x11, 0x39, 0x37, 0xaf, 0xad,
   362  	0xce, 0x8b, 0xb8, 0x25, 0x28, 0x54, 0x3a, 0x8b, 0x1f, 0xab, 0x02, 0xb4, 0x80, 0x34, 0x03, 0x1d,
   363  	0x3f, 0xd0, 0x8d, 0xe6, 0xac, 0x59, 0xbc, 0xae, 0xfe, 0xfe, 0x2a, 0xe3, 0xf6, 0xb1, 0xdc, 0xd4,
   364  	0x47, 0xcd, 0x3b, 0xe8, 0xdc, 0xa3, 0xd7, 0x1e, 0xbd, 0xce, 0xd4, 0xbc, 0xa6, 0x37, 0xfe, 0xfb,
   365  	0xfa, 0xf2, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x4e, 0x67, 0x04, 0x1f, 0x7f, 0x03, 0x00, 0x00,
   366  }