github.com/yacovm/fabric@v2.0.0-alpha.0.20191128145320-c5d4087dc723+incompatible/common/mocks/resourcesconfig/resourcesconfig.go (about)

     1  /*
     2  Copyright IBM Corp. All Rights Reserved.
     3  
     4  SPDX-License-Identifier: Apache-2.0
     5  */
     6  
     7  package resourceconfig
     8  
     9  type MockChaincodeDefinition struct {
    10  	NameRv          string
    11  	VersionRv       string
    12  	EndorsementStr  string
    13  	ValidationStr   string
    14  	ValidationBytes []byte
    15  	HashRv          []byte
    16  }
    17  
    18  func (m *MockChaincodeDefinition) CCName() string {
    19  	return m.NameRv
    20  }
    21  
    22  func (m *MockChaincodeDefinition) Hash() []byte {
    23  	return m.HashRv
    24  }
    25  
    26  func (m *MockChaincodeDefinition) CCVersion() string {
    27  	return m.VersionRv
    28  }
    29  
    30  func (m *MockChaincodeDefinition) Validation() (string, []byte) {
    31  	return m.ValidationStr, m.ValidationBytes
    32  }
    33  
    34  func (m *MockChaincodeDefinition) Endorsement() string {
    35  	return m.EndorsementStr
    36  }
    37  
    38  func (m *MockChaincodeDefinition) ChaincodeID() string {
    39  	return m.NameRv + ":" + m.VersionRv
    40  }