github.com/yacovm/fabric@v2.0.0-alpha.0.20191128145320-c5d4087dc723+incompatible/common/config/api.go (about) 1 /* 2 Copyright IBM Corp. 2017 All Rights Reserved. 3 4 SPDX-License-Identifier: Apache-2.0 5 */ 6 package config 7 8 import ( 9 cb "github.com/hyperledger/fabric-protos-go/common" 10 ) 11 12 // Config encapsulates config (channel or resource) tree 13 type Config interface { 14 // ConfigProto returns the current config 15 ConfigProto() *cb.Config 16 17 // ProposeConfigUpdate attempts to validate a new configtx against the current config state 18 ProposeConfigUpdate(configtx *cb.Envelope) (*cb.ConfigEnvelope, error) 19 } 20 21 // Manager provides access to the resource config 22 type Manager interface { 23 // GetChannelConfig defines methods that are related to channel configuration 24 GetChannelConfig(channel string) Config 25 }