github.com/adnan-c/fabric_e2e_couchdb@v0.6.1-preview.0.20170228180935-21ce6b23cf91/common/mocks/configvalues/channel/orderer/sharedconfig.go (about) 1 /* 2 Copyright IBM Corp. 2016 All Rights Reserved. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 package sharedconfig 18 19 import ab "github.com/hyperledger/fabric/protos/orderer" 20 import "time" 21 22 // SharedConfig is a mock implementation of sharedconfig.SharedConfig 23 type SharedConfig struct { 24 // ConsensusTypeVal is returned as the result of ConsensusType() 25 ConsensusTypeVal string 26 // BatchSizeVal is returned as the result of BatchSize() 27 BatchSizeVal *ab.BatchSize 28 // BatchTimeoutVal is returned as the result of BatchTimeout() 29 BatchTimeoutVal time.Duration 30 // ChainCreationPolicyNamesVal is returned as the result of ChainCreationPolicyNames() 31 ChainCreationPolicyNamesVal []string 32 // KafkaBrokersVal is returned as the result of KafkaBrokers() 33 KafkaBrokersVal []string 34 // IngressPolicyNamesVal is returned as the result of IngressPolicyNames() 35 IngressPolicyNamesVal []string 36 // EgressPolicyNamesVal is returned as the result of EgressPolicyNames() 37 EgressPolicyNamesVal []string 38 } 39 40 // ConsensusType returns the ConsensusTypeVal 41 func (scm *SharedConfig) ConsensusType() string { 42 return scm.ConsensusTypeVal 43 } 44 45 // BatchSize returns the BatchSizeVal 46 func (scm *SharedConfig) BatchSize() *ab.BatchSize { 47 return scm.BatchSizeVal 48 } 49 50 // BatchTimeout returns the BatchTimeoutVal 51 func (scm *SharedConfig) BatchTimeout() time.Duration { 52 return scm.BatchTimeoutVal 53 } 54 55 // ChainCreationPolicyNames returns the ChainCreationPolicyNamesVal 56 func (scm *SharedConfig) ChainCreationPolicyNames() []string { 57 return scm.ChainCreationPolicyNamesVal 58 } 59 60 // KafkaBrokers returns the KafkaBrokersVal 61 func (scm *SharedConfig) KafkaBrokers() []string { 62 return scm.KafkaBrokersVal 63 } 64 65 // IngressPolicyNames returns the IngressPolicyNamesVal 66 func (scm *SharedConfig) IngressPolicyNames() []string { 67 return scm.IngressPolicyNamesVal 68 } 69 70 // EgressPolicyNames returns the EgressPolicyNamesVal 71 func (scm *SharedConfig) EgressPolicyNames() []string { 72 return scm.EgressPolicyNamesVal 73 }